mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +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
|
||||
argparse 's/short=+' 'l/long=+' -- $argv
|
||||
argparse 's/short=+' 'o/old=+' 'l/long=+' -- $argv
|
||||
|
||||
set cmd (commandline -co)
|
||||
set -e cmd[1]
|
||||
|
@ -10,6 +10,12 @@ function __fish_seen_argument
|
|||
end
|
||||
end
|
||||
|
||||
for o in $_flag_o
|
||||
if string match -qr "^-$s\$" -- $t
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
for l in $_flag_l
|
||||
if string match -q -- "--$l" $t
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue