mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-24 04:29:25 +02:00
add ccat support
Signed-off-by: ivan <qw7692336@gmail.com>
This commit is contained in:
parent
bd6dbd1d9b
commit
2b2cef6515
1 changed files with 6 additions and 0 deletions
|
|
@ -6,6 +6,12 @@
|
||||||
alias colorize='colorize_via_pygmentize'
|
alias colorize='colorize_via_pygmentize'
|
||||||
|
|
||||||
colorize_via_pygmentize() {
|
colorize_via_pygmentize() {
|
||||||
|
# https://github.com/jingweno/ccat
|
||||||
|
if [ -x "$(which ccat)" ]; then
|
||||||
|
ccat $@
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -x "$(which pygmentize)" ]; then
|
if [ ! -x "$(which pygmentize)" ]; then
|
||||||
echo "package \'pygmentize\' is not installed!"
|
echo "package \'pygmentize\' is not installed!"
|
||||||
return -1
|
return -1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue