zsh-users
 help / color / mirror / code / Atom feed
* stopped globbing/expansion (?)
@ 2005-07-08  3:19 Meino Christian Cramer
  2005-07-08  4:32 ` Thomas Köhler
  2005-07-09  6:14 ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Meino Christian Cramer @ 2005-07-08  3:19 UTC (permalink / raw)
  To: zsh-users

Hi,

 (this is no feature request...it is a cry for help instead :O) :O) 

 currently my zsh is configured to behave as follows:
 I type in the first characters, which are common to a group of files
 in the cwd and then press TAB.

 Then all matches are displayed below the current cmd-line and the
 first match is used to complete my input.

 Instead I would like zsh to behave as follows: 

 Type in the first characters, TAB and all possibilites are displayed
 below the current cmd-line without touching my typing (no full
 completing to the first). 

 Furthermore I would like to have a completing for cmd-line inputs
 like  "*.png <TAB>".

 And one last:
 Suppose one is here:

 /home/me/projekte/current/src/testlib/src/.

 And I want to copy a file from the cwd to 

 /home/me/projekte/backup/src/testlib/src/.

 To achive this is would type

 pwd

 and then "cp" and copy'n' paste the output of the previous command
 behind cp twice (adding the file in question after the first
 cut'n'paste).

 Then I would position the cursor on the word "current", wipe it out,
 type "b <TAB>" but nothing happens until I add an additional SPACE to
 seperate the left from the right part of the string, which I have to
 remove afterwards again.

 I am sure, that the behaviour of zsh, which I like to have, can
 easily be configured via some switched or so.

 The problem I have to find the appropiate information in the manual
 is: I dont know the keywords to search for, I even dont know how all
 this is named...

 I would be very happy if someone can point me to the according
 passages of text.

 ( I am using zsh 4.2.5 on Linux 2.6.12.2 )

 Thanks a lot fro any help or hint in advance!!! :)

 Have a nice weekend!
 Meino

 PS: I dont no for sure, whether it was <TAB> or <TAB><TAB> to
 acchieve the things I tried to explain in the above mail...so please
 add any missing <TAB>.... :)

 


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

* Re: stopped globbing/expansion (?)
  2005-07-08  3:19 stopped globbing/expansion (?) Meino Christian Cramer
@ 2005-07-08  4:32 ` Thomas Köhler
  2005-07-08 16:14   ` Meino Christian Cramer
  2005-07-09  6:14 ` Bart Schaefer
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Köhler @ 2005-07-08  4:32 UTC (permalink / raw)
  To: Meino Christian Cramer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 2648 bytes --]

Meino Christian Cramer wrote:
> Hi,
> 
>  (this is no feature request...it is a cry for help instead :O) :O) 
> 
>  currently my zsh is configured to behave as follows:
>  I type in the first characters, which are common to a group of files
>  in the cwd and then press TAB.
> 
>  Then all matches are displayed below the current cmd-line and the
>  first match is used to complete my input.
> 
>  Instead I would like zsh to behave as follows: 
> 
>  Type in the first characters, TAB and all possibilites are displayed
>  below the current cmd-line without touching my typing (no full
>  completing to the first). 

Then you want the default behaviour back? :)
I think you should try something like
zstyle ':completion:*' completer _complete _ignored _match _correct _approximate _prefix
(or change your own definition of completer)

>  Furthermore I would like to have a completing for cmd-line inputs
>  like  "*.png <TAB>".

I usually do
   ls *.png<ctrl-e>
and my .zshrc contains
   bindkey "^E" expand-word

Of course, I use vi keybindings, so ctrl-e is not used otherwise ;-)

>  And one last:
>  Suppose one is here:
> 
>  /home/me/projekte/current/src/testlib/src/.
> 
>  And I want to copy a file from the cwd to 
> 
>  /home/me/projekte/backup/src/testlib/src/.
> 
>  To achive this is would type
> 
>  pwd
> 
>  and then "cp" and copy'n' paste the output of the previous command
>  behind cp twice (adding the file in question after the first
>  cut'n'paste).
> 
>  Then I would position the cursor on the word "current", wipe it out,
>  type "b <TAB>" but nothing happens until I add an additional SPACE to
>  seperate the left from the right part of the string, which I have to
>  remove afterwards again.
> 
>  I am sure, that the behaviour of zsh, which I like to have, can
>  easily be configured via some switched or so.

Of course, you could do something like
   > pwd
   /home/me/projekte/current/src/testlib/src
   > cd current backup
   > cd -
   > cp <whatever> $OLDPWD
