mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-28 20:55: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
|
argparse 's/short=+' 'o/old=+' 'l/long=+' -- $argv
|
||||||
|
|
||||||
set -l cmd (commandline -co)
|
set -l cmd (commandline -poc)
|
||||||
set -e cmd[1]
|
set -e cmd[1]
|
||||||
for t in $cmd
|
for t in $cmd
|
||||||
for s in $_flag_s
|
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
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue