mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 17:06:59 +08:00
6 lines
229 B
Fish
6 lines
229 B
Fish
function __fish_is_token_n --description 'Test if current token is on Nth place' --argument n
|
|
# Add a fake element to increment without calling math
|
|
set -l num (count (commandline -poc) additionalelement)
|
|
test $n -eq $num
|
|
end
|