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

Re: .zsh_history




On 2023-04-14 07:36, Felipe Contreras wrote:

I do remember that one's control of history is essentially perfect, you
can get just about anything you want.  History is one of those features
of zsh that is tractable and understandable without too much head
scratching and without any weird gotchas.
I couldn't disagree more.

It could very well be that a closer examination than I've made would reveal various mysteries and gotchas.  All I can say is that I've never wanted something from history that it couldn't provide.  One exception: "$ echo one; echo two; echo three" ... you can't, AFAICT, break up the line into it's component commands.  One of the first brick walls I crashed into learning zsh was realizing that a command has no access to it's own unexpanded, 'raw' tail -- which still strikes me as incomprehensible.   Pulling a command back from history comes closest, but again there's that 'many commands on one line' issue.  I'd sure love to be able to pull just the text of a single command.







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