zsh-users
 help / color / mirror / code / Atom feed
* Completion question
@ 2002-08-09  6:51 Byron Foster
  2002-08-09  7:28 ` Sven Wischnowsky
  0 siblings, 1 reply; 23+ messages in thread
From: Byron Foster @ 2002-08-09  6:51 UTC (permalink / raw)
  To: zsh-users


Hello,

      I can't figure out how to configure the completion system so that 
only directories are listed after typing 'rm -r ' at the command line, 
but without the the '-r' option only list files.  Can I do this by only 
using styles, or do I need to write an _rm function? Im using zsh 4.0.4

so far for only listing files I have

zstyle ':completion:*:complete:rm:*' file-patterns '*(^-/):files'

Of course this breaks 'rm -r'


Thanks,
Byron


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

* Re: Completion question
  2002-08-09  6:51 Completion question Byron Foster
@ 2002-08-09  7:28 ` Sven Wischnowsky
  2002-08-11  3:29   ` Byron Foster
  0 siblings, 1 reply; 23+ messages in thread
From: Sven Wischnowsky @ 2002-08-09  7:28 UTC (permalink / raw)
  To: zsh-users


Byron Foster wrote:

> 
> Hello,
> 
>       I can't figure out how to configure the completion system so that 
> only directories are listed after typing 'rm -r ' at the command line, 
> but without the the '-r' option only list files.  Can I do this by only 
> using styles, or do I need to write an _rm function? Im using zsh 4.0.4
> 
> so far for only listing files I have
> 
> zstyle ':completion:*:complete:rm:*' file-patterns '*(^-/):files'
> 
> Of course this breaks 'rm -r'

You can always use the `-e' option and then have a look at the $words
array, which is one of the special parameters set by the completion
code. It contains the word on the line. So:

  zstyle -e ':completion:*:complete:rm:*' file-patterns '
    if (( $words[(I)-r] )); then                                               
      reply=("*(-/):directories")                                                
    else                                                                       
      reply=("*(^-/):files")                                                     
    fi' 

This doesn't catch the case where the `-r' option is put together with
other options in the same string (like `-ir').

Even if there were a function for `rm' which would do option parsing,
there currently were no way of smuggling code into it to take
advantage of the information about options on the line gathered there.
Except for that `-e' thing above (if a `_rm' function would use
_arguments we should have $opt_args available inside that code).


Bye
  Sven

-- 
Sven Wischnowsky                          wischnow@berkom.de


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

* Re: Completion question
  2002-08-09  7:28 ` Sven Wischnowsky
@ 2002-08-11  3:29   ` Byron Foster
  0 siblings, 0 replies; 23+ messages in thread
From: Byron Foster @ 2002-08-11  3:29 UTC (permalink / raw)
  To: zsh-users

Sven Wischnowsky wrote:
 > Byron Foster wrote:
 >
 >
 >>Hello,
 >>
 >>      I can't figure out how to configure the completion system so that
 >>only directories are listed after typing 'rm -r ' at the command line,
 >>but without the the '-r' option only list files.  Can I do this by only
 >>using styles, or do I need to write an _rm function? Im using zsh 4.0.4
 >>
 >>so far for only listing files I have
 >>
 >>zstyle ':completion:*:complete:rm:*' file-patterns '*(^-/):files'
 >>
 >>Of course this breaks 'rm -r'
 >
 >
 > You can always use the `-e' option and then have a look at the $words
 > array, which is one of the special parameters set by the completion
 > code. It contains the word on the line. So:
 >
 >   zstyle -e ':completion:*:complete:rm:*' file-patterns '
 >     if (( $words[(I)-r] )); then 

 >       reply=("*(-/):directories") 

 >     else 

 >       reply=("*(^-/):files") 

 >     fi'

Thanks, that works nicely for both rm and cp.

 > Even if there were a function for `rm' which would do option parsing,
 > there currently were no way of smuggling code into it to take
 > advantage of the information about options on the line gathered there.
 > Except for that `-e' thing above (if a `_rm' function would use
 > _arguments we should have $opt_args available inside that code).

I don't know enough, even though I'm learning,  about the guts of the 
completion functions to really follow what you are saying.  However, 
couldn't you just do what you did in the style definition, but do it in 
the _rm function?  that is select tags based on the contents of $words. 
    Doesn't the _arguments function do this for you?  Again, I don't 
know allot about these function, so I may be making no sense.

Thanks,
Byron



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

* Re: Completion question
  2011-06-06 22:33 ` meino.cramer
  2011-06-07  5:12   ` Jun T.
  2011-06-07  8:29   ` Peter Stephenson
@ 2011-06-07  8:53   ` Jérémie Roquet
  2 siblings, 0 replies; 23+ messages in thread
From: Jérémie Roquet @ 2011-06-07  8:53 UTC (permalink / raw)
  To: Zsh Users; +Cc: meino.cramer

2011/6/7  <meino.cramer@gmx.de>:
>>mpla/home/me/data/subdira/subdirb/The Long and winding commandline.wav
>     ^
>
> If I press TAB now, nothing happens, since zsh seems to take the
> whole commandline into account while searching for a possible
> completion. And of course
> "mpla/home/me/data/subdira/subdirb/The Long and winding commandline.wav"
> is not know as a command on my system... ;)
>
> Is it possible to configure zsh to only take the string from the
> beginning up to the position of the cursor into account for the
> completion processing ?

Maybe a stupid answer, but you just have to add a space for the
completion to work as expected, ie:

“mpla /home/me/data/subdira/subdirb/The Long and winding commandline.wav”

…with the cursor just after “mpla”.

Since it's something you probably do often (at least I do), you may
want to automatize:

cmdit() {
  LBUFFER=' '$LBUFFER
  zle beginning-of-line
}
zle -N cmdit
bindkey WHATEVERKEYYOUWANT cmdit

I personally have a set of programs I often add at the beginning of a
line (sudo, dist, archive extractor, gdb, valgrind…), now¹ I only have
to type something like :
 M-x s for sudo
 M-x g for gdb
 M-x v for valgrind
…

The cursor does not move, so I can add additional parameters at the
end, if needed.

Best regards,

¹ https://github.com/Arkanosis/Arkonf/blob/master/zsh/.zsh/prefix

-- 
Jérémie


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

* Re: Completion question
  2011-06-06 22:33 ` meino.cramer
  2011-06-07  5:12   ` Jun T.
@ 2011-06-07  8:29   ` Peter Stephenson
  2011-06-07  8:53   ` Jérémie Roquet
  2 siblings, 0 replies; 23+ messages in thread
From: Peter Stephenson @ 2011-06-07  8:29 UTC (permalink / raw)
  To: zsh-users

On Tue, 7 Jun 2011 00:33:21 +0200
<meino.cramer@gmx.de> wrote:
> Is it possible to configure zsh to only take the string from the
> beginning up to the position of the cursor into account for the
> completion processing ?

"unsetopt completeinword" should certainly help, though it's so
complicated it might not do everything you're asking for.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


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

* Re: Completion question
  2011-06-06 22:33 ` meino.cramer
@ 2011-06-07  5:12   ` Jun T.
  2011-06-07  8:29   ` Peter Stephenson
  2011-06-07  8:53   ` Jérémie Roquet
  2 siblings, 0 replies; 23+ messages in thread
From: Jun T. @ 2011-06-07  5:12 UTC (permalink / raw)
  To: zsh-users

At 0:33 AM +0200 11.6.7, meino.cramer@gmx.de wrote:
>Is it possible to configure zsh to only take the string from the
>beginning up to the position of the cursor into account for the
>completion processing ?

Try adding the following line into your .zshrc:

bindkey '^I' expand-or-complete-prefix


(another possibiliy is to use the _prefix completer with the
complete_in_word option, but using expand-or-complete-prefix
would be the simplest one.)


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

* Completion question
       [not found] <20110602191951.566gmx1@mp009.gmx.net>
@ 2011-06-06 22:33 ` meino.cramer
  2011-06-07  5:12   ` Jun T.
                     ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: meino.cramer @ 2011-06-06 22:33 UTC (permalink / raw)
  To: zsh-users

Hi,

often I assemble complicate and/or longish commandlines from previous
ones. This include copy'n'paste actions. This also includes action
which are not always done the sequence, which is given by the
paramters of the final commandline.

Suppose I have alreasy pasted this one (">" is the prompt)

>/home/me/data/subdira/subdirb/The Long and winding commandline.wav
                                                                   ^
The cursor is here:"^"

Now I press CTRL-A and type the beginning of the command "mplayer"
like this:


>mpla/home/me/data/subdira/subdirb/The Long and winding commandline.wav
     ^

If I press TAB now, nothing happens, since zsh seems to take the
whole commandline into account while searching for a possible
completion. And of course
"mpla/home/me/data/subdira/subdirb/The Long and winding commandline.wav" 
is not know as a command on my system... ;)

Is it possible to configure zsh to only take the string from the
beginning up to the position of the cursor into account for the
completion processing ?

Thank you very much in advance for any help ! :)

Best regards,
mcc



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

* Re: Completion Question
  2004-08-31 11:02 Completion Question Sean Johnston
@ 2004-08-31 11:51 ` Oliver Kiddle
  0 siblings, 0 replies; 23+ messages in thread
From: Oliver Kiddle @ 2004-08-31 11:51 UTC (permalink / raw)
  To: Sean Johnston; +Cc: Zsh-users List (E-mail)

Sean Johnston wrote:
> % man zs_<tab>
> 
> becomes
> 
> % man zs _
> 
> What I would like would be for this to offer me the various zsh... man pages
> for completion, but it seems to spot that there is an exact match for what

It should do that by default. You must have either the rec_exact option
or accept-exact style set. Try unsetopt rec_exact and if that doesn't
work, look to see if the style is set.

Oliver 


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

* Completion Question
@ 2004-08-31 11:02 Sean Johnston
  2004-08-31 11:51 ` Oliver Kiddle
  0 siblings, 1 reply; 23+ messages in thread
From: Sean Johnston @ 2004-08-31 11:02 UTC (permalink / raw)
  To: Zsh-users List (E-mail)

I'm using 4.2.0 at the moment. I recently rejigged all my startup files and
am using all the completion stuff that comes with this version. Mostly
defaults everywhere.

However, how do I get completion to always offer a choice, even if what I
have already typed has an exact match? I noticed this with man pages
initially, which wasn't too bothersome, but now its annoying me with
directories.

_ marks the cursor position

% man zs_<tab>

becomes

% man zs _

What I would like would be for this to offer me the various zsh... man pages
for completion, but it seems to spot that there is an exact match for what
I've typed and just take that rather than offer me everything that begins zs
(including zs itself).

Sean.

_____________________________________________________________________
This message has been checked for all known viruses by Xenicom delivered through the MessageLabs Virus Control Centre. 


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

* Re: completion question
  2003-02-06  1:32 completion question Le Wang
@ 2003-02-10 11:06 ` Oliver Kiddle
  0 siblings, 0 replies; 23+ messages in thread
From: Oliver Kiddle @ 2003-02-10 11:06 UTC (permalink / raw)
  To: Le Wang; +Cc: Zsh users list

On 5 Feb, Le Wang wrote:
> Hi,
> 
> I have a script that is basically a proxy to run other commands and show the
> output in a new xterm window, e.g.
> 
> ~> xr make
> 
> In this case, how can I get the completion system to ignore "xr" and complete
> for the command?

compdef _precommand xr

> Ohh, and xr can take a single option --nopause, but the option should always
> come before make.

Then you'll need a function specifically for xr:
_xr() { _arguments '--nopause' '*::command:_normal' }

> I'm just starting out with the completion system, the complexity involved
> seems, well, mind boggling.  What are some good resources?

Best introduction is John Beppu's Linux Magazine articles which are
linked to from:
http://zsh.sunsite.dk/links.html

Next, you could try the user guide:
http://zsh.sunsite.dk/Guide/zshguide.html

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


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

* completion question
@ 2003-02-06  1:32 Le Wang
  2003-02-10 11:06 ` Oliver Kiddle
  0 siblings, 1 reply; 23+ messages in thread
