neofetch: Drop . outside of iOS for oil shell

This commit is contained in:
Dylan Araps 2020-04-15 15:21:53 +03:00
parent c374ee2ec9
commit 23c445d05f
No known key found for this signature in database
GPG key ID: 46D62DD9F1DE636E

View file

@ -903,24 +903,24 @@ get_os() {
# $kernel_name is set in a function called cache_uname and is # $kernel_name is set in a function called cache_uname and is
# just the output of "uname -s". # just the output of "uname -s".
case $kernel_name in case $kernel_name in
Darwin): "$darwin_name" ;; Darwin) os=$darwin_name ;;
SunOS): Solaris ;; SunOS) os=Solaris ;;
Haiku): Haiku ;; Haiku) os=Haiku ;;
MINIX): MINIX ;; MINIX) os=MINIX ;;
AIX): AIX ;; AIX) os=AIX ;;
IRIX*): IRIX ;; IRIX*) os=IRIX ;;
FreeMiNT): FreeMiNT ;; FreeMiNT) os=FreeMiNT ;;
Linux|GNU*) Linux|GNU*)
: Linux os=Linux
;; ;;
*BSD|DragonFly|Bitrig) *BSD|DragonFly|Bitrig)
: BSD os=BSD
;; ;;
CYGWIN*|MSYS*|MINGW*) CYGWIN*|MSYS*|MINGW*)
: Windows os=Windows
;; ;;
*) *)
@ -929,8 +929,6 @@ get_os() {
exit 1 exit 1
;; ;;
esac esac
os=$_
} }
get_distro() { get_distro() {
@ -1425,7 +1423,7 @@ get_packages() {
# dir: Count files or dirs in a glob. # dir: Count files or dirs in a glob.
# pac: If packages > 0, log package manager name. # pac: If packages > 0, log package manager name.
# tot: Count lines in command output. # tot: Count lines in command output.
has() { type -p "$1" >/dev/null && manager=$_; } has() { type -p "$1" >/dev/null && manager=$1; }
dir() { ((packages+=$#)); pac "$#"; } dir() { ((packages+=$#)); pac "$#"; }
pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; } pac() { (($1 > 0)) && { managers+=("$1 (${manager})"); manager_string+="${manager}, "; }; }
tot() { IFS=$'\n' read -d "" -ra pkgs <<< "$("$@")";((packages+=${#pkgs[@]}));pac "${#pkgs[@]}";} tot() { IFS=$'\n' read -d "" -ra pkgs <<< "$("$@")";((packages+=${#pkgs[@]}));pac "${#pkgs[@]}";}