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

Re: Trouble with 'fc -l'



On 02/17/2014 12:29 AM, Bart Schaefer wrote:
On Feb 16,  5:41pm, Ray Andrews wrote:
}
} function z ()
} {
}    fc -R
}    fc -l -1
} }
}
} When 'z' is executed, my entire saved history scrolls past and history
} itself is 'advanced' by several thousand places.

This is subtle, and the documentation is could be clearer.

Never! ;-)
...

So how exactly does one display the most recent event from a newly-
reloaded history?  That's where the HISTCMD parameter comes in:

z() {
       fc -R
       fc -l $HISTCMD
     }


Well I dunno Bart, my mind is big enough for Kant, but not big enough for all this stuff. I'm glad you understand it. All I can add it that " fc -l $HISTCMD " WORKS! The byzantine complexities I leave to better men. Thanks again. But does it really need to be so obscure? I suppose so.



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