new keyboard navigation method now is default
[far2l.git] / far2l / bootstrap / trash.sh
blobe2af561f41ce02f5eb27c4dd0185b8a9b955929d
1 #!/bin/sh
2 ##########################################################
3 #This script used by FAR to move files to Trash
4 ##########################################################
5 #For per user customization - create:
6 #~/.config/far2l/trash.sh
7 ##########################################################
9 set -e
11 if [ -x ~/.config/far2l/trash.sh ]; then
12 . ~/.config/far2l/trash.sh
15 if command -v kioclient >/dev/null 2>&1; then
16 kioclient move "$1" trash:/ 2>"$2"
18 elif command -v gio >/dev/null 2>&1; then
19 gio trash -f -- "$1" 2>"$2"
21 elif command -v gvfs-trash >/dev/null 2>&1; then
22 gvfs-trash -f -- "$1" 2>"$2"
24 elif command -v osascript >/dev/null 2>&1; then
25 osascript -e "tell application \"Finder\" to delete POSIX file \"$1\"" 2>"$2"
27 else
28 echo 'No command-line trash tool available' >"$2"
29 exit 1