This commit is contained in:
parent
8bf0080654
commit
a1230c71db
4
trash.sh
4
trash.sh
@ -12,7 +12,7 @@ trash_list() {
|
|||||||
trash_put() {
|
trash_put() {
|
||||||
for FILE in $@; do
|
for FILE in $@; do
|
||||||
# Store old filepath for later restore
|
# Store old filepath for later restore
|
||||||
echo "$FILE $(readlink -f "$FILE")" >> "$FILE_PATHS_FILE"
|
echo "$FILE $(readlink -f "$FILE")" >>"$FILE_PATHS_FILE"
|
||||||
done
|
done
|
||||||
mv -v $* "$HOME"/.trash/
|
mv -v $* "$HOME"/.trash/
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ trash_put() {
|
|||||||
trash_empty() {
|
trash_empty() {
|
||||||
echo "Delete all $(find "$HOME"/.trash/* | wc -l) files in trash?"
|
echo "Delete all $(find "$HOME"/.trash/* | wc -l) files in trash?"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
\rm -Ir $HOME/.trash/* && echo > "$FILE_PATHS_FILE"
|
\rm -Ir $HOME/.trash/* && echo >"$FILE_PATHS_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
trash_restore() {
|
trash_restore() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user