fish-shell/share/functions/__fish_is_nth_token.fish
Mahmoud Al-Qudsi de47a096e8 Add udevadm completions
[ci skip]
2020-07-01 09:27:20 -05:00

6 lines
201 B
Fish

function __fish_is_nth_token
set -l n $argv[1]
set -l tokens (commandline -poc)
set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens)
test (count $tokens) -eq "$n"
end