zsh-workers
 help / color / mirror / code / Atom feed
* dirstack with ksharrays
@ 2000-01-11 15:55 Tanaka Akira
  2000-01-11 16:10 ` Completion listing " Tanaka Akira
  0 siblings, 1 reply; 3+ messages in thread
From: Tanaka Akira @ 2000-01-11 15:55 UTC (permalink / raw)
  To: zsh-workers

I found that `cd -<TAB>' doesn't work with ksharrays.
It is caused by the behaviour of dirstack parametar:

Z(2):akr@is27e1u11% Src/zsh -f
is27e1u11% cd /usr
is27e1u11% pushd /etc; pushd /usr; pushd /etc; pushd /usr
/etc /usr
/usr /etc /usr
/etc /usr /etc /usr
/usr /etc /usr /etc /usr
is27e1u11% print -l $dirstack
/etc
/usr
/etc
/usr
is27e1u11% setopt ksharrays
is27e1u11% print -l $dirstack
/etc
is27e1u11% 
-- 
Tanaka Akira


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

* Completion listing with ksharrays
  2000-01-11 15:55 dirstack with ksharrays Tanaka Akira
@ 2000-01-11 16:10 ` Tanaka Akira
  0 siblings, 0 replies; 3+ messages in thread
From: Tanaka Akira @ 2000-01-11 16:10 UTC (permalink / raw)
  To: zsh-workers

In article <rsqk8lg38mu.fsf@crane.jaist.ac.jp>,
  Tanaka Akira <akr@jaist.ac.jp> writes:

> I found that `cd -<TAB>' doesn't work with ksharrays.
> It is caused by the behaviour of dirstack parametar:

No.  I found that `cd -<TAB>' 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<TAB>
file
CVS/            ChangeLog       ChangeLog.3.0   Completion/     Config/

`ls C<TAB>' lists filenames beginning with `C' as above.

is27e1u11% setopt ksharrays
is27e1u11% ls C<TAB>
file

But when ksharrays is set, completions is not listed.
-- 
Tanaka Akira


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

* Re: Completion listing with ksharrays
@ 2000-01-11 16:39 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 2000-01-11 16:39 UTC (permalink / raw)
  To: zsh-workers


Tanaka Akira wrote:

> In article <rsqk8lg38mu.fsf@crane.jaist.ac.jp>,
>   Tanaka Akira <akr@jaist.ac.jp> writes:
> 
> > I found that `cd -<TAB>' doesn't work with ksharrays.
> > It is caused by the behaviour of dirstack parametar:
> 
> No.  I found that `cd -<TAB>' 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<TAB>
> file
> CVS/            ChangeLog       ChangeLog.3.0   Completion/     Config/
> 
> `ls C<TAB>' lists filenames beginning with `C' as above.
> 
> is27e1u11% setopt ksharrays
> is27e1u11% ls C<TAB>
> 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


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

end of thread, other threads:[~2000-01-11 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-11 15:55 dirstack with ksharrays Tanaka Akira
2000-01-11 16:10 ` Completion listing " Tanaka Akira
2000-01-11 16:39 Sven Wischnowsky

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