Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use this to have all shells share a history concurrently - which sometimes is confusing if you press "↑" and have an unexpected (possibly dangerous command) but I'm used to it now:

  shopt -s histappend
  PROMPT_COMMAND="history -a; history -c; history -r"
See more about it here: https://unix.stackexchange.com/questions/1288/preserve-bash-...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: