zsh: fix window title for term emu
This commit is contained in:
parent
c9ef293ebe
commit
a9d5afa7fe
2 changed files with 6 additions and 9 deletions
|
@ -5,15 +5,13 @@ function venv_prompt() {
|
|||
echo -e "%F{yellow}%f ${VIRTUAL_ENV:t:gs/%/%%}"
|
||||
}
|
||||
|
||||
function write_title_cmd() {
|
||||
if [ ${1[(w)1]} != "lfwrap" ]; then
|
||||
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 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() {
|
||||
LF_DIRFILE="$(mktemp -u)"
|
||||
|
|
|
@ -31,8 +31,7 @@ _comp_options+=(globdots)
|
|||
zle_highlight+=(paste:none)
|
||||
|
||||
# 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
|
||||
|
||||
export HISTSIZE=10000000
|
||||
|
|
Loading…
Add table
Reference in a new issue