summaryrefslogtreecommitdiff
path: root/Completion
diff options
context:
space:
mode:
authorEisuke Kawashima <e-kwsm@users.noreply.github.com>2024-04-03 00:36:22 +0900
committerOliver Kiddle <opk@zsh.org>2025-01-30 13:02:39 +0100
commit8cddd97297365f91e0f816f5364e06f77b0a2358 (patch)
tree239e1bdc675d82d653f853f88b5a9e3db914114d /Completion
parent13417c27014aee0bb201988ecd81421f2e987c8c (diff)
downloadzsh-8cddd97297365f91e0f816f5364e06f77b0a2358.tar.gz
zsh-8cddd97297365f91e0f816f5364e06f77b0a2358.zip
github #118: completion(git-rebase): non-interactive mode also supports --autosquash
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_git11
1 files changed, 2 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a442b45d2..702360ef3 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1565,14 +1565,6 @@ _git-range-diff () {
(( $+functions[_git-rebase] )) ||
_git-rebase () {
- local -a autosquash_opts
-
- if (( words[(I)-i|--interactive] )); then
- autosquash_opts=(
- '( --no-autosquash)--autosquash[check for auto-squash boundaries]'
- '(--autosquash )--no-autosquash[do not check for auto-squash boundaries]')
- fi
-
_arguments -s -S $endopt \
- actions \
'(-)--continue[continue after resolving merge conflict]' \
@@ -1605,7 +1597,8 @@ _git-rebase () {
'(--apply --whitespace -C)*'{-s+,--strategy=}'[use given merge strategy]:merge strategy:__git_merge_strategies' \
'(--apply --whitespace -C)*'{-X+,--strategy-option=}'[pass merge-strategy-specific option to merge strategy]: :_git_strategy_options' \
'(1 --keep-base --fork-point)--root[rebase all reachable commits]' \
- $autosquash_opts \
+ '(--no-autosquash)--autosquash[check for auto-squash boundaries]' \
+ "(--autosquash)--no-autosquash[don't check for auto-squash boundaries]" \
'(--autostash --no-autostash)--autostash[stash uncommitted changes before rebasing and apply them afterwards]' \
"(--autostash --no-autostash)--no-autostash[don't stash uncommitted changes before rebasing and apply them afterwards]" \
'(--root)--fork-point[use merge-base --fork-point to refine upstream]' \