aboutsummaryrefslogtreecommitdiff
path: root/bashrc.d
diff options
context:
space:
mode:
Diffstat (limited to 'bashrc.d')
-rw-r--r--bashrc.d/title4
1 files changed, 3 insertions, 1 deletions
diff --git a/bashrc.d/title b/bashrc.d/title
index d6bb5e1..e391855 100644
--- a/bashrc.d/title
+++ b/bashrc.d/title
@@ -1,7 +1,9 @@
# vim: ft=sh
function settitle {
- echo -ne "\033]0;`whoami`@`hostname`:`pwd`\007"
+ if command -v whoami >/dev/null && command -v hostname >/dev/null && command -v pwd >/dev/null; then
+ echo -ne "\033]0;$(whoami)@$(hostname):$(pwd)\007"
+ fi
}
case "$TERM" in