mirror of
https://github.com/tw93/Mole.git
synced 2026-02-16 07:11:11 +00:00
feat: add commands help flag (#429)
This commit is contained in:
12
bin/clean.sh
12
bin/clean.sh
@@ -1078,6 +1078,18 @@ perform_cleanup() {
|
|||||||
main() {
|
main() {
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
"--help" | "-h")
|
||||||
|
echo "Usage: mo clean [OPTIONS]"
|
||||||
|
echo ""
|
||||||
|
echo "Clean up disk space by removing caches, logs, and temporary files."
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " --dry-run, -n Preview cleanup without making changes"
|
||||||
|
echo " --whitelist Manage protected paths"
|
||||||
|
echo " --debug Show detailed operation logs"
|
||||||
|
echo " -h, --help Show this help message"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
"--debug")
|
"--debug")
|
||||||
export MO_DEBUG=1
|
export MO_DEBUG=1
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -668,6 +668,16 @@ show_summary() {
|
|||||||
main() {
|
main() {
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
"--help" | "-h")
|
||||||
|
echo "Usage: mo installer [OPTIONS]"
|
||||||
|
echo ""
|
||||||
|
echo "Find and remove installer files (.dmg, .pkg, .iso, .xip, .zip)."
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " --debug Show detailed operation logs"
|
||||||
|
echo " -h, --help Show this help message"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
"--debug")
|
"--debug")
|
||||||
export MO_DEBUG=1
|
export MO_DEBUG=1
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -373,6 +373,18 @@ main() {
|
|||||||
local health_json
|
local health_json
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
"--help" | "-h")
|
||||||
|
echo "Usage: mo optimize [OPTIONS]"
|
||||||
|
echo ""
|
||||||
|
echo "Check and maintain system health, apply optimizations."
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " --dry-run Preview optimization without making changes"
|
||||||
|
echo " --whitelist Manage protected items"
|
||||||
|
echo " --debug Show detailed operation logs"
|
||||||
|
echo " -h, --help Show this help message"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
"--debug")
|
"--debug")
|
||||||
export MO_DEBUG=1
|
export MO_DEBUG=1
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -306,6 +306,22 @@ main() {
|
|||||||
local command="${1:-}"
|
local command="${1:-}"
|
||||||
|
|
||||||
case "$command" in
|
case "$command" in
|
||||||
|
"--help" | "-h")
|
||||||
|
echo "Usage: mo touchid [COMMAND]"
|
||||||
|
echo ""
|
||||||
|
echo "Configure Touch ID for sudo authentication."
|
||||||
|
echo ""
|
||||||
|
echo "Commands:"
|
||||||
|
echo " enable Enable Touch ID for sudo"
|
||||||
|
echo " disable Disable Touch ID for sudo"
|
||||||
|
echo " status Show current Touch ID status"
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " -h, --help Show this help message"
|
||||||
|
echo ""
|
||||||
|
echo "If no command is provided, an interactive menu is shown."
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
enable)
|
enable)
|
||||||
enable_touchid
|
enable_touchid
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -757,6 +757,16 @@ main() {
|
|||||||
# Global flags
|
# Global flags
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
"--help" | "-h")
|
||||||
|
echo "Usage: mo uninstall [OPTIONS]"
|
||||||
|
echo ""
|
||||||
|
echo "Interactively remove applications and their leftover files."
|
||||||
|
echo ""
|
||||||
|
echo "Options:"
|
||||||
|
echo " --debug Show detailed operation logs"
|
||||||
|
echo " -h, --help Show this help message"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
"--debug")
|
"--debug")
|
||||||
export MO_DEBUG=1
|
export MO_DEBUG=1
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user