瀏覽代碼

get tmux pane name every time ps1 is generated

pull/1/head
10sr 12 年之前
父節點
當前提交
d7c99314ad
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      bashrc

+ 2
- 2
bashrc 查看文件

@@ -476,10 +476,10 @@ __my_ps1_scale(){
echo "[LC:${LINES}x${COLUMNS}]"
return $last
}
TMUX_CURRENT="$(__try_exec tmux display -p '#S:#I:#W.#P' 2>/dev/null)"
__my_ps1_tmux(){
local last=$?
test -n "$TMUX" && echo "[TMUX:$TMUX_CURRENT]"
local tmuxc="$(__try_exec tmux display -p '#S:#I:#W.#P' 2>/dev/null)"
test -n "$TMUX" && echo "[TMUX:$tmuxc]"
return $last
}
__my_ps1_moc(){


Loading…
取消
儲存