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

Highlighting shell scripts as code examples #28

Closed
wikimatze opened this issue Jan 21, 2014 · 3 comments
Closed

Highlighting shell scripts as code examples #28

wikimatze opened this issue Jan 21, 2014 · 3 comments

Comments

@wikimatze
Copy link

I have the following code example in my presentation

     #!/bin/bash -x
     REPOS=`ls -d /mnt/revo/jenkins/jobs/Puppet/workspace/*/`;

     for repo in $REPOS
     do
       cd $repo;
       echo $repo;

       remote=$(git ls-remote -h origin master | awk '{print $1}')
       local=$(git rev-parse HEAD)

       printf "Local : %s\nRemote: %s\n" $local $remote

       if [ $local == $remote ]; then
           echo "Commits match."
       else
           echo "Changes available => run test."
           exit 1;
       fi
       cd ..
     done
{: lang="sh"}

but the highlighting is not working. I tried it with bash or shell but none of them is working. Ruby related code is working fine.

@kou
Copy link
Member

kou commented Jan 23, 2014

Rabbit uses rubychan/coderay for hilighting code. If CodeRay supports shell, Rabbit can use it!
I find a pull request to support shell: rubychan/coderay#119

Could you comment to the pull request?

@wikimatze
Copy link
Author

Left there a comment. Hope it will invoke the maintainer of the gem to
merge the pull request.

On 23.01.2014 14:11, Kouhei Sutou wrote:

Rabbit uses rubychan/coderay for hilighting code. If CodeRay supports
shell, Rabbit can use it!
I find a pull request to support shell: rubychan/coderay#119
rubychan/coderay#119

Could you comment to the pull request?


Reply to this email directly or view it on GitHub
#28 (comment).

@kou
Copy link
Member

kou commented Sep 8, 2019

We can also use rouge as highlight backend.
It can highlight shell scripts.

@kou kou closed this as completed Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants