mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
Use zstyle instead of variables for configuration.
This commit is contained in:
parent
60f39d8d91
commit
f0499b76c3
13 changed files with 156 additions and 103 deletions
|
|
@ -70,7 +70,7 @@ autoload -Uz add-zsh-hook
|
|||
|
||||
# Sets the tab and window titles before the prompt is displayed.
|
||||
function set-title-precmd {
|
||||
if [[ "$TERM_PROGRAM" != "Apple_Terminal" ]] && check-bool "$AUTO_TITLE"; then
|
||||
if [[ "$TERM_PROGRAM" != "Apple_Terminal" ]] && zstyle -t ':omz:terminal' auto-title; then
|
||||
set-window-title "${(%):-%~}"
|
||||
for kind in tab screen; do
|
||||
# Left-truncate the current working directory to 15 characters.
|
||||
|
|
@ -85,7 +85,7 @@ add-zsh-hook precmd set-title-precmd
|
|||
|
||||
# Sets the tab and window titles before command execution.
|
||||
function set-title-preexec {
|
||||
if check-bool "$AUTO_TITLE"; then
|
||||
if zstyle -t ':omz:terminal' auto-title; then
|
||||
set-title-by-command "$2"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue