On Fri, May 13, 2011 at 09:53, Sam Steingold <s...@gnu.org> wrote: > When screen terminates on a signal, does it send EOF to each bash window? > if it will not, I will lose my bash history!
I don't know how much of this you already have setup, so please ignore those parts. I do something similar to what you describe. I basically live in screen for everything except browsing the web and reading feeds (email, newsgroups, etc) and I'm working on moving the feeds to the CLI as well. In my .bashrc I set the following: export HISTCONTROL='ignorespace:erasedups' export HISTFILESIZE=1000 export HISTSIZE=1000 ignoreboth says to ignore commands beginning with a space erasedups says to remove any matching commands from the history before saving this one, effectively keeping the most common commands near the end of the history. Also, I have the following shopts: shopt -s cmdhist shopt -s histappend shopt -s histreedit shopt -s histverify cmdhist saves multiple line commands as the same history line histappend tells bash to append to the history file instead of overwriting it histreedit allows you to edit a failed command histverify allows you to edit a history line before executing it And finally, I have this included in my prompt: PS1="\$(history -a)" This appends the previous command to the history file everytime the prompt is displayed. You will still lose the command if the session is lost before the prompt is displayed, but this minimizes it as far as I've been able to get it for myself. You should read the bash man page. There are other history related stuff that I don't use. Hope this helps. -- Alan Young _______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users