Open cjappl opened 3 months ago
@folliehiyuki just pinging you here as you wrote the original version. I'm going to dig in more at some point, but perhaps in your expertise you see the problem right away :)
Completion in fish shell is explicit. Since no completion for blame
subcommand is defined in the current completion file, it behaves correctly in this case (providing nothing).
It seems like we're trying to pass completion items of git blame
to git-forgit blame
, which is kind of tricky. fish's complete
function has -w|--wraps
flag to deal with alias completion, but it doesn't work with other complete
's flags apparently.
What I've tried:
# This copies all the completion arguments of `git blame` to `git-forgit`, ignoring the
# blame subcommand requirement
complete -c git-forgit -n '__fish_seen_subcommand_from blame' -w 'git blame'
# This pass all the completion items of `git` to `git-forgit`, with redundant completion
# items, which is not what we desire
complete -c git-forgit -w git
Can you try filling an issue upstream? Maybe they will add support for our use case. Also, it might already be possible but my fish-fu is not good enough to let me figure it out.
Good investigation. I'll see if I can dive in at some point and figure out if there is a workaround or we need to file a ticket. Thanks for spending some time!!
This has been merged, our monthly release goes out in a few days. I'll check it then (because we have a big refactor going through with that release I don't want to push it early)
Environment info
Problem / Steps to reproduce
Full fish completions are relatively new, but some of them are behaving strangely.
Ideally, when you do something like
You get all the flags available to pass into git blame:
Instead you get:
Nothing.
It seems like we are completing the files correctly, but not wrapping the flags. Filing this for the future