Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
weird expansion and compctl for man pages
- X-seq: zsh-users 3988
- From: Will Yardley <william@xxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: weird expansion and compctl for man pages
- Date: Mon, 02 Jul 2001 17:45:10 -0700
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Sender: william@xxxxxxxxxxxxxxxxxxxx
two questions.
i use the following to put the current command in the titlebar:
case $TERM in
(xterm*)
precmd () {print -Pn "\e]2;%n@%m %~ %l %W %T\a"}
preexec () {print -Pn "\e]2;%n@%m $* %l %W %T\a"}
;;
esac
and the following to expand common hostnames and usernames for ssh:
compctl -k hosts -x 'c[-1,-l]' -k usernames -- \
+ -k usernames -S '@' -x 'n[1,@]' -k hosts -- ssh
when ssh to a particular machine was freezing today, i noticed that if i
hit tab while expanding the hostname, the resulting command which showed
up in the titlebar was:
ssh machine ssh machine ssh machine ssh machine
i realize this isn't a super big deal, but is there an easy way to get
around this?
also i tried some of the various compctl scripts for completing man
pages (including the two on the main info site) and neither seemed to
work (i used the bsd option). i'm using zsh 4.0.1 on freebsd
4.3-stable. does anyone have a working script on a similar system?
basically i want to be able to type:
man
and then tab complete to various programs as long as there's a man page
for them
so man l[tab] would expand to ls, lsof etc.
w
Messages sorted by:
Reverse Date,
Date,
Thread,
Author