1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 07:46:28 +00:00

docs: show current directory in terminal window title (#1415)

This commit is contained in:
Muhammad Mejanul Haque 2020-07-02 06:46:40 +06:00 committed by GitHub
parent a370bfdc63
commit 14c4ce1974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,17 @@ precmd_functions+=(set_win_title)
```
If you like the result, add these lines to your shell configuration file
(`~/.bashrc` or `~/.zsrhc`) to make it permanent.
(`~/.bashrc` or `~/.zshrc`) to make it permanent.
For example, if you want to display your current directory in your terminal tab title,
add the following snippet to your `~/.bashrc` or `~/.zshrc`:
```bash
function set_win_title(){
echo -ne "\033]0; $(basename $PWD) \007"
}
starship_precmd_user_func="set_win_title"
```
## Style Strings