A little trick I just added to the Cookbook: https://lispcookbook.github.io/cl-cookbook/os.html
Running visual commands (htop)
Use uiop:run-program
and set both :input
and :output
to :interactive
:
(uiop:run-program "htop" :output :interactive :input :interactive)
This will spawn htop
in full screen, as it should.
It works for more commands (sudo
, vim
…), however not for all interactive
programs, such as less
or fzf
. If you know how to do it, your contribution will be precious.
If you want more, you'd have to resort to cmd
and set its *visual-commands*
list with your visual program, to run the interactive command in a new terminal like xterm, or emacsserver (if you use Emacs' vterm you could have emacsserver open the interactive command inside another vterm… it's nearly transparent).
(push "fzf" cmd:*visual-commands*)
(let ((cmd:*terminal* '("xterm" "-e")))
…)
Top comments (0)