Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Colorize: Bash #1516

Closed
MichiFr opened this issue Aug 1, 2024 · 1 comment · Fixed by #1525
Closed

New Colorize: Bash #1516

MichiFr opened this issue Aug 1, 2024 · 1 comment · Fixed by #1525
Assignees
Labels
feature-request New feature or request released Available in a released installer

Comments

@MichiFr
Copy link

MichiFr commented Aug 1, 2024

New Feature/Solution

Can you please implement a new Colorize option to format a bash command line or shell script?

Thanks,
Michael

@stevencohn stevencohn added the feature-request New feature or request label Aug 1, 2024
stevencohn added a commit that referenced this issue Aug 8, 2024
stevencohn added a commit that referenced this issue Aug 8, 2024
@stevencohn stevencohn mentioned this issue Aug 8, 2024
stevencohn added a commit that referenced this issue Aug 8, 2024
* #1516 - simple bash highlighter
#1516

* #1516 known and user vars
@stevencohn stevencohn self-assigned this Aug 8, 2024
@stevencohn stevencohn added the next-release Addressed but not yet released label Aug 8, 2024
@stevencohn stevencohn linked a pull request Aug 8, 2024 that will close this issue
@stevencohn
Copy link
Owner

stevencohn commented Aug 8, 2024

Not complete coverage by any means, but a good start. For example, it would be nice to figure out a regex that parses embedded variables inside a string.

It recognizes comment, strings, numbers, and these basic reserved keywords

  • if, then, elif, else, fi, time, for, in, until, while, do, done, case, esac, coproc, select, function

 It recognizes some known Bash variables and differentiates those from others, including.

  • $$, $# , $@ , $* , $0
  • $HOME, $HOSTNAME, $NAME, $LINENO, $PATH, $PWD, $SHELL, $USER, $UID

@stevencohn stevencohn added released Available in a released installer and removed next-release Addressed but not yet released labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request released Available in a released installer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants