Expanded distro_shorthand to Solaris

This commit is contained in:
Muhammad Herdiansyah 2016-10-14 19:09:57 +07:00
parent ed41c15c6a
commit fe6588d8b6
4 changed files with 8 additions and 5 deletions

View file

@ -366,7 +366,7 @@ alias neofetch2="neofetch \
Possible values: name, speed, tiny, on, off
--cpu_cores on/off Whether or not to display the number of CPU cores
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This is only possible on Linux and Mac OS X
NOTE: This is only possible on Linux, Mac OS X, and Solaris
--kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--refresh_rate on/off Whether to display the refresh rate of each monitor

View file

@ -62,7 +62,7 @@ kernel_shorthand="on"
# Distro
# Shorten the output of distro (tiny, on, off)
# NOTE: This is only possible on Linux and Mac OS X
# NOTE: This is only possible on Linux, Mac OS X, and Solaris
distro_shorthand="off"
# Show 'x86_64' and 'x86' in 'Distro:' output.

View file

@ -231,7 +231,10 @@ getdistro() {
;;
"Solaris")
distro="$(awk 'NR==1{print $1 " " $2;}' /etc/release)"
case "$distro_shorthand" in
"on" | "tiny") distro="$(awk 'NR==1{print $1 " " $2;}' /etc/release)" ;;
*) distro="$(awk 'NR==1{print $1 " " $2 " " $3;}' /etc/release)" ;;
esac
;;
esac
@ -2901,7 +2904,7 @@ usage() { cat << EOF
Possible values: name, speed, tiny, on, off
--cpu_cores on/off Whether or not to display the number of CPU cores
--distro_shorthand on/off Shorten the output of distro (tiny, on, off)
NOTE: This is only possible on Linux and Mac OS X
NOTE: This is only possible on Linux, Mac OS X, and Solaris
--kernel_shorthand on/off Shorten the output of kernel
--uptime_shorthand on/off Shorten the output of uptime (tiny, on, off)
--refresh_rate on/off Whether to display the refresh rate of each monitor

View file

@ -41,7 +41,7 @@ Whether or not to display the number of CPU cores
.B \--distro_shorthand 'on/off'
Shorten the output of distro (tiny, on, off)
.br
NOTE: This is only possible on Linux and Mac OS X
NOTE: This is only possible on Linux, Mac OS X, and Solaris
.TP
.B \--kernel_shorthand 'on/off'
Shorten the output of kernel