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

script using vared to read commands - history bug



If I run the following script:

    #!/bin/zsh

    prompt="%B%%%b "
    while cmd="" && vared -h -p "$prompt" cmd ; do 
      echo " -- got: $cmd"
      print -s - "$cmd"
    done

it works as intended, except that the most recent 
command never appears in the history.  What's up?

thank,
Greg



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