diff --git a/modules/osx/README.md b/modules/osx/README.md index bb74ef5518..498ed2e506 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 d392437311..0000000000 --- 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 -