rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

Add detection for zsh completion files #1933

Closed griano closed 1 year ago

griano commented 1 year ago

Chenges

tancnle commented 1 year ago

Thank you for considering the suggestions, @griano. The change LGTM 🚀

griano commented 1 year ago

Addressed the requested changes.

Testing:

The test above were reported incorrectly. In these tests I use the raw URL to download the actual file.

Test with #autoload

$ bin/rougify guess <(curl -sq https://raw.githubusercontent.com/zsh-users/zsh/master/Completion/Base/Utility/_arguments) 
{ tag: "shell", title: "shell", desc: "Various shell languages, including sh and bash" }

Test with `#compdef``


$ bin/rougify guess <(curl -qs https://raw.githubusercontent.com/zsh-users/zsh/master/Completion/Zsh/Command/_alias)
{ tag: "shell", title: "shell", desc: "Various shell languages, including sh and bash" }
```bash