mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
Patch __fish_seen_argument to support --foo=arg
...when searching for long arguments by name/key. Closes #10615.
This commit is contained in:
parent
936f7d9b8d
commit
6020fc497a
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,8 @@ function __fish_seen_argument --description 'Check whether argument is used'
|
||||||
end
|
end
|
||||||
|
|
||||||
for l in $_flag_l
|
for l in $_flag_l
|
||||||
if string match --quiet -- "--$l" $t
|
# Make sure to only prefix-match --foo=bar style tokens
|
||||||
|
if string match --quiet -- "--$l" (string replace -r -- '^(--.*?)=.*' '$1' $t)
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue