photo
Jordan Sissel
geek

Sat, 30 Apr 2005

better screen session completion in zsh

function screen-sessions {
   typeset -a sessions
   for i in /tmp/screens/S-${USER}/*(p:t);  do
      sessions+=(${i#*.})
   done

   reply=($sessions)
}

compctl -K screen-sessions screen
Completion chops off the PID of the screen session, so i can do:
screen -x log[TAB]
and it will complete to 'screen -x logwatch'

Hurray.

Comments: 0 (view comments)
Tags:
Permalink: /geekery/161
posted at: 21:48


0 responses to 'better screen session completion in zsh'


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment:


Search this site

Navigation

Metadata

Home About Resume My Code (SVN)

Articles

ARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work Efficiency

Projects

fex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scripts

Presentations

Yahoo! Hack Day '08 Yahoo! Hack Day '06 Unix Essentials Vi/Vim Essentials SSH Tunneling (Video)

Tag Cloud

Calendar

< April 2005 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930

Friends

BarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler Shields

Technorati