victor-gp / cmd-help-sublime-syntax

Sublime Syntax definition for sharkdp/bat to colorize command --help messages.
MIT License
21 stars 5 forks source link

Problem with installation #21

Closed crs1138 closed 1 year ago

crs1138 commented 1 year ago

description

When I run the recommended test I see no Bat output, I just get the following text:

mv --help | bat -plhelp
mv: illegal option -- -
usage: mv [-f | -i | -n] [-hv] source target
       mv [-f | -i | -n] [-v] source ... directory

I've been using Bat for a few years and just wanted to extend its use to the help text.

$ bat --version

bat 0.23.0

$ COMMAND --help

mv --help
mv: illegal option -- -
usage: mv [-f | -i | -n] [-hv] source target
       mv [-f | -i | -n] [-v] source ... directory

$ COMMAND --version

No response

crs1138 commented 1 year ago

Ok, I've tested that with another command instead of mv and it all works fine. It just seems that mv on MacOS/zsh might be an unfortunate choice of test command.

This worked for me. Note: MacOS comes with Git preinstalled.

git --help | bat -pl help

victor-gp commented 1 year ago

HI @crs1138, thank you for reporting this! Let's change the test command, yup.

Git's help only prints (& colors) subcommands though. Can you also try this?

cp --help | bat -plhelp

If it doesn't work, we'll just use Git.

crs1138 commented 1 year ago

I'm afraid that all of these low level utilities (at least those I could thing of – cp, mv, rm, xargs) are resulting in the same for me. On the other hand, rsync does work as well as git.

victor-gp commented 1 year ago

Git is ok then.

Thank you for the help! :purple_heart: