Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _dput tweak
- X-seq: zsh-workers 16264
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _dput tweak
- Date: Sun, 18 Nov 2001 15:22:03 -0500
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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:' \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author