From: Le Wang @ 2003-02-06  1:32 UTC (permalink / raw)
  To: Zsh users list

Hi,

I have a script that is basically a proxy to run other commands and show the
output in a new xterm window, e.g.

~> xr make

In this case, how can I get the completion system to ignore "xr" and complete
for the command?

Ohh, and xr can take a single option --nopause, but the option should always
come before make.

I'm just starting out with the completion system, the complexity involved
seems, well, mind boggling.  What are some good resources?

Many thanks.

--
Le

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca


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

* Re: Completion question
  2002-06-11 11:40 Completion question jarausch
@ 2002-06-11 11:55 ` Sven Wischnowsky
  0 siblings, 0 replies; 23+ messages in thread
From: Sven Wischnowsky @ 2002-06-11 11:55 UTC (permalink / raw)
  To: zsh-users


jarausch@igpm.rwth-aachen.de wrote:

> is there any simple means to enable filename completion
> in situations like this one
> 
> export PATH=/usr/local/lib/libper  <TAB>
> 
> I always have to first insert a blank after '='
> and then remove it after completion.
> Can I tell the completion system to 'split' after
> a certain character (like '=') here.

With `completion system', do you mean the new, function-based one?

That does all this automatically for me. Even recognising that $PATH
gets a colon-separated list of directories.


If you are using compctl (which you shouldn't), use something like:

  compctl -v -x 'C[0,*:*] n[-1,:]' -f - 'C[0,*=*] n[1,=]' -f -- export

(I think it was...)


Bye
  Sven

-- 
Sven Wischnowsky                          wischnow@berkom.de


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

* Completion question
@ 2002-06-11 11:40 jarausch
  2002-06-11 11:55 ` Sven Wischnowsky
  0 siblings, 1 reply; 23+ messages in thread
From: jarausch @ 2002-06-11 11:40 UTC (permalink / raw)
  To: zsh-users

Hi all,

is there any simple means to enable filename completion
in situations like this one

export PATH=/usr/local/lib/libper  <TAB>

I always have to first insert a blank after '='
and then remove it after completion.
Can I tell the completion system to 'split' after
a certain character (like '=') here.

Many thanks for a hint,


Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
Institute of Technology, RWTH Aachen
D 52056 Aachen, Germany


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

* Re: completion question
  2001-07-30  2:15 completion question Eric D. Friedman
@ 2001-07-30  2:32 ` Bart Schaefer
  0 siblings, 0 replies; 23+ messages in thread
From: Bart Schaefer @ 2001-07-30  2:32 UTC (permalink / raw)
  To: Eric D. Friedman, zsh-users

On Jul 29,  7:15pm, Eric D. Friedman wrote:
}
} There usually isn't anything else besides `CVS' at the `com' and
} `company' levels and it'd be nice if I could just cd right on through.
} I tried fignore, but that seems to be for extensions only, not for
} complete names.

If you're using `compinit', you can do this:

    zstyle ':completion:*:cd:*' ignored-patterns '(*/)#CVS'

With old compctl, it's something like

    compctl -g '*~(*/)#CVS(/)' cd

(which requires extendedglob).

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* completion question
@ 2001-07-30  2:15 Eric D. Friedman
  2001-07-30  2:32 ` Bart Schaefer
  0 siblings, 1 reply; 23+ messages in thread
From: Eric D. Friedman @ 2001-07-30  2:15 UTC (permalink / raw)
  To: zsh-users

Does anyone have completion code that will exclude CVS directories
when I type `cd [TAB]'

I tend to have a lot of spare,deep directory structures in my CVS
modules, and it'd be nice to be able to press tab when cd'ing into
a directory that has only one non-CVS entry.

