2
0
Fork 0
mirror of https://github.com/fish-shell/fish-shell synced 2025-01-27 20:25:12 +00:00
fish-shell/share/functions/__fish_any_arg_in.fish

10 lines
233 B
Fish
Raw Normal View History

2019-10-20 19:07:26 +00:00
# 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)
2019-10-20 19:07:26 +00:00
contains -- $arg $haystack
and return 0
end
return 1
end