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"
|
||||
fi
|
||||
|
||||
function __over_prompt_set_title {
|
||||
# emits garbage on tmux, where it's not really needed anyway
|
||||
if [[ ! -n "$TMUX" ]]; then
|
||||
function __over_prompt_set_title {
|
||||
if [[ ${TERM} =~ "screen" ]]; then
|
||||
print -Pn "\033k\033${@}\033\134"
|
||||
fi
|
||||
}
|
||||
}
|
||||
fi
|
||||
|
||||
function __over_prompt_preexec {
|
||||
__over_prompt_set_title "${USER}: ${PWD} -> ${1}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue