From 43f2abd7942528ee2891eb58a71337b34149f117 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 3 Feb 2025 00:02:14 +0100 Subject: fix(modules/lf/commands/trash_{clear,restore}): Use full path to file Otherwise, `trash {empty,restore}` will not find it. --- modules/by-name/lf/lf/commands/scripts/trash_clear.sh | 2 +- modules/by-name/lf/lf/commands/scripts/trash_restore.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/by-name/lf/lf/commands/scripts/trash_clear.sh b/modules/by-name/lf/lf/commands/scripts/trash_clear.sh index de800074..e3c2f795 100755 --- a/modules/by-name/lf/lf/commands/scripts/trash_clear.sh +++ b/modules/by-name/lf/lf/commands/scripts/trash_clear.sh @@ -1,7 +1,7 @@ # shellcheck shell=sh while read -r file; do - set -- "$@" "$file" + set -- "$@" "$(pwd)/$file" done <"$(conceal list | fzf --multi --ansi | awk '{for(i=3; i<=NF; i++) {print $i}}' | tmp)" trash empty --match=exact "$@" diff --git a/modules/by-name/lf/lf/commands/scripts/trash_restore.sh b/modules/by-name/lf/lf/commands/scripts/trash_restore.sh index 5e9847c3..aa9ca0dc 100755 --- a/modules/by-name/lf/lf/commands/scripts/trash_restore.sh +++ b/modules/by-name/lf/lf/commands/scripts/trash_restore.sh @@ -10,7 +10,7 @@ fs="$fs" id="$id" while read -r file; do - set -- "$@" "$file" + set -- "$@" "$(pwd)/$file" done <"$(conceal list | fzf --multi --ansi | awk '{for(i=3; i<=NF; i++) {print $i}}' | tmp)" trash restore --match=exact "$@" -- cgit 1.4.1