From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Completion suggestions
Date: Mon, 8 Feb 1999 10:12:26 +0100 (MET) [thread overview]
Message-ID: <199902080912.KAA26759@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: opk@thoth.u-net.com's message of Sun, 7 Feb 1999 18:56:05 +0000
Oliver Kiddle wrote:
> Anyway, this has reminded me of another completion feature which I'd
> like. When typing a filename as a parameter where the filename I want to
> use contains a special character (such as a space), I obviously have to
> use quoting of some sort. What would be nice is if the completion was
> aware of quotes and assumed that I wasn't going to quote unnecessarily.
>
> For example:
> ~ [56]% :> "a file"
> ~ [57]% :> afile
> Currently:
> ~ [58]% vi "a<tab>
> Lists:
> a file afile
>
> I'd find it useful if it completed to the file with the space in it: I
> wouldn't have bothered to type the '"' if I wanted to edit afile. This
> will ofcourse need to be aware of \ quoting and the closing quote. I
> wouldn't be suprised if some people wouldn't like this so if
> implemented, it might need to be an option.
As an option, maybe. But if you have something like zsh -c "ls f<TAB>",
you'll want all files.
> Another thing which would be quite useful is some way to specify if
> files listed as parameters to a command should be unique. Taking the rm
> example above, it would be pointless to type:
>
> rm glib-1.1.so.12 glib-1.1.so.12
>
> so rm glib{-1.1.so.12,<tab>
> should not offer -1.1.so.12 but complete to anything else such as
> -1.1.so.12.0.0
This is something I'd like to have, too. One thing I'm planning to do
is give a way to access/change/delete matches from those that were
generated in the new style completion stuff, with that it might become
easier to do such things. You can already get this with a shell
function and the `-K' option, though, but only if used without brace
expansion (since the completion code currently doesn't see the other
strings in the braces).
> I've also just discovered the following possible bug which might have
> been fixed since the version I've got here (3.1.5; maybe pws-3):
>
> ~ [67]% rm a{\ <tab>
> Gives me:
> ~ [67]% rm a\ file,
This is fixed since pws-<dunno>, at least 6 and 7.
> Has any thought been given to implementing tcsh's complete=enhance
> functionality. I found the `.', `-' and `_' handling occaisionally
> useful and sometimes annoying. I liked the case-insensitivity aspect
> however the ideal in my opinion would be for anything which I
> explicitly type in uppercase to remain in uppercase but anything typed
> in lowercase to be treated as completable to uppercase. If this tcsh
> functionality does get implemented there should be separate options for
> the two (very distinct in my opinion) features.
This is what the matching control is for. In any recent enough zsh you
can do:
compctl -M 'm:{a-z}={A-Z}'
to get the one-way-case-insesitiveness you described. The partial word
completion can be allowed with:
compctl -M 'r:|[._-]=* r:|=*'
See the compctl manual pages for further enlightenment.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-02-08 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-08 9:12 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-02-15 9:51 Sven Wischnowsky
1999-02-14 11:54 Oliver Kiddle
1999-02-14 21:26 ` Bart Schaefer
[not found] <borsenkow.msk@sni.de>
1999-02-07 18:56 ` Oliver Kiddle
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=199902080912.KAA26759@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@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).