diff options
| author | Robert Günzler <r@gnzler.io> | 2021-02-23 13:24:46 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-04-26 02:09:44 +0200 |
| commit | 01c7c7a51b65a836d7d33c9320a80a0537cff6e1 (patch) | |
| tree | 5f742aafccb030f403fdadd1c26ac9bf47135dab /bin | |
| parent | 4b13aa59af9da2c6ddf8fa2eab02a46aa796a596 (diff) | |
prompt: set terminal window title
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/hibiki/prompt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/hibiki/prompt b/bin/hibiki/prompt index a4ceb60..f4f8f27 100755 --- a/bin/hibiki/prompt +++ b/bin/hibiki/prompt @@ -1,9 +1,13 @@ #!/bin/bash +# make sure window title is set in terminals +SET_TERM_TITLE='\[\033]0;\u@\h:\w\007\]' + if [ "$1" == "err" ]; then color="\[$(tput setaf 1)\]" # red else color="\[$(tput setaf 10)\]" fi RESET="\[$(tput sgr0)\]" -echo "${color}\w${RESET} ❱ " + +echo "${SET_TERM_TITLE}${color}\w${RESET} ❱ " |