Skip to content
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

trash on macOS #1168

Closed
screendriver opened this issue Sep 19, 2021 · 4 comments
Closed

trash on macOS #1168

screendriver opened this issue Sep 19, 2021 · 4 comments

Comments

@screendriver
Copy link
Contributor

Is your feature request related to a problem? Please describe.

At the moment trashing files is support with trash-cli and gio trash via the environment variable NNN_TRASH. Unfortunately these tools are not working on macOS. On macOS one of the recommended tools is trash.

Describe the solution you'd like

It would be great if I can specify trash when deleting files.

Describe alternatives you've considered

I also tried to set an alias like alias trash-cli=trash but it does not work.

@jarun
Copy link
Owner

jarun commented Sep 19, 2021

Please raise the PR.

@N-R-K
Copy link
Collaborator

N-R-K commented Sep 19, 2021

I also tried to set an alias like alias trash-cli=trash but it does not work.

Aliases are for the interactive shell, it doesn't normally work outside of it. You can use wrapper shell script for this instead.

#!/bin/sh

trash "$@"

name this script trash-cli trash-put and put it in your PATH.

@dhruvmanila
Copy link

Actually, you should name the script trash-put because that's the command (comes with trash-cli) which is being used: https://github.com/jarun/nnn/blob/master/src/nnn.c#L585

@screendriver
Copy link
Contributor Author

Awesome! Thank you for your help 👍

@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants