feat: add script catalog and -h help for all dotfile scripts
Introduce ff script -h with auto descriptions, shared help.sh, and usage flags across script/*.sh. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# 供 script/*.sh source:统一处理 -h / --help
|
||||
# 调用方需先定义 usage() 函数
|
||||
|
||||
dotfile_help_requested() {
|
||||
[[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]
|
||||
}
|
||||
|
||||
dotfile_show_help() {
|
||||
usage
|
||||
exit 0
|
||||
}
|
||||
Reference in New Issue
Block a user