Support -h/--help for all programs (#1620)

This commit is contained in:
Rangi
2025-01-21 21:24:17 -05:00
committed by GitHub
parent 157826bf82
commit d9654b752f
16 changed files with 54 additions and 20 deletions

View File

@@ -25,6 +25,7 @@ _rgbasm_completions() {
# See the `state` variable below for info about `state_after`
declare -A opts=(
[V]="version:normal"
[h]="help:normal"
[E]="export-all:normal"
[v]="verbose:normal"
[w]=":normal"

View File

@@ -8,6 +8,7 @@ _rgbfix_completions() {
# See the `state` variable below for info about `state_after`
declare -A opts=(
[V]="version:normal"
[h]="help:normal"
[j]="non-japanese:normal"
[s]="sgb-compatible:normal"
[v]="validate:normal"

View File

@@ -8,6 +8,7 @@ _rgbgfx_completions() {
# See the `state` variable below for info about `state_after`
declare -A opts=(
[V]="version:normal"
[h]="help:normal"
[C]="color-curve:normal"
[m]="mirror-tiles:normal"
[O]="group-outputs:normal"

View File

@@ -8,6 +8,7 @@ _rgblink_completions() {
# See the `state` variable below for info about `state_after`
declare -A opts=(
[V]="version:normal"
[h]="help:normal"
[d]="dmg:normal"
[t]="tiny:normal"
[v]="verbose:normal"

View File

@@ -36,8 +36,9 @@ _rgbasm_warnings() {
}
local args=(
# Arguments are listed here in the same order as in the manual, except for the version
'(- : * options)'{-V,--version}'[Print version number]'
# Arguments are listed here in the same order as in the manual, except for the version and help
'(- : * options)'{-V,--version}'[Print version number and exit]'
'(- : * options)'{-h,--help}'[Print help text and exit]'
'(-E --export-all)'{-E,--export-all}'[Export all symbols]'
'(-v --verbose)'{-v,--verbose}'[Print additional messages regarding progression]'

View File

@@ -35,8 +35,9 @@ _mbc_names() {
}
local args=(
# Arguments are listed here in the same order as in the manual, except for the version
'(- : * options)'{-V,--version}'[Print version number]'
# Arguments are listed here in the same order as in the manual, except for the version and help
'(- : * options)'{-V,--version}'[Print version number and exit]'
'(- : * options)'{-h,--help}'[Print help text and exit]'
'(-C --color-only -c --color-compatible)'{-C,--color-only}'[Mark ROM as GBC-only]'
'(-C --color-only -c --color-compatible)'{-c,--color-compatible}'[Mark ROM as GBC-compatible]'

View File

@@ -10,8 +10,9 @@ _depths() {
}
local args=(
# Arguments are listed here in the same order as in the manual, except for the version
'(- : * options)'{-V,--version}'[Print version number]'
# Arguments are listed here in the same order as in the manual, except for the version and help
'(- : * options)'{-V,--version}'[Print version number and exit]'
'(- : * options)'{-h,--help}'[Print help text and exit]'
'(-a --attr-map -A --auto-attr-map)'{-A,--auto-attr-map}'[Shortcut for -a <file>.attrmap]'
'(-C --color-curve)'{-C,--color-curve}'[Generate palettes using GBC color curve]'

View File

@@ -1,8 +1,9 @@
#compdef rgblink
local args=(
# Arguments are listed here in the same order as in the manual, except for the version
'(- : * options)'{-V,--version}'[Print version number]'
# Arguments are listed here in the same order as in the manual, except for the version and help
'(- : * options)'{-V,--version}'[Print version number and exit]'
'(- : * options)'{-h,--help}'[Print help text and exit]'
'(-d --dmg)'{-d,--dmg}'[Enable DMG mode (-w + no VRAM banking)]'
'(-t --tiny)'{-t,--tiny}'[Enable tiny mode, disabling ROM banking]'