浏览代码

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).
GIL B. Chan 6 年之前
父节点
当前提交
67e0ef7aa6
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      plugins/colorize/colorize.plugin.zsh

+ 3 - 3
plugins/colorize/colorize.plugin.zsh

@@ -9,7 +9,7 @@ colorize_via_pygmentize() {
 
 
     # pygmentize stdin if no arguments passed
     # pygmentize stdin if no arguments passed
     if [ $# -eq 0 ]; then
     if [ $# -eq 0 ]; then
-        pygmentize -g
+        pygmentize -f terminal -g
         return $?
         return $?
     fi
     fi
 
 
@@ -20,9 +20,9 @@ colorize_via_pygmentize() {
     do
     do
         lexer=$(pygmentize -N "$FNAME")
         lexer=$(pygmentize -N "$FNAME")
         if [[ $lexer != text ]]; then
         if [[ $lexer != text ]]; then
-            pygmentize -l "$lexer" "$FNAME"
+            pygmentize -f terminal -l "$lexer" "$FNAME"
         else
         else
-            pygmentize -g "$FNAME"
+            pygmentize -f terminal -g "$FNAME"
         fi
         fi
     done
     done
 }
 }