aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2024-04-11 00:00:00 +0000
committertdro <tdro@users.noreply.github.com>2024-04-11 00:00:00 +0000
commitbd81ec4c5849e9ae13105757d49f55fcb0c5b90d (patch)
treee239d574e87cb9840eca3488e43b7ec3494b4e23
parentf93138457f1607dab5f7b0749f0967fc0939bbed (diff)
downloaddotfiles-bd81ec4c5849e9ae13105757d49f55fcb0c5b90d.tar.gz
dotfiles-bd81ec4c5849e9ae13105757d49f55fcb0c5b90d.tar.bz2
dotfiles-bd81ec4c5849e9ae13105757d49f55fcb0c5b90d.zip
.bashrc: Set better term titles
-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; }