summaryrefslogblamecommitdiffstats
path: root/bashrc/common/screen.sh
blob: 28a4ef7d34e5e94d2657028dbb48a05f54a7a893 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                                              
                                                  



                                                                  

                                    


                                   
# screen shelltitle magic

set_screen_title() {
    # prevent reset_screen_title from calling set_screen_title
    if [[ $BASH_COMMAND != "__make_propt" ]]; then
	echo -ne "\ek$(id -un)@$(hostname):${BASH_COMMAND/ *}\e\\"
    fi
}

init_preexec_hack() {
    if [[ $TERM == "screen" ]]; then
	trap set_screen_title DEBUG
    fi
}