zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: minor problems with dynamic directory completion
Date: Wed, 19 Aug 2015 07:20:13 +0200	[thread overview]
Message-ID: <CAHYJk3SSsbiQNjZGAvB6t_fA2pxBns0G4Nn41+YkS8GA2ovJSQ@mail.gmail.com> (raw)

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


                 reply	other threads:[~2015-08-19  5:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAHYJk3SSsbiQNjZGAvB6t_fA2pxBns0G4Nn41+YkS8GA2ovJSQ@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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).