zsh-users
 help / color / mirror / code / Atom feed
* Auto-completion isn't working
@ 2005-05-17  9:41 Fafa Hafiz Krantz
  2005-05-17 15:53 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Fafa Hafiz Krantz @ 2005-05-17  9:41 UTC (permalink / raw)
  To: zsh-users


Hello.

Something is wrong. This configuration makes auto-completion work
like a charm. However, on my FreeBSD 5.4-STABLE server, it doesn't.

http://www.home.no/hedhnta/zshrc
http://www.home.no/hedhnta/zsh-x

I hope that's enough for someone to tell me what's wrong.

Appreciate!

--

Fafa Hafiz Krantz
  Research Designer @ http://www.bleed.no


-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Auto-completion isn't working
  2005-05-17  9:41 Auto-completion isn't working Fafa Hafiz Krantz
@ 2005-05-17 15:53 ` Bart Schaefer
  0 siblings, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2005-05-17 15:53 UTC (permalink / raw)
  To: zsh-users

On May 17,  4:41am, Fafa Hafiz Krantz wrote:
}
} I hope that's enough for someone to tell me what's wrong.

No, it's not enough.  "Doesn't work" is not an adequate description.

One last time, and then I'm giving up on you:  Describe, in as much
detail as possible, what happens (or does not) to you when you are
using the shell interactively.  Provide an example, such as:

  I have a directory containing these seven files:
    (... list them ...)

  When I type ls followed by a space and then press TAB, zsh just beeps
  at me.  This happens even if I press TAB repeatedly.  I expected to 
  see a listing of the seven files.

Ideally, you will also have run the "complete-debug" widget by typing
control+x question-mark INSTEAD OF a TAB at some time when you are
having trouble with completion.  This widget writes a file with a long
trace of everything the completion system is doing.  If that file is
empty, or if you get some different kind of error when you press the two
keys control+x followed by a question mark (NOT control with question
mark), then tell us what that error is as well.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Auto-completion isn't working
  2005-05-22 19:56 Fafa Hafiz Krantz
@ 2005-05-23  7:45 ` Oliver Kiddle
  0 siblings, 0 replies; 6+ messages in thread
From: Oliver Kiddle @ 2005-05-23  7:45 UTC (permalink / raw)
  To: Fafa Hafiz Krantz; +Cc: zsh-users

"Fafa Hafiz Krantz" wrote:
> 
> > The initialization did occur -- otherwise, _complete_debug would not
> > have worked -- so something else is causing _comps to become empty.
> 
> Pardon my ignorance. But what's next?

My guess is that there's something up with the .zcompdump file. That's a
file in your home directory that caches information about available
completion functions. If you remove it and log in again, the problem may
be fixed.

Before deleting .zcompdump, can you take a backup. If removing it fixes
the problem, please e-mail us a copy of the bad .zcompdump file. We may
be able to make it more robust (comparing _comps to #files perhaps).

Oliver


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Auto-completion isn't working
@ 2005-05-22 19:56 Fafa Hafiz Krantz
  2005-05-23  7:45 ` Oliver Kiddle
  0 siblings, 1 reply; 6+ messages in thread
From: Fafa Hafiz Krantz @ 2005-05-22 19:56 UTC (permalink / raw)
  To: Bart Schaefer, zsh-users


> The initialization did occur -- otherwise, _complete_debug would not
> have worked -- so something else is causing _comps to become empty.

Hello Bart!

Pardon my ignorance. But what's next?

--

Fafa Hafiz Krantz
  Research Designer @ http://www.home.no/barbershop
  Enlightened @ http://www.home.no/barbershop/smart/sharon.pdf



-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Auto-completion isn't working
  2005-05-22 10:46 Fafa Hafiz Krantz
@ 2005-05-22 16:31 ` Bart Schaefer
  0 siblings, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2005-05-22 16:31 UTC (permalink / raw)
  To: Fafa Hafiz Krantz, zsh-users

On May 22,  5:46am, Fafa Hafiz Krantz wrote:
}
} I provided you with my zshrc, and the output of zsh -x.
} Indeed that ought to tell you something?

