Attempt to show hostname in prompt

This commit is contained in:
2021-05-02 15:48:32 +03:00
parent 1cab46c1d0
commit 94e7d6ce27
+4 -2
View File
@@ -1,5 +1,7 @@
# Colors
PS1='\[\e[1;32m\]\w\[\e[m\]\[\e[1;0m\] \[\e[0m\] \[\e[1;0m\]'
# Set prompt
IFS='.' read -ra split_hostname <<<$(hostname | tr '[:upper:]' '[:lower:]')
HOSTNAME=${split_hostname[0]}
PS1='\[\e[1;36m\]$HOSTNAME | \[\e[1;32m\]\w\[\e[m\]\[\e[1;0m\] \[\e[0m\] \[\e[1;0m\]'
export TERM=xterm-256color
shopt -s autocd