pass env vars to fingers-copy-command ( IS_UPPERCASE and HINT )
This commit is contained in:
parent
3fd3ea4d1f
commit
1a8591fcc4
|
@ -102,6 +102,7 @@ function toggle_help_state() {
|
||||||
|
|
||||||
function copy_result() {
|
function copy_result() {
|
||||||
local result="$1"
|
local result="$1"
|
||||||
|
local hint="$2"
|
||||||
|
|
||||||
tmux set-buffer "$result"
|
tmux set-buffer "$result"
|
||||||
|
|
||||||
|
@ -112,7 +113,8 @@ function copy_result() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$FINGERS_COPY_COMMAND" ]; then
|
if [ ! -z "$FINGERS_COPY_COMMAND" ]; then
|
||||||
tmux run-shell -b "echo -n \"$result\" | $exec_prefix $FINGERS_COPY_COMMAND > /dev/null"
|
is_uppercase=$(echo "$input" | grep -E '^[a-z]+$' &> /dev/null; echo $?)
|
||||||
|
tmux run-shell -b "echo -n \"$result\" | IS_UPPERCASE=$is_uppercase HINT=$hint $exec_prefix $FINGERS_COPY_COMMAND > /dev/null"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $HAS_TMUX_YANK = 1 ]]; then
|
if [[ $HAS_TMUX_YANK = 1 ]]; then
|
||||||
|
|
|
@ -13,7 +13,7 @@ export pane_output_temp
|
||||||
|
|
||||||
function lookup_match() {
|
function lookup_match() {
|
||||||
local input=$1
|
local input=$1
|
||||||
echo "$(cat $match_lookup_table | grep "^$input:" | sed "s/^$input://" | head -n 1)"
|
echo "$(cat $match_lookup_table | grep -i "^$input:" | sed "s/^$input://i" | head -n 1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_stdin() {
|
function get_stdin() {
|
||||||
|
|
Loading…
Reference in New Issue