diff --git a/syntaxes/cmd-help.sublime-syntax b/syntaxes/cmd-help.sublime-syntax index a86f128..350a3bf 100644 --- a/syntaxes/cmd-help.sublime-syntax +++ b/syntaxes/cmd-help.sublime-syntax @@ -259,7 +259,7 @@ contexts: set: option-def-alt - match: '\s+(?=-)' set: option-def-alt - - match: ', (?=\S)' + - match: ', {2,3}(?=\S)' set: option-def-alt option-def-alt: diff --git a/tests/highlighted/nvidia-smi-470.129.06.txt b/tests/highlighted/nvidia-smi-470.129.06.txt index cb33441..51946ad 100644 --- a/tests/highlighted/nvidia-smi-470.129.06.txt +++ b/tests/highlighted/nvidia-smi-470.129.06.txt @@ -22,13 +22,13 @@  - All Geforce products, starting with the Kepler architecture nvidia-smi [OPTION1 [ARG1]] [OPTION2 [ARG2]] ... - -h, --help Print usage information and exit. + -h, --help Print usage information and exit.  LIST OPTIONS: - -L, --list-gpus Display a list of GPUs connected to the system. + -L, --list-gpus Display a list of GPUs connected to the system. - -B, --list-excluded-gpus Display a list of excluded GPUs in the system. + -B, --list-excluded-gpus Display a list of excluded GPUs in the system.  SUMMARY OPTIONS: @@ -36,22 +36,22 @@  [plus any of] - -i, --id= Target a specific GPU. - -f, --filename= Log to a specified file, rather than to stdout. - -l, --loop= Probe until Ctrl+C at specified second interval. + -i, --id= Target a specific GPU. + -f, --filename= Log to a specified file, rather than to stdout. + -l, --loop= Probe until Ctrl+C at specified second interval.  QUERY OPTIONS: - -q, --query Display GPU or Unit info. + -q, --query Display GPU or Unit info.  [plus any of] - -u, --unit Show unit, rather than GPU, attributes. - -i, --id= Target a specific GPU or Unit. - -f, --filename= Log to a specified file, rather than to stdout. - -x, --xml-format Produce XML output. + -u, --unit Show unit, rather than GPU, attributes. + -i, --id= Target a specific GPU or Unit. + -f, --filename= Log to a specified file, rather than to stdout. + -x, --xml-format Produce XML output.  --dtd When showing xml output, embed DTD. - -d, --display= Display only selected information: MEMORY, + -d, --display= Display only selected information: MEMORY,  UTILIZATION, ECC, TEMPERATURE, POWER, CLOCK,  COMPUTE, PIDS, PERFORMANCE, SUPPORTED_CLOCKS,  PAGE_RETIREMENT, ACCOUNTING, ENCODER_STATS, @@ -61,7 +61,7 @@  Sampling data with max/min/avg is also returned  for POWER, UTILIZATION and CLOCK display types.  Doesn't work with -u or -x flags. - -l, --loop= Probe until Ctrl+C at specified second interval. + -l, --loop= Probe until Ctrl+C at specified second interval.  -lms, --loop-ms= Probe until Ctrl+C at specified millisecond interval. @@ -95,9 +95,9 @@  [plus any of] - -i, --id= Target a specific GPU or Unit. - -f, --filename= Log to a specified file, rather than to stdout. - -l, --loop= Probe until Ctrl+C at specified second interval. + -i, --id= Target a specific GPU or Unit. + -f, --filename= Log to a specified file, rather than to stdout. + -l, --loop= Probe until Ctrl+C at specified second interval.  -lms, --loop-ms= Probe until Ctrl+C at specified millisecond interval.  DEVICE MODIFICATION OPTIONS: @@ -105,9 +105,9 @@  [any one of]  -pm, --persistence-mode= Set persistence mode: 0/DISABLED, 1/ENABLED - -e, --ecc-config= Toggle ECC support: 0/DISABLED, 1/ENABLED - -p, --reset-ecc-errors= Reset ECC error counts: 0/VOLATILE, 1/AGGREGATE - -c, --compute-mode= Set MODE for compute applications: + -e, --ecc-config= Toggle ECC support: 0/DISABLED, 1/ENABLED + -p, --reset-ecc-errors= Reset ECC error counts: 0/VOLATILE, 1/AGGREGATE + -c, --compute-mode= Set MODE for compute applications:  0/DEFAULT, 1/EXCLUSIVE_PROCESS,  2/PROHIBITED  --gom= Set GPU Operation Mode: @@ -166,16 +166,16 @@  [plus optional] - -i, --id= Target a specific GPU. + -i, --id= Target a specific GPU.  -eow, --error-on-warning Return a non-zero error for warnings.  UNIT MODIFICATION OPTIONS: - -t, --toggle-led= Set Unit LED state: 0/GREEN, 1/AMBER + -t, --toggle-led= Set Unit LED state: 0/GREEN, 1/AMBER  [plus optional] - -i, --id= Target a specific Unit. + -i, --id= Target a specific Unit.  SHOW DTD OPTIONS: @@ -183,8 +183,8 @@  [plus optional] - -f, --filename= Log to a specified file, rather than to stdout. - -u, --unit Show unit, rather than device, DTD. + -f, --filename= Log to a specified file, rather than to stdout. + -u, --unit Show unit, rather than device, DTD.  --debug= Log encrypted debug information to a specified file. diff --git a/tests/syntax/syntax_test_nvidia-smi.txt b/tests/syntax/syntax_test_nvidia-smi.txt index 0488ac5..5840a26 100644 --- a/tests/syntax/syntax_test_nvidia-smi.txt +++ b/tests/syntax/syntax_test_nvidia-smi.txt @@ -30,8 +30,7 @@ nvidia-smi [OPTION1 [ARG1]] [OPTION2 [ARG2]] ... -h, --help Print usage information and exit. # ^^ entity.name.function.option.cmd-help # ^^^ - entity.name.function.option.cmd-help -# ^^^^^^ - entity.name.function.option.cmd-help -#todo: #25 +# ^^^^^^ entity.name.function.option.cmd-help LIST OPTIONS: