fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMark private functions that don't need localizationa53db7256

master
315 B6 linesraw
1# localization: skip(private)
2function __fish_is_nth_token --description 'Test if current token is the Nth (ignoring command and switches/flags)' --argument-names n
3    set -l tokens (commandline -pxc)
4    set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens)
5    test (count $tokens) -eq "$n"
6end