fish-shell/share/functions/__fish_any_arg_in.fish
2019-10-29 19:13:31 +01:00

10 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 -opc)
contains -- $arg $haystack
and return 0
end
return 1
end