Skip to content

Instantly share code, notes, and snippets.

@gb-swatanabe
Created January 20, 2014 06:50
Show Gist options
  • Save gb-swatanabe/8516038 to your computer and use it in GitHub Desktop.
Save gb-swatanabe/8516038 to your computer and use it in GitHub Desktop.
BASHで履歴の共通化
:
# SEE ALSO : http://iandeth.dyndns.org/mt/ian/archives/000651.html
# share history for all terminals
function share_history {
history -a
history -c
history -r
}
PROMPT_COMMAND="share_history;${PROMPT_COMMAND}"
# append to the history file, don't overwrite it
shopt -s histappend
:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment