From e2c5f2fb2c5e43d9dabcf5a367955de297234004 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 28 Feb 2013 17:35:54 -0500 Subject: [PATCH] [Fix #396] Remove the osx trash function The trash program found at http://hasseg.org/trash is a superior implementation. --- modules/osx/README.md | 1 - modules/osx/functions/trash | 27 --------------------------- 2 files changed, 28 deletions(-) delete mode 100644 modules/osx/functions/trash diff --git a/modules/osx/README.md b/modules/osx/README.md index bb74ef55..498ed2e5 100644 --- a/modules/osx/README.md +++ b/modules/osx/README.md @@ -20,7 +20,6 @@ Functions - `pfd` prints the current _Finder_ directory. - `pfs` prints the current _Finder_ selection. - `tab` creates a new tab (works in both _Terminal_ and [_iTerm_][3]). - - `trash` moves files and folders to _Trash_. Authors ------- diff --git a/modules/osx/functions/trash b/modules/osx/functions/trash deleted file mode 100644 index d3924373..00000000 --- a/modules/osx/functions/trash +++ /dev/null @@ -1,27 +0,0 @@ -# -# Moves directories and files to Trash. -# -# Authors: -# Sorin Ionescu -# - -print -N "${@:a}" | xargs -0 osascript -e ' - on run theFilePaths - tell application "Finder" - set thePOSIXFiles to {} - repeat with aFilePath in theFilePaths - set aPOSIXFile to aFilePath as POSIX file - if exists aPOSIXFile - set end of thePOSIXFiles to aPOSIXFile - end if - end repeat - move every item of thePOSIXFiles to trash - end tell - end run -' &>/dev/null - -if (( $? != 0)); then - print "$0: failed to move one or more items" >&2 - return 1 -fi -