Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: init.d completion
- X-seq: zsh-workers 13597
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxx>
- Subject: Re: init.d completion
- Date: Sun, 11 Mar 2001 17:38:13 +0000
- In-reply-to: <002101c0aa1f$4d5ccf50$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <002101c0aa1f$4d5ccf50$21c9ca95@xxxxxxxxxxxxxx>
On Mar 11, 2:34pm, Andrej Borsenkow wrote:
} Subject: init.d completion
}
} Most (many) of scripts in our /etc/init.d are not executable, so I have to
} use 'sh foo' instead of plain 'foo'. Not sure how to handle it; putting
} special case in sh completion?
_sh is pretty braindead at the moment. Unless you're using "sh -c ..."
it only uses _default completion. Here's a fairly simple potential fix:
Index: Completion/User/_sh
===================================================================
diff -c -r1.1.1.1 _sh
--- Completion/User/_sh 1999/07/20 08:11:00 1.1.1.1
+++ Completion/User/_sh 2001/03/11 17:28:10
@@ -4,5 +4,6 @@
compset -q
_normal
else
- _default
+ compset -n ${words[(b:2:i)[^-]*]}
+ _normal || _default
fi
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author