zsh-users
 help / color / mirror / code / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: Completion: smarter symlink completion
Date: Wed, 6 Mar 2013 21:58:37 +0530	[thread overview]
Message-ID: <CALkWK0=s+woP7cEnrY_QuTttZFi9cs05ujBL6RFOD3TUe4_9qg@mail.gmail.com> (raw)
In-Reply-To: <130306075216.ZM10086@torch.brasslantern.com>

Bart Schaefer wrote:
> On Mar 6,  8:37pm, Ramkumar Ramachandra wrote:
> }
> } I noticed that symlinks are always completed with the trailing slash
>
> I presume you mean symlinks whose targets are directories?  If symlinks
> whose targets are files are getting a trailing slash, that would clearly
> be strange.
>
> } like directories, and unlike normal files.  This can be problematic if
> } the user runs `rm -r` on a symlink by mistake.
>
> Does autoremoveslash not take the slash away again before the command
> is executed?  It certainly does for me.

AUTO_REMOVE_SLASH works, thanks.

> In any case I'd say running rm -r by mistake is a problem independent of
> how the file name was completed.  If you have a rash of people running
> rm -r accidentally, why aren't you worried about real directories?

Agreed.  I crafted the problem mostly out of theoretical interest; it
doesn't arise from a real-world itch.

> } Is this really a bug, or am I misunderstanding something?
>
> The assumption is that when completing a directory (whether symlink
> or not), there's every likelyhood that the directory itself is not the
> end result, and you're going to continue completing other files down
> the tree.  The slash is appended to (a) make that obvious and (b) not
> require that you switch back and forth between TAB and / keys in order
> to continue completing (unless the directory name itself was part of
> an ambiguous list).

Makes sense, thanks.  Yes, I'd want zsh to follow symlinks and operate
on the tree of the underlying directory.


      reply	other threads:[~2013-03-06 16:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 15:07 Ramkumar Ramachandra
2013-03-06 15:52 ` Bart Schaefer
2013-03-06 16:28   ` Ramkumar Ramachandra [this message]

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='CALkWK0=s+woP7cEnrY_QuTttZFi9cs05ujBL6RFOD3TUe4_9qg@mail.gmail.com' \
    --to=artagnon@gmail.com \
    --cc=schaefer@brasslantern.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).