git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormail_redacted_for_web 2025-03-15 21:10:04 +0100
committermail_redacted_for_web 2025-03-15 21:10:04 +0100
commit672a8bda092a03eb93e068deb2cbdcf355b06c68 (patch)
treef40830d6433f35648f8fd4a94c3b37de36219c6c
parent4c0b4468554f704633350b0e0cdd4ad174da349b (diff)
downloaddotfiles-672a8bda092a03eb93e068deb2cbdcf355b06c68.tar.bz2
Further grep adjustments where -P is not necessary (auto)
-rw-r--r--.bash/prompt.bash8
-rw-r--r--.bash/vars.bash8
2 files changed, 8 insertions, 8 deletions
diff --git a/.bash/prompt.bash b/.bash/prompt.bash
index 8735cd4..956b3b9 100644
--- a/.bash/prompt.bash
+++ b/.bash/prompt.bash
@@ -48,13 +48,13 @@ case "$MYUID" in
*solaris) FGC2="fgcolor 63";FGC3="fgcolor 124";;
ubuntu)
if [ "$OSMAJVER" -ge 24 ];then
- if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then
+ if printf "%b" "$TERM"|grep -E 'xterm|256' > /dev/null;then
FGC2="fgcolor 125";FGC3="fgcolor 202"
else
FGC2="fgcolor 53";FGC3="fgcolor 184"
fi
elif [ "$OSMAJVER" -ge 22 ];then
- if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then
+ if printf "%b" "$TERM"|grep -E 'xterm|256' > /dev/null;then
FGC2="fgcolor 208";FGC3="fgcolor 89"
else
FGC2="fgcolor 184";FGC3="fgcolor 53"
@@ -101,13 +101,13 @@ case "$MYUID" in
*solaris) FGC1="fgcolor 63";FGC3="fgcolor 124";;
ubuntu)
if [ "$OSMAJVER" -ge 24 ];then
- if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then
+ if printf "%b" "$TERM"|grep -E 'xterm|256' > /dev/null;then
FGC1="fgcolor 125";FGC3="fgcolor 202"
else
FGC1="fgcolor 53";FGC3="fgcolor 184"
fi
elif [ "$OSMAJVER" -ge 22 ];then
- if printf "%b" "$TERM"|grep -P 'xterm|256' > /dev/null;then
+ if printf "%b" "$TERM"|grep -E 'xterm|256' > /dev/null;then
FGC1="fgcolor 89";FGC3="fgcolor 208"
else
FGC1="fgcolor 53";FGC3="fgcolor 184"
diff --git a/.bash/vars.bash b/.bash/vars.bash
index b9b1b19..8b99807 100644
--- a/.bash/vars.bash
+++ b/.bash/vars.bash
@@ -20,7 +20,7 @@ export SSHAGH
# ----- SHELL ----- #
for pa in "/usr/local/bin" "${HOME}/bin" "${HOME}/.local/bin" "${HOME}/go/bin";do
if [ -x "$pa" ]; then
- if ! printf "%b" "$PATH"|grep -P "^${pa}:|:${pa}:" >/dev/null;then
+ if ! printf "%b" "$PATH"|grep -E "^${pa}:|:${pa}:" >/dev/null;then
export PATH="${pa}:${PATH}"
fi
fi
@@ -30,9 +30,9 @@ if [ -r "/etc/os-release" ];then
OSNAME="$(grep ^ID /etc/os-release|awk -F= '{print $NF}'|head -n1|sed 's/"//g')"
elif [ "$(uname -s)" == 'SunOS' ]; then OSNAME="sunos"
elif [ -r "/etc/redhat-release" ];then
- grep -P "^Red[\ ]?[Hh]at" /etc/redhat-release >/dev/null 2>&1 && OSNAME="redhat"
- grep -P "^[Ff]edora" /etc/redhat-release >/dev/null 2>&1 && OSNAME="fedora"
- grep -P "^[Cc]ent[Oo][Ss]" /etc/redhat-release >/dev/null 2>&1 && OSNAME="centos"
+ grep -E "^Red[\ ]?[Hh]at" /etc/redhat-release >/dev/null 2>&1 && OSNAME="redhat"
+ grep -E "^[Ff]edora" /etc/redhat-release >/dev/null 2>&1 && OSNAME="fedora"
+ grep -E "^[Cc]ent[Oo][Ss]" /etc/redhat-release >/dev/null 2>&1 && OSNAME="centos"
[ -z "$OSNAME" ]&&OSNAME="obsolete"
elif [ -r "/etc/SuSE-release" ];then
OSNAME="oldsuse"