February 22, 2012

Auto-attaching to Screen using Fish Shell

Another post about the excellent Fish Shell, this time about how to configure it to automatically start "Screen"

Using the simple and clean fish shell language, I whipped up this little function, which will start screen, reattaching to the old session if possible, and starting a new one instead if not:

function screen_auto_attach
  if [ -z "$STY" ]
    exec screen -dR
  end
end

Then just call it from your .config/fish/config.fish shell with “screen_auto_attach”.

Share and Enjoy:
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell
  • services sprite Auto attaching to Screen using Fish Shell

Related posts:

  1. Using Virtualenv with Fish Shell I am a huge fan of the fish shell, and...
  2. Converting WMA to MP3 on OSX or Linux Finding this technique took more time than I thought it...

About Bruce Kroeze

Speak Your Mind

*