zsh-users
 help / color / mirror / code / Atom feed
* get text of buffer before completion
@ 2019-01-25 15:25 Pier Paolo Grassi
  0 siblings, 0 replies; only message in thread
From: Pier Paolo Grassi @ 2019-01-25 15:25 UTC (permalink / raw)
  To: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Hello, I am trying to create a widget that should work like this:
1. when I am doing menu-completion, the widget should save the content of
the buffer before the last completion (the text added by the last call to a
completion widget such as expand-or-complete-prefix)
2. then execute the whole buffer
3. than show again (like accept-and-hold does) the previous buffer as saved
in step 1

eg if I am on a line like this:

ls abc/

and pressing TAB complete like this:

ls abc/def

accepting this with my custom widget (when still in menu selection) should
execute the buffer and then return to the prompt with a buffer containing

ls abc/

IDK if the "when still in menu selection" is relevant, but I included it in
case it is helpful (maybe there are variables populated there that are
discarded when the completion has already been accepted/there is only one
alternative, although using typeset from a widget hasn't shown such
variables though).

thanks

-- 
Pier Paolo Grassi
email: pierpaolog@gmail.com
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-25 15:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-25 15:25 get text of buffer before completion Pier Paolo Grassi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).