Complete custom "git-foo" commands from "git foo" commandlines by krobelus · Pull Request #7652 · fish-shell/fish-shell
Since fish-shell#7075, git-foo.fish files are sourced when Git completions are loaded. However, at least Cobra (CLI framework for Go) provides completions like complete git-foo ... This means that completions are only offered when typing "git-foo <TAB>" and not on "git foo <TAB>". Fix this by forwarding the completion requests. Take care to only forward if there are actually completions for "git-foo", to avoid adding filename completions.
krobelus added a commit that referenced this pull request
Feb 2, 2021Some third party Git tools provide a man page, which we can at least use for completing options. The old logic excluded all generated completions for Git subcommands. Instead, try to load completions for all available external subcommands. We can use $PATH/git-* because /bin/git-add and friends were removed in Git 1.6.0 in 2008. Closes #4358 (the "git-foo" wrapping was added in #7652)
github-actions
bot
locked as resolved and limited conversation to collaborators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters