mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 22:58:46 +00:00
11 lines
234 B
Fish
11 lines
234 B
Fish
|
function __fish_is_token_n --description 'Test if current token is on Nth place' --argument n
|
||
|
set -l num (count (commandline -poc))
|
||
|
#if test $cur
|
||
|
expr $n = $num + 1 > /dev/null
|
||
|
#else
|
||
|
#expr $n '=' $num + 1 > /dev/null
|
||
|
#end
|
||
|
|
||
|
|
||
|
end
|