[#23] Convert terminal into a module
This commit is contained in:
parent
1330e6e792
commit
56f8f83d58
3 changed files with 3 additions and 4 deletions
1
init.zsh
1
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
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue