* PATCH: _dput tweak
@ 2001-11-18 20:22 Clint Adams
0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2001-11-18 20:22 UTC (permalink / raw)
To: zsh-workers
We don't need to use grep and sed.
Index: Completion/Debian/Command/_dput
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_dput,v
retrieving revision 1.1
diff -u -r1.1 _dput
--- Completion/Debian/Command/_dput 2001/11/15 19:37:59 1.1
+++ Completion/Debian/Command/_dput 2001/11/18 20:20:55
@@ -1,9 +1,7 @@
#compdef dput
if (( ! $+_dput_sites )); then
- _dput_sites=(
-$(grep "^\[" /etc/dput.cf | sed -e 's,\[,,g' -e 's,\],,g')
-)
+ _dput_sites=( ${${(M)${(f)"$(</etc/dput.cf)"}:#\[*}//[][]/} )
fi
_arguments '(-c)--config[config file]:config file:' \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-11-18 20:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-18 20:22 PATCH: _dput tweak Clint Adams
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).