diff --git a/share/functions/fish_is_nth_token.fish b/share/functions/fish_is_nth_token.fish index c3f23cf53..907caae71 100644 --- a/share/functions/fish_is_nth_token.fish +++ b/share/functions/fish_is_nth_token.fish @@ -1,4 +1,4 @@ -function fish_is_nth_token --description 'Test if current token is on Nth place' --argument-names n +function fish_is_nth_token --description 'Test if current token is the Nth (ignoring command and switches/flags)' --argument-names n set -l tokens (commandline -poc) set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens) test (count $tokens) -eq "$n"