mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 15:37:59 +08:00
__fish_seen_argument update:
- -p option use - quoting simplify - description add
This commit is contained in:
parent
294ed27590
commit
7f86794881
|
@ -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 New Issue
Block a user