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

Support more trash utility #1831

Closed
wants to merge 2 commits into from
Closed

Support more trash utility #1831

wants to merge 2 commits into from

Conversation

rennsax
Copy link

@rennsax rennsax commented Feb 25, 2024

This PR add more options for the environment variable NNN_TRASH.

Currently, NNN_TRASH only support two external utilities: 1 for trash-put in andreafrancia/trash-cli, 2 for gio trash. These two doesn't seem to act perfectly in macOS.

In macOS, there are trash utilities like sindresorhus/macos-trash and trash, which just move files/folders to the native trash bin. The two utilities can be installed with:

brew install macos-trash
brew install trash

These two both provide the command interface trash. They are useful when an user prefer to use the native trash folder.

Thanks for your review.

Support sindresorhus/macos-trash, which just moves files/folders to
the macOS native trash bin.

Setting `NNN_TRASH=3` makes nnn use `trash` command to delete files.
Copy link
Collaborator

@N-R-K N-R-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to keep hardcoding more and more trash utils. Instead making NNN_TRASH=3 call out to some specific plugin is more flexible (see #1811 (comment)).

@rennsax
Copy link
Author

rennsax commented Feb 25, 2024

You're right. Thanks and I'll close the PR.

@rennsax rennsax closed this Feb 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants