Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Completion suggestions



On Feb 5, 11:31am, "Andrej Borsenkow" wrote:

> Thanks, Sven! The only question is, is it possible to make final comma to be
> autoremoved? Currently I get
> rm glib{-1.1.so.12,-1.1.so.12.0.0,

Completion in braces is something I've wanted for ages and I must have
missed the message with the patch but I've just noticed it now works
with the zsh I'm using - great, thanks.

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.

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

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,

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.

Thanks

Oliver Kiddle






Messages sorted by: Reverse Date, Date, Thread, Author