diff --git a/init.zsh b/init.zsh index 4e0d181..028f222 100644 --- a/init.zsh +++ b/init.zsh @@ -49,7 +49,6 @@ autoload -Uz compinit && compinit -i # Source files (the order matters). source "${0:h}/helper.zsh" source "${0:h}/environment.zsh" -source "${0:h}/terminal.zsh" # Source modules defined in ~/.zshrc. for omodule in "$omodules[@]"; do diff --git a/terminal.zsh b/modules/terminal/init.zsh similarity index 95% rename from terminal.zsh rename to modules/terminal/init.zsh index 6e9d3f2..dcb9a6e 100644 --- a/terminal.zsh +++ b/modules/terminal/init.zsh @@ -78,7 +78,7 @@ autoload -Uz add-zsh-hook # Sets the tab and window titles before the prompt is displayed. function set-title-precmd { - if zstyle -t ':omz:terminal' auto-title; then + if zstyle -t ':omz:module:terminal' auto-title; then if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then # Set the current working directory in Apple Terminal. printf '\e]7;%s\a' "file://$HOST${PWD// /%20}" @@ -95,7 +95,7 @@ add-zsh-hook precmd set-title-precmd # Sets the tab and window titles before command execution. function set-title-preexec { - if zstyle -t ':omz:terminal' auto-title; then + if zstyle -t ':omz:module:terminal' auto-title; then set-title-by-command "$2" fi } diff --git a/templates/zshrc b/templates/zshrc index ba7f393..01f95b6 100644 --- a/templates/zshrc +++ b/templates/zshrc @@ -18,7 +18,7 @@ zstyle ':omz:*:*' case-sensitive 'no' zstyle ':omz:*:*' color 'yes' # Auto set the tab and window titles. -zstyle ':omz:terminal' auto-title 'yes' +zstyle ':omz:module:terminal' auto-title 'yes' # Set the Zsh modules to load (man zshmodules). # zstyle ':omz:load' zmodule 'attr' 'stat'