Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Completing subcommand strings



Here's the latest version of _sh (which in your case you have not got,
due to incompetence).  It now works pretty much OK, although at this point
things get rather hairy, so it's not surprising if there are some remaining
difficulties.  I managed to get into trouble completing after

  sh -c 'tar xvf 

when it seems to like to insert another copy of `tar xvf' along with any
file it's inserting; the bug could be in a lot of different places.  I'm
certainly not expecting every little thing like that to be fixed before
3.1.6.

--- Completion/User/_sh.old	Wed Jul 14 16:13:10 1999
+++ Completion/User/_sh	Wed Jul 14 16:10:43 1999
@@ -0,0 +1,6 @@
+#compdef sh ksh bash zsh csh tcsh rc
+
+if (( CURRENT == ${words[(i)-c]} + 1 )); then
+  compset -q
+  _normal
+fi

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



Messages sorted by: Reverse Date, Date, Thread, Author