emacs

Gent Krasniqi 2025-06-23T12:36:50.637629Z

I want to make shell-command produce colored (or at least ungarbled) output in the *Shell Command Output*. Can someone point me to the right direction?

Roma 2025-06-23T13:43:35.322369Z

Not really a solution, but it works if you use async-shell-command instead of shell-command:

❤️ 1
Roma 2025-06-23T13:46:36.409699Z

if you need shell-command I'd suggest to look at ansi-color-compilation-filter function from the built-in ansi-color.el. It should be applied to the output somehow, but I couldn't find a proper hook for shell-command.

Gent Krasniqi 2025-06-23T14:26:32.217919Z

Thanks! async-shell-command seems to work well for the command I'm using.

👍 1