|
From: | Dan Espen |
Subject: | Re: Examining the output of a shell command? |
Date: | Sun, 28 Jun 2015 13:17:53 -0400 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes: > Dan Espen <despen@verizon.net> writes: > >> Maybe the OP doesn't realize that some programs that output >> escape sequences won't do so when run as an Emacs shell command. >> >> /bin/ls being a good example. >> >> In that case, run: >> >> /bin/ls --color >> >> as an Emacs shell command. > > I guess programs like "ls" check the TERM environment variable. > > Try: > > (setenv "TERM" "xterm") I doubt $TERM is the key. /bin/ls knows when it is interactive. > (shell-command-to-string "ls --color") This will show escape sequences regardless of $TERM. It did for me with the Emacs default value "dumb". -- Dan Espen
[Prev in Thread] | Current Thread | [Next in Thread] |