Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion: smarter symlink completion
- X-seq: zsh-users 17668
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ramkumar Ramachandra <artagnon@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: Completion: smarter symlink completion
- Date: Wed, 06 Mar 2013 07:52:16 -0800
- In-reply-to: <CALkWK0mRTZ16O8njnaT+QgENFrP2-eRfq101aSwAPa7QC=TUvA@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>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author