zsh-workers
 help / color / mirror / code / Atom feed
* Re: BUG: RE: What happened to _path_files?
@ 1999-10-11 12:31 Sven Wischnowsky
  1999-10-11 13:59 ` Andrej Borsenkow
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 1999-10-11 12:31 UTC (permalink / raw)
  To: zsh-workers


Andrej Borsenkow wrote:

> It looks, like ambiguous completion does not work any more. It is not
> _path_files - it works correctly and compadd's all needed info. But for whatever
> reason completion C-code does not like it.

Only if the thing starts with a slash, right? The PREFIX parameter
wasn't set correctly.

Bye
 Sven

diff -u oldcompletion/Core/_path_files Completion/Core/_path_files
--- oldcompletion/Core/_path_files	Mon Oct 11 13:30:19 1999
+++ Completion/Core/_path_files	Mon Oct 11 14:30:01 1999
@@ -354,10 +354,10 @@
       # it as far as possible.
 
       if [[ "$tmp3" = */* ]]; then
-        PREFIX="${linepath}${cpre}${tmp3%%/*}"
+        PREFIX="${donepath}${linepath}${cpre}${tmp3%%/*}"
 	SUFFIX="/${tmp3#*/}"
       else
-        PREFIX="${linepath}${cpre}${tmp3}"
+        PREFIX="${donepath}${linepath}${cpre}${tmp3}"
 	SUFFIX=""
       fi
 

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

* RE: BUG: RE: What happened to _path_files?
  1999-10-11 12:31 BUG: RE: What happened to _path_files? Sven Wischnowsky
@ 1999-10-11 13:59 ` Andrej Borsenkow
  1999-10-11 14:58   ` Prblems with _match and exact matches (was: RE: BUG: RE: What happened to _path_files?) Andrej Borsenkow
  0 siblings, 1 reply; 3+ messages in thread
From: Andrej Borsenkow @ 1999-10-11 13:59 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers

>
> Only if the thing starts with a slash, right? The PREFIX parameter
> wasn't set correctly.
>

Still something strange:

bor@itsrm2:~%> zsh -f
itsrm2% autoload compinit; compinit -D
itsrm2% ls /tools/share/zsh
functions      functions.old
itsrm2% ls /t/s/z/f/_<TAB>
itsrm2% ls /tools/share/zsh/functions/_<TAB>
itsrm2% ls /tools/share/zsh/functions/_
zsh: do you wish to see all 180 possibilities?

but, I do have _* in functions.old:

itsrm2% ls /tools/share/zsh/functions.old
_a2ps                   _other_accounts         _tilde
_cd                     _path_files             _urls
_history_complete_word  _perl_modules           _yodl
_man                    _perldoc                compinit
_my_accounts            _rpm

so, I'd expect to presented with ambiguous "functions functions.old" ... or was
something changed in respect to exact matches? I remember, we already had almost
the same problem back in pre-3.1.6.

With my settings it is even worse:

bor@itsrm2:~%> l /t/s/z/f/_<TAB>
bor@itsrm2:~%> l /tools/share/zsh/functions/_<TAB>
functions/      functions.old/
bor@itsrm2:~%> l /tools/share/zsh/functions/_a2ps<TAB>
unctions/      functions.old/
bor@itsrm2:~%> l /tools/share/zsh/functions/_aliases
functions/      functions.old/

...

I rememeber having exactly the same bug once ...

bor@itsrm2:~%> compconf -L
compconf correct_accept='2n'
compconf match_original='yes'
compconf completer='_oldlist:_complete:_match'
compconf dumpfile='/home/bor/.zcompdump'
compconf oldlist_list='_match'
compconf path_cursor='yes'
compconf match_insert='unambig'
compconf correct_prompt='correct to:'
bor@itsrm2:~%>

/andrej


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

* Prblems with _match and exact matches (was: RE: BUG: RE: What happened to _path_files?)
  1999-10-11 13:59 ` Andrej Borsenkow
@ 1999-10-11 14:58   ` Andrej Borsenkow
  0 siblings, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 1999-10-11 14:58 UTC (permalink / raw)
  To: Sven Wischnowsky, zsh-workers


>
> With my settings it is even worse:
>
> bor@itsrm2:~%> l /t/s/z/f/_<TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions/_<TAB>
> functions/      functions.old/
>

Just to make sure - the actual bug is, that cursor is moved to the end of word
and not to the end of ambiguous part (path_cursor). I just tried with
zsh-3.1.6-pws-3 - and there it is the same ... so, may be, it was there for a
long time.

It happens only if one match is a prefix of another (i.e. one match is exact)
and there is no exact match for suffix. With 3.1.6-pws-3 it does not happen with
_match:

itsrm2% l /t/s/z/f*/_<TAB>
itsrm2% l /tools/share/zsh/functions<CURSOR HERE>/_
functions/      functions.old/

but with 3.1.6-pws-6 + all current patches:

or@itsrm2:~%> l /t/s/z/f*/_<TAB>

just beeps.

If suffix is exact, that works as expected:

bor@itsrm2:~/test%> l ~/test/(ls|lss)
/home/bor/test/ls:
a     acc

/home/bor/test/lss:
a     acc

bor@itsrm2:~/test%> l /h/b/t/l/a<TAB>
bor@itsrm2:~/test%> l /home/bor/test/ls<CURSOR HERE>/a
ls/   lss/

It still works even in this case:

bor@itsrm2:~/test%> l ~/test/(ls|lss)
/home/bor/test/ls:
ab     acc

/home/bor/test/lss:
a     acc

But not in this

bor@itsrm2:~/test%> l ~/test/(ls|lss)
/home/bor/test/ls:
ab     acc

/home/bor/test/lss:
ab     acc

My setings in ~/.zshrc are:

ompconf completer=_oldlist:_complete:_match
compconf match_original=yes
compconf match_insert=unambig
compconf path_cursor=yes
compconf oldlist_list=_match
LS_COLORS=
SELECTMIN=0
setopt cdablevars
setopt extendedhistory
setopt extendedglob
setopt histexpiredupsfirst
setopt histignorealldups
setopt histignoredups
setopt histreduceblanks
setopt histsavenodups
setopt ignoreeof
setopt nobanghist
setopt nolistambiguous
setopt nolistbeep

/andrej


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

end of thread, other threads:[~1999-10-11 14:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-11 12:31 BUG: RE: What happened to _path_files? Sven Wischnowsky
1999-10-11 13:59 ` Andrej Borsenkow
1999-10-11 14:58   ` Prblems with _match and exact matches (was: RE: BUG: RE: What happened to _path_files?) Andrej Borsenkow

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