zsh-users
 help / color / mirror / code / Atom feed
From: Aleksandrina Nikolova <infinite.craziness@gmail.com>
To: zsh-users@zsh.org
Subject: mkdir completion not offering ignored patterns
Date: Sat, 11 Apr 2015 15:44:34 +1000	[thread overview]
Message-ID: <5528B4C2.3010001@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

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. 
I'm attaching the relevant part of my .zshrc, but here are the two lines 
I think control the behaviour:

     zstyle ':completion:*' completer _expand _complete _prefix _ignored 
_complete:-separators _match _approximate
     zstyle ':completion:*:((*-|)files|(*-|)directories)' 
ignored-patterns '(*/|).[^/]##'

Commenting the second one disables hiding of hidden files for all 
commands and I get those offered by mkdir along with non-hidden ones. I 
also have the following:

     zstyle ':completion:*:cd:*' tag-order local-directories 
"path-directories named-directories directory-stack users"

I tried including mkdir as well, but that didn't help. How can I make 
mkdir offer the ignored matches at a later time?

Thanks!

[-- Attachment #2: zshrc --]
[-- Type: text/plain, Size: 3579 bytes --]

######## COMPLETION, EXPANSION & MATCHING #########

autoload -Uz compinit
compinit

zstyle :compinstall filename '/home/aleksandrina/.zshrc'
zstyle ':completion:*' completer _expand _complete _prefix _ignored _complete:-separators _match _approximate
zstyle ':completion:*:expand:*' add-space true
zstyle ':completion:*:prefix:*' add-space false
zstyle ':completion:*' accept-exact false
zstyle ':completion:*' accept-exact-dirs false
zstyle ':completion:*:paths' ambiguous true
zstyle ':completion:*' insert-tab false
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' last-prompt true
zstyle ':completion:*' list-dirs-first true
zstyle ':completion:*' list-grouped true
zstyle ':completion:*' list-packed true
zstyle ':completion:*' list-suffixes true
zstyle ':completion:*' list-separator '#'
zstyle ':completion:*' original true
zstyle ':completion:*' path-completion true
zstyle ':completion:*' rehash true
zstyle ':completion:*' remove-all-dups true
zstyle ':completion:*' prefix-hidden false
zstyle ':completion:*' squeeze-slashes false
zstyle ':completion:*' expand suffix
zstyle ':completion:*' fake-parameters 'DISPLAY:scalar'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ${(s.:.)~~LS_COLORS}
zstyle ':completion:*' list-prompt %Smatch %M, line %L: Hit '<TAB>' for more, or the character to insert%s
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' menu select=2
zstyle ':completion:*' auto-description true
zstyle ':completion:*' verbose true
zstyle ':completion:*' word false
zstyle ':completion:*:auto-describe' format 'specify: %d'
zstyle ':completion:*:descriptions' format '
%F{cyan}%B%d:%b%f'
zstyle ':completion:*:-command-:*' completer _expand _complete _prefix _match _approximate _history _ignored
zstyle ':completion:*:-command-:*' group-order aliases functions builtins commands
zstyle ':completion:*:-command-:*' tag-order "aliases suffix-aliases reserved-words functions:-non-ignored builtins commands" parameters functions
zstyle ':completion:*:functions-non-ignored' ignored-patterns '_*'
zstyle ':completion:*:complete-separators:*' matcher-list '' 'r:|[._-]=** r:[^[:upper:]0-9]||[[:upper:]0-9]=** r:|=** l:|=**' '+m:{[:lower:][:upper:]}={[:upper:][:lower:]}'
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle ':completion:*:correct:*' max-errors 3 numeric
zstyle ':completion:*:expand:*' glob true
zstyle ':completion:*:expand:*' substitute true
zstyle ':completion:*:expand:*' suffix true
zstyle ':completion:*:expand:*' tag-order expansions
zstyle ':completion:*:match:*' match-original true
zstyle ':completion:*:ignore:*' single-ignored menu
zstyle ':completion:*:cd:*' tag-order local-directories "path-directories named-directories directory-stack users"
zstyle ':completion:*:((*-|)files|(*-|)directories)' ignored-patterns '(*/|).[^/]##'
zstyle ':completion:*:jobs' prefix-needed false
zstyle ':completion:*:jobs' numbers true
zstyle ':completion:*:processes' list-colors '=(#b) #([0-9]#)*=0=01'
zstyle ':completion:*:processes' insert-ids single
(( $UID )) && zstyle ':completion:*:processes' command "ps -u $USER" \
		     || zstyle ':completion:*:processes' command 'ps -e'
zstyle ':completion:*:sudo::' environ PATH="/sbin:/usr/sbin:$PATH" HOME="/root"
zstyle ':completion:*' complete true		# _expand_alias
zstyle ':completion:*' complete-options false	# cd, pushd
zstyle ':completion:*' stop true		# _history_complete_word
zstyle ':completion:*' recent-dirs-insert fallback
zstyle ':chpwd:*' recent-dirs-default true

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-11  5:44 Aleksandrina Nikolova [this message]
2015-04-11 20:44 ` Bart Schaefer
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=5528B4C2.3010001@gmail.com \
    --to=infinite.craziness@gmail.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).