--- a/.bashrc Mon May 07 12:17:32 2018 +0300
+++ b/.bashrc Sat May 12 22:28:34 2018 +0300
@@ -9,25 +9,23 @@
. ~/.env
fi
-hr() {
+_my_ruler() {
local ruler=''
for (( i=${COLUMNS:-78}; i>0; i-=1 )) do
ruler+='='
done
echo $ruler
}
-HR=`hr`
-PS1='\n'`hr`'\r$?|\u@\h \w \nbash# '
+PS1='\n$(_my_ruler)\r$?|\u@\h \w \nbash# '
PS2='> '
case "$TERM" in
xterm*|eterm-color|screen|linux|cygwin)
- PS1=$'\n\e[34m\e[1m'`hr`$'\r$?|\e[31m\u\e[35m@\h\e[0m\e[36m \w \n\[\e[1m\e[31m\]bash#\[\e[0m\] '
+ PS1=$'\n\e[34m\e[1m$(_my_ruler)$\r$?|\e[31m\u\e[35m@\h\e[0m\e[36m \w \n\[\e[1m\e[31m\]bash#\[\e[0m\] '
PS2=$'\[\e[32m\]> \[\e[0m\]'
;;
esac
-unset hr
# Set current directory in terminal emulator title.
case "$TERM" in
xterm*|screen|linux|cygwin)