about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--Completion/Unix/Command/.distfiles2
-rw-r--r--Completion/Unix/Command/_cvs4
-rw-r--r--Completion/Unix/Command/_nice14
-rw-r--r--Completion/Zsh/Command/_precommand6
5 files changed, 35 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0cf1bb3ad..65d042be2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -192,6 +192,11 @@
 	* 18841: Completion/Base/Completer/_prefix: work around problem
 	where the unambiguous part is empty making the word be removed
 
+2003-07-09  Peter Stephenson  <pws@csr.com>
+
+	* 18839, modified c.f. 18840: Completion/Unix/Command/_nice,
+	Completion/Zsh/Command/_precommand: Completion for nice.
+
 2003-07-07  Oliver Kiddle  <opk@zsh.org>
 
 	* 18822: Completion/Base/Completer/_expand
@@ -216,6 +221,13 @@
 	Completion/Linux/Command/_pkgtool: Completion for Slackware
 	package management tool.
 
+2003-07-03  Peter Stephenson  <pws@csr.com>
+
+	* 18796: Completion/Unix/Command/_cvs: quoting of characters
+	when completing existing CVS-managed files (in particular
+	spaces) was flakey.  The same problem probably exists for
+	completing modified files, but the code is indecipherable.
+
 2003-07-02  Oliver Kiddle  <opk@zsh.org>
 
 	* 18520, 13691 (Mario Lang), 13701 (Sven):
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index fa947708f..5c99e85d4 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -20,5 +20,5 @@ _chkconfig    _cdcd         _irssi	  _sccs         _texinfo      _ant
 _global                     _figlet       _ifconfig     _last         _larch
 _lsof         _mt           _xmlsoft      _elinks       _tidy         _python
 _antiword     _renice       _sablotron    _cdrecord     _aap          _du
-_rar          _vorbis       _subversion   _screen
+_rar          _vorbis       _subversion   _screen       _nice
 '
diff --git a/Completion/Unix/Command/_cvs b/Completion/Unix/Command/_cvs
index 7ab72d341..ec047c38a 100644
--- a/Completion/Unix/Command/_cvs
+++ b/Completion/Unix/Command/_cvs
@@ -856,8 +856,8 @@ _cvs_existing_entries() {
   linedir="$match[1]"
   realdir=${(e)~linedir}
   [[ -f "$realdir"CVS/Entries ]] &&
-  [[ -n ${pat::="${(@j:|:)${(@)${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}%%/*}//(#m)[][*?()<|^~#\\]/\\$MATCH}}"} ]] &&
-  _wanted files expl file _path_files -g "$pat"
+  pat=(${(@)${(@)${(@M)${(@f)"$(<"$realdir"CVS/Entries)"}:#/*}#/}%%/*})
+  (( ${#pat} )) && _wanted files expl file _path_files -a pat
 }
 
 (( $+functions[_cvs_modified_entries] )) ||
diff --git a/Completion/Unix/Command/_nice b/Completion/Unix/Command/_nice
new file mode 100644
index 000000000..f2f688368
--- /dev/null
+++ b/Completion/Unix/Command/_nice
@@ -0,0 +1,14 @@
+#compdef nice
+
+shift words
+(( CURRENT-- ))
+
+if [[ $CURRENT -gt 1 && $words[1] = [-+](-|)<-> ]]; then
+    shift words
+    (( CURRENT -- ))
+elif [[ $CURRENT -gt 2 && $words[1] = -n ]]; then
+    shift 2 words
+    (( CURRENT -= 2 ))
+fi
+
+_normal
diff --git a/Completion/Zsh/Command/_precommand b/Completion/Zsh/Command/_precommand
new file mode 100644
index 000000000..e48094721
--- /dev/null
+++ b/Completion/Zsh/Command/_precommand
@@ -0,0 +1,6 @@
+#compdef - nohup eval time rusage noglob nocorrect exec
+
+shift words
+(( CURRENT-- ))
+
+_normal