Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Conditionally complete on space.
- X-seq: zsh-users 22836
- From: Grant Taylor <gtaylor@xxxxxxxxxxxxxxxxxx>
- To: Zsh Users List <zsh-users@xxxxxxx>
- Subject: Conditionally complete on space.
- Date: Thu, 17 Aug 2017 16:34:06 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=tnetconsulting.net; s=2015; t=1503009253; bh=cPlqvtwGRInbc2frzUWcN8YdVFVbPZtpDOwYBFY8zL4=; h=To:From:Subject:Date:From; b=kGNKyvdHiiqTXTejdwhARML/MfFJypuWrvSQ2rO/49fScc4SFTbyw+B0h6a6pX19+ Blf2hLWB+ZdHdtALD54BYpxJyPudW4qna273V7f9sATgor6vis3Ua5p6Z3iLiPVkVq yBriCn18PYoa2ngiQoZz7RmiH9ie2yBjZakscZ6A=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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:
smime.p7s
Description: S/MIME Cryptographic Signature
Messages sorted by:
Reverse Date,
Date,
Thread,
Author