* RE: completion question [not found] <20010704142951.B4036@dlux.hu> @ 2001-07-04 12:50 ` Andrej Borsenkow 2001-07-04 13:02 ` Nadav Har'El 0 siblings, 1 reply; 7+ messages in thread From: Andrej Borsenkow @ 2001-07-04 12:50 UTC (permalink / raw) To: dLux; +Cc: ZSH users mailing list > /--- On Wed, Jul 04, 2001 at 03:10:46PM +0400, Andrej Borsenkow > wrote: > | setopt completeinword > \--- > > It does not exactly work as I want... It simply does nothing. (at > least in zsh 4.0.2, debian sid). :-( > bor@itsrm2% ~/pkg/bin/zsh -f itsrm2% bindkey -e itsrm2% echo $ZSH_VERSION 4.0.2 itsrm2% setopt completeinword itsrm2% ls /u1/box ^ cursor go back itsrm2% ls /u1/mTABbox ^ cursor itsrm2% ls /u1/mailbox/ so it works; do you use vi or emacs bindings? Do you use old (compctl) or new completion? Does it work with zsh -f (as above)? -andrej ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: completion question 2001-07-04 12:50 ` completion question Andrej Borsenkow @ 2001-07-04 13:02 ` Nadav Har'El 2001-07-04 13:27 ` Andrej Borsenkow 2001-07-04 14:45 ` dLux 0 siblings, 2 replies; 7+ messages in thread From: Nadav Har'El @ 2001-07-04 13:02 UTC (permalink / raw) To: Andrej Borsenkow; +Cc: dLux, ZSH users mailing list On Wed, Jul 04, 2001, Andrej Borsenkow wrote about "RE: completion question": > > > /--- On Wed, Jul 04, 2001 at 03:10:46PM +0400, Andrej Borsenkow > > wrote: > > | setopt completeinword > > \--- > > > > It does not exactly work as I want... It simply does nothing. (at > > least in zsh 4.0.2, debian sid). :-( > > > ... it works; do you use vi or emacs bindings? Do you use old (compctl) or > new completion? Does it work with zsh -f (as above)? Maybe what is bothering him is that if you do /u_local/ ^--- cursor (no space) and press TAB, nothing is completed. If you enter a slash, however, it works: /u/_local/ (or /u_/local/) is completed to /usr/local/ But if you don't type in that extra slash explicitly, completeinword doesn't seem to be doing what he wants. -- Nadav Har'El | Wednesday, Jul 4 2001, 13 Tammuz 5761 nyh@math.technion.ac.il |----------------------------------------- Phone: +972-53-245868, ICQ 13349191 |Don't be irreplaceable. If you can't be http://nadav.harel.org.il |replaced, you can't be promoted. ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: completion question 2001-07-04 13:02 ` Nadav Har'El @ 2001-07-04 13:27 ` Andrej Borsenkow 2001-07-04 14:45 ` dLux 1 sibling, 0 replies; 7+ messages in thread From: Andrej Borsenkow @ 2001-07-04 13:27 UTC (permalink / raw) To: Nadav Har'El; +Cc: dLux, ZSH users mailing list > Maybe what is bothering him is that if you do > > /u_local/ > ^--- cursor (no space) > and press TAB, nothing is completed. If you enter a slash, > however, it works: > > /u/_local/ (or /u_/local/) > is completed to > /usr/local/ > Ah, I see. Well, somebody else have to answer this. I guess, this is what _prefix completer is for, but I never used it. As a quick try (assuming, you are using new completion): bor@itsrm2% setopt completeinword bor@itsrm2% zstyle ':completion:*' completer _oldlist _prefix _complete _match bor@itsrm2% l /usTABcal bor@itsrm2% l /usr/cal ^ cursor here It still behaves differently; zsh totally ignores suffix, while bash not. Next TAB in above example gives you in bash: MW1G017@MW1G17C ~ $ ls /usr/cal bin include local share doc info logs src etc lib man ssl i686-pc-cygwin libexec sbin tmp in zsh: bor@itsrm2% l /usr/TT_DB/cal Completing files TT_DB/ add-on/ adm@ admin/ bin/ ccs/ crash@ dt@ games/ ic/ include/ lbin/ lib/ lib64s/ local/ lost+found/ mail@ menus/ net/ news@ oasys/ opt/ options@ pkg/ preserve@ pub@ sadm/ sbin/ share/ spool@ src/ sysadm/ tmp@ ucb/ ucbinclude/ ucblib/ vmsys/ (ignore list settings). I do not know how to make them behave identically. OTOH in zsh you do not need to go back; just say /u/bTAB and it will be completed to /usr/bing. Much better :-) -andrej ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: completion question 2001-07-04 13:02 ` Nadav Har'El 2001-07-04 13:27 ` Andrej Borsenkow @ 2001-07-04 14:45 ` dLux 2001-07-04 15:43 ` Sven Wischnowsky 1 sibling, 1 reply; 7+ messages in thread From: dLux @ 2001-07-04 14:45 UTC (permalink / raw) To: Nadav Har'El; +Cc: Andrej Borsenkow, ZSH users mailing list /--- On Wed, Jul 04, 2001 at 04:02:17PM +0300, Nadav Har'El wrote: | Maybe what is bothering him is that if you do | | /u_local/ | ^--- cursor (no space) | and press TAB, nothing is completed. If you enter a slash, | however, it works: | | /u/_local/ (or /u_/local/) | is completed to | /usr/local/ | | But if you don't type in that extra slash explicitly, | completeinword doesn't | seem to be doing what he wants. \--- Yes, absolutely. I don't have chance to read the whole zsh documentation, it is very huge! I want zsh to ignore the "local/" part of the example, and complete the word as I want... dLux -- ... Végy egy Magnumot és fogd rá a Nyuszira! ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: completion question 2001-07-04 14:45 ` dLux @ 2001-07-04 15:43 ` Sven Wischnowsky 2001-07-04 15:47 ` Sven Wischnowsky 0 siblings, 1 reply; 7+ messages in thread From: Sven Wischnowsky @ 2001-07-04 15:43 UTC (permalink / raw) To: zsh-users dLux wrote: > ... > > Yes, absolutely. I don't have chance to read the whole zsh > documentation, it is very huge! > > I want zsh to ignore the "local/" part of the example, and complete > the word as I want... If you use compctl-based completions, just use another key binding: bindkey '^I' expand-or-complete-prefix That `-prefix' means that it will ignore the `suffix', i.e. the part after the cursor when completing. If you use the new completion system (the one invoked by `compinit'), then, as Andrej pointed out, you want to use the _prefix completer which does the same. You set that up with: zstyle ':completion:*' completer _complete _prefix to make it try normal completion (from both ends if `completeinword' is set) first, or by using the _prefix completer exclusively: zstyle ':completion:*' completer _prefix zstyle ':completion:*:prefix:*' completer _complete (or whichever completer you use or compinstall has set up for you). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: completion question 2001-07-04 15:43 ` Sven Wischnowsky @ 2001-07-04 15:47 ` Sven Wischnowsky 2001-07-05 14:31 ` 4.0.2 Nick Cross 0 siblings, 1 reply; 7+ messages in thread From: Sven Wischnowsky @ 2001-07-04 15:47 UTC (permalink / raw) To: zsh-users And I forgot to say: dLux wrote: > Yes, absolutely. I don't have chance to read the whole zsh > documentation, it is very huge! For the completion system (and other things), start with Peter's user friendly user's guide, available at www.zsh.org. Very good reading. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* 4.0.2 2001-07-04 15:47 ` Sven Wischnowsky @ 2001-07-05 14:31 ` Nick Cross 0 siblings, 0 replies; 7+ messages in thread From: Nick Cross @ 2001-07-05 14:31 UTC (permalink / raw) To: zsh-users Hi, I just downloaded 4.0.2 off sourceforge and compiled it. No changes to configure were made barring changing the prefix to /usr. As suggested I ran the tests and had C02 fail with a bad status: [root@excalibur zsh-4.0.2]# make TESTNUM=C02 check cd Test ; make check make[1]: Entering directory `/root/zsh-4.0.2/Test' if test -n "gcc"; then \ cd .. && \ make MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \ fi mkdir /root/zsh-4.0.2/Test/Modules mkdir /root/zsh-4.0.2/Test/Modules/zsh for f in ./C02*.ztst; do \ ../Src/zsh +Z -f ./ztst.zsh $f; \ done ./C02cond.ztst: starting. Test ./C02cond.ztst failed: bad status 1, expected 0 from: [[ -r zerolength && ! -r unmodish ]] Was testing: -r cond ./C02cond.ztst: test failed. make[1]: [check] Error 1 (ignored) rm -rf Modules .zcompdump make[1]: Leaving directory `/root/zsh-4.0.2/Test' Are they are all expected to pass? Is this serious enough to stop trying to install zsh? Cheers, Nick ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2001-07-05 14:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20010704142951.B4036@dlux.hu> 2001-07-04 12:50 ` completion question Andrej Borsenkow 2001-07-04 13:02 ` Nadav Har'El 2001-07-04 13:27 ` Andrej Borsenkow 2001-07-04 14:45 ` dLux 2001-07-04 15:43 ` Sven Wischnowsky 2001-07-04 15:47 ` Sven Wischnowsky 2001-07-05 14:31 ` 4.0.2 Nick Cross
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).