Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/contrib/zsh_compl/_rgbasm b/contrib/zsh_compl/_rgbasm
- index 2998be21e56497349cc026f0d1719626d494eb51..84c97860e6cdc239d2fa73c464b59569312d179d 100644
- --- a/contrib/zsh_compl/_rgbasm
- +++ b/contrib/zsh_compl/_rgbasm
- @@ -8,53 +8,91 @@ _rgbasm_warnings() {
- 'extra:Enable extra, possibly unwanted, messages'
- 'everything:Enable literally everything'
- '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'
- 'charmap-redef:Warn when redefining a charmap mapping'
- 'div:Warn when dividing the smallest int by -1'
- 'empty-data-directive:Warn on arg-less d[bwl] in ROM'
- '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'
- 'macro-shift:Warn when shifting macro args part their limits'
- 'nested-comment:Warn on "/*" inside block comments'
- 'numeric-string:Warn when a multi-character string is treated as a number'
- 'obsolete:Warn when using deprecated features'
- 'purge:Warn when purging exported symbols or labels'
- 'shift:Warn when shifting negative values'
- 'shift-amount:Warn when a shift'\''s operand it negative or \> 32'
- 'truncation:Warn when implicit truncation loses bits'
- 'unmapped-char:Warn on unmapped character'
- 'unmatched-directive:Warn on unmatched directive pair'
- 'unterminated-load:Warn on LOAD without ENDL'
- 'user:Warn when executing the WARN built-in'
- )
- - # TODO: handle `no-` and `error=` somehow?
- - # TODO: handle `=0|1|2` levels for `numeric-string`, `purge`, `truncation`, and `unmapped-char`?
- - _describe warning warnings
- + if compset -P 'no-'; then
- + _describe warning warnings
- + return
- + elif compset -P 'error='; then
- + _describe warning warnings
- + return
- + elif compset -P 'numeric-string='; then
- + local numeric_levels=(
- + '0:Disable this warning'
- + '1:Warn about strings longer than four characters'
- + '2:Warn about any multi-character string'
- + )
- + _describe level numeric_levels
- + return
- + elif compset -P 'purge='; then
- + local purge_levels=(
- + '0:Disable this warning'
- + '1:Warn when purging any exported symbol'
- + '2:Warn when purging any label'
- + )
- + _describe level purge_levels
- + return
- + elif compset -P 'truncation='; then
- + local trunc_levels=(
- + '0:Disable this warning'
- + '1:Warn when values exceed the target bit-width'
- + '2:Also warn when values do not fit in two\'s complement'
- + )
- + _describe level trunc_levels
- + return
- + elif compset -P 'unmapped-char='; then
- + local unmapped_levels=(
- + '0:Disable this warning'
- + '1:Warn only if the active charmap is not empty'
- + '2:Warn even if the active charmap is empty or not default'
- + )
- + _describe level unmapped_levels
- + return
- + fi
- +
- + _describe warning warnings
- }
- local args=(
- # 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]'
- -w'[Disable all warnings]'
- '(-b --binary-digits)'{-b,--binary-digits}'+[Change chars for binary constants]:digit spec:'
- '*'{-D,--define}'+[Define a string symbol]:name + value (default 1):'
- '(-g --gfx-chars)'{-g,--gfx-chars}'+[Change chars for gfx constants]:chars spec:'
- '(-I --include)'{-I,--include}'+[Add an include directory]:include path:_files -/'
- '(-M --dependfile)'{-M,--dependfile}"+[Write 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'
- '(-P --preinclude)'{-P,--preinclude}"+[Pre-include a file]:include file:_files -g '*.{asm,inc}'"
- '(-p --pad-value)'{-p,--pad-value}'+[Set padding byte]:padding byte:'
- '(-Q --q-precision)'{-Q,--q-precision}'+[Set fixed-point precision]:precision:'
- '(-r --recursion-depth)'{-r,--recursion-depth}'+[Set maximum recursion depth]:depth:'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement