* buggy completion for zsh [TAB]
@ 2012-04-03 14:38 Vincent Lefevre
2012-04-03 17:21 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Lefevre @ 2012-04-03 14:38 UTC (permalink / raw)
To: zsh-workers
ypig% autoload -U compinit
ypig% compinit
ypig% touch foobar
ypig% zsh [TAB]
shows all the files in the working directory.
ypig% zsh foo[TAB]
foo.html foomatic-cleanupdrivers
foo2hiperc foomatic-combo-xml
foo2hiperc-wrapper foomatic-compiledb
foo2hp foomatic-configure
foo2hp2600-wrapper foomatic-datafile
foo2lava foomatic-extract-text
foo2lava-wrapper foomatic-fix-xml
foo2oak foomatic-getpjloptions
foo2oak-wrapper foomatic-kitload
foo2qpdl foomatic-nonumericalids
foo2qpdl-wrapper foomatic-perl-data
foo2slx foomatic-ppd-options
foo2slx-wrapper foomatic-ppd-to-xml
foo2xqx foomatic-ppdfile
foo2xqx-wrapper foomatic-preferred-driver
foo2zjs foomatic-printermap-to-gutenprint-xml
foo2zjs-icc2ps foomatic-printjob
foo2zjs-pstops foomatic-replaceoldprinterids
foo2zjs-wrapper foomatic-rip
foobar foomatic-searchprinter
foomatic-addpjloptions
ypig% zsh foob[TAB]
foobar
which is not expected when the completion is unique.
If any case, following [TAB]'s have no effect.
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: buggy completion for zsh [TAB]
2012-04-03 14:38 buggy completion for zsh [TAB] Vincent Lefevre
@ 2012-04-03 17:21 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2012-04-03 17:21 UTC (permalink / raw)
To: zsh-workers
On Apr 3, 4:38pm, Vincent Lefevre wrote:
}
} ypig% zsh [TAB]
} shows all the files in the working directory.
}
} ypig% zsh foo[TAB]
[shows files and commands beginning with "foo"]
This is because _sh always falls through to _default when there are no
arguments already on the command line, instead of taking the path where
_alternative is called for files and commands which it does when there
is at least one (partial) argument.
} ypig% zsh foob[TAB]
} foobar
}
} which is not expected when the completion is unique.
}
} [In] any case, following [TAB]'s have no effect.
This seems to be happening because of the initial call to _arguments that
is done by _sh only in the zsh case. This leaves the completion seeming
to be "ambiguous". If I simply move the [[ $service == zsh ]] block to
the end of _sh, things get a lot more sensible (but there's probably some
state saving/returning that needs to be added as well).
Also as it stands, after
% zsh foobar [TAB]
the options of zsh are completed even though they're no longer valid in
that position.
--
Barton E. Schaefer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-03 17:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 14:38 buggy completion for zsh [TAB] Vincent Lefevre
2012-04-03 17:21 ` Bart Schaefer
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).