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

Re: Completion on cd



On Jan 28, 10:10am, zefram@xxxxxxxxx wrote:
>    compctl -g '*(D-/)' cd
> 
> is better.  The point of using + is that the non-. filenames are used
> if possible, approximating the behaviour of normal filename completion.
> Of course, with the recent compctl patches, one should use
> 
> compctl -/ cd

I was hoping that these -/ options would fix my problems when I upgraded
to 3.1.2-zefram but that wasn't the case. Using the above compctl for cd
and the 3.1.2-zefram I still get the problems I previously described. If
you can't remember, I shall outline it again:

% compctl -/ cd
% cd
% cd [tab]
 -- Only my directories not beginning with "." are listed which is fine
% cd .[tab]
 -- Only my directories beginning with "." are listed which is fine
% cd .netscape/[tab]
 -- All the *files* and directories in .netscape/ (not starting ".") are
 -- listed! I'd have expected it to complete to "cd .netscape/plugins/"
 -- Also annoying is this behaviour:
% cd ..[tab]
 -- I get a beep! It should complete to "cd ../" as in tcsh.

The new -W option is nice though and seems to work very well. Would be
nice if the -Y compctl option patch was included.

Another problem which I've been having with zsh which wasn't a problem
in 3.0.5 but is in 3.1.2 or 3.1.2-zefram is with a particular bindkey:

Under 3.0.5, I used:
bindkey '^[[161q' up-line-or-search

This meant that if I typed a letter, and then pressed Shift-Up the
history would be searched back for a line starting with what I had typed
and the cursor would be positioned at the end of the line. This worked
in the same way as "history-search-backward" from tcsh and was what I
wanted. Under zsh 3.1.2, I just get a beep when I press Shift-Up.
Instead, I have been using:
bindkey '^[[161q' history-beginning-search-backward
which I don't like as much because it leaves the cursor at the same
position.

Oliver Kiddle



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