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

Part of #11833
2025-09-30 11:47:26 +02:00

11 lines
321 B
Fish

# localization: skip(private)
# Retrieves the first non-switch argument from the command line buffer
function __fish_first_token
set -l tokens (commandline -cx)
set -e tokens[1]
set -l tokens (string replace -r --filter '^([^-].*)' '$1' -- $tokens)
if set -q tokens[1]
echo $tokens[1]
end
end