fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a53db7256
master
1# localization: skip(private) 2function __fish_seen_argument --description'Check whether argument is used' 3argparse --move-unknown's/short=+&' 'o/old=+&' 'l/long=+&' 'w/windows=+&' --$argv 4 5set --local tokens( commandline --current-process --tokens-expanded --cut-at-cursor) 6set --erase tokens[ 1 ] 7 8for tin $tokens 9for sin $_flag_s 10if string match --regex --quiet --"^-[A-z0-9]*" $s "[A-z0-9]*\$" $t 11return 0 12end 13end 14 15for oin $_flag_o 16if string match --quiet --"- $o " $t 17return 0 18end 19end 20 21for lin $_flag_l 22# Make sure to only prefix-match --foo=bar style tokens 23if string match --quiet --"-- $l " ( string replace -r --'^(--.*?)=.*' '$1' $t ) 24return 0 25end 26end 27 28for win $_flag_w 29if string match --quiet --"/ $w " $t 30return 0 31end 32end 33 34for raw_argin $argv_opts $argv 35if string match --quiet --$t $raw_arg 36return 0 37end 38end 39end 40 41return 1 42end