zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>, zsh-users@zsh.org
Subject: Re: Completion: smarter symlink completion
Date: Wed, 06 Mar 2013 07:52:16 -0800	[thread overview]
Message-ID: <130306075216.ZM10086@torch.brasslantern.com> (raw)
In-Reply-To: <CALkWK0mRTZ16O8njnaT+QgENFrP2-eRfq101aSwAPa7QC=TUvA@mail.gmail.com>

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.

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?

} 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).


  reply	other threads:[~2013-03-06 15:52 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 [this message]
2013-03-06 16:28   ` Ramkumar Ramachandra

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=130306075216.ZM10086@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=artagnon@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).