4 ms·
I use GNU screen. I use a script to name each GNU screen session "projectA", "sysadmin", etc. Then in my .bash_profile, I set the Bash history to be a separat
by ansible 5y ago
I use GNU screen.
I use a script to name each GNU screen session "projectA", "sysadmin", etc.
Then in my .bash_profile, I set the Bash history to be a separate file in my ~/.bash_hist_dir subdirectory.
if [ "x$SCREEN_SESSION_NAME" != "x" -a "x$WINDOW" != "x" ]; then
if [ ! -d ~/.bash_hist_dir ]; then
mkdir ~/.bash_hist_dir
fi
export HISTFILE=~/.bash_hist_dir/${SCREEN_SESSION_NAME}.${WINDOW}
fi
So each separate window in each session gets a unique history file.
I have up to 10 windows per GNU screen session, and sometimes 6 to 8 terminal tabs.
Each separate GNU screen window is used for specific things: "edit", "build", "debug", etc.
This all makes it easy to maintain the context of all the things I work on.