1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 12:30:32 +01:00

Set terminal title before commands.

This commit is contained in:
Bert Peters
2017-07-05 11:43:41 +02:00
parent 7897e6f33e
commit ce5cec48e8

View File

@@ -146,10 +146,18 @@ SAVEHIST=$HISTSIZE
setopt autocd # Automatically cd to dirs typed
setopt notify
###########################
# Configure terimal title #
###########################
############################
# Configure terminal title #
############################
precmd ()
{
print -Pn "\e]0;%n@%m: %2~\a"
}
preexec ()
{
if [ -n $1 ]; then
cmd=${1:0:20}
print -Pn "\e]0;$1\a"
fi
}