From 15cd72d6373057b232e27e6a2795108d1161c18f Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Fri, 11 Mar 2022 15:54:31 +0100 Subject: [PATCH] bashrc: add support for Manjaro-ARM + change rule for keeping second part of hostname --- bashrc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bashrc b/bashrc index 6f515c0..67d8a46 100644 --- a/bashrc +++ b/bashrc @@ -1,4 +1,3 @@ -#!/bin/bash # ~/.bashrc # byMasterKTO @@ -58,7 +57,7 @@ fi if [[ $system == "Linux" ]]; then case $(lsb_release -si) in # Arch family: light blue - Arch | ManjaroLinux) COLOR=$C_BOLD$C_ARCH;; + Arch | ManjaroLinux | Manjaro-ARM) COLOR=$C_BOLD$C_ARCH;; # Debian family: orange Debian | Ubuntu | Linuxmint | Neon | Raspbian) COLOR=$C_BOLD$C_DEB;; # RedHat family: blue @@ -90,8 +89,8 @@ if [[ $system == "Linux" ]]; then fi # hostname -# if hostname has 4 parts then host=.secondpart -if [[ $(hostname | grep -o "\." | wc -l) -eq 3 ]]; then +# if hostname has 5 parts then host=.secondpart +if [[ $(hostname | grep -o "\." | wc -l) -eq 4 ]]; then host='.'$(hostname | cut -f 2 -d '.') fi hn="$COLOR\h$host$virt$C_RESET"