1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 10:01:11 +02:00

github #118: completion(git-rebase): non-interactive mode also supports --autosquash

This commit is contained in:
Eisuke Kawashima 2024-04-03 00:36:22 +09:00 committed by Oliver Kiddle
parent 13417c2701
commit 8cddd97297
2 changed files with 5 additions and 9 deletions

View file

@ -1,5 +1,8 @@
2025-01-30 Oliver Kiddle <opk@zsh.org> 2025-01-30 Oliver Kiddle <opk@zsh.org>
* github #118: Eisuke Kawashima: Completion/Unix/Command/_git:
git rebase non-interactive mode also supports --autosquash
* 53338: Completion/Zsh/Command/_typeset: complete typeset -n option * 53338: Completion/Zsh/Command/_typeset: complete typeset -n option
* 53337: Doc/Zsh/mod_ksh93.yo, Src/Modules/ksh93.c: allow nameref -p * 53337: Doc/Zsh/mod_ksh93.yo, Src/Modules/ksh93.c: allow nameref -p

View file

@ -1565,14 +1565,6 @@ _git-range-diff () {
(( $+functions[_git-rebase] )) || (( $+functions[_git-rebase] )) ||
_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 \ _arguments -s -S $endopt \
- actions \ - actions \
'(-)--continue[continue after resolving merge conflict]' \ '(-)--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)*'{-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' \ '(--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]' \ '(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)--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]" \ "(--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]' \ '(--root)--fork-point[use merge-base --fork-point to refine upstream]' \