February 19, 2018

Deleting files Using Ranger on My Mac

I recently learned about Ranger and have been loving it on Linux. Ranger is a console file manager with VI key bindings”. Turns out that it also works on macOS so I’ve been using it there too.

One thing that I wanted to change was the way ranger deleted files. I’m new here, but I think ranger deletes using rm which I find a little scary when using a new tool. What I wanted was for deleted files to be moved to the Trash instead.

I found a small command-line program called trash which does just that. All I needed to do is install it using brew install trash and add the following to ranger’s rc.conf file.

map DD shell trash %s

Now I can select one or more files and press DD to have them moved to the macOS Trash. The original method is still available via dD”.

Previous post
ThinkPad as iPad ThinkPad My experiment with Linux has been fun and sometimes frustrating so far. Using only a Tiling window manager to run things on a brand new (to
Next post
The Best Bon Scott AC/DC Song(s) Chris Lynch (A Large Regular): It’s a Long Way to the Top (If You Wanna Rock ‘n’ Roll) may be the most perfect hard rock song ever recorded. There