fish-shell/share/functions/__fish_is_first_arg.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

6 lines
178 B
Fish

# determine if this is the very first argument (regardless if switch or not)
function __fish_is_first_arg
set -l tokens (commandline -pxc)
test (count $tokens) -eq 1
end