Commit d8fbf6fe by PotatoGim

bash에서 tmux 사용 시 타이틀 이름 자동 변경 기능 수정

parent cd1a78e7
......@@ -173,10 +173,14 @@ alias rm="rm -i"
alias vi="vim"
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
if [ "x$TMUX" != "x" ]; then
function cd() { builtin cd "$@" && printf "\033k`basename $PWD`\033\\"; }
tmux rename-window `basename $PWD`;
fi
function cd()
{
builtin cd "$@";
if [[ "x$TMUX" != "x" ]]; then
tmux rename-window "${PWD##*/}";
fi;
}
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
......@@ -184,6 +188,7 @@ case ${TERM} in
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
#PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033k%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
;;
esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment