As nano added YAML parsing syntax, it's possible to leverage this
to highlight .sls in addition to .yml and .yaml. Even if Jinja2
templates blocks are ignored, it's a great help, especially compared
to no syntax at all.
Fixes T1759.
Differential D2863
Parse .sls as YAML for nano syntax highlighting dereckson on Mar 8 2023, 21:27. Authored by Tags None Referenced Files
Subscribers None
Details
As nano added YAML parsing syntax, it's possible to leverage this Fixes T1759. Deploy on WindRiver
Diff Detail
Event TimelineComment Actions First run WindRiver $ salt-call --local state.sls_id nano_sls_support roles/shellserver/userland-software/base local: ---------- ID: nano_sls_support Function: file.replace Name: /usr/local/share/nano/yaml.nanorc Result: True Comment: Changes were made Started: 21:24:32.750903 Duration: 9.754 ms Changes: ---------- diff: --- +++ @@ -3,7 +3,7 @@ ## Original author: Benno Schulenberg ## License: GPL version 3 or newer -syntax yaml "\.ya?ml$" +syntax yaml "\.(ya?ml|sls)$" header "^%YAML |^---( |$)" tabgives " " Summary for local ------------ Succeeded: 1 (changed=1) Failed: 0 ------------ Total states run: 1 Total run time: 9.754 ms Idempotent test WindRiver $ salt-call --local state.sls_id nano_sls_support roles/shellserver/userland-software/base local: ---------- ID: nano_sls_support Function: file.replace Name: /usr/local/share/nano/yaml.nanorc Result: True Comment: No changes needed to be made Started: 21:24:57.605310 Duration: 7.302 ms Changes: Summary for local ------------ Succeeded: 1 Failed: 0 ------------ Total states run: 1 Total run time: 7.302 ms |