misc: docs
This commit is contained in:
parent
14005cac4a
commit
bee887a3e0
1 changed files with 3 additions and 0 deletions
3
neofetch
3
neofetch
|
@ -1237,6 +1237,9 @@ get_uptime() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_packages() {
|
get_packages() {
|
||||||
|
# pkgs: Run package manager if it exists.
|
||||||
|
# tots: Count lines in command output.
|
||||||
|
# dirc: Count files or dirs in a glob.
|
||||||
pkgs() { type -p "$1" >/dev/null && { ((packages+="$2"));(("$2">0))&&managers+="$_, "; }; }
|
pkgs() { type -p "$1" >/dev/null && { ((packages+="$2"));(("$2">0))&&managers+="$_, "; }; }
|
||||||
tots() { IFS=$'\n' read -d "" -ra files < <($1); echo "${#files[@]}"; }
|
tots() { IFS=$'\n' read -d "" -ra files < <($1); echo "${#files[@]}"; }
|
||||||
dirc() { echo $#; }
|
dirc() { echo $#; }
|
||||||
|
|
Loading…
Reference in a new issue