-
Notifications
You must be signed in to change notification settings - Fork 2.1k
complete --force-files does not work without options #7920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What you want is to reenable files, like complete -c wormhole -n "__fish_seen_subcommand_from send" -r -F |
This doesn't seem right, I see it returning directories and files: ❯ __fish_complete_path ~/forks/fish-shell/
/Users/andy/forks/fish-shell/BSDmakefile
/Users/andy/forks/fish-shell/CHANGELOG.rst
/Users/andy/forks/fish-shell/CMakeLists.txt
/Users/andy/forks/fish-shell/CODE_OF_CONDUCT.md
/Users/andy/forks/fish-shell/CONTRIBUTING.rst
/Users/andy/forks/fish-shell/COPYING
/Users/andy/forks/fish-shell/Dockerfile
/Users/andy/forks/fish-shell/GNUmakefile
/Users/andy/forks/fish-shell/README.rst
/Users/andy/forks/fish-shell/benchmarks/
/Users/andy/forks/fish-shell/build/
/Users/andy/forks/fish-shell/build,/
/Users/andy/forks/fish-shell/build_tools/
/Users/andy/forks/fish-shell/cmake/
/Users/andy/forks/fish-shell/config_cmake.h.in
/Users/andy/forks/fish-shell/debian/
/Users/andy/forks/fish-shell/doc_src/
/Users/andy/forks/fish-shell/docker/
/Users/andy/forks/fish-shell/etc/
/Users/andy/forks/fish-shell/fish.desktop
/Users/andy/forks/fish-shell/fish.pc.in
/Users/andy/forks/fish-shell/fish.png
/Users/andy/forks/fish-shell/fish.spec.in
/Users/andy/forks/fish-shell/osx/
/Users/andy/forks/fish-shell/pcre2/
/Users/andy/forks/fish-shell/po/
/Users/andy/forks/fish-shell/share/
/Users/andy/forks/fish-shell/src/
/Users/andy/forks/fish-shell/tests/
With this, |
Oh, sorry, no, I misunderstood So What This is an awkward interface, but it's also unnecessary given that Unfortunately that has a bug and only works with options (so if |
Ah thanks that would explain that! I'm still confused by the behavior of
This still doesn't complete anything for complete -e -c wormhole
complete --no-files -c wormhole
complete -c wormhole -n __fish_use_subcommand -a send -d "Send a text message, file, or directory"
complete -c wormhole -n "__fish_seen_subcommand_from send" -r -a '(__fish_complete_path (commandline -ct))'
# This isn't a real option to wormhole but demonstrates the inconsistency
complete -c wormhole -l send -r -a '(__fish_complete_path (commandline -ct))' e.g.: ❯ complete -C 'wormhole send ~/forks/fish-shell/' vs. ❯ complete -C 'wormhole --send ~/forks/fish-shell/'
~/forks/fish-shell/benchmarks/
~/forks/fish-shell/BSDmakefile
~/forks/fish-shell/build,/
~/forks/fish-shell/build/
~/forks/fish-shell/build_tools/
~/forks/fish-shell/CHANGELOG.rst
~/forks/fish-shell/cmake/
~/forks/fish-shell/CMakeLists.txt
~/forks/fish-shell/CODE_OF_CONDUCT.md
~/forks/fish-shell/config_cmake.h.in
~/forks/fish-shell/CONTRIBUTING.rst
~/forks/fish-shell/COPYING
~/forks/fish-shell/debian/
~/forks/fish-shell/doc_src/
~/forks/fish-shell/docker/
~/forks/fish-shell/Dockerfile
~/forks/fish-shell/etc/
~/forks/fish-shell/fish.desktop
~/forks/fish-shell/fish.pc.in
~/forks/fish-shell/fish.png
~/forks/fish-shell/fish.spec.in
~/forks/fish-shell/GNUmakefile
~/forks/fish-shell/osx/
~/forks/fish-shell/pcre2/
~/forks/fish-shell/po/
~/forks/fish-shell/README.rst
~/forks/fish-shell/share/
~/forks/fish-shell/src/
~/forks/fish-shell/tests/ |
Yes, this is because the Anyway, I've just pushed a fix for that pesky |
Ahhhhh, got it.
Thanks for the fast fix! |
fish version: 3.2.2
I'm trying to write completions for magic-wormhole and I'm struggling to complete paths outside of the current directory using
__fish_complete_path
with this completion file:wormhole send <tab>
it starts completing files in the current directory, as expected.wormhole send ~/<tab>
, it doesn't complete anything, but I would expect it to complete the contents of my home directorywormhole --send ~/<tab>
, it starts completing the contents of my home directoryIs there a way to get
wormhole send ~/<tab>
to complete the contents of my home directory? I'm also very confused why-a "(__fish_complete_path)"
is behaving differently with a long option vs a subcommand.The text was updated successfully, but these errors were encountered: