diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-09-19 16:29:05 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-09-19 16:29:05 +0300 |
commit | 0934b3f7668a629b09c5bdb9f51747a20ef04eaf (patch) | |
tree | d6e06a80f8a72a253d49959401fc03378aa1e3b3 /bashrc | |
parent | 0b3e8219974b237fdc35838154a3a39043ea37c7 (diff) | |
download | liw-dot-files-0934b3f7668a629b09c5bdb9f51747a20ef04eaf.tar.gz |
feat(bashrc): set window title to hostname and cwd
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -156,6 +156,13 @@ define_ps1() } +define_window_title() +{ + printf "%s:" "$(hostname)" + pwd | sed "s,$HOME,~," +} + + tell_about_exit_code() { local exit_code="$1" @@ -172,7 +179,7 @@ export PROMPT_COMMAND=prompt_command prompt_command() { tell_about_exit_code "$?" PS1="$(define_ps1)" - set_window_title "Terminal" + set_window_title "$(define_window_title)" } |