Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Completion of abbrev. paths with variables doesn't work



Hi Bart,

Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Dec 3,  2:39pm, Jorg wrote:
>}
>} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>} >} ibook% echo $ZSH_VERSION 
>} >} 4.3.9-dev-0-cvs1115
>} >
>} > This works for me in zsh 4.3.9-dev-1 as of 2008-11-27.  Can you still
>} > reproduce the problem?
>} 
>} Yes, with 4.3.9-dev-1-cvs1127
>
> I just notice the word "ibook" in the prompt.  This is happening on a Mac?
> Does the case of the path in the variable match the case of the path on
> the filesystem?  It may be that case insentitive globbing is not working
> with the path expanded from the variable.
>
> Beyond that suggestion I'm at the end of my immediate usefulness.  Get
> some output from _complete_debug (ctrl-x question-mark).

I did it with and without glob_complete. This is the diff:

#v+
--- /tmp/zsh-completion-debug	2008-12-04 12:27:17.502975278 +0100
+++ /tmp/zsh-completion-noglobcomplete-debug	2008-12-04 12:26:56.330974724 +0100
@@ -337,15 +337,14 @@
 +_path_files:196> zstyle -a :completion::complete:echo::paths accept-exact accex
 +_path_files:197> zstyle -a :completion::complete:echo:: fake-files fake
 +_path_files:199> zstyle -s :completion::complete:echo:: ignore-parents ignpar
