From 0f5a89f0f632f785af1cca5f5a240c99012a80bf Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 21 Aug 2012 14:38:05 +0900 Subject: [PATCH] fix __my_ps1_tmux --- bashrc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bashrc b/bashrc index 9e22028..48bdb56 100755 --- a/bashrc +++ b/bashrc @@ -454,13 +454,10 @@ ip-address(){ test -n "$ip" && printf $1 $ip } -TMUX_CURRENT=$(tmux display -p '#S:#I:#W.#P') +TMUX_CURRENT="$(__try_exec tmux display -p '#S:#I:#W.#P')" __my_ps1_tmux(){ local last=$? - if test -n "$TMUX" - then - echo "[TMUX:$TMUX_CURRENT]" - fi + test -n "$TMUX" && echo "[TMUX:$TMUX_CURRENT]" return $last } __my_ps1_moc(){