From: Marc Chantreux <marc.chantreux@ulpmm.u-strasbg.fr>
To: zsh-users <zsh-users@sunsite.dk>
Subject: simply add an host completion
Date: Thu, 15 Jun 2006 14:35:55 +0200 [thread overview]
Message-ID: <20060615123553.GA28129@ulpmm.u-strasbg.fr> (raw)
hi all,
i have a little wrapper for the screen command defined as
> type -f s
s () {
case $1 in
('g'|'go') [ -n "$2" ] && screen -RDS $2 || screen -r || screen ;;
('r'|'root') screen -t root sudo -s ;;
('l'|'ls') screen -ls ;;
('m'|'mail') screen -t mail mutt $*[2,-1] ;;
('i'|'irc') screen -t irc irssi ;;
('f'|'ftp') screen -t ftp lftp ;;
('d'|'doc') screen -t "doc:$*[2,-1]" info $*[2,-1] ;;
('e'|'edit') screen -t "${*[-1]:t}" ${EDITOR:-editor} $*[2,-1] ;;
('s'|'ssh') screen -t "$*[2,-1]" ssh $*[2,-1] ;;
(*) screen $@ ;;
esac
}
now i would like to add completion with it so
- s s would be completed by the ssh hosts completion.
- s e would be completed by filenames.
- s e would be completed by available info pages.
i'm not sure about the best way to do that. Anyone would help ?
regards
mc
--
téléphone : 03.90.24.00.19
courriel : marc.chantreux@ulpmm.u-strasbg.fr
---------------------------------------
reply other threads:[~2006-06-15 12:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060615123553.GA28129@ulpmm.u-strasbg.fr \
--to=marc.chantreux@ulpmm.u-strasbg.fr \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).