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

Re: Completion on word prefix only (tcsh-style)



> > Is there an option to force zsh to only look at a prefix on
> > completion?  This seems to be the default in tcsh, but I can't get it
> > to work for zsh.
> 
> The command is called expand-or-complete-prefix.  If you bind it to
> tab, you will probably get something like tcsh behaviour.

This appeared to work initially, but now completion for "cd" doesn't
work beyond the first directory level:

With expand-or-complete-prefix:

% cd /etc/[TAB]

produces no matches.

With expand-or-complete, it works fine:

% cd /etc/[TAB]
acct/      fn/        lp/        rc2.d/     snmp/
cron.d/    fs/        mail/      rc3.d/     tm/
default/   http/      net/       rcS.d/     uucp/
dfs/       inet/      openwin/   saf/
dhcp/      init.d/    opt/       security/
dmi/       lib/       rc0.d/     skel/
dt/        log@       rc1.d/     ski/

I'm using the simple completion

compctl -g '*(-/)' cd

Is this a bug?

Thanks,

Steve



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