mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Introduce DISABLE_AUTO_TITLE option
This commit is contained in:
parent
01b0366f3e
commit
9b48a845d1
3 changed files with 33 additions and 24 deletions
|
|
@ -12,13 +12,17 @@ function title {
|
|||
}
|
||||
|
||||
function precmd {
|
||||
if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
|
||||
title zsh "$PWD"
|
||||
fi
|
||||
}
|
||||
|
||||
function preexec {
|
||||
emulate -L zsh
|
||||
local -a cmd; cmd=(${(z)1})
|
||||
if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
|
||||
title $cmd[1]:t "$cmd[2,-1]"
|
||||
fi
|
||||
}
|
||||
|
||||
function zsh_stats() {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
if [ "$DISABLE_AUTO_TITLE" != "true" ]; then
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
preexec () {
|
||||
|
|
@ -19,3 +20,4 @@ case "$TERM" in
|
|||
}
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ export ZSH_THEME="robbyrussell"
|
|||
# Uncomment following line if you want to disable colors in ls
|
||||
# export DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment following line if you want to disable autosetting terminal title.
|
||||
# export DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
plugins=(git)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue