mirror of
https://github.com/fish-shell/fish-shell
synced 2024-09-22 07:21:55 +00:00
add -o/--old to __fish_seen_argument
This commit is contained in:
parent
5ece4481a5
commit
dd1f8489a7
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
function __fish_seen_argument
|
function __fish_seen_argument
|
||||||
argparse 's/short=+' 'l/long=+' -- $argv
|
argparse 's/short=+' 'o/old=+' 'l/long=+' -- $argv
|
||||||
|
|
||||||
set cmd (commandline -co)
|
set cmd (commandline -co)
|
||||||
set -e cmd[1]
|
set -e cmd[1]
|
||||||
|
@ -10,6 +10,12 @@ function __fish_seen_argument
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for o in $_flag_o
|
||||||
|
if string match -qr "^-$s\$" -- $t
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for l in $_flag_l
|
for l in $_flag_l
|
||||||
if string match -q -- "--$l" $t
|
if string match -q -- "--$l" $t
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue