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

Re: append to history entry?



On Dec 26,  5:28pm, Ray Andrews wrote:
} Subject: Re: append to history entry?
}
} On 26/12/16 03:16 PM, Ray Andrews wrote:
} > Can I arrange for a function to append something to it's own entry 
} > into history when it is run?

You might also want to look at the zshaddhistory hook function.

} This seems to work:
}     ...
} Leading space keeps the command out of history as usual, then I just 
} replace it with the massaged version.

This looks fine.  My only suggestion would be to use the ":" command
instead of "echo".



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