It occurred to me today that I could open up to ssh sessions and have both joined to the same screen session, so that I could keep different windows open in each. Simply open the second terminal with "screen -x".
Another trick I discovered was to add the following to my bashrc.
if [ "$TERM" = "screen" ]; then screen_set_window_title () { local HPWD="$PWD" case $HPWD in $HOME) HPWD="~";; *) HPWD=`basename "$HPWD"`;; esac printf '\ek%s\e\\' "$HPWD" } PROMPT_COMMAND="screen_set_window_title; $PROMPT_COMMAND" fi
And now my windows have a more sensible name; I do find myself constantly cycling through windows till I find the right screen in the right directory.
No comments:
Post a Comment