__fish_seen_subcommand_from: fix regression causing false negatives given multiple arguments

Fixes 2bfa7db7bc (Restructure __fish_seen_subcommand_from, 2024-07-07)
Fixes #11685
This commit is contained in:
Johannes Altmanninger
2025-07-26 13:04:51 +02:00
parent 30ff3710a0
commit 4412164fd4

View File

@@ -6,5 +6,5 @@
function __fish_seen_subcommand_from
set -l regex (string escape --style=regex -- (commandline -pxc)[2..] | string join '|')
string match -rq -- "^$regex"'$' $argv
string match -rq -- "^($regex)\$" $argv
end