Set zsh window title
6f7b92e8e2839e4074cb6ccb59a70279b5f98bde
1 parent
b2292dbc
.zshrc
+8 -0
| 149 | 149 | fi |
|
| 150 | 150 | ||
| 151 | 151 | if [ "$RPROMPT" != "" ]; then |
|
| 152 | 152 | RPROMPT="%{$fg[red]%}#$RPROMPT%{$reset_color%}" |
|
| 153 | 153 | fi |
|
| 154 | + | ||
| 155 | + | # Set the window title to the pwd. |
|
| 156 | + | print -Pn "\e]2;%~\a" |
|
| 157 | + | } |
|
| 158 | + | ||
| 159 | + | preexec() { |
|
| 160 | + | # Set the window title to the command and pwd. |
|
| 161 | + | print -Pn "\e]2;$1 %~\a" |
|
| 154 | 162 | } |
|
| 155 | 163 | ||
| 156 | 164 | # |
|
| 157 | 165 | # Vi-mode |
|
| 158 | 166 | # |