-+_path_files:201> [[ -n '*' && -z '' && '$d/mu/ma' == (|*[^\$])\([^\|\~]##\) || '' == (|*[^\$])\([^\|\~]##\) ]]
++_path_files:201> [[ -n '' ]]
 +_path_files:231> pre='$d/mu/ma' 
 +_path_files:232> suf='' 
 +_path_files:233> opre='$d/mu/ma' 
 +_path_files:234> osuf='' 
 +_path_files:235> orig='$d/mu/ma' 
 +_path_files:236> eorig='$d/mu/ma' 
-+_path_files:238> [[ automenu-unambiguous == (*menu|[0-9]*) || -n '' || -n '*' && '$d/mu/ma' != (|*[^\\])[][*?#~^\|\<\>]* ]]
-+_path_files:240> menu=yes 
++_path_files:238> [[ automenu-unambiguous == (*menu|[0-9]*) || -n '' || -n '' ]]
 +_path_files:241> [[ -n '' ]]
 +_path_files:245> Mopts=( -M 'r:|/=* r:|=*' ) 
 +_path_files:250> [[ '$d/mu/ma' == [^][*?#^\|\<\>\\]#(`[^`]#`|\$)*/* && '' != ' ]]
@@ -429,16 +428,16 @@
 +_path_files:601> tmp2='' 
 +_path_files:602> [[ -n '$d/' ]]
 +_path_files:603> compquote -p tmp2 tmp1
-+_path_files:611> [[ -z '' && '*' == \* && -n '' ]]
++_path_files:611> [[ -z '' && '' == \* ]]
 +_path_files:621> [[ -z automenu-unambiguous ]]
 +_path_files:622> zstyle -t :completion::complete:echo::paths expand suffix
-+_path_files:623> [[ -z '' && -n '' || -z '*' || /ma != */* || ma == (|*[^\\])[][*?#~^\|\<\>]* ]]
-+_path_files:667> [[ mu/ma == */* ]]
-+_path_files:668> tmp4=( -Qf -J -default- -p '$d/' -s '' -W /usr/share/doc/ -M 'r:|/=* r:|=*' ) 
-+_path_files:672> [[ -z '' ]]
-+_path_files:673> i=mutt/manual.txt.gz
-+_path_files:674> tmpdisp=( mutt ) 
-+_path_files:675> _list_files tmpdisp /usr/share/doc/
++_path_files:623> [[ -z '' && -n '' || -z '' ]]
++_path_files:629> ((  tmp4  ))
++_path_files:629> zstyle -t :completion::complete:echo::paths ambiguous
++_path_files:631> [[ mu/ma == */* ]]
++_path_files:632> [[ -z '' ]]
++_path_files:635> tmp1=( mutt mutt-patched ) 
++_path_files:636> _list_files tmp1 /usr/share/doc/
 +_list_files:11> local stat f elt what dir
 +_list_files:12> local -a stylevals
 +_list_files:13> integer ok
@@ -446,24 +445,14 @@
 +_list_files:16> listopts=( ) 
 +_list_files:18> zstyle -a :completion::complete:echo:: file-list stylevals
 +_list_files:18> return 1
-+_path_files:676> compadd -Qf -J -default- -p '$d/' -s '' -W /usr/share/doc/ -M 'r:|/=* r:|=*' -s /manual.txt.gz - mutt
-+_path_files:673> i=mutt-patched/manual.txt.gz
-+_path_files:674> tmpdisp=( mutt-patched ) 
-+_path_files:675> _list_files tmpdisp /usr/share/doc/
-+_list_files:11> local stat f elt what dir
-+_list_files:12> local -a stylevals
-+_list_files:13> integer ok
-+_list_files:15> listfiles=( ) 
-+_list_files:16> listopts=( ) 
-+_list_files:18> zstyle -a :completion::complete:echo:: file-list stylevals
-+_list_files:18> return 1
-+_path_files:676> compadd -Qf -J -default- -p '$d/' -s '' -W /usr/share/doc/ -M 'r:|/=* r:|=*' -s /manual.txt.gz - mutt-patched
++_path_files:637> compadd -Qf -J -default- -p '$d/' -s /ma -W /usr/share/doc/ -M 'r:|/=* r:|=*' -a tmp1
 +_path_files:696> tmp4=- 
 +_path_files:697> break
 +_path_files:741> [[ -z - ]]
 +_path_files:804> [[ _matcher_num -eq 1 ]]
 +_path_files:805> zstyle -t :completion::complete:echo::paths expand prefix
 +_path_files:813> [[ nm -ne 'compstate[nmatches]' ]]
++_files:117> ret=0 
 +_files:114> _next_label all-files expl file
 +_next_label:3> local __gopt __descr __spec
 +_next_label:5> __gopt=( ) 
@@ -471,60 +460,53 @@
 +_next_label:8> comptags -A all-files curtag __spec
 +_next_label:25> return 1
 +_files:122> ((  ret  ))
-+_files:112> _tags
-+_tags:3> local prev
-+_tags:10> [[ '' == -- ]]
-+_tags:15> ((  0  ))
-+_tags:67> comptags -N
++_files:122> break
 +_files:129> [[ '*' == \* ]]
 +_files:129> return ret
-+_default:21> [[ -o magicequalsubst ]]
-+_default:26> return 1
++_default:15> return 0
++_dispatch:82> ret=0 
 +_dispatch:84> _compskip='' 
 +_dispatch:86> return ret
++_complete:117> ret=0 
 +_complete:142> _compskip='' 
 +_complete:144> return ret
-+_main_complete:165> ((  _matcher_num++  ))
-+_main_complete:167> [[ -n '' ]]
-+_main_complete:169> ((  _completer_num++  ))
-+_main_complete:125> tmp=_ignored
-+_main_complete:127> [[ -n '' ]]
-+_main_complete:129> [[ _ignored == *:-* ]]
-+_main_complete:132> [[ _ignored == *:* ]]
-+_main_complete:136> _completer=ignored 
-+_main_complete:139> curcontext=:ignored:: 
-+_main_complete:140> zstyle -t :completion::ignored::: show-completer
-+_main_complete:143> zstyle -a :completion::ignored::: matcher-list _matchers
-+_main_complete:144> _matchers=( '' ) 
-+_main_complete:146> _matcher_num=1 
-+_main_complete:147> _matcher='' 
-+_main_complete:148> _c_matcher=
-+_main_complete:149> [[ '' == +* ]]
-+_main_complete:152> _matcher='' 
-+_main_complete:155> _comp_mesg='' 
-+_main_complete:156> [[ -n '' ]]
-+_main_complete:161> _ignored
-+_ignored:5> [[ _matcher_num -gt 1 || 0 -eq 0 ]]
-+_ignored:5> return 1
-+_main_complete:165> ((  _matcher_num++  ))
-+_main_complete:167> [[ -n '' ]]
-+_main_complete:169> ((  _completer_num++  ))
++_main_complete:162> ret=0 
++_main_complete:163> break 2
 +_main_complete:172> curcontext=::: 
 +_main_complete:173> [[ '' == keep ]]
-+_main_complete:179> nm=0 
++_main_complete:179> nm=2 
 +_main_complete:182> [[ '' == keep || nm -gt 1 ]]
-+_main_complete:297> [[ nm -lt 1 && -n '' ]]
-+_main_complete:300> [[ nm -eq 0 && -z '' && 2 -ne 0 && '' != keep ]]
-+_main_complete:302> zstyle -s :completion:::::warnings format format
++_main_complete:183> [[ _last_nmatches -ge 0 ]]
++_main_complete:186> tmp=3 
++_main_complete:188> _menu_style=( '' '' ) 
++_main_complete:190> [[ ambiguous == *list ]]
++_main_complete:194> [[ automenu-unambiguous == automenu-unambiguous ]]
++_main_complete:195> [[ -n automenu-unambiguous && -n '' ]]
++_main_complete:199> sel=( ) 
++_main_complete:201> ((  0  ))
++_main_complete:217> sel=( ) 
++_main_complete:219> ((  0  ))
++_main_complete:235> [[ -n '' || -n '' ]]
++_main_complete:239> [[ -n '' ]]
++_main_complete:241> [[ -n '' ]]
++_main_complete:248> [[ automenu-unambiguous == *menu* ]]
++_main_complete:249> [[ '' == 00 ]]
++_main_complete:250> [[ -n '' ]]
++_main_complete:252> [[ -n '' ]]
++_main_complete:258> [[ '' != 00 ]]
++_main_complete:259> sel=( ) 
++_main_complete:261> ((  0  ))
++_main_complete:280> unset MENUSELECT
++_main_complete:283> [[ -n '' ]]
 +_main_complete:320> [[ '' == always || '' == ?* ]]
 +_main_complete:324> [[ '' == keep ]]
 +_main_complete:326> ((  0  ))
 +_main_complete:329> unset ZLS_COLORS
 +_main_complete:334> funcs=( ) 
 +_main_complete:335> comppostfuncs=( ) 
-+_main_complete:340> _lastcomp=( list_lines 0 all_quotes '\' nmatches 0 pattern_match '*' restore auto context command vared '' unambiguous '' list_max 100 unambiguous_cursor 1 list ambiguous insert_positions '' unambiguous_positions '' exact '' to_end match last_prompt yes pattern_insert menu ignored 0 insert automenu-unambiguous ) 
-+_main_complete:341> _lastcomp[nmatches]=0 
-+_main_complete:342> _lastcomp[completer]=ignored 
++_main_complete:340> _lastcomp=( list_lines 1 all_quotes '\' nmatches 2 restore auto context command vared '' unambiguous '$d/mutt/ma' list_max 100 unambiguous_cursor 8 list ambiguous insert_positions 12:15 unambiguous_positions 7:10 exact '' to_end match last_prompt yes pattern_insert menu ignored 0 insert automenu-unambiguous ) 
++_main_complete:341> _lastcomp[nmatches]=2 
++_main_complete:342> _lastcomp[completer]=complete 
 +_main_complete:343> _lastcomp[prefix]='$d/mu/ma' 
 +_main_complete:344> _lastcomp[suffix]='' 
 +_main_complete:345> _lastcomp[iprefix]='' 
@@ -533,5 +515,5 @@
 +_main_complete:348> _lastcomp[qisuffix]='' 
 +_main_complete:349> _lastcomp[tags]=' all-files ' 
 +_main_complete:351> return ret
-+_complete_debug:15> integer 'ret=1'
++_complete_debug:15> integer 'ret=0'
 +_complete_debug:16> unsetopt xtrace
#v-

SchÃne GrÃÃe, JÃrg.
-- 
Alles, wovor wir Angst haben mÃssen, ist die Angst selbst.
       	     	       	     	     	 (Franklin D. Roosevelt)



Messages sorted by: Reverse Date, Date, Thread, Author