Skip to content

Commit

Permalink
Added color to command line help output (#928)
Browse files Browse the repository at this point in the history
Add color to command line help output using `bat`.
  • Loading branch information
freemanjp authored Sep 17, 2023
1 parent b970fa5 commit 0e09b4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions provisioning/roles/more_cli_tools/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
become_user: '{{ my_user }}'
community.general.homebrew:
name:
- bat # to get newer version with --language help
- bandwhich
- dust
- gh
Expand Down
5 changes: 5 additions & 0 deletions provisioning/roles/zsh/files/custom.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ if (( $+commands[bat] )) || (( $+commands[batcat] )); then
# compdef shfmt_with_bat=shfmt
alias shfmt=shfmt_with_bat
fi

if (( $+commands[bat] )); then
# batcat doesn't support --language=help (old version)
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
fi
fi

if (( $+commands[lsd] )); then
Expand Down

0 comments on commit 0e09b4b

Please sign in to comment.