mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Merge 1409f0584b into 5667161d49
This commit is contained in:
commit
f60306fa55
1 changed files with 9 additions and 2 deletions
|
|
@ -59,7 +59,9 @@ function omz_termsupport_precmd {
|
||||||
title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
|
title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE
|
||||||
}
|
}
|
||||||
|
|
||||||
# Runs before executing the command
|
# Runs before executing the command; @CMD@ is the command run; @LINE@ is the rest of the line
|
||||||
|
ZSH_THEME_TERM_TAB_TITLE_EXEC='@CMD@'
|
||||||
|
ZSH_THEME_TERM_TITLE_EXEC='%100>...>@LINE@%<<'
|
||||||
function omz_termsupport_preexec {
|
function omz_termsupport_preexec {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
setopt extended_glob
|
setopt extended_glob
|
||||||
|
|
@ -72,7 +74,12 @@ function omz_termsupport_preexec {
|
||||||
local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
|
local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
|
||||||
local LINE="${2:gs/%/%%}"
|
local LINE="${2:gs/%/%%}"
|
||||||
|
|
||||||
title '$CMD' '%100>...>$LINE%<<'
|
local tab_title=${ZSH_THEME_TERM_TAB_TITLE_EXEC//@CMD@/$CMD}
|
||||||
|
tab_title=${tab_title//@LINE@/$LINE}
|
||||||
|
local title=${ZSH_THEME_TERM_TITLE_EXEC//@CMD@/$CMD}
|
||||||
|
title=${title//@LINE@/$LINE}
|
||||||
|
|
||||||
|
title "$tab_title" "$title"
|
||||||
}
|
}
|
||||||
|
|
||||||
precmd_functions+=(omz_termsupport_precmd)
|
precmd_functions+=(omz_termsupport_precmd)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue