From 8cddd97297365f91e0f816f5364e06f77b0a2358 Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Wed, 3 Apr 2024 00:36:22 +0900 Subject: github #118: completion(git-rebase): non-interactive mode also supports --autosquash --- Completion/Unix/Command/_git | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Completion/Unix/Command/_git') 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]' \ -- cgit v1.2.3