Skip to content

Commit

Permalink
fix: fix 25 by making the pygmentize invocation customizable
Browse files Browse the repository at this point in the history
  • Loading branch information
hellerve committed Aug 27, 2022
1 parent 4745cae commit 23ba58e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ For reference, here is a complete list of the variables we expose:
; if you're unsure what to put there, i suggest using
; [which](https://github.com/eudoxia0/which)
*pygmentize* ; => nil
; you can also customize the pygmentize invocation
*pygmentize-options* ; => ("-s" "-l" "lisp")
; the last error encountered in the REPL. You can call
; `invoke-debugger` on it!
Expand Down
3 changes: 2 additions & 1 deletion repl.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
(defvar *hist-file* "~/.sbcli_history")
(defvar *hist* (list))
(defvar *pygmentize* nil)
(defvar *pygmentize-options* (list "-s" "-l" "lisp"))
(defvar *error* nil)
(declaim (special *special*))

Expand Down Expand Up @@ -298,7 +299,7 @@ strings to match candidates against (for example in the form \"package:sym\")."
(if *pygmentize*
(with-input-from-string (s str)
(let ((proc (sb-ext:run-program *pygmentize*
(list "-s" "-l" "lisp")
*pygmentize-options*
:input s
:output :stream)))
(read-line (sb-ext:process-output proc) nil "")))
Expand Down

0 comments on commit 23ba58e

Please sign in to comment.