properly set permissions and delete tmp file
This commit is contained in:
parent
f3d392f63d
commit
b822109b31
|
@ -6,6 +6,7 @@ source $DIRNAME/config.sh
|
||||||
#TODO move this out of here!
|
#TODO move this out of here!
|
||||||
current_pane_id=$1
|
current_pane_id=$1
|
||||||
fingers_pane_id=$2
|
fingers_pane_id=$2
|
||||||
|
tmp_path=$3
|
||||||
|
|
||||||
ALPHABET=asdfqwertjkluiop
|
ALPHABET=asdfqwertjkluiop
|
||||||
ALPHABET_SIZE=${#ALPHABET}
|
ALPHABET_SIZE=${#ALPHABET}
|
||||||
|
@ -56,6 +57,7 @@ echo -ne "$output"
|
||||||
function handle_exit() {
|
function handle_exit() {
|
||||||
tmux swap-pane -s $current_pane_id -t $fingers_pane_id
|
tmux swap-pane -s $current_pane_id -t $fingers_pane_id
|
||||||
tmux kill-pane -t $fingers_pane_id
|
tmux kill-pane -t $fingers_pane_id
|
||||||
|
rm -rf $tmp_path
|
||||||
}
|
}
|
||||||
|
|
||||||
trap "handle_exit" EXIT
|
trap "handle_exit" EXIT
|
||||||
|
|
|
@ -41,15 +41,15 @@ function prompt_fingers_for_pane() {
|
||||||
local current_pane_id=$1
|
local current_pane_id=$1
|
||||||
local fingers_pane_id=`init_fingers_pane`
|
local fingers_pane_id=`init_fingers_pane`
|
||||||
local tmp_path=`mktemp --suffix "tmux-fingers"`
|
local tmp_path=`mktemp --suffix "tmux-fingers"`
|
||||||
|
chmod 600 "$tmp_path"
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
||||||
capture_pane "$current_pane_id" "$tmp_path"
|
capture_pane "$current_pane_id" "$tmp_path"
|
||||||
pane_exec $fingers_pane_id "cat $tmp_path | $CURRENT_DIR/fingers.sh $current_pane_id $fingers_pane_id"
|
pane_exec $fingers_pane_id "cat $tmp_path | $CURRENT_DIR/fingers.sh $current_pane_id $fingers_pane_id $tmp_path"
|
||||||
|
|
||||||
tmux swap-pane -s $current_pane_id -t $fingers_pane_id
|
tmux swap-pane -s $current_pane_id -t $fingers_pane_id
|
||||||
|
|
||||||
##rm $tmp_path
|
|
||||||
|
|
||||||
echo $fingers_pane_id
|
echo $fingers_pane_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue