Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: combining .histfiles

On Oct 14, 2014 10:19 AM, "Ray Andrews" <rayandrews@xxxxxxxxxxx> wrote:
> .histfiles files merged fine, all good, except that somewhere along the
line I managed to do this:
>     . ~/.histfile
> and it merrily started executing everything in my history.

Yes, history files have historically (ahem) been kept in a format that is
readable as shell command input.  I suspect this may date from early csh
implementations that reloaded the history by disabling command execution
and then running the file through the parser.

> Nothing would stop it until I
> jumped under my desk and pulled out the computer's plug.

Hmm, I don't know any reason why a regular interrupt (Ctrl+c) would not
stop "." execution, regardless of whether the script is a history file or
any other script, as long as the commands being executed are themselves

You mentioned a "slow copy" ... I've found that if an external command is
in disk wait state it may not respond to interrupts.  Sometimes a Ctrl+z
will suspend such a job even when Ctrl+c won't kill it.

Messages sorted by: Reverse Date, Date, Thread, Author