diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2011-04-01 01:33:22 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2011-04-01 01:47:05 +0200 |
commit | 9644993eaedec22b1d00a02c280b6a464a45efa4 (patch) | |
tree | 2ec902d7a4b4207c92fe7130cf78abdccefa0105 /bashrc/common/screen.sh | |
parent | e5a58b4409d4ea223e8f568eea62cf299ccb1592 (diff) | |
download | dotfiles-9644993eaedec22b1d00a02c280b6a464a45efa4.tar.gz dotfiles-9644993eaedec22b1d00a02c280b6a464a45efa4.tar.xz dotfiles-9644993eaedec22b1d00a02c280b6a464a45efa4.zip |
compatibility fix with openbsd
hostname returns the fqnd on openbsd, befor using it as screen title
discard the domain part
Diffstat (limited to '')
-rw-r--r-- | bashrc/common/screen.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bashrc/common/screen.sh b/bashrc/common/screen.sh index 6dbda21..72bc13d 100644 --- a/bashrc/common/screen.sh +++ b/bashrc/common/screen.sh @@ -3,7 +3,8 @@ set_screen_title() { # prevent reset_screen_title from calling set_screen_title if [[ $BASH_COMMAND != "__make_prompt" ]]; then - echo -ne "\ek$(id -un)@$(hostname):${BASH_COMMAND/ *}\e\\" + _hostname=$(hostname) + echo -ne "\ek$(id -un)@${_hostname%%\.*}:${BASH_COMMAND/ *}\e\\" fi } |