Yes, it told me that everything appeared to be in proper working order
up to that point.

However, the _complete_debug output indicates that the $_comps array
is empty -- or, at least, it doesn't have the entries for "cd" and
"-default-" which is a pretty good indication that it doesn't have
entries for anything -- so somehow all that initialization has been
lost.

The initialization did occur -- otherwise, _complete_debug would not
have worked -- so something else is causing _comps to become empty.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Auto-completion isn't working
@ 2005-05-22 10:46 Fafa Hafiz Krantz
  2005-05-22 16:31 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Fafa Hafiz Krantz @ 2005-05-22 10:46 UTC (permalink / raw)
  To: Bart Schaefer, zsh-users


Hello Mr. Bart Schaefer!

> No, it's not enough.  "Doesn't work" is not an adequate description.

I provided you with my zshrc, and the output of zsh -x.
Indeed that ought to tell you something?

> One last time, and then I'm giving up on you:  Describe, in as much
> detail as possible, what happens (or does not) to you when you are
> using the shell interactively.

This is my home:

(johann@ninja)(12:38:05/22/05)
(%:~) ls -l
total 12
drwxr-xr-x  3 johann  wheel  512 May 12 12:11 bin
drwxr-xr-x  2 johann  wheel  512 May 21 17:09 bkp
drwxr-xr-x  5 johann  wheel  512 May 19 12:10 doc
drwxr-xr-x  4 johann  wheel  512 May 10 12:35 etc
drwxr-xr-x  4 johann  wheel  512 May 12 12:16 ftp
drwxr-xr-x  6 johann  wheel  512 May 20 20:46 tmp
lrwxr-xr-x  1 johann  wheel   14 Dec  8 12:34 www -> /usr/home/www/

When, let's say, I want to enter ftp/archive, then the auto-completion
feature would allow me to press f<tab> and then a<tab>. But f<tab> doesn't
complete to ftp/ in zsh. Instead it just beeps.

When I switch to tcsh, however, auto-completion works.

> Ideally, you will also have run the "complete-debug" widget by typing
> control+x question-mark INSTEAD OF a TAB at some time when you are
> having trouble with completion.  This widget writes a file with a long
> trace of everything the completion system is doing.  If that file is
> empty, or if you get some different kind of error when you press the two
> keys control+x followed by a question mark (NOT control with question
> mark), then tell us what that error is as well.

Cool, this gave me some more output:

+_complete_debug:13> _main_complete
+_main_complete:7> local 'IFS=  
^@'
+_main_complete:21> eval 'setopt localoptions localtraps ${_comp_options[@]};
             exec </dev/null;
             trap - ZERR'