or
   > pwd
   /home/me/projekte/current/src/testlib/src
   > cp <whatever> ${PWD:s/current/backup}

Just to avoid the need for the whole path.
On the other hand, you could as well
   zstyle ':completion:*' special-dirs true
which does what you want in the first place ;)

>  Have a nice weekend!
>  Meino

Ciao,
Thomas

-- 
 Thomas Köhler       Email:       jean-luc@picard.franken.de
     <><             WWW:              http://gott-gehabt.de
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: stopped globbing/expansion (?)
  2005-07-08  4:32 ` Thomas Köhler
@ 2005-07-08 16:14   ` Meino Christian Cramer
  2005-07-09  4:39     ` Thomas Köhler
  0 siblings, 1 reply; 6+ messages in thread
From: Meino Christian Cramer @ 2005-07-08 16:14 UTC (permalink / raw)
  To: jean-luc; +Cc: zsh-users

From: Thomas Köhler <jean-luc@picard.franken.de>
Subject: Re: stopped globbing/expansion (?)
Date: Fri, 8 Jul 2005 06:32:53 +0200

Hi Thomas !

 Thanks a lot for your help and your patience with a newbie-zsh-er :)

 "Unfortunately" (a much too big a word for that...) CTRL-e is bound
 to End-of-line ... in Emacs mode (I am using "the other editor of
 that two" :))) , which I use.

 Is there a way to instruct zsh to show all current key bindings at
 once ... just for hunting for the few free once I can use instead of
 CTRL-e ?

 Thanks a lot for any help in advance !

 Have a nice weekend and keep zshing!
 Meino


						Configuring is fun !   :O)
 

> Meino Christian Cramer wrote:
> > Hi,
> > 
> >  (this is no feature request...it is a cry for help instead :O) :O) 
> > 
> >  currently my zsh is configured to behave as follows:
> >  I type in the first characters, which are common to a group of files
> >  in the cwd and then press TAB.
> > 
> >  Then all matches are displayed below the current cmd-line and the
> >  first match is used to complete my input.
> > 
> >  Instead I would like zsh to behave as follows: 
> > 
> >  Type in the first characters, TAB and all possibilites are displayed
> >  below the current cmd-line without touching my typing (no full
> >  completing to the first). 
> 
> Then you want the default behaviour back? :)
> I think you should try something like
> zstyle ':completion:*' completer _complete _ignored _match _correct _approximate _prefix
> (or change your own definition of completer)
> 
> >  Furthermore I would like to have a completing for cmd-line inputs
> >  like  "*.png <TAB>".
> 
> I usually do
>    ls *.png<ctrl-e>
> and my .zshrc contains
>    bindkey "^E" expand-word
> 
> Of course, I use vi keybindings, so ctrl-e is not used otherwise ;-)
> 
> >  And one last:
> >  Suppose one is here:
> > 
> >  /home/me/projekte/current/src/testlib/src/.
> > 
> >  And I want to copy a file from the cwd to 
> > 
> >  /home/me/projekte/backup/src/testlib/src/.
> > 
> >  To achive this is would type
> > 
> >  pwd
> > 
> >  and then "cp" and copy'n' paste the output of the previous command
> >  behind cp twice (adding the file in question after the first
> >  cut'n'paste).
> > 
> >  Then I would position the cursor on the word "current", wipe it out,
> >  type "b <TAB>" but nothing happens until I add an additional SPACE to
> >  seperate the left from the right part of the string, which I have to
> >  remove afterwards again.
> > 
> >  I am sure, that the behaviour of zsh, which I like to have, can
> >  easily be configured via some switched or so.
> 
> Of course, you could do something like
>    > pwd
>    /home/me/projekte/current/src/testlib/src
>    > cd current backup
>    > cd -
>    > cp <whatever> $OLDPWD
> or
>    > pwd
>    /home/me/projekte/current/src/testlib/src
>    > cp <whatever> ${PWD:s/current/backup}
> 
> Just to avoid the need for the whole path.
> On the other hand, you could as well
>    zstyle ':completion:*' special-dirs true
> which does what you want in the first place ;)
> 
> >  Have a nice weekend!
> >  Meino
> 
> Ciao,
> Thomas
> 
> -- 
>  Thomas Köhler       Email:       jean-luc@picard.franken.de
>      <><             WWW:              http://gott-gehabt.de
>                      IRC:                           tkoehler
>                      PGP public key available from Homepage!


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

* Re: stopped globbing/expansion (?)
  2005-07-08 16:14   ` Meino Christian Cramer
@ 2005-07-09  4:39     ` Thomas Köhler
  2005-07-09  5:20       ` Meino Christian Cramer
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Köhler @ 2005-07-09  4:39 UTC (permalink / raw)
  To: Meino Christian Cramer; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

