Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: init.d completion
- X-seq: zsh-workers 13599
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxx>
- Subject: Re: init.d completion
- Date: Sun, 11 Mar 2001 18:17:39 +0000
- In-reply-to: <1010311173813.ZM27565@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <002101c0aa1f$4d5ccf50$21c9ca95@xxxxxxxxxxxxxx> <1010311173813.ZM27565@xxxxxxxxxxxxxxxxxxxxxxx>
On Mar 11, 5:38pm, Bart Schaefer wrote:
} Subject: Re: init.d completion
}
} 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:
Sorry, that doesn't quite cut it. Better:
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 18:16:38
@@ -4,5 +4,10 @@
compset -q
_normal
else
+ local n=${words[(b:2:i)[^-]*]}
+ if (( n <= CURRENT )); then
+ compset -n $n
+ _normal && return 0
+ fi
_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