Finally working bash_completion in GNU screen

I was struggling without bash_completion in GNU screen and the solution was adding the following to .screenrc:

defshell -bash

Some more info at:

https://www.gnu.org/software/screen/
http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/
http://www.debian-administration.org/article/An_introduction_to_bash_completion_part_1

My .screenrc https://raw.github.com/mikaelz/dotfiles/master/.screenrc

#
# ~/.screenrc
#
# Thanks to:
# https://www.gnu.org/software/screen/manual/screen.html#Command-Summary
# http://www.debian-administration.org/articles/560
# http://www.alexandrulazar.com/junk/articles/.screenrc

startup_message off

defshell -bash # dash makes it a login shell

vbell on # no annoying audible bell
vbell_msg "  !! Something interesting has happened !!  "
activity "%c activity -> %n%f %t"
bell "%c bell -> %n%f %t^G"

autodetach on  # autodetach session on hangup instead of terminating screen completely
altscreen on
defscrollback 5000
defutf8 on
defnonblock on
msgwait 1 # message timeout 1 second
shelltitle "$ |bash"

defmonitor on # turn monitoring on
activity "%"  # tell me when stuff happens!

# allow bold colors - necessary for some reason
attrcolor b ".I"

# http://www4.cs.fau.de/~jnweiger/screen-faq.html
# https://stackoverflow.com/a/4833946
# http://pjkh.com/articles/osx-iterm-screen-vim-256-colors/
term screen-256color
termcapinfo screen* 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm'
termcapinfo screen* ti@:te@ # make scrollbar work

defbce on # erase background with current bg color

bind R eval "source $HOME/.screenrc" "echo '.screenrc reloaded!'"
bind % screen -t htop htop

screen -t netlog 0 watch -n 2 -d lsof -iTCP -P
screen 1 mc
screen 2
screen 3
screen 4

backtick 0 0 0 whoami # set "%0`" to equal the output of `whoami`

hardstatus alwayslastline "%{.bW} %-w%{.rW}%n %t%{-}%+w %=%{..} %l | %0`@%H | %D %c:%s %d.%m.%Y"
Advertisements

About Michal Zuber

Biker and rollerblader. Owner and developer at http://nevilleweb.sk/ Co-founded http://neville.sk/ Blog at https://michalzuber.wordpress.com/
This entry was posted in bash, screen and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s