diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-05-25 17:54:13 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-05-25 17:54:13 +0200 |
| commit | 7d6d9465cfc5120b9904f3713690e5aebe82b0f6 (patch) | |
| tree | 5b9bfb8b333426443507706f7642c6b67aeed6de /.config/zsh/.zshrc | |
| parent | 57e3751f994a9e0cd42f2ac70dc7300599097fb9 (diff) | |
| download | dotfiles-7d6d9465cfc5120b9904f3713690e5aebe82b0f6.tar.gz dotfiles-7d6d9465cfc5120b9904f3713690e5aebe82b0f6.zip | |
Fixed prompt showing mode in same line by adding preexec()
Diffstat (limited to '.config/zsh/.zshrc')
| -rw-r--r-- | .config/zsh/.zshrc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index e8b5573..9c1f961 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -135,8 +135,8 @@ function set-prompt() { echo -ne '\e[5 q' VI_MODE=$(insert-mode) fi - PS1="%{┌─[%F{145}%n%f] %F{39}%0~%f%} ${vcs_info_msg_0_} $(jobs_status_indicator) - %{%{$terminfo_down_sc$VI_MODE$terminfo[rc]%}%{└─%{[%{$(tput setaf 226)%}""%{$(tput blink)%}"%{$%}"%{$(tput sgr0)%}]%}%}%}" + PS1="%{┌─[%F{145}%n%f] %F{39}%0~%f%} ${vcs_info_msg_0_} \$(jobs_status_indicator) + %{%{$terminfo_down_sc$VI_MODE$terminfo[rc]%}%{└─%{["%{$(tput setaf 226)%}""%{$(tput blink)%}"%{$%}"%{$(tput sgr0)%}"%{%G]%}%}%}%}" } function update-mode-file() { @@ -170,6 +170,8 @@ function zle-keymap-select() { esac } +preexec () { print -rn -- $terminfo[el]; echo -ne '\e[5 q' ; } + zle -N zle-keymap-select zle -N zle-line-init |
