Skip to content
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

Custom git command completion seems to be broken in 3.6 #9457

Closed
jaminthorns opened this issue Jan 9, 2023 · 1 comment
Closed

Custom git command completion seems to be broken in 3.6 #9457

jaminthorns opened this issue Jan 9, 2023 · 1 comment
Labels
regression Something that used to work, but was broken, especially between releases
Milestone

Comments

@jaminthorns
Copy link

The new 3.6 release is fantastic! Upon upgrading, though, I noticed that completions for my custom git commands are no longer working. I have a few commands that augment certain git commands, and I get completions for them by wrapping their corresponding git commands using the -w flag (previously discussed here). I have these completions set in a conf.d file:

complete -c git-branches -w "git branch"
complete -c git-branches -s o -l graph-options -d "Options for the 'git graph' view"

complete -c git-compare -w "git diff"
complete -c git-compare -s p -l path -d "Show only changes from specified path"

complete -c git-history -w "git log"
complete -c git-history -s p -l path -d "Show only commits and changes from specified path"
complete -c git-history -s o -l show-options -d "Options for the 'git show' view"

complete -c git-stashes -w "git stash"
complete -c git-history -s o -l stash-show-options -d "Options for the 'git stash show' view"

complete -c git-view -w "git show"
complete -c git-view -s p -l path -d "Show only changes from specified path"

These completions don't seem to work at all anymore. My guess is that it might be due to the recent change for caching commands in share/completions/git.fish.

@faho
Copy link
Member

faho commented Jan 9, 2023

My guess is that it might be due to the recent change for caching commands in share/completions/git.fish.

Nope, it's down to us expecting git git-branches, not git branches. Broken in f5711ad.

@faho faho added regression Something that used to work, but was broken, especially between releases and removed needs more info labels Jan 9, 2023
@faho faho added this to the fish 3.6.1 milestone Jan 9, 2023
@faho faho closed this as completed in 2da1a4a Jan 9, 2023
zanchey pushed a commit that referenced this issue Jan 11, 2023
Broken in f5711ad, this neglected to
remove the `git-` part from the command

Fixes #9457.

(cherry picked from commit 2da1a4a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Something that used to work, but was broken, especially between releases
Projects
None yet
Development

No branches or pull requests

2 participants