Keeping bash history in sync between multiple terminals
briancarper.net
Keeping bash history in sync between multiple terminals
1–10 of 35 posts
Re: Keeping bash history in sync between multiple terminals
#2File not found.
Re: Keeping bash history in sync between multiple terminals
#3use zsh, problem solved
Re: Keeping bash history in sync between multiple terminals
#4use zsh, problem solved
How?
(I use zsh. I also downvoted you.)
Re: Keeping bash history in sync between multiple terminals
#5use zsh, problem solved
zsh does a terrible job at keeping bash history in sync.
Re: Keeping bash history in sync between multiple terminals
#6use zsh, problem solved
How? (I use zsh. I also downvoted you.)
Because zsh has shared history, I'm not sure if it's enabled by default, but I use oh-my-zsh (highly recommended!) and shared history works.
Edit: How to enable in zsh: http://www.refining-linux.org/archives/49/ZSH-Gem-15-Shared-...
Re: Keeping bash history in sync between multiple terminals
#7A real trick would be keeping the bash history in sync between multiple machines.
Re: Keeping bash history in sync between multiple terminals
#8use zsh, problem solved
How? (I use zsh. I also downvoted you.)
I suggest some of the following setopt's:
APPEND_HISTORY AUTO_CD HIST_IGNORE_SPACE HIST_IGNORE_DUPS HIST_NO_STORE
AUTO_CD is nice because you can just straight-up type a directory and it'll go there (i.e. .. or tilde).
HIST_IGNORE_SPACE and HIST_NO_STORE work out nicely when you want commands not to show up, i.e. stuff where maybe your password is inline, or you're handling something sensitive.
HIST_IGNORE_DUPS just saves space. HIST_IGNORE_ALL_DUPS even more so.
Re: Keeping bash history in sync between multiple terminals
#9A real trick would be keeping the bash history in sync between multiple machines.
I keep my ~/.bashrc in my Dropbox and symlink to it. You could do the same with ~/.bash_history.
Re: Keeping bash history in sync between multiple terminals
#10I always thought I wanted an in-sync bash history but after a few days of trying I realised it actually slowed me down. I have multiple terminals open (with Terminator, most of the time) and different windows / tabs are for different projects or tasks. If I'm building / configuring a project in 1 window, suddenly having a few apt-gets or log tails interspersed is very unproductive.