summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bashrc9
1 files changed, 8 insertions, 1 deletions
diff --git a/bashrc b/bashrc
index cae83f0..0a389b1 100644
--- a/bashrc
+++ b/bashrc
@@ -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)"
}