zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/2] vcs_info git: Produce nicer applied-string messages for 'exec' actions.
@ 2016-09-23  6:47 Daniel Shahaf
  2016-09-23  6:47 ` [PATCH 2/2] _zed: Support the '--' end-of-options mark Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Shahaf @ 2016-09-23  6:47 UTC (permalink / raw)
  To: zsh-workers

This changes the behaviour on "unknown" git-rebase actions (those other
than pick/reword/edit/fixup/squash/execute).
---
 Functions/VCS_Info/Backends/VCS_INFO_get_data_git | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
index 472c10d..18ba89a 100644
--- a/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
+++ b/Functions/VCS_Info/Backends/VCS_INFO_get_data_git
@@ -213,8 +213,12 @@ elif [[ -d "${gitdir}/rebase-merge" ]]; then
     local p
     [[ -f "${patchdir}/done" ]] &&
     for p in ${(f)"$(< "${patchdir}/done")"}; do
-        # remove action
-        git_patches_applied+=("${${(s: :)p}[2,-1]}")
+        # pick/edit/fixup/squash/reword: Add "$hash $subject" to $git_patches_applied.
+        # exec: Add "exec ${command}" to $git_patches_applied.
+        # (anything else): As 'exec'.
+        p=${p/(#s)(p|pick|e|edit|r|reword|f|fixup|s|squash) /}
+        p=${p/(#s)x /exec }
+        git_patches_applied+=("$p")
     done
     if [[ -f "${patchdir}/git-rebase-todo" ]] ; then
         git_patches_unapplied=(${(f)"$(grep -v '^$' "${patchdir}/git-rebase-todo" | grep -v '^#')"})


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] _zed: Support the '--' end-of-options mark.
  2016-09-23  6:47 [PATCH 1/2] vcs_info git: Produce nicer applied-string messages for 'exec' actions Daniel Shahaf
@ 2016-09-23  6:47 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2016-09-23  6:47 UTC (permalink / raw)
  To: zsh-workers

This matters for fned'ing vcs_info hooks.
---
 Completion/Zsh/Command/_zed | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Completion/Zsh/Command/_zed b/Completion/Zsh/Command/_zed
index 184234b..211dae7 100644
--- a/Completion/Zsh/Command/_zed
+++ b/Completion/Zsh/Command/_zed
@@ -1,7 +1,9 @@
 #compdef zed fned
 
 case $service in
-(fned) _arguments ':shell function:_functions';;
-(zed) _arguments '(-):file:_files' \
-	'(:)-f[edit function]:shell function:_functions';;
+(fned) _arguments -S : ':shell function:_functions';;
+(zed) _arguments -S : \
+	'(- 2):file:_files' \
+	'(1):shell function:_functions' \
+	'(1)-f[edit function]';;
 esac


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-23  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-23  6:47 [PATCH 1/2] vcs_info git: Produce nicer applied-string messages for 'exec' actions Daniel Shahaf
2016-09-23  6:47 ` [PATCH 2/2] _zed: Support the '--' end-of-options mark Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).