+(eval):1> setopt localoptions localtraps glob bareglobqual nullglob rcexpandparam extendedglob unset NO_markdirs NO_globsubst NO_shwordsplit NO_shglob NO_k
shglob NO_ksharrays NO_kshtypeset NO_cshnullglob NO_allexport NO_aliases NO_errexit NO_octalzeroes
+(eval):3> trap - ZERR
+_main_complete:23> local func funcs 'ret=1' tmp _compskip format nm call match min max i num _completers _completer _completer_num curtag _comp_force_list 
_matchers _matcher _c_matcher _matcher_num _comp_tags _comp_mesg mesg str context state line opt_args val_args 'curcontext=' '_last_nmatches=-1' _last_menu_
style _def_menu_style _menu_style sel '_tags_level=0' '_saved_exact=' '_saved_lastprompt=yes' '_saved_list=ambiguous' '_saved_insert=automenu-unambiguous' '
_saved_colors='
+_main_complete:35> typeset -U _lastdescr _comp_ignore _comp_colors
+_main_complete:37> [[ -z '' ]]
+_main_complete:37> curcontext=::: 
+_main_complete:39> zstyle -s :completion::::: insert-tab tmp
+_main_complete:39> tmp=yes 
+_main_complete:41> [[ yes == '*pending(|[[:blank:]]*)' || yes == '*pending=(#b)([0-9]##)(|[[:blank:]]*)' ]]
+_main_complete:49> [[ automenu-unambiguous == 'tab*' ]]
+_main_complete:59> [[ -z '' ]]
+_main_complete:60> [[ -o equals ]]
+_main_complete:60> compset -P 1 '='
+_main_complete:62> [[ e != '*/*' && e == '~' ]]
+_main_complete:70> _setup default
+_setup:3> local val 'nm=0'
+_setup:5> [[ 1 -eq 1 ]]
+_setup:5> 2=default 
+_setup:7> zstyle -a :completion:::::default list-colors val
+_setup:8> zmodload -i zsh/complist
+_setup:9> [[ default == default ]]
+_setup:10> _comp_colors=( ) 
+_setup:26> zstyle -t :completion:::::default list-packed
+_setup:28> [[ 2 -eq 1 ]]
+_setup:31> compstate[list]=ambiguous 
+_setup:34> zstyle -t :completion:::::default list-rows-first
+_setup:36> [[ 2 -eq 1 ]]
+_setup:39> compstate[list]=ambiguous 
+_setup:42> zstyle -t :completion:::::default last-prompt
+_setup:44> [[ 2 -eq 1 ]]
+_setup:47> compstate[last_prompt]=yes 
+_setup:50> zstyle -t :completion:::::default accept-exact
+_setup:52> [[ 2 -eq 1 ]]
+_setup:55> compstate[exact]='' 
+_setup:58> [[ _last_nmatches -ge 0 ]]
+_setup:61> zstyle -a :completion:::::default menu val
+_setup:65> _last_nmatches=-1 
+_setup:68> [[ '' != always ]]
+_setup:69> zstyle -s :completion:::::default force-list val
+_main_complete:71> _def_menu_style=( '' ) 
+_main_complete:80> _last_menu_style=( ) 
+_main_complete:82> zstyle -s :completion:::::default list-prompt tmp
+_main_complete:86> zstyle -s :completion:::::default select-prompt tmp
+_main_complete:90> zstyle -s :completion:::::default select-scroll tmp
+_main_complete:97> ((  0  ))
+_main_complete:109> zstyle -a :completion::::: completer _completers
+_main_complete:115> _completer_num=1 
+_main_complete:119> funcs=( ) 
+_main_complete:120> compprefuncs=( ) 
+_main_complete:125> tmp=_complete
+_main_complete:127> [[ -n '' ]]
+_main_complete:129> [[ _complete == '*:-*' ]]
+_main_complete:132> [[ _complete == '*:*' ]]
+_main_complete:136> _completer=complete 
+_main_complete:139> curcontext=:complete:: 
+_main_complete:140> zstyle -t :completion::complete::: show-completer
+_main_complete:143> zstyle -a :completion::complete::: 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> _complete
+_complete:7> local comp name oldcontext 'ret=1' service
+_complete:8> typeset -T 'curcontext=:complete::' ccarray
+_complete:10> oldcontext=:complete:: 
+_complete:14> [[ -n '' ]]
+_complete:96> comp='' 
+_complete:97> [[ -n '' ]]
+_complete:110> [[ -n '' ]]
+_complete:114> ret=1 
+_complete:115> [[ command == command ]]
+_complete:116> curcontext=:complete:: 
+_complete:117> _normal -s
+_normal:3> local _comp_command1 _comp_command2 _comp_command skip
+_normal:5> [[ -s == -s ]]
+_normal:6> skip=( -s ) 
+_normal:14> [[ CURRENT -eq 1 ]]
+_normal:23> _set_command
+_set_command:6> local command
+_set_command:8> command=cd 
+_set_command:10> [[ -z cd ]]
+_set_command:12> ((  1 + 0  ))
+_set_command:13> _comp_command1=cd 
+_set_command:14> _comp_command=cd 
+_normal:25> _dispatch -s cd cd '' -default-
+_dispatch:3> local comp pat val name i 'ret=1' '_compskip='
+_dispatch:4> local 'curcontext=:complete::' service str noskip
+_dispatch:8> [[ -s == -s ]]
+_dispatch:9> noskip=yes 
+_dispatch:10> shift
+_dispatch:13> [[ -z yes ]]
+_dispatch:15> curcontext=:complete:cd: 
+_dispatch:17> shift
+_dispatch:21> [[ '' != '(all|*patterns*)' ]]
+_dispatch:23> str=cd
+_dispatch:24> [[ -n cd ]]
+_dispatch:25> service=cd 
+_dispatch:23> str=
+_dispatch:24> [[ -n '' ]]
+_dispatch:24> continue
+_dispatch:23> str=-default-
+_dispatch:24> [[ -n -default- ]]
+_dispatch:25> service=-default- 
+_dispatch:40> ret=1 
+_dispatch:41> str=cd
+_dispatch:42> [[ -n cd ]]
+_dispatch:46> str=cd 
+_dispatch:47> name=cd 
+_dispatch:48> comp='' 
+_dispatch:49> service=cd 
+_dispatch:51> [[ -z '' ]]
+_dispatch:41> str=
+_dispatch:42> [[ -n '' ]]
+_dispatch:42> continue
+_dispatch:41> str=-default-
+_dispatch:42> [[ -n -default- ]]
+_dispatch:46> str=-default- 
+_dispatch:47> name=-default- 
+_dispatch:48> comp='' 
+_dispatch:49> service=-default- 
+_dispatch:51> [[ -z '' ]]
+_dispatch:56> [[ -n '' ]]
+_dispatch:62> [[ '' != '(all|*patterns*)' ]]
+_dispatch:63> str=cd
+_dispatch:64> [[ -n cd ]]
+_dispatch:65> service=cd 
+_dispatch:79> [[ -default- == -default- && -n '' ]]
+_dispatch:84> _compskip='' 
+_dispatch:86> return ret
+_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=_prefix
+_main_complete:127> [[ -n '' ]]
+_main_complete:129> [[ _prefix == '*:-*' ]]
+_main_complete:132> [[ _prefix == '*:*' ]]
+_main_complete:136> _completer=prefix 
+_main_complete:139> curcontext=:prefix:: 
+_main_complete:140> zstyle -t :completion::prefix::: show-completer
+_main_complete:143> zstyle -a :completion::prefix::: 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> _prefix
+_prefix:5> [[ _matcher_num -gt 1 || -z '' ]]
+_prefix:5> return 1
+_main_complete:165> ((  _matcher_num++  ))
+_main_complete:167> [[ -n '' ]]
+_main_complete:169> ((  _completer_num++  ))
+_main_complete:172> curcontext=::: 
+_main_complete:173> [[ '' == keep ]]
+_main_complete:179> nm=0 
+_main_complete:182> [[ '' == keep || nm -gt 1 ]]
+_main_complete:297> [[ nm -lt 1 && -n '' ]]
+_main_complete:300> [[ nm -eq 0 && -z '' && 0 -ne 0 ]]
+_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 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-unambiguo
us ) 
+_main_complete:341> _lastcomp[nmatches]=0 
+_main_complete:342> _lastcomp[completer]=prefix 
+_main_complete:343> _lastcomp[prefix]=e 
+_main_complete:344> _lastcomp[suffix]='' 
+_main_complete:345> _lastcomp[iprefix]='' 
+_main_complete:346> _lastcomp[isuffix]='' 
+_main_complete:347> _lastcomp[qiprefix]='' 
+_main_complete:348> _lastcomp[qisuffix]='' 
+_main_complete:349> _lastcomp[tags]='' 
+_main_complete:351> return ret
+_complete_debug:14> integer 'ret=1'
+_complete_debug:15> unsetopt xtrace

Thank you so much, Mr. Bart Schaefer,
for wanting to help.

--

Fafa Hafiz Krantz
  Research Designer @ http://www.home.no/barbershop
  Enlightened @ http://www.home.no/barbershop/smart/sharon.pdf



-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-23  7:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-17  9:41 Auto-completion isn't working Fafa Hafiz Krantz
2005-05-17 15:53 ` Bart Schaefer
2005-05-22 10:46 Fafa Hafiz Krantz
2005-05-22 16:31 ` Bart Schaefer
2005-05-22 19:56 Fafa Hafiz Krantz
2005-05-23  7:45 ` Oliver Kiddle

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).