Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: stopped globbing/expansion (?)



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@xxxxxxxxxxxxxxxxx
     <><             WWW:              http://gott-gehabt.de
                     IRC:                           tkoehler
                     PGP public key available from Homepage!

Attachment: signature.asc
Description: Digital signature



Messages sorted by: Reverse Date, Date, Thread, Author