aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index c1310a0..9c430c0 100644
--- a/.bashrc
+++ b/.bashrc
@@ -128,7 +128,7 @@ docker-rootfs() { id=$(docker run --detach "$1" /bin/true) \
shellquote() { printf '%q\n' "$(cat)"; }
# show window title of last command (https://stackoverflow.com/a/5080670)
-trap 'echo -ne "\033]2;command: $PWD $(history 1 | sed "s/^[ ]*[0-9]*[ ]*//g")\007"' DEBUG
+trap 'echo -ne "\033]2;term: $PWD $(history 1 | tr -s " " | cut -d " " -f 5-)\007"' DEBUG
# swallow
swallow() { "$@" & disown; exit; }