diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-03 00:02:14 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-02-03 00:02:14 +0100 |
commit | 43f2abd7942528ee2891eb58a71337b34149f117 (patch) | |
tree | 0cf83465f998fed7799c48afc7dff1a866397f54 | |
parent | fix(modules/lf/commands/trash_{clear,restore}): Allow ansi codes in fzf (diff) | |
download | nixos-config-43f2abd7942528ee2891eb58a71337b34149f117.zip |
fix(modules/lf/commands/trash_{clear,restore}): Use full path to file
Otherwise, `trash {empty,restore}` will not find it.
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/trash_clear.sh | 2 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/trash_restore.sh | 2 |
2 files changed, 2 insertions, 2 deletions
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 "$@" |