zsh-users
 help / Atom feed
* get text of buffer before completion
@ 2019-01-25 15:25 Pier Paolo Grassi
  0 siblings, 0 replies; 1+ messages 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] 1+ messages in thread

only message in thread, back to index

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

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox