zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: mkdir completion not offering ignored patterns
Date: Sat, 11 Apr 2015 13:44:10 -0700	[thread overview]
Message-ID: <150411134410.ZM27516@torch.brasslantern.com> (raw)
In-Reply-To: <5528B4C2.3010001@gmail.com>

On Apr 11,  3:44pm, Aleksandrina Nikolova wrote:
}
} Greetings, I am trying to make mkdir behave like similar commands (in 
} particular, cd) but I can't seem to figure it out. I have set the 
} completion system to ignore hidden files and only show them when there 
} are no other options (no other files in the listed directory or I 
} explicitly type . at the beginning). It works perfectly with all 
} commands but mkdir, which simply refuses to offer hidden files, ever. 

As far as I can tell, this is happening because _mkdir calls _wanted,
and _wanted forces completion to be limited to the first set of matches
for the desired tag ("directories" in this case).

If I do (after compinit)

autoload +X _mkdir
functions[_mkdir]="${functions[_mkdir]:s/_wanted/_tags directories;_requested}"

then things seem to work as you are expecting, though I'm not sure I've
tried all nuances.

I'd like feedback from other zsh-workers on whether this is the right
change to make permanent.


  reply	other threads:[~2015-04-11 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11  5:44 Aleksandrina Nikolova
2015-04-11 20:44 ` Bart Schaefer [this message]
2015-04-11 22:52   ` Aleksandrina Nikolova
2015-04-12 17:18     ` Bart Schaefer
2015-04-12 22:09       ` Aleksandrina Nikolova

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=150411134410.ZM27516@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@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).