From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Examining the output of a shell command? Date: Mon, 29 Jun 2015 17:51:41 +0300 Message-ID: <834mlq6002.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1435589532 26568 80.91.229.3 (29 Jun 2015 14:52:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2015 14:52:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 16:52:06 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9aPh-00067e-SM for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 16:52:02 +0200 Original-Received: from localhost ([::1]:42579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9aPh-0000u2-FM for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 10:52:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9aPQ-0000r4-Cw for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 10:51:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9aPM-0007JB-Dh for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 10:51:44 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:53057) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9aPM-0007Ih-5p for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 10:51:40 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NQP00200NRU5500@mtaout28.012.net.il> for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 17:51:24 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQP00ODUNXOAD40@mtaout28.012.net.il> for help-gnu-emacs@gnu.org; Mon, 29 Jun 2015 17:51:24 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105281 Archived-At: > From: Raffaele Ricciardi > Date: Mon, 29 Jun 2015 13:26:38 +0200 > > Hence, how could I capture a colorized output in Emacs as in a Bash > session? > > Below is a Bash script that recursively searches "*.el" files for the > string "defun" and highlights matches (the complex `find` call is the > shell command generated by `M-x rgrep` for the same task): > > #!/bin/bash > > export GREP_COLORS="mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne" > export GREP_OPTIONS="--color=auto" ^^^^ Did you try with --color=always?