sindresorhus / pure

Pretty, minimal and fast ZSH prompt
MIT License
13.22k stars 977 forks source link

Set different path as window title in `preexec` #583

Closed yannickperrenet closed 3 years ago

yannickperrenet commented 3 years ago

General information

I would like to change the window title that is set when executing a command. Currently, this is done using $PWD:t (see L98), instead I would like to see "%~" (as done in L203).

With the current format I have difficulties finding the right window I have open (I use https://github.com/davatorium/rofi to do this).

I can make a PR for this, but wanted to first understand the reasoning behind it.

yannickperrenet commented 3 years ago

With the current format I have difficulties finding the right window I have open

This was only applicable for terminals that were running Vim (possibly through fg after suspending it), and so I needed the extra granularity to find the terminal which was editing the file I am looking for.

I just found out that Vim has the option to set the title through :set title titlestring= and thus my proposed change is no longer needed (at least for my use case).