From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "E. Jay Berkenbilt" <ejb@ql.org>, <zsh-users@sunsite.auc.dk>
Subject: insert-all-matches example RE: completion and globbing, part 2
Date: Mon, 18 Sep 2000 13:59:46 +0400 [thread overview]
Message-ID: <000001c02157$2ceaa360$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <000701c0213d$2434b6d0$21c9ca95@mow.siemens.ru>
>
> May be, widget to do it (insert all current choices) would be the simplest
> case. Hmm ... may be it is even possible to implement it as function.
>
Very dumb implemetation. It won't work (correctly) if anything is already
inserted on command line - that is, it will insert all matches directly after
anything already there. This may or may not be appropriate.
bor@itsrm2% which _insert_all_matches
_insert_all_matches () {
compstate[insert]=all
compstate[old_list]=keep
_complete
}
bor@itsrm2% zle -C insert-all-matches complete-word _insert_all_matches
bor@itsrm2% bindkey '^Xi' insert-all-matches
With these you could do:
bor@itsrm2% ls f*^D
bor@itsrm2% ls f*
Completing file
fnt/ foo.c
Now press ^Xi
bor@itsrm2% ls fnt foo.c
But, as stated, it has all sorts of problems. It does not work correctly after
*completion* - it tries to complete word already inserted (that is, it is
treated as new completion instead of continuation of old - but this may be
related to my styles settings). ^D is needed to get a list that is inserted
with ^Xi.
-andrej
next prev parent reply other threads:[~2000-09-18 10:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-17 17:50 completion with globbing, take 2 E. Jay Berkenbilt
2000-09-17 18:43 ` Bart Schaefer
2000-09-17 23:03 ` E. Jay Berkenbilt
2000-09-18 0:17 ` completion and globbing, part 2 E. Jay Berkenbilt
2000-09-18 6:53 ` Andrej Borsenkow
2000-09-18 9:59 ` Andrej Borsenkow [this message]
2000-09-18 17:28 ` completion with globbing, take 2 Bart Schaefer
2000-09-18 18:08 ` Andrej Borsenkow
2000-09-19 2:02 ` Bart Schaefer
2000-09-20 15:06 ` Andrej Borsenkow
2000-09-20 16:12 ` Bart Schaefer
2000-09-18 22:07 ` E. Jay Berkenbilt
2000-09-19 2:14 ` Bart Schaefer
2001-02-20 9:55 ` Job Table Nick Cross
2000-09-18 6:07 ` completion with globbing, take 2 Andrej Borsenkow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000001c02157$2ceaa360$21c9ca95@mow.siemens.ru' \
--to=andrej.borsenkow@mow.siemens.ru \
--cc=ejb@ql.org \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).