mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Update Zsh completions with CLI changes
Also fix some misc. issues with them, and fix an incorrect reported ID for MBC1
This commit is contained in:
@@ -9,11 +9,15 @@ _rgbasm_warnings() {
|
|||||||
'everything:Enable literally everything'
|
'everything:Enable literally everything'
|
||||||
|
|
||||||
'assert:Warn when WARN-type asserts fail'
|
'assert:Warn when WARN-type asserts fail'
|
||||||
|
'backwards-for:Warn when start and stop are backwards relative to step'
|
||||||
'builtin-args:Report incorrect args to built-in funcs'
|
'builtin-args:Report incorrect args to built-in funcs'
|
||||||
|
'charmap-redef:Warn when redefining a charmap mapping'
|
||||||
'div:Warn when dividing the smallest int by -1'
|
'div:Warn when dividing the smallest int by -1'
|
||||||
'empty-entry:Warn on empty entries in db, dw, dl args'
|
'empty-macro-arg:Warn on empty macro arg'
|
||||||
|
'empty-strrpl:Warn on calling STRRPL with empty pattern'
|
||||||
'large-constant:Warn on constants too large for a signed 32-bit int'
|
'large-constant:Warn on constants too large for a signed 32-bit int'
|
||||||
'long-string:Warn on strings too long'
|
'long-string:Warn on strings too long'
|
||||||
|
'macro-shift:Warn when shifting macro args part their limits'
|
||||||
'obsolete:Warn when using deprecated features'
|
'obsolete:Warn when using deprecated features'
|
||||||
'shift:Warn when shifting negative values'
|
'shift:Warn when shifting negative values'
|
||||||
'shift-amount:Warn when a shift'\''s operand it negative or \> 32'
|
'shift-amount:Warn when a shift'\''s operand it negative or \> 32'
|
||||||
@@ -35,15 +39,19 @@ local args=(
|
|||||||
-w'[Disable all warnings]'
|
-w'[Disable all warnings]'
|
||||||
|
|
||||||
'(-b --binary-digits)'{-b,--binary-digits}'+[Change chars for binary constants]:digit spec:'
|
'(-b --binary-digits)'{-b,--binary-digits}'+[Change chars for binary constants]:digit spec:'
|
||||||
'(-D --define)'{-D,--define}'+[Define a string symbol]:name + value (default 1):'
|
'*'{-D,--define}'+[Define a string symbol]:name + value (default 1):'
|
||||||
'(-g --gfx-chars)'{-g,--gfx-chars}'+[Change chars for gfx constants]:chars spec:'
|
'(-g --gfx-chars)'{-g,--gfx-chars}'+[Change chars for gfx constants]:chars spec:'
|
||||||
'(-i --include)'{-i,--include}'+[Add an include directory]:include path:_files -/'
|
'(-i --include)'{-i,--include}'+[Add an include directory]:include path:_files -/'
|
||||||
'(-M --dependfile)'{-M,--dependfile}"+[List deps in make format]:output file:_files -g '*.{d,mk}"
|
'(-M --dependfile)'{-M,--dependfile}"+[List deps in make format]:output file:_files -g '*.{d,mk}'"
|
||||||
|
-MG'[Assume missing files should be generated]'
|
||||||
|
-MP'[Add phony targets to all deps]'
|
||||||
|
'*'-MT"+[Add a target to the rules]:target:_files -g '*.{d,mk,o}'"
|
||||||
|
'*'-MQ"+[Add a target to the rules]:target:_files -g '*.{d,mk,o}'"
|
||||||
'(-o --output)'{-o,--output}'+[Output file]:output file:_files'
|
'(-o --output)'{-o,--output}'+[Output file]:output file:_files'
|
||||||
'(-p --pad-value)'{-p,--pad-value}'+[Set padding byte]:padding byte:'
|
'(-p --pad-value)'{-p,--pad-value}'+[Set padding byte]:padding byte:'
|
||||||
'(-r --recursion-depth)'{-r,--recursion-depth}'+[Set maximum recursion depth]:depth:'
|
'(-r --recursion-depth)'{-r,--recursion-depth}'+[Set maximum recursion depth]:depth:'
|
||||||
'(-W --warning)'{-W,--warning}'+[Toggle warning flags]:warning flag:_rgbasm_warnings'
|
'(-W --warning)'{-W,--warning}'+[Toggle warning flags]:warning flag:_rgbasm_warnings'
|
||||||
|
|
||||||
'*'":assembly sources:_files -g '*.asm'"
|
":assembly sources:_files -g '*.asm'"
|
||||||
)
|
)
|
||||||
_arguments -s -S : $args
|
_arguments -s -S : $args
|
||||||
|
|||||||
@@ -1,11 +1,45 @@
|
|||||||
#compdef rgbfix
|
#compdef rgbfix
|
||||||
|
|
||||||
|
_mbc_names() {
|
||||||
|
local mbc_names=(
|
||||||
|
'ROM:$00'
|
||||||
|
'MBC1:$01'
|
||||||
|
'MBC1+RAM:$02'
|
||||||
|
'MBC1+RAM+BATTERY:$03'
|
||||||
|
'MBC2:$05'
|
||||||
|
'MBC2+BATTERY:$06'
|
||||||
|
'ROM+RAM:$08'
|
||||||
|
'ROM+RAM+BATTERY:$09'
|
||||||
|
'MMM01:$0B'
|
||||||
|
'MMM01+RAM:$0C'
|
||||||
|
'MMM01+RAM+BATTERY:$0D'
|
||||||
|
'MBC3+TIMER+BATTERY:$0F'
|
||||||
|
'MBC3+TIMER+RAM+BATTERY:$10'
|
||||||
|
'MBC3:$11'
|
||||||
|
'MBC3+RAM:$12'
|
||||||
|
'MBC3+RAM+BATTERY:$13'
|
||||||
|
'MBC5:$19'
|
||||||
|
'MBC5+RAM:$1A'
|
||||||
|
'MBC5+RAM+BATTERY:$1B'
|
||||||
|
'MBC5+RUMBLE:$1C'
|
||||||
|
'MBC5+RUMBLE+RAM:$1D'
|
||||||
|
'MBC5+RUMBLE+RAM+BATTERY:$1E'
|
||||||
|
'MBC6:$20'
|
||||||
|
'MBC7+SENSOR+RUMBLE+RAM+BATTERY:$22'
|
||||||
|
'POCKET_CAMERA:$FC'
|
||||||
|
'BANDAI_TAMA5:$FD'
|
||||||
|
'HUC3:$FE'
|
||||||
|
'HUC1+RAM+BATTERY:$FF'
|
||||||
|
)
|
||||||
|
_describe "MBC name" mbc_names
|
||||||
|
}
|
||||||
|
|
||||||
local args=(
|
local args=(
|
||||||
# Arguments are listed here in the same order as in the manual, except for the version
|
# Arguments are listed here in the same order as in the manual, except for the version
|
||||||
'(- : * options)'{-V,--version}'[Print version number]'
|
'(- : * options)'{-V,--version}'[Print version number]'
|
||||||
|
|
||||||
'(-C --color-only)'{-C,--color-only}'[Mark ROM as GBC-only]'
|
'(-C --color-only -c --color-compatible)'{-C,--color-only}'[Mark ROM as GBC-only]'
|
||||||
'(-c --color-compatible)'{-c,--color-compatible}'[Mark ROM as GBC-compatible]'
|
'(-C --color-only -c --color-compatible)'{-c,--color-compatible}'[Mark ROM as GBC-compatible]'
|
||||||
'(-j --non-japanese)'{-j,--non-japanese}'[Set the non-Japanese region flag]'
|
'(-j --non-japanese)'{-j,--non-japanese}'[Set the non-Japanese region flag]'
|
||||||
'(-s --sgb-compatible)'{-s,--sgb-compatible}'[Set the SGB flag]'
|
'(-s --sgb-compatible)'{-s,--sgb-compatible}'[Set the SGB flag]'
|
||||||
'(-f --fix-spec -v --validate)'{-v,--validate}'[Shorthand for -f lhg]'
|
'(-f --fix-spec -v --validate)'{-v,--validate}'[Shorthand for -f lhg]'
|
||||||
@@ -14,7 +48,7 @@ local args=(
|
|||||||
'(-i --game-id)'{-i,--game-id}'+[Set game ID string]:4-char game ID:'
|
'(-i --game-id)'{-i,--game-id}'+[Set game ID string]:4-char game ID:'
|
||||||
'(-k --new-licensee)'{-k,--new-licensee}'+[Set new licensee string]:2-char licensee ID:'
|
'(-k --new-licensee)'{-k,--new-licensee}'+[Set new licensee string]:2-char licensee ID:'
|
||||||
'(-l --old-licensee)'{-l,--old-licensee}'+[Set old licensee ID]:licensee number:'
|
'(-l --old-licensee)'{-l,--old-licensee}'+[Set old licensee ID]:licensee number:'
|
||||||
'(-m --mbc-type)'{-m,--mbc-type}'+[Set MBC flags]:mbc flags byte:'
|
'(-m --mbc-type)'{-m,--mbc-type}"+[Set MBC flags]:mbc name:_mbc_names"
|
||||||
'(-n --rom-version)'{-n,--rom-version}'+[Set ROM version]:rom version byte:'
|
'(-n --rom-version)'{-n,--rom-version}'+[Set ROM version]:rom version byte:'
|
||||||
'(-p --pad-value)'{-p,--pad-value}'+[Pad to next valid size using this byte as padding]:padding byte:'
|
'(-p --pad-value)'{-p,--pad-value}'+[Pad to next valid size using this byte as padding]:padding byte:'
|
||||||
'(-r --ram-size)'{-r,--ram-size}'+[Set RAM size]:ram size byte:'
|
'(-r --ram-size)'{-r,--ram-size}'+[Set RAM size]:ram size byte:'
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ local args=(
|
|||||||
'(-t --tilemap -T --output-tilemap)'{-t,--tilemap}'+[Generate a map of tile indices]:tilemap file:_files'
|
'(-t --tilemap -T --output-tilemap)'{-t,--tilemap}'+[Generate a map of tile indices]:tilemap file:_files'
|
||||||
'(-x --trim-end)'{-x,--trim-end}'+[Trim end of output by this many tiles]:tile count:'
|
'(-x --trim-end)'{-x,--trim-end}'+[Trim end of output by this many tiles]:tile count:'
|
||||||
|
|
||||||
'*'":input png files:_files -g '*.png'"
|
":input png file:_files -g '*.png'"
|
||||||
)
|
)
|
||||||
_arguments -s -S : $args
|
_arguments -s -S : $args
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ local args=(
|
|||||||
'(-t --tiny)'{-t,--tiny}'[Enable tiny mode, disabling ROM banking]'
|
'(-t --tiny)'{-t,--tiny}'[Enable tiny mode, disabling ROM banking]'
|
||||||
'(-v --verbose)'{-v,--verbose}'[Enable verbose output]'
|
'(-v --verbose)'{-v,--verbose}'[Enable verbose output]'
|
||||||
'(-w --wramx)'{-w,--wramx}'[Disable WRAM banking]'
|
'(-w --wramx)'{-w,--wramx}'[Disable WRAM banking]'
|
||||||
|
'(-x --nopad)'{-x,--nopad}'[Disable padding the end of the final file]'
|
||||||
|
|
||||||
'(-l --linkerscript)'{-l,--linkerscript}"+[Use a linker script]:linker script:_files -g '*.link'"
|
'(-l --linkerscript)'{-l,--linkerscript}"+[Use a linker script]:linker script:_files -g '*.link'"
|
||||||
'(-m --map)'{-m,--map}"+[Produce a map file]:map file:_files -g '*.map'"
|
'(-m --map)'{-m,--map}"+[Produce a map file]:map file:_files -g '*.map'"
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ enum MbcType {
|
|||||||
static void printAcceptedMBCNames(void)
|
static void printAcceptedMBCNames(void)
|
||||||
{
|
{
|
||||||
fputs("\tROM ($00) [aka ROM_ONLY]\n", stderr);
|
fputs("\tROM ($00) [aka ROM_ONLY]\n", stderr);
|
||||||
fputs("\tMBC1 ($02), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)\n", stderr);
|
fputs("\tMBC1 ($01), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)\n", stderr);
|
||||||
fputs("\tMBC2 ($05), MBC2+BATTERY ($06)\n", stderr);
|
fputs("\tMBC2 ($05), MBC2+BATTERY ($06)\n", stderr);
|
||||||
fputs("\tROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]\n", stderr);
|
fputs("\tROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]\n", stderr);
|
||||||
fputs("\tMMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)\n", stderr);
|
fputs("\tMMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)\n", stderr);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ error: Failed to parse TPP1 major revision number
|
|||||||
error: Unknown MBC "TPP1_lol"
|
error: Unknown MBC "TPP1_lol"
|
||||||
Accepted MBC names:
|
Accepted MBC names:
|
||||||
ROM ($00) [aka ROM_ONLY]
|
ROM ($00) [aka ROM_ONLY]
|
||||||
MBC1 ($02), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
MBC1 ($01), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
||||||
MBC2 ($05), MBC2+BATTERY ($06)
|
MBC2 ($05), MBC2+BATTERY ($06)
|
||||||
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
||||||
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ error: Failed to parse TPP1 minor revision number
|
|||||||
error: Unknown MBC "TPP1_1.lol"
|
error: Unknown MBC "TPP1_1.lol"
|
||||||
Accepted MBC names:
|
Accepted MBC names:
|
||||||
ROM ($00) [aka ROM_ONLY]
|
ROM ($00) [aka ROM_ONLY]
|
||||||
MBC1 ($02), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
MBC1 ($01), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
||||||
MBC2 ($05), MBC2+BATTERY ($06)
|
MBC2 ($05), MBC2+BATTERY ($06)
|
||||||
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
||||||
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ error: RGBFIX only supports TPP1 versions 1.0
|
|||||||
error: Unknown MBC "TPP1_2.0"
|
error: Unknown MBC "TPP1_2.0"
|
||||||
Accepted MBC names:
|
Accepted MBC names:
|
||||||
ROM ($00) [aka ROM_ONLY]
|
ROM ($00) [aka ROM_ONLY]
|
||||||
MBC1 ($02), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
MBC1 ($01), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
||||||
MBC2 ($05), MBC2+BATTERY ($06)
|
MBC2 ($05), MBC2+BATTERY ($06)
|
||||||
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
||||||
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ error: TPP1 minor revision number must be 8-bit
|
|||||||
error: Unknown MBC "TPP1_1.256"
|
error: Unknown MBC "TPP1_1.256"
|
||||||
Accepted MBC names:
|
Accepted MBC names:
|
||||||
ROM ($00) [aka ROM_ONLY]
|
ROM ($00) [aka ROM_ONLY]
|
||||||
MBC1 ($02), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
MBC1 ($01), MBC1+RAM ($02), MBC1+RAM+BATTERY ($03)
|
||||||
MBC2 ($05), MBC2+BATTERY ($06)
|
MBC2 ($05), MBC2+BATTERY ($06)
|
||||||
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
ROM+RAM ($08) [deprecated], ROM+RAM+BATTERY ($09) [deprecated]
|
||||||
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
MMM01 ($0B), MMM01+RAM ($0C), MMM01+RAM+BATTERY ($0D)
|
||||||
|
|||||||
Reference in New Issue
Block a user