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

Completion with backslashes? non-native characters?



Is there an easy way to change the behavior of what happens in completion when the final character is a backslash?

I don't tend to use spaces in filenames under linux, but in Windows, often I want to complete things like:

$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff(TAB)
Stuff/                Stuff\ and\ More/

It'd be nice if I could do:
$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff\(TAB)
rather than
$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff\ (TAB)
(not have to type the space)

As it is, I still haven't trained my muscle memory to not hit tab after the backslash, and the backslash gets deleted. So, I end up hitting (TAB) backslash (TAB)[oops] backslash (TAB)[oops] backslash (Space) (TAB):

$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff\(TAB)
$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff
$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff\(TAB)
$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff
$ /cygdrive/c/Documents\ and\ Settings/bhaskell/Stuff\ (TAB)

It'd be nice if a trailing backslash could be taken as some kind of "anything" match, or even a non-word-char match.


In a similar problem, I have folder names that consist solely of kanji (Japanese characters) that I can't easily type myself. Is there a nice way to get to them via tab-completion?

e.g.:

music$ cd (TAB)
Cake/                       They\ Might\ Be\ Giants/
Dismemberment\ Plan,\ The/  Zykos/
Magnetic\ Fields,\ The/     ããã/
Palomar/

My usual workaround is to resort to middle-click-copying, but, is there something I could do with completion options that would make this easier? (I guess I'm looking for something like automenu, but excluding [\x20-\x7e]* so I don't have to tab through 300 other things.)

Best,
Ben


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