diff --git a/share/functions/__fish_seen_argument.fish b/share/functions/__fish_seen_argument.fish index 877554dfd..2f8704387 100644 --- a/share/functions/__fish_seen_argument.fish +++ b/share/functions/__fish_seen_argument.fish @@ -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