-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing symlink ending with /
removes the original path
#13275
Comments
With docs, the command description of rm is With normal shell (e.g : bash, zsh)
I don't think this is a bug because it works similarly to how other shells define it. |
I see, |
Another case where the tab-completed trailing
|
I've opened a pull request with changes to fix this! Can I be added as the Assignee for this issue? |
# Description These changes fix #13275 where a slash is appended to completions of symlinks pointing to directories. # User-Facing Changes The `/` character will no longer be appended to completions of symlinks. Co-authored-by: Henry Jetmundsen <jet@henrys-mbp-2.lan>
Nushell also refuses to remove a non-empty directory. |
Describe the bug
Removing a symlink of a directory, if ending with
/
, removes not the symlink, but the existing directory.This is especially troublesome since autocompletion automatically appends the trailing
/
.How to reproduce
Expected behavior
Two options (not mutually exclusive):
rm foo-link
andrm foo-link/
should remove the symlink, not the original path. Such a subtle difference as a trailing slash should not have this severe impact on semantics./
to symlinks pointing at directories.Screenshots
No response
Configuration
Additional context
No response
The text was updated successfully, but these errors were encountered: