summaryrefslogtreecommitdiff
path: root/plugins/colorize
diff options
context:
space:
mode:
authorGIL B. Chan <bnbcmindnpass@gmail.com>2019-04-07 18:48:22 +0900
committerGIL B. Chan <bnbcmindnpass@gmail.com>2019-04-07 18:57:17 +0900
commit67e0ef7aa6a494b2357c64a204214f7b19fb52e7 (patch)
tree09596c07ef45312c85e02f9c91b267ab9677bf38 /plugins/colorize
parent4ddb2e384ab0840b1d8a6d4c95770ef8a6c25fcc (diff)
downloadzsh-67e0ef7aa6a494b2357c64a204214f7b19fb52e7.tar.gz
zsh-67e0ef7aa6a494b2357c64a204214f7b19fb52e7.tar.bz2
zsh-67e0ef7aa6a494b2357c64a204214f7b19fb52e7.zip
edit colorize plugin: add `-f terminal` option
The option (`pygmentize -f terminal <...>`) lets pygments use terminal color scheme. Otherwise, it would use its default colors, which might be unbalanced with that of terminal (e.g. not harmonious with background color of terminal).
Diffstat (limited to 'plugins/colorize')
-rw-r--r--plugins/colorize/colorize.plugin.zsh6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
index 8eede9a94..d52e95c49 100644
--- a/plugins/colorize/colorize.plugin.zsh
+++ b/plugins/colorize/colorize.plugin.zsh
@@ -9,7 +9,7 @@ colorize_via_pygmentize() {
# pygmentize stdin if no arguments passed
if [ $# -eq 0 ]; then
- pygmentize -g
+ pygmentize -f terminal -g
return $?
fi
@@ -20,9 +20,9 @@ colorize_via_pygmentize() {
do
lexer=$(pygmentize -N "$FNAME")
if [[ $lexer != text ]]; then
- pygmentize -l "$lexer" "$FNAME"
+ pygmentize -f terminal -l "$lexer" "$FNAME"
else
- pygmentize -g "$FNAME"
+ pygmentize -f terminal -g "$FNAME"
fi
done
}