mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 13:23:53 +08:00
7 lines
201 B
Fish
7 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
|