prompt: improve tmux compatibility
This commit is contained in:
parent
c27a3e47f3
commit
dd76c7123b
1 changed files with 8 additions and 5 deletions
|
@ -8,11 +8,14 @@ if [[ -a "$OVER_PROMPT_CFG" ]]; then
|
||||||
source "$OVER_PROMPT_CFG"
|
source "$OVER_PROMPT_CFG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# emits garbage on tmux, where it's not really needed anyway
|
||||||
|
if [[ ! -n "$TMUX" ]]; then
|
||||||
function __over_prompt_set_title {
|
function __over_prompt_set_title {
|
||||||
if [[ ${TERM} =~ "screen" ]]; then
|
if [[ ${TERM} =~ "screen" ]]; then
|
||||||
print -Pn "\033k\033${@}\033\134"
|
print -Pn "\033k\033${@}\033\134"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
function __over_prompt_preexec {
|
function __over_prompt_preexec {
|
||||||
__over_prompt_set_title "${USER}: ${PWD} -> ${1}"
|
__over_prompt_set_title "${USER}: ${PWD} -> ${1}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue