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

Re: Zsh can't do "echo -n" preceding vared <variable>



On Thu, Aug 17, 2023 at 7:45 AM Budi <budikusasi@xxxxxxxxx> wrote:
>
> How come Zsh can't perform echo -n that precedes vared <variable>, as
> output is only the vared variable's content preceded by none ?

ZLE (invoked by vared) wants to know exactly where the cursor is
positioned on the first line, so it returns to the leftmost column on
startup.

Instead of
  echo -n "Stuff here"
  vared var

You should be using
  vared -p "Stuff here" var




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