"fixing" copy paste in both linux and OSX?

This commit is contained in:
Jorge Morante 2017-10-06 18:24:37 +02:00
parent 612c2252a4
commit b4f58df938
1 changed files with 7 additions and 1 deletions

View File

@ -103,12 +103,18 @@ function copy_result() {
tmux set-buffer "$result"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
tmux_yank_prefix="nohup"
else
tmux_yank_prefix=""
fi
if [ ! -z "$FINGERS_COPY_COMMAND" ]; then
echo -n "$result" | eval "nohup $FINGERS_COPY_COMMAND" > /dev/null
fi
if [[ $HAS_TMUX_YANK = 1 ]]; then
echo -n "$result" | eval "$tmux_yank_copy_command" > /dev/null
echo -n "$result" | eval "$tmux_yank_prefix $tmux_yank_copy_command" > /dev/null
fi
}