fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a53db7256
master
1# localization: skip(private) 2function __fish_nth_token --description'Prints the Nth token (ignoring command and switches/flags)' --argument-names n 3set -l tokens( commandline -px| string replace -r --filter'^([^-].*)' '$1' ) 4# Increment $n by one to account for ignoring the command 5if test ( count $tokens ) -ge ( math " $n " +1 ) 6echo $tokens [( math $n + 1 )] 7else 8return 1 9end 10end