args: Rename package_manager

This commit is contained in:
Dylan Araps 2018-06-03 10:26:20 +10:00
parent 27b2feb216
commit ee9939a1dd
2 changed files with 6 additions and 6 deletions

View File

@ -150,12 +150,12 @@ uptime_shorthand="on"
# #
# Default: 'on' # Default: 'on'
# Values: 'on', 'off' # Values: 'on', 'off'
# Flag: --package_manager # Flag: --package_managers
# #
# Example: # Example:
# on: '900 (pacman, apt)' # on: '900 (pacman, apt)'
# off: '900' # off: '900'
package_manager="on" package_managers="on"
# Shell # Shell
@ -1319,7 +1319,7 @@ get_packages() {
if ((packages == 0)); then if ((packages == 0)); then
unset packages unset packages
elif [[ "$package_manager" == "on" && "${managers//,}" ]]; then elif [[ "$package_managers" == "on" && "${managers//,}" ]]; then
managers="${managers/pacman-key/pacman}" managers="${managers/pacman-key/pacman}"
managers="${managers/kpt-pkg/kpt}" managers="${managers/kpt-pkg/kpt}"
packages+=" (${managers%,*})" packages+=" (${managers%,*})"
@ -4211,7 +4211,7 @@ INFO:
NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu' NOTE: You can supply multiple args. eg. 'neofetch --disable cpu gpu'
--package_manager on/off Hide/Show Package Manager names. --package_managers on/off Hide/Show Package Manager names.
--os_arch on/off Hide/Show OS architecture. --os_arch on/off Hide/Show OS architecture.
--speed_type type Change the type of cpu speed to display. --speed_type type Change the type of cpu speed to display.
Possible values: current, min, max, bios, Possible values: current, min, max, bios,
@ -4404,7 +4404,7 @@ get_args() {
while [[ "$1" ]]; do while [[ "$1" ]]; do
case "$1" in case "$1" in
# Info # Info
"--package_manager") package_manager="$2" ;; "--package_managers") package_managers="$2" ;;
"--os_arch") os_arch="$2" ;; "--os_arch") os_arch="$2" ;;
"--cpu_cores") cpu_cores="$2" ;; "--cpu_cores") cpu_cores="$2" ;;
"--cpu_speed") cpu_speed="$2" ;; "--cpu_speed") cpu_speed="$2" ;;

View File

@ -22,7 +22,7 @@ For example: 'info "Memory" memory' would be '\-\-disable memory'
.IP .IP
NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu' NOTE: You can supply multiple args. eg. 'neofetch \fB\-\-disable\fR cpu gpu'
.TP .TP
\fB\-\-package_manager\fR on/off \fB\-\-package_managers\fR on/off
Hide/Show Package Manager names. Hide/Show Package Manager names.
.TP .TP
\fB\-\-os_arch\fR on/off \fB\-\-os_arch\fR on/off