mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
fix(cli): don't auto-invoke pager under powershell
Need to find a pager that works on Windows.
This commit is contained in:
@ -1322,16 +1322,18 @@ ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
|
|||||||
|
|
||||||
ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
|
ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
|
||||||
(doom-cli--exit
|
(doom-cli--exit
|
||||||
(let ((threshold (ceiling (* (doom-cli-context-height context)
|
(if (equal (getenv "__DOOMSH") "ps1")
|
||||||
doom-cli-pager-ratio))))
|
0
|
||||||
(if (>= (let ((stdout (doom-cli-context-stdout context)))
|
(let ((threshold (ceiling (* (doom-cli-context-height context)
|
||||||
(if (fboundp 'buffer-line-statistics)
|
doom-cli-pager-ratio))))
|
||||||
(car (buffer-line-statistics stdout))
|
(if (>= (let ((stdout (doom-cli-context-stdout context)))
|
||||||
(with-current-buffer stdout
|
(if (fboundp 'buffer-line-statistics)
|
||||||
(count-lines (point-min) (point-max)))))
|
(car (buffer-line-statistics stdout))
|
||||||
threshold)
|
(with-current-buffer stdout
|
||||||
(cons :pager args)
|
(count-lines (point-min) (point-max)))))
|
||||||
0))
|
threshold)
|
||||||
|
(cons :pager args)
|
||||||
|
0)))
|
||||||
context))
|
context))
|
||||||
|
|
||||||
;; (defun doom-cli--exit-editor (args context)) ; TODO Launch $EDITOR
|
;; (defun doom-cli--exit-editor (args context)) ; TODO Launch $EDITOR
|
||||||
|
Reference in New Issue
Block a user