From: Alexander Barton Date: Tue, 5 Mar 2019 22:23:05 +0000 (+0100) Subject: New "trash" plugin (for macOS) X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=60e12d85c103d132ab92683629d0229894c2d0fa New "trash" plugin (for macOS) --- diff --git a/plugins/trash/README.md b/plugins/trash/README.md new file mode 100644 index 0000000..2818420 --- /dev/null +++ b/plugins/trash/README.md @@ -0,0 +1,8 @@ +## trash + +Setup *trash*(1), a tool moving files and folders to the "trash" of macOS. + +### Command Aliases + +- `rm`: `trash -F` - map *rm*(1) to *trash*(1) and use the Finder to move files + to the trash, so that you can use Finder's "put back" feature. diff --git a/plugins/trash/trash.zshrc b/plugins/trash/trash.zshrc new file mode 100644 index 0000000..07ca914 --- /dev/null +++ b/plugins/trash/trash.zshrc @@ -0,0 +1,7 @@ +# AX-ZSH: Alex' Modular ZSH Configuration +# trash.zshrc: Setup trash(1) + +# Make sure that "trash(1)" is installed +(( $+commands[trash] )) || return + +alias rm='trash -F'