remove unused exec code
This commit is contained in:
parent
39d5d2fd2d
commit
2ceea91504
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
source $CURRENT_DIR/utils.sh
|
||||
|
||||
function contains_placeholders() {
|
||||
local input=$1
|
||||
|
||||
echo "$input" | grep -c "%"
|
||||
}
|
||||
|
||||
function replace_placeholders() {
|
||||
local template=$1
|
||||
local result=$2
|
||||
|
||||
echo $template | sed "s/%/$result/g"
|
||||
}
|
||||
|
||||
command_template=$1
|
||||
result=$2
|
||||
current_pane_id="%$3"
|
||||
fingers_pane_id="%$4"
|
||||
|
||||
if [[ $(contains_placeholders "$command_template") == 1 ]]; then
|
||||
pane_exec "$current_pane_id" "$(replace_placeholders "$command_template" "$result")"
|
||||
else
|
||||
pane_exec "$current_pane_id" "$command_template $result"
|
||||
fi
|
||||
|
||||
revert_to_original_pane $current_pane_id $fingers_pane_id
|
||||
|
||||
exit 0
|
|
@ -61,13 +61,8 @@ do
|
|||
continue
|
||||
fi
|
||||
|
||||
#TODO meeec, still not working
|
||||
#if [[ $(has_capitals $input) == "1" ]]; then
|
||||
#tmux command-prompt -p "fingers-exec:" "run-shell -t $fingers_pane_id $CURRENT_DIR/exec.sh '%%' '$result' '${current_pane_id//%}' '${fingers_pane_id//%}'"
|
||||
#else
|
||||
copy_result "$result"
|
||||
revert_to_original_pane $current_pane_id $fingers_pane_id
|
||||
#fi
|
||||
|
||||
exit 0
|
||||
done < /dev/tty
|
||||
|
|
Loading…
Reference in New Issue