jorgebucaran / fisher

A plugin manager for Fish
https://git.io/fisher
MIT License
7.7k stars 263 forks source link

Autocompletions don't work when passing variables on the command line #703

Closed alexrutar closed 2 years ago

alexrutar commented 2 years ago

Autocompletions don't work when, (for example) manually specifying $fisher_path:

fisher_path=/some/nice/path fisher [TAB]

does not offer the usual options.

This should be easy to fix: the fish completion tutorial seems to suggest something like set --local fisher_subcommands install update remove list and then using

not __fish_seen_subcommand_from $fisher_subcommands

as the condition, instead of __fish_use_subcommand.

However, I am inclined to see this as an upstream issue with __fish_use_subcommand.

jorgebucaran commented 2 years ago

I'm keen on fixing this for our use-case here this time. Nice catch!

alexrutar commented 2 years ago

I'm not sure if this is the fix you necessarily want, but for convenience I've added this pull request with what I stated in the first comment!

jorgebucaran commented 2 years ago

Welp, can't reproduce this issue. Fisher completions work just fine.

スクリーンショット 2022-04-12 20 31 40 スクリーンショット 2022-04-12 20 32 46
alexrutar commented 2 years ago

Tested it too on my device, looks like fish has fixed the upstream issue. Thanks!