From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18385 invoked from network); 11 Jan 2000 16:40:00 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Jan 2000 16:40:00 -0000 Received: (qmail 18242 invoked by alias); 11 Jan 2000 16:39:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9291 Received: (qmail 18216 invoked from network); 11 Jan 2000 16:39:49 -0000 Date: Tue, 11 Jan 2000 17:39:47 +0100 (MET) Message-Id: <200001111639.RAA28636@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 12 Jan 2000 01:10:14 +0900 Subject: Re: Completion listing with ksharrays Tanaka Akira wrote: > In article , > Tanaka Akira writes: > > > I found that `cd -' doesn't work with ksharrays. > > It is caused by the behaviour of dirstack parametar: > > No. I found that `cd -' problem is not dirstack/cd dependent. > > Z(2):akr@is27e1u11% Src/zsh -f > is27e1u11% bindkey -e; autoload -U compinit; compinit -D > is27e1u11% zstyle ':completion*' group-name '' > is27e1u11% zstyle ':completion*:descriptions' format '%d' > is27e1u11% ls C > file > CVS/ ChangeLog ChangeLog.3.0 Completion/ Config/ > > `ls C' lists filenames beginning with `C' as above. > > is27e1u11% setopt ksharrays > is27e1u11% ls C > file > > But when ksharrays is set, completions is not listed. I needed some time to find out what was going on... With ksharrays array subscripts may only be given inside `${...}' but in _main_complete subscripts without the braces were used before ksharrays was unset. Bye Sven diff -ru ../z.old/Completion/Core/_main_complete Completion/Core/_main_complete --- ../z.old/Completion/Core/_main_complete Tue Jan 11 10:06:47 2000 +++ Completion/Core/_main_complete Tue Jan 11 17:37:32 2000 @@ -16,14 +16,16 @@ # which makes the output of setopt and unsetopt reflect a different # state than the global one for which you are completing. +setopt localoptions nullglob rcexpandparam extendedglob +unsetopt markdirs globsubst shwordsplit nounset ksharrays local comp post ret=1 _compskip _prio_num=1 format \ context state line opt_args val_args curcontext="$curcontext" \ _last_nmatches=-1 _last_menu_style _def_menu_style _menu_style sel \ - _saved_exact="$compstate[exact]" \ - _saved_lastprompt="$compstate[last_prompt]" \ - _saved_list="$compstate[list]" \ - _saved_insert="$compstate[insert]" + _saved_exact="${compstate[exact]}" \ + _saved_lastprompt="${compstate[last_prompt]}" \ + _saved_list="${compstate[list]}" \ + _saved_insert="${compstate[insert]}" typeset -U _offered_tags _tried_tags _failed_tags _used_tags _unused_tags @@ -32,9 +34,6 @@ _failed_tags=() typeset -U _lastdescr - -setopt localoptions nullglob rcexpandparam extendedglob -unsetopt markdirs globsubst shwordsplit nounset ksharrays # Special completion contexts after `~' and `='. -- Sven Wischnowsky wischnow@informatik.hu-berlin.de