bashrc: add support for Manjaro-ARM + change rule for keeping second part of hostname
This commit is contained in:
parent
bbb9d98547
commit
15cd72d637
7
bashrc
7
bashrc
@ -1,4 +1,3 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ~/.bashrc
|
# ~/.bashrc
|
||||||
# byMasterKTO
|
# byMasterKTO
|
||||||
|
|
||||||
@ -58,7 +57,7 @@ fi
|
|||||||
if [[ $system == "Linux" ]]; then
|
if [[ $system == "Linux" ]]; then
|
||||||
case $(lsb_release -si) in
|
case $(lsb_release -si) in
|
||||||
# Arch family: light blue
|
# Arch family: light blue
|
||||||
Arch | ManjaroLinux) COLOR=$C_BOLD$C_ARCH;;
|
Arch | ManjaroLinux | Manjaro-ARM) COLOR=$C_BOLD$C_ARCH;;
|
||||||
# Debian family: orange
|
# Debian family: orange
|
||||||
Debian | Ubuntu | Linuxmint | Neon | Raspbian) COLOR=$C_BOLD$C_DEB;;
|
Debian | Ubuntu | Linuxmint | Neon | Raspbian) COLOR=$C_BOLD$C_DEB;;
|
||||||
# RedHat family: blue
|
# RedHat family: blue
|
||||||
@ -90,8 +89,8 @@ if [[ $system == "Linux" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# hostname
|
# hostname
|
||||||
# if hostname has 4 parts then host=.secondpart
|
# if hostname has 5 parts then host=.secondpart
|
||||||
if [[ $(hostname | grep -o "\." | wc -l) -eq 3 ]]; then
|
if [[ $(hostname | grep -o "\." | wc -l) -eq 4 ]]; then
|
||||||
host='.'$(hostname | cut -f 2 -d '.')
|
host='.'$(hostname | cut -f 2 -d '.')
|
||||||
fi
|
fi
|
||||||
hn="$COLOR\h$host$virt$C_RESET"
|
hn="$COLOR\h$host$virt$C_RESET"
|
||||||
|
Loading…
Reference in New Issue
Block a user