* [PATCH 0/2] completion: zsh wrapper cleanups
@ 2013-05-08 7:36 Felipe Contreras
2013-05-08 7:37 ` [PATCH 1/2] completion: cleanup zsh wrapper Felipe Contreras
2013-05-08 7:37 ` [PATCH 2/2] completion: synchronize " Felipe Contreras
0 siblings, 2 replies; 3+ messages in thread
From: Felipe Contreras @ 2013-05-08 7:36 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Manlio Perillo, Felipe Contreras
Hi,
Nothing fancy, just some cleanups for the minimal zsh backup wrapper in bash's
completion code.
Felipe Contreras (2):
completion: cleanup zsh wrapper
completion: synchronize zsh wrapper
contrib/completion/git-completion.bash | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
--
1.8.3.rc1.553.gac13664
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] completion: cleanup zsh wrapper
2013-05-08 7:36 [PATCH 0/2] completion: zsh wrapper cleanups Felipe Contreras
@ 2013-05-08 7:37 ` Felipe Contreras
2013-05-08 7:37 ` [PATCH 2/2] completion: synchronize " Felipe Contreras
1 sibling, 0 replies; 3+ messages in thread
From: Felipe Contreras @ 2013-05-08 7:37 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Manlio Perillo, Felipe Contreras
There's no need for a separate function; we can call
'emulate -k ksh func'.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
contrib/completion/git-completion.bash | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b97162f..84dbf19 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2689,21 +2689,13 @@ if [[ -n ${ZSH_VERSION-} ]]; then
compadd -Q -p "${2-}" -f -- ${=1} && _ret=0
}
- __git_zsh_helper ()
- {
- emulate -L ksh
- local cur cword prev
- cur=${words[CURRENT-1]}
- prev=${words[CURRENT-2]}
- let cword=CURRENT-1
- __${service}_main
- }
-
_git ()
{
- emulate -L zsh
- local _ret=1
- __git_zsh_helper
+ local _ret=1 cur cword prev
+ cur=${words[CURRENT]}
+ prev=${words[CURRENT-1]}
+ let cword=CURRENT-1
+ emulate ksh -c __${service}_main
let _ret && _default -S '' && _ret=0
return _ret
}
--
1.8.3.rc1.553.gac13664
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] completion: synchronize zsh wrapper
2013-05-08 7:36 [PATCH 0/2] completion: zsh wrapper cleanups Felipe Contreras
2013-05-08 7:37 ` [PATCH 1/2] completion: cleanup zsh wrapper Felipe Contreras
@ 2013-05-08 7:37 ` Felipe Contreras
1 sibling, 0 replies; 3+ messages in thread
From: Felipe Contreras @ 2013-05-08 7:37 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Manlio Perillo, Felipe Contreras
So it's closer to the full zsh wrapper.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
contrib/completion/git-completion.bash | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 84dbf19..b61f6c2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2663,7 +2663,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
--*=*|*.) ;;
*) c="$c " ;;
esac
- array[$#array+1]="$c"
+ array+=("$c")
done
compset -P '*[=:]'
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
@@ -2696,7 +2696,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
prev=${words[CURRENT-1]}
let cword=CURRENT-1
emulate ksh -c __${service}_main
- let _ret && _default -S '' && _ret=0
+ let _ret && _default && _ret=0
return _ret
}
--
1.8.3.rc1.553.gac13664
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-08 7:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-08 7:36 [PATCH 0/2] completion: zsh wrapper cleanups Felipe Contreras
2013-05-08 7:37 ` [PATCH 1/2] completion: cleanup zsh wrapper Felipe Contreras
2013-05-08 7:37 ` [PATCH 2/2] completion: synchronize " Felipe Contreras
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).