zsh-users
 help / color / mirror / code / Atom feed
* simply add an host completion
@ 2006-06-15 12:35 Marc Chantreux
  0 siblings, 0 replies; only message in thread
From: Marc Chantreux @ 2006-06-15 12:35 UTC (permalink / raw)
  To: zsh-users


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
---------------------------------------


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-15 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-15 12:35 simply add an host completion Marc Chantreux

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).