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

fc in non-interactive shells and vared



Hiya,

I'm trying to write a simple wrapper script to mairix (a mail
index/searching tool) for mutt.

My idea was to use "vared" to query the user on the last line of
the script.

I had two problems with that:
  - I could not use fc to load/save a history file as fc refuses
    to work in non-interactive shells. Instead, I have to create
    a history file manually, read it line by line and use print
    -s to build the history stack.

    Is there a better way around that?

  - When "vared" returns, zsh prints a NL character. As I'm on
    the last line of the screen, this causes the screen to
    scroll. Is there any way to avoid that? I tried to do a stty
    onlret, but that doesn't work as vared resets the termios
    settings.

Thanks,
Stéphane



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