mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
__fish_seen_argument update:
- -p option use - quoting simplify - description add
This commit is contained in:
parent
294ed27590
commit
7f86794881
1 changed files with 3 additions and 3 deletions
|
@ -1,11 +1,11 @@
|
|||
function __fish_seen_argument
|
||||
function __fish_seen_argument --description 'Check whether argument used'
|
||||
argparse 's/short=+' 'o/old=+' 'l/long=+' -- $argv
|
||||
|
||||
set -l cmd (commandline -co)
|
||||
set -l cmd (commandline -poc)
|
||||
set -e cmd[1]
|
||||
for t in $cmd
|
||||
for s in $_flag_s
|
||||
if string match -qr "^-[A-z0-9]*"$s"[A-z0-9]*\$" -- $t
|
||||
if string match -qr "^-[A-z0-9]*$s[A-z0-9]*\$" -- $t
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue