Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Don't append slash when auto completing a symbolic link pointing to a directory
- X-seq: zsh-users 24885
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Alan <8fvebtoeq87@xxxxxxxxx>
- Subject: Re: Don't append slash when auto completing a symbolic link pointing to a directory
- Date: Thu, 28 May 2020 22:53:51 +0200
- Cc: zsh-users@xxxxxxx
- In-reply-to: <CAL7A0-M241MU_MUm+8ci8=rRa96m0sqR34k8AFcq+Jp7n6WD-g@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAL7A0-M241MU_MUm+8ci8=rRa96m0sqR34k8AFcq+Jp7n6WD-g@mail.gmail.com>
On 5/28/20, Alan <8fvebtoeq87@xxxxxxxxx> wrote:
> Hi,
>
> I'm switching from bash to zsh and prefer bash's default behavior of not
> appending a slash when auto completing a symbolic link pointing to a
> directory.
>
> For example:
> $ mkdir directory
> $ ln -s directory symblink
> $ ls sym<TAB>
>
> At this point, in bash, you would get:
> $ ls symblink
>
> In zsh, I'm getting:
> $ ls symblink/
>
> Also, in bash, hitting a <TAB> when the full symbolic link is already
> present would then append the slash to the symbolic link:
> $ ls symblink<TAB>
> $ ls symblink/
>
> Is there anyway to get this behavior with zsh? I looked through "man
> zshoptions" this time and couldn't find anything specific to this.
If it makes you feel better, hitting enter will remove the / and just
run "ls symblink". (Although this makes no difference to ls unless you
also give -l). The / is just inserted temporarily in case you want to
continue typing/completing things inside the directory, but a space,
enter or movement etc will remove it again. This should be indicated
by a bold/standout font.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author