* PATCH: Use new array syntax in _getconf
@ 2012-04-27 7:13 Mikael Magnusson
2012-04-27 15:22 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2012-04-27 7:13 UTC (permalink / raw)
To: zsh-workers
tried git grep --cached '(j\(.\)|\1)' and looked through the matches, this
was the only one that was obvious (to me) to convert to the new syntax.
---
Completion/Unix/Command/_getconf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_getconf b/Completion/Unix/Command/_getconf
index 76d9c76..f2c713a 100644
--- a/Completion/Unix/Command/_getconf
+++ b/Completion/Unix/Command/_getconf
@@ -27,7 +27,7 @@ if [[ CURRENT -eq 2 ]]; then
_tags syswideconfig pathconfig standardsconfig confstring restconfig
allkeys=(${${(f)"$(getconf -a 2>/dev/null)"}%%[: ]*})
- restkeys=(${allkeys:#(${(j.|.)~mykeys})})
+ restkeys=(${allkeys:|mykeys})
while _tags; do
_requested -V syswideconfig expl 'systemwide configuration variables' \
--
1.7.10.GIT
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: Use new array syntax in _getconf
2012-04-27 7:13 PATCH: Use new array syntax in _getconf Mikael Magnusson
@ 2012-04-27 15:22 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2012-04-27 15:22 UTC (permalink / raw)
To: zsh-workers
On Apr 27, 9:13am, Mikael Magnusson wrote:
}
} tried git grep --cached '(j\(.\)|\1)' and looked through the matches, this
} was the only one that was obvious (to me) to convert to the new syntax.
Yeah, the other places are going to be non-obvious -- pipes into grep,
or loops over the array.
I think in previoius email I was remembering the inner "for" loop in
__git_files_relative, but now I look again that's doing character slices,
not real arrays. Similar application of pattern matching but not really
applicable to this new syntax.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-27 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 7:13 PATCH: Use new array syntax in _getconf Mikael Magnusson
2012-04-27 15:22 ` Bart Schaefer
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).