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

Trouble with 'fc -l'



All,

If I run " fc -l -1 " from the command line, it works as expected, however:


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. I can have either line: " fc -R " or " fc -l -1 " alone in the function and it works as expected. I can also do this:

function z ()
{
  fc -R
  fc -l
}

... and it works fine--I get the last 16 lines of updated history as I should. But whenever I try to modify " fc -l ... " in any way, I get either a "no such event: 0" message, or ,again, the whole of history scrolls by. It seems very strange, what am I doing wrong?





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