]> arthur.barton.de Git - ax-zsh.git/commitdiff
New "trash" plugin (for macOS)
authorAlexander Barton <alex@barton.de>
Tue, 5 Mar 2019 22:23:05 +0000 (23:23 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 5 Mar 2019 22:23:05 +0000 (23:23 +0100)
plugins/trash/README.md [new file with mode: 0644]
plugins/trash/trash.zshrc [new file with mode: 0644]

diff --git a/plugins/trash/README.md b/plugins/trash/README.md
new file mode 100644 (file)
index 0000000..2818420
--- /dev/null
@@ -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 (file)
index 0000000..07ca914
--- /dev/null
@@ -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'