An example:

% cd <Module>/src/com/company/foo/bar/baz

There usually isn't anything else besides `CVS' at the `com' and `company'
levels and it'd be nice if I could just cd right on through.  I tried
fignore, but that seems to be for extensions only, not for complete names.

Thanks,
Eric


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

* Re: completion question
  2001-07-04 15:43       ` Sven Wischnowsky
@ 2001-07-04 15:47         ` Sven Wischnowsky
  0 siblings, 0 replies; 23+ 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] 23+ 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; 23+ 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] 23+ 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; 23+ 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] 23+ 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; 23+ 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] 23+ messages in thread

* Re: completion question
  2001-07-04 12:50 ` 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; 23+ 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] 23+ messages in thread

* 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; 23+ 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] 23+ messages in thread

* RE: completion question
  2001-07-04 10:57 dLux
@ 2001-07-04 11:10 ` Andrej Borsenkow
  0 siblings, 0 replies; 23+ messages in thread
From: Andrej Borsenkow @ 2001-07-04 11:10 UTC (permalink / raw)
  To: dLux, zsh-users

setopt completeinword

> -----Original Message-----
> From: dLux [mailto:dlux@spam.sch.bme.hu]On Behalf Of dLux
> Sent: Wednesday, July 04, 2001 2:58 PM
> To: zsh-users@sunsite.dk
> Subject: completion question
>
>
> Hello,
>
> I liked  zsh in  the past, but  it is quite  annoying for  bash users,
> that I cannot set the following behaviour:
>
> I start  typing: "ls  bing", then I  go back to  the beginning  of the
> word "bing",  and I type: "/u"  and I press tab.  Bash completes this,
> and it will become "ls /usrbing", but zsh does not do anything.
>
> Can anyone  helping with  this problem?  Can zsh be  set up  to behave
> like bash?
>
> Thanks in advance,
>
> dLux
> --
> Szabadság, szerelem -- ext2 kell nekem
>
>


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

* completion question
@ 2001-07-04 10:57 dLux
  2001-07-04 11:10 ` Andrej Borsenkow
  0 siblings, 1 reply; 23+ messages in thread
From: dLux @ 2001-07-04 10:57 UTC (permalink / raw)
  To: zsh-users

Hello,

I liked  zsh in  the past, but  it is quite  annoying for  bash users,
that I cannot set the following behaviour:

I start  typing: "ls  bing", then I  go back to  the beginning  of the
word "bing",  and I type: "/u"  and I press tab.  Bash completes this,
and it will become "ls /usrbing", but zsh does not do anything.

Can anyone  helping with  this problem?  Can zsh be  set up  to behave
like bash?

Thanks in advance,

dLux
--
Szabadság, szerelem -- ext2 kell nekem


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

end of thread, other threads:[~2011-06-07  9:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-09  6:51 Completion question Byron Foster
2002-08-09  7:28 ` Sven Wischnowsky
2002-08-11  3:29   ` Byron Foster
     [not found] <20110602191951.566gmx1@mp009.gmx.net>
2011-06-06 22:33 ` meino.cramer
2011-06-07  5:12   ` Jun T.
2011-06-07  8:29   ` Peter Stephenson
2011-06-07  8:53   ` Jérémie Roquet
  -- strict thread matches above, loose matches on Subject: below --
2004-08-31 11:02 Completion Question Sean Johnston
2004-08-31 11:51 ` Oliver Kiddle
2003-02-06  1:32 completion question Le Wang
2003-02-10 11:06 ` Oliver Kiddle
2002-06-11 11:40 Completion question jarausch
2002-06-11 11:55 ` Sven Wischnowsky
2001-07-30  2:15 completion question Eric D. Friedman
2001-07-30  2:32 ` Bart Schaefer
     [not found] <20010704142951.B4036@dlux.hu>
2001-07-04 12:50 ` 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-04 10:57 dLux
2001-07-04 11:10 ` 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).