Thu, 09 Mar 2006

Setting your terminal title in bash

I didn't really want to write three articles about bash in a row, but after my last article about Bash prompts Ralph Aichinger emailed me asking about a feature he had in zsh, where his xterms show him the current process and whether it was possible to do that in Bash. Never one to refuse a challenge, I had a go and my latest article is the result.

[, , , , , ] | # Read Comments (2) |

Related Products

Comments

You should add a \c to your echo command so you dont' get spurious newlines.

trap 'echo -e "\e]0;$BASH_COMMAND\007"' DEBUG
becomes
trap 'echo -e "\e]0;$BASH_COMMAND\007\c"' DEBUG
Posted by MattK at Fri Mar 10 18:32:37 2006
Yes, crap, I'd forgotten I'd added on a -n to echo to fix that. Thanks for reminding me. I've updated the article.
Posted by JD at Fri Mar 10 18:45:33 2006

Name:


E-mail:


URL:


Comment:


Please enter "fudge" to prove you are a human