zsh-users
 help / color / mirror / code / Atom feed
* Conditionally complete on space.
@ 2017-08-17 22:34 Grant Taylor
  2017-08-18  1:07 ` Daniel Shahaf
  0 siblings, 1 reply; 6+ messages in thread
From: Grant Taylor @ 2017-08-17 22:34 UTC (permalink / raw)
  To: Zsh Users List

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

Is it possible to have ZLE conditionally complete on a space?

I know that I can 'bindkey " " expand-or-complete' to get space to 
complete like tab.  However, this does not play well when I want a true 
space.

Thus I want to conditionally complete if there is not a space proceeding 
the cursor's current position.  If there is a space proceeding the 
cursor, then put a space and not call expand-or-complete.

I am guessing that I will need to modify expand-or-complete's behavior 
via modifying _main_complete, or wrap _main_complete with something else 
to do the conditional logic and then call _main_complete, and update zle 
so that expand-or-complete calls the wrapper instead of _main_complete.

Should such be possible?  Or am I waisting my time?



-- 
Grant. . . .
unix || die


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3717 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-18 17:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-17 22:34 Conditionally complete on space Grant Taylor
2017-08-18  1:07 ` Daniel Shahaf
2017-08-18  4:32   ` Grant Taylor
2017-08-18  5:07     ` Daniel Shahaf
2017-08-18 17:13       ` Grant Taylor
2017-08-18 17:19         ` Grant Taylor

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).