diff options
| author | Markus Kurtz <m@mgkurtz.de> | 2025-09-02 09:36:30 +0200 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2025-09-24 00:57:06 +0200 |
| commit | 8f4002a1e4d8381945b0fa0fec4a1b479acd93b4 (patch) | |
| tree | 06fecc0eb7b6cf7f111bf6f3bdf07a3e8d253b79 | |
| parent | github #142: Fix text for git merge --squash/--no-squash (diff) | |
| download | zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.tar zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.tar.gz zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.tar.bz2 zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.tar.lz zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.tar.xz zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.tar.zst zsh-8f4002a1e4d8381945b0fa0fec4a1b479acd93b4.zip | |
github #143: list only remote branches for `git checkout --guess`
| -rw-r--r-- | ChangeLog | 3 | ||||
| -rw-r--r-- | Completion/Unix/Command/_git | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2025-09-24 Oliver Kiddle <opk@zsh.org> + * Markus Kurtz: github #143: Completion/Unix/Command/_git: + list only remote branches for `git checkout --guess` + * Elliot Berman: github #142: Completion/Unix/Command/_git: fix text for git merge --squash/--no-squash diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index d6420e77a..fdf35b2f5 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -517,6 +517,10 @@ _git-checkout () { _alternative remote-branches::__git_remote_branch_names && ret=0 elif [[ -n ${opt_args[(I)--ours|--theirs|-m|--conflict|--patch|--no-guess]} ]]; then _alternative $tree_ish_arg $file_arg && ret=0 + elif [[ -n ${opt_args[(i)--guess]} ]]; then + # --guess is the default but if it has been explicitly specified, + # we'll only complete remote branches + __git_remote_branch_names_noprefix && ret=0 else _alternative \ $file_arg \ |
