Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
mkdir completion not offering ignored patterns
- X-seq: zsh-users 20133
- From: Aleksandrina Nikolova <infinite.craziness@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: mkdir completion not offering ignored patterns
- Date: Sat, 11 Apr 2015 15:44:34 +1000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type; bh=TqJz00D/z002hx4OwtC1xKSbKfYb2G/znFBDAnuyZ00=; b=Cfb56il6NsOR/L6BjXXZsKhAQvSFHAqzJ7d9Kcu6iYwO/t6B/X71YPpAlglWmuMwaj atvLsKx/Ds+7xXbTfYYS/vdacbnkstB92It/f9S/Qhp8WBXqK3i5lnfD/m8dLLMYrVfP 5f4ubN5q7rE4QGo10nRFh2lOs5VkYr26nzGtyXNDKk0MyS0nXY4/lYxQxnqugF/FdRAF dF/M2CHNlKfXymK6+Iz2XaSnE9ZDoqVNV7Kvun+oOBZLYkBan2vBVdgVobLbUyEnrmC6 Pa1pO5qUN3mjaIKFZL0k/jnkLSS32/uojJzzDDnMVJwRwRwlcixJlCKdN5oOuOydYEQl MuBA==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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!
######## 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author