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

Re: vared and history



Sven Wischnowsky wrote:
> 
> Again no `PATCH:' in the subject because I'm not sure about this at
> all...
> 
> The patch just makes bin_vared() call hbegin(1) and hend() when given
> the -h option. That's the same loop() does, so it seemed sensible...
> 
> Peter: does this look like the right thing for you? It seems to work.

Looks all right.  I had the hbegin/hend somewhere else and I still didn't
get the right line, but this way it seems to work.  The other question is
whether we leave it up to the user to add it to the history with print -s.
I suppose that's all right here.

> Another thing is that in functions like nslookup one probably wants to 
> be able to use ^D on an empty line to leave vared. I couldn't find a
> way to make this possible, so I added the -e option (making it accept
> EOF). Is that right? Was there really no way?

The point was probably to allow the editor to get hold of all the
characters.  You could probably bind ^D to accept-line to get pretty much
the same effect, but if you only wanted that on an empty line you would
need your own widget.

> The stuff in nslookup just makes it use -e and history and improves
> the prompt styles.

I missed the nslookup part out because I haven't applied the zpty patch.
I haven't applied that because I don't know if it's going to fail to
compile on some systems.  This may require some more configure tests.  But
it would be a nice library to have.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>



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