about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-11-18 20:24:47 +0000
committerClint Adams <clint@users.sourceforge.net>2001-11-18 20:24:47 +0000
commit7c30945e0840e59c6b889093baa8596f3c8ccd56 (patch)
treed10913e2f30ffdde902dd53c40fa86f2607ab55a
parent263f3b1422c9704ddda03424dff996543af10edf (diff)
downloadzsh-7c30945e0840e59c6b889093baa8596f3c8ccd56.tar.gz
zsh-7c30945e0840e59c6b889093baa8596f3c8ccd56.tar.xz
zsh-7c30945e0840e59c6b889093baa8596f3c8ccd56.zip
16264: don't use grep and sed in _dput
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Debian/Command/_dput4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index af683ee63..1487667a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-18  Clint Adams  <clint@zsh.org>
+
+	* 16264: Completion/Debian/Command/_dput:
+	Use parameter expansion instead of grep and sed.
+
 2001-11-16  Chmouel Boudjnah  <chmouel@mandrakesoft.com>
 
 	* 16258: Completion/Mandrake/Command/_urpmi:
diff --git a/Completion/Debian/Command/_dput b/Completion/Debian/Command/_dput
index 39d2973bc..5fe9847d1 100644
--- a/Completion/Debian/Command/_dput
+++ b/Completion/Debian/Command/_dput
@@ -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:' \