Revert "Revert "properly delete all tmp files""

This reverts commit 2e58dfb404.
This commit is contained in:
Jorge Morante 2016-12-03 19:17:58 +01:00
parent 0ec23a189c
commit ba24c4566a
2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,7 @@ FINGERS_COPY_COMMAND=$(tmux show-option -gqv @fingers-copy-command)
current_pane_id=$1
fingers_pane_id=$2
tmp_path=$3
pane_input_temp=$3
BACKSPACE=$'\177'
@ -34,7 +34,7 @@ function handle_exit() {
tmux swap-pane -s "$current_pane_id" -t "$fingers_pane_id"
[[ $pane_was_zoomed == "1" ]] && zoom_pane "$current_pane_id"
tmux kill-pane -t "$fingers_pane_id"
rm -rf "$tmp_path"
rm -rf "$pane_input_temp" "$pane_output_temp" "$match_lookup_table"
}
function copy_result() {

View File

@ -7,6 +7,10 @@ match_lookup_table=$(fingers_tmp)
pane_output_temp=$(fingers_tmp)
flushed_input=0
# exporting them so they can be properly deleted at fingers.sh handle_exit trap
export match_lookup_table
export pane_output_temp
function lookup_match() {
local input=$1
echo "$(cat $match_lookup_table | grep "^$input:" | sed "s/^$input://")"