1
0
Fork 0

zsh: fix window title for term emu

This commit is contained in:
Luca Bilke 2024-09-27 11:31:41 +02:00
commit a9d5afa7fe
2 changed files with 6 additions and 9 deletions
common/.config/zsh/configs

View file

@ -5,15 +5,13 @@ function venv_prompt() {
echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}" echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}"
} }
function write_title_cmd() { function write_title_wd() {
if [ ${1[(w)1]} != "lfwrap" ]; then echo -ne "\033]0;$(print -P "%n@%m [%3~]")\007"
echo -ne "\033]0;$(print -P "%n@%m [%3~] » ${1[(w)1]}")\007"
fi
} }
function write_title_wd() { echo -ne "\033]0;$(print -P "%n@%m [%3~]")\007"; } function reset_beam() {
echo -ne '\e[5 q'
function reset_beam() { echo -ne '\e[5 q'; } }
function lfwrap() { function lfwrap() {
LF_DIRFILE="$(mktemp -u)" LF_DIRFILE="$(mktemp -u)"

View file

@ -31,8 +31,7 @@ _comp_options+=(globdots)
zle_highlight+=(paste:none) zle_highlight+=(paste:none)
# Set the titlestring # Set the titlestring
# add-zsh-hook preexec write_title_cmd add-zsh-hook precmd write_title_wd
# add-zsh-hook precmd write_title_wd
add-zsh-hook preexec reset_beam add-zsh-hook preexec reset_beam
export HISTSIZE=10000000 export HISTSIZE=10000000