fish-shell/share/functions/__fish_any_arg_in.fish
Johannes Altmanninger 29f35d6cdf completion: adopt commandline -x replacing deprecated -o
This gives us more accurate completions because completion scripts get
expanded paths
2024-01-27 09:28:06 +01:00

9 lines
233 B
Fish

# returns 0 only if any argument is on of the supplied arguments
function __fish_any_arg_in
set -l haystack $argv
for arg in (commandline -xpc)
contains -- $arg $haystack
and return 0
end
return 1
end