From 43ece7bf143c155cd18cff6563d49ff7ac507adc Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 14 Oct 2012 17:48:05 +0900 Subject: [PATCH] enable rtun only when using tmux --- bashrc | 2 +- emacs.el | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 2622521..47368af 100755 --- a/bashrc +++ b/bashrc @@ -381,7 +381,7 @@ mkcd(){ cd $1 } -if null type reattach-to-user-namespace +if test -n "$TMUX" && null type reattach-to-user-namespace then alias pbpaste="reattach-to-user-namespace pbpaste" alias pbcopy="reattach-to-user-namespace pbcopy" diff --git a/emacs.el b/emacs.el index 9f1db5f..25b32cc 100644 --- a/emacs.el +++ b/emacs.el @@ -609,6 +609,7 @@ otherwise the path where the library installed." t) (require 'pasteboard nil t) (turn-on-pasteboard) + (getenv "TMUX") (pasteboard-enable-rtun)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;