zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Alan <8fvebtoeq87@gmail.com>
Cc: zsh-users@zsh.org
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	[thread overview]
Message-ID: <CAHYJk3QNf8S9i-0iBnCapY6wJX1wq2WwX2+eQ9-xkYsYFDAD=Q@mail.gmail.com> (raw)
In-Reply-To: <CAL7A0-M241MU_MUm+8ci8=rRa96m0sqR34k8AFcq+Jp7n6WD-g@mail.gmail.com>

On 5/28/20, Alan <8fvebtoeq87@gmail.com> 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

  reply	other threads:[~2020-05-28 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 20:04 Alan
2020-05-28 20:53 ` Mikael Magnusson [this message]
2020-05-28 21:56   ` Alan
2020-05-29 22:54     ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHYJk3QNf8S9i-0iBnCapY6wJX1wq2WwX2+eQ9-xkYsYFDAD=Q@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=8fvebtoeq87@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).