Files
fish-shell/share/functions/__fish_prev_arg_in.fish
Johannes Altmanninger 2c0e912fe1 Mark private functions that don't need localization
See the next commit.

Part of #11833

(cherry picked from commit a53db72564)
2025-09-30 11:52:41 +02:00

18 lines
431 B
Fish

# localization: skip(private)
# returns 0 only if previous argument is one of the supplied arguments
function __fish_prev_arg_in
set -l tokens (commandline -cx)
set -l tokenCount (count $tokens)
if test $tokenCount -lt 2
# need at least cmd and prev argument
return 1
end
for arg in $argv
if string match -q -- $tokens[-1] $arg
return 0
end
end
return 1
end