fix(cli): don't auto-invoke pager under powershell
Need to find a pager that works on Windows.
This commit is contained in:
parent
94a291a7f8
commit
73ab554566
1 changed files with 12 additions and 10 deletions
|
@ -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."
|
||||
(doom-cli--exit
|
||||
(let ((threshold (ceiling (* (doom-cli-context-height context)
|
||||
doom-cli-pager-ratio))))
|
||||
(if (>= (let ((stdout (doom-cli-context-stdout context)))
|
||||
(if (fboundp 'buffer-line-statistics)
|
||||
(car (buffer-line-statistics stdout))
|
||||
(with-current-buffer stdout
|
||||
(count-lines (point-min) (point-max)))))
|
||||
threshold)
|
||||
(cons :pager args)
|
||||
0))
|
||||
(if (equal (getenv "__DOOMSH") "ps1")
|
||||
0
|
||||
(let ((threshold (ceiling (* (doom-cli-context-height context)
|
||||
doom-cli-pager-ratio))))
|
||||
(if (>= (let ((stdout (doom-cli-context-stdout context)))
|
||||
(if (fboundp 'buffer-line-statistics)
|
||||
(car (buffer-line-statistics stdout))
|
||||
(with-current-buffer stdout
|
||||
(count-lines (point-min) (point-max)))))
|
||||
threshold)
|
||||
(cons :pager args)
|
||||
0)))
|
||||
context))
|
||||
|
||||
;; (defun doom-cli--exit-editor (args context)) ; TODO Launch $EDITOR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue