My zsh configuration
git clone https://github.com/m-col/zshrc
Files | Refs | Readme

-rw-r--r-- set_titles.zsh


      1 #
      2 # Set terminal window titles
      3 #
      4 
      5 function _set_title() {
      6     local a="%20>...>zsh"
      7     local b="%20<...<%~"
      8     printf '\33]2;%s:%s\007' ${(%)a} ${(%)b}
      9 }
     10 
     11 autoload -Uz add-zsh-hook
     12 add-zsh-hook precmd _set_title
     13