zsh-users
 help / color / mirror / code / Atom feed
From: Thorsten Kampe <thorsten@thorstenkampe.de>
To: zsh-users@sunsite.dk
Subject: completion not inserting matches
Date: Sun, 18 Apr 2004 16:17:14 +0200	[thread overview]
Message-ID: <x1n6gf1ludq1.dlg@thorstenkampe.de> (raw)

I have the following directories in /usr/src:

linux@
linux-2.4.20-wolk4.9s-r6/
linux-2.4.20-wolk4.11s-r3/
linux-2.4.25-gentoo-r2/
linux-2.4.25_pre7-gss-r3/
linux-2.6.5-gentoo-r1/

Now I am in /usr/src and want to change to "linux-2.4.20-wolk4.11s-r3"
by typing

,---
| root@wolfbrand# cd r3<TAB>
| root@wolfbrand# cd linux-2.4.2--<TAB>-sr3
|                                ^ Cursor jumps to this point
| local directory
| linux-2.4.20-wolk4.11s-r3/  linux-2.4.25_pre7-gss-r3/
| root@wolfbrand# cd linux-2.4.2---sr3
|                                     ^ Cursor jumps to the end
| No match for: `local directory', `directory in cdpath', `user', `named directory', or `corrections'
`---

So the Completion System is correctly showing the possible two matches
on the first <TAB>, but doesn't doesn't insert them at the second
<TAB> and instead tells me now that there are /no matches/!

These are my completion settings: [1] and [2]. One "culprit" is

# case-insensitive and partial-word then substring
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} m:[-._]=[-._] r:|[-./_]=** r:|=*' '+l:|=*'

and more precisely the "partial word" completion "r:|[-./_]=** r:|=*"
(which is directly taken from the user's guide).

So what am I doing wrong? Am I trying "to complete too much"?


Thorsten

[1]
,---
| setopt   alwayslastprompt
| unsetopt alwaystoend
| setopt   autoparamkeys
| setopt   autoparamslash
| setopt   autoremoveslash
| setopt   completealiases
| setopt   completeinword
| 
| # ambigious completions
| setopt   autolist
| setopt   automenu
| unsetopt bashautolist
| unsetopt beep
| unsetopt listambiguous
| unsetopt listbeep
| unsetopt menucomplete
| unsetopt recexact
|
| # displaying completions
| setopt   listpacked
| setopt   listrowsfirst
| setopt   listtypes
`---

[2]
,---
| # contexts: ':completion:<function>:<completer>:<command>:<arg>:<tag>' <style> <value> (^Xh)
| autoload -U compinit; compinit -C   # completion system
| 
| zstyle ':completion:*' auto-description "specifies %d"
| zstyle ':completion:*' commands         broken ineed iuse needsme pause restart start status stop usesme zap
| zstyle ':completion:*' completer        _expand _complete _approximate _ignored
| zstyle ':completion:*' domains          thorstenkampe.de
| zstyle ':completion:*' group-name       ''
| zstyle ':completion:*' ignore-parents   parent pwd
| zstyle ':completion:*' list-colors      ${(s.:.)LS_COLORS}
| zstyle ':completion:*' list-prompt      "%{${ltgreen}%}last line %l (%p)%{${reset_color}%}  %{${ltwhite}%}last match %m%{${reset_color}%}"
| # case-insensitive and partial-word then substring
| zstyle ':completion:*' matcher-list     'm:{a-zA-Z}={A-Za-z} m:[-._]=[-._] r:|[-./_]=** r:|=*' '+l:|=*'
| zstyle ':completion:*' menu             select=10 select=long-list
| zstyle ':completion:*' prefix-needed    false
| zstyle ':completion:*' remote-access    false
| zstyle ':completion:*' select-prompt    "%{${ltgreen}%}line %l (%p)%{${reset_color}%}  %{${ltwhite}%}match %m%{${reset_color}%}"
| zstyle ':completion:*' select-scroll    -1
| zstyle ':completion:*' sort             true
| zstyle ':completion:*' verbose          yes
| 
| zstyle ':completion::approximate*:*'  insert-unambiguous true
| zstyle ':completion:*:approximate:*'  max-errors         2  # more than '2' degrades performance regardless of "matcher-list"
| zstyle ':completion:*:approximate*:*' original           false
| 
| zstyle ':completion::complete:*' use-cache true
| 
| zstyle ':completion:*:expand:*' accept-exact     continue
| zstyle ':completion:*:expand:*' add-space        file
| zstyle ':completion:*:expand:*' glob             true
| zstyle ':completion:*:expand:*' keep-prefix      true
| zstyle ':completion:*:expand:*' subst-globs-only true
| zstyle ':completion:*:expand:*' substitute       true
| zstyle ':completion:*:expand:*' suffix           true
| zstyle ':completion::expand:*'  tag-order        all-expansions
| 
| zstyle ':completion:*:ignored:*' single-ignored show
| 
| zstyle ':completion:*:corrections'  format "%{${ltyellow}%}%d (errors: %e)%{${reset_color}%}"
| zstyle ':completion:*:descriptions' format "%{${ltgreen}%}%d%{${reset_color}%}"
| zstyle ':completion:*:messages'     format "%{${ltgreen}%}%d%{${reset_color}%}"
| zstyle ':completion:*:warnings'     format "%{${ltred}%}No match for%{${reset_color}%}: %d"
| 
| zstyle ':completion:*:files'                      list-suffixes     true
| zstyle ':completion::(^approximate*):*:functions' ignored-patterns  '_*'
| zstyle ':completion:*:jobs'                       list-colors       'no=01;31'
| zstyle ':completion:*:manuals'                    separate-sections true
| 
| zstyle ':completion:*:paths' ambiguous       true
| zstyle ':completion:*:paths' expand          suffix
| zstyle ':completion:*:paths' preserve-prefix "?:/"  # "C:\" style
| zstyle ':completion:*:paths' special-dirs    ..
| 
| zstyle ':completion:*:processes' command     'ps -e'
| zstyle ':completion:*:processes' insert-ids  single
| zstyle ':completion:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
| 
| zstyle ':completion:*:complete:dpkg:option--status-1:*' packageset avail
| 
| autoload -U predict-on; predict-on
| zle-line-init() { predict-on }
| zle -N zle-line-init
| zle -N predict-on
| zle -N predict-off
| bindkey '^P'   predict-on
| bindkey '^Xp'  predict-off
| bindkey '^X^P' predict-off
| zstyle ':predict' toggle  true
| zstyle ':predict' verbose true
| 
| zstyle ':completion:predict::::' cursor complete key
| zstyle ':completion:predict::::' list   always
`---


             reply	other threads:[~2004-04-18 14:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-18 14:17 Thorsten Kampe [this message]
2004-04-18 23:20 ` Bart Schaefer
2004-04-19 15:40   ` Thorsten Kampe
2004-04-20  4:23     ` Bart Schaefer
2004-04-18 23:35 ` Bart Schaefer
2004-04-19 14:42   ` Thorsten Kampe

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=x1n6gf1ludq1.dlg@thorstenkampe.de \
    --to=thorsten@thorstenkampe.de \
    --cc=zsh-users@sunsite.dk \
    /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).