Meino Christian Cramer wrote:
> From: Thomas Köhler <jean-luc@picard.franken.de>
> Subject: Re: stopped globbing/expansion (?)
> Date: Fri, 8 Jul 2005 06:32:53 +0200
> 
> Hi Thomas !
> 
>  Thanks a lot for your help and your patience with a newbie-zsh-er :)
> 
>  "Unfortunately" (a much too big a word for that...) CTRL-e is bound
>  to End-of-line ... in Emacs mode (I am using "the other editor of
>  that two" :))) , which I use.

;)

>  Is there a way to instruct zsh to show all current key bindings at
>  once ... just for hunting for the few free once I can use instead of
>  CTRL-e ?

Just use
   > bindkey
which yields a list of used keys.

>  Thanks a lot for any help in advance !
> 
>  Have a nice weekend and keep zshing!
>  Meino

Ciao,
Thomas

-- 
 Thomas Köhler       Email:       jean-luc@picard.franken.de
     <><             WWW:              http://gott-gehabt.de
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: stopped globbing/expansion (?)
  2005-07-09  4:39     ` Thomas Köhler
@ 2005-07-09  5:20       ` Meino Christian Cramer
  0 siblings, 0 replies; 6+ messages in thread
From: Meino Christian Cramer @ 2005-07-09  5:20 UTC (permalink / raw)
  To: jean-luc; +Cc: zsh-users

From: Thomas Köhler <jean-luc@picard.franken.de>
Subject: Re: stopped globbing/expansion (?)
Date: Sat, 9 Jul 2005 06:39:57 +0200

Hi Thomas !

 oh, yeah ! Thanks a lot! Saves me some thousands years of time... :)

 Have a nice weekend!
 Meino



> Meino Christian Cramer wrote:
> > From: Thomas Köhler <jean-luc@picard.franken.de>
> > Subject: Re: stopped globbing/expansion (?)
> > Date: Fri, 8 Jul 2005 06:32:53 +0200
> > 
> > Hi Thomas !
> > 
> >  Thanks a lot for your help and your patience with a newbie-zsh-er :)
> > 
> >  "Unfortunately" (a much too big a word for that...) CTRL-e is bound
> >  to End-of-line ... in Emacs mode (I am using "the other editor of
> >  that two" :))) , which I use.
> 
> ;)
> 
> >  Is there a way to instruct zsh to show all current key bindings at
> >  once ... just for hunting for the few free once I can use instead of
> >  CTRL-e ?
> 
> Just use
>    > bindkey
> which yields a list of used keys.
> 
> >  Thanks a lot for any help in advance !
> > 
> >  Have a nice weekend and keep zshing!
> >  Meino
> 
> Ciao,
> Thomas
> 
> -- 
>  Thomas Köhler       Email:       jean-luc@picard.franken.de
>      <><             WWW:              http://gott-gehabt.de
>                      IRC:                           tkoehler
>                      PGP public key available from Homepage!


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

* Re: stopped globbing/expansion (?)
  2005-07-08  3:19 stopped globbing/expansion (?) Meino Christian Cramer
  2005-07-08  4:32 ` Thomas Köhler
@ 2005-07-09  6:14 ` Bart Schaefer
  1 sibling, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 2005-07-09  6:14 UTC (permalink / raw)
  To: zsh-users

On Jul 8,  5:19am, Meino Christian Cramer wrote:
}
}  currently my zsh is configured to behave as follows:
}  [on TAB] all matches are displayed below the current cmd-line and the
}  first match is used to complete my input.
} 
}  Instead I would like zsh to behave as follows: 
} 
}  Type in the first characters, TAB and all possibilites are displayed
}  below the current cmd-line without touching my typing (no full
}  completing to the first). 

Without knowing your setopts and zstyles, it's not possible to know
exactly what you need to do to change this.  However, my best guess
is that you should do

    setopt auto_menu

and maybe

    unsetopt menu_complete

}  Then I would position the cursor on the word "current", wipe it out,
}  type "b <TAB>" but nothing happens until I add an additional SPACE

Try

    setopt complete_in_word


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

end of thread, other threads:[~2005-07-09  6:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-08  3:19 stopped globbing/expansion (?) Meino Christian Cramer
2005-07-08  4:32 ` Thomas Köhler
2005-07-08 16:14   ` Meino Christian Cramer
2005-07-09  4:39     ` Thomas Köhler
2005-07-09  5:20       ` Meino Christian Cramer
2005-07-09  6:14 ` 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).