aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-01-13 23:19:56 +0100
committerFederico Angelilli <code@fedang.net>2024-01-13 23:20:07 +0100
commitb363ed6f7be97658e8c148e05fabc6bb12f993a4 (patch)
tree3d3569ed8a5c406722f2c9aeb3019d139aba8048
parentd161b7cd50d34f589b5ae063518c6ee2849b56f8 (diff)
Change action evaluation
-rwxr-xr-xcrypt.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypt.sh b/crypt.sh
index 661abe6..b904d76 100755
--- a/crypt.sh
+++ b/crypt.sh
@@ -461,7 +461,9 @@ _cmd_action_file() {
*) error "Unknown action" ;;
esac
- eval "$action" "$tmp_file"
+ # Set environment
+ set -- "$tmp_file" "$path" "${entries_name[$entry]}"
+ eval "$action"
[[ -f $tmp_file ]] || error "File not saved."
$GPG -d -o - "${GPG_OPTS[@]}" "$file" 2>/dev/null | diff - "$tmp_file" &>/dev/null && \