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

minor problems with dynamic directory completion



I found this in my Drafts folder, it must have been there at least a
couple of years... It looks like all the things in here are still
broken. I should finish working on the patch to fix ~[a]/<tab> that I
sent a while ago too... (it's only broken if you have a / inside, as
it turned out, so not super important).

~~~~

{~[<tab> doesn't work, nor does ${:-~[<tab>. ~[a]{<tab> produces
results with the { in the middle of the word for static named
directories, ie it produces ~apa{che as a result. If the resulting
string is shorter, the / is not appended and the final letter is
turned into a suffix, ie "~at" + space gives "~a ". ~[a]/{<tab> works
fine though. ~[a]<tab> completes static names too, but treats the
suffix correctly afaict. The only one of these that have actually
happened to me in real usage and not by being evil and thinking up
ways to break it is the last one, where I just wanted it to append a /
for me :).

In my completer for the inside bits, I do some stuff to automatically
append the ], and I noticed that when I use _all_matches, it doesn't
reproduce the ~[ prefix for any but the first one, so I get stuff like
~[a-5] a-4] a-3] etc. Is there any way that could be made to work
easily? I noticed that all-matches for brace completion even manages
to insert the commas and closing brace correctly, which is how I
happened upon the first case in the mail.

-- 
Mikael Magnusson



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