Clarify fish_is_nth_token description

Yes, this does make it longer but it's a very important point.
This commit is contained in:
Mahmoud Al-Qudsi 2022-02-07 12:56:27 -06:00
parent 8d386a27f3
commit 99e0aa3c64

View file

@ -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"