From dd1f8489a7ec70c600d729bccb39be4a62f77fb0 Mon Sep 17 00:00:00 2001 From: "Z. Grace Moreau" Date: Sat, 2 Nov 2019 13:40:40 -0600 Subject: [PATCH] add -o/--old to __fish_seen_argument --- share/functions/__fish_seen_argument.fish | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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