Manager: Improve help output formatting, display help without options
This commit is contained in:
+12
-9
@@ -46,18 +46,18 @@ ${B}OPTIONS${N}
|
|||||||
${B}-h, --help${N}
|
${B}-h, --help${N}
|
||||||
Display usage message and exit.
|
Display usage message and exit.
|
||||||
|
|
||||||
${B}-p${N} [${U}ARG${N}], ${B}--packages${N} [${U}ARG${N}]
|
${B}-p${N} [${U}FUNCTION${N}], ${B}--packages${N} [${U}FUNCTION${N}]
|
||||||
${B}install${N}
|
Apply ${U}FUNCTION${N} to the package manager packages.
|
||||||
Install all core packages of the stored list.
|
|
||||||
|
|
||||||
${B}install-aur${N}
|
${U}install${N} Install all core packages of the stored list.
|
||||||
Install all AUR packages of the stored list.
|
|
||||||
|
|
||||||
${B}list${N} (default)
|
${U}install-aur${N} Install all AUR packages of the stored list.
|
||||||
Display all packages installed on the system.
|
|
||||||
|
|
||||||
${B}store${N}
|
${U}list${N} Display all packages installed on the system.
|
||||||
Stores a list of all installed packages on the system.
|
|
||||||
|
${U}store${N} Stores a list of all installed packages on the system.
|
||||||
|
|
||||||
|
The default value is ${U}list${N}.
|
||||||
|
|
||||||
${B}-l, --pull${N}
|
${B}-l, --pull${N}
|
||||||
Pull each added file from the system to the dotfiles directory.
|
Pull each added file from the system to the dotfiles directory.
|
||||||
@@ -67,6 +67,9 @@ ${B}OPTIONS${N}
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Exit if no option is provided
|
||||||
|
[ "$#" -eq 0 ] && help && exit 1
|
||||||
|
|
||||||
set_files() {
|
set_files() {
|
||||||
FILES="$(find . -type f -o -type l \
|
FILES="$(find . -type f -o -type l \
|
||||||
| awk -v e="^./($EXCLUDE_FILES)" '$0 !~ e { print $0 }')"
|
| awk -v e="^./($EXCLUDE_FILES)" '$0 !~ e { print $0 }')"
|
||||||
|
|||||||
Reference in New Issue
Block a user