On Fri, 16 Mar 2001, Caolan McNamara wrote:
> For my sins I work a little with 4nt under nt on occasion and
> it has a history feature that 50% of the time drives me crazy
> and 50% of the time is quite handy. All running copies share
> the same history buffer. Type a command in a window and
> it appears as the last command in all windows history.
>> Probably wouldn't be too hard to add it to bash/tcsh with a
> bit of ipc jiggerypokery.
>> tcsh has a merge facility which when the various shells exit
> then the histories are merged and sorted according to timestamp,
> and bash has an append facility which sounds similiar. But of
> course this only happens at exit time not during execution.
> Does it sound useful to have a single shared history file
> during execution of multiple shells ? I'm of two minds, but
> could be a fun option to play with.
Zsh will do this (and ksh as Jerry Connolly has mentioned). usually
find this annoying I don't use it. You can enable it by putting the
following commands into your ~/.zshrc:
setopt sharehistory # Enable shared history between shells
HISTFILE=~/.zsh_history # The file for storing history events
SAVEHIST=100 # The max number of events saved in $HISTFILE
HISTSIZE=100 # The max number of events saved in the
# internal history list.
There's also a bunch of options for controlling what gets added to the
history list. You can get a description of them by searching for 'hist'
in the zshoptions manpage.
John.
--
John Gaughan, Systems Administrator
Irish Times New Media - http://www.ireland.com/
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!