help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to avoid /dev/null at the end of grep-command


From: al . coyote
Subject: How to avoid /dev/null at the end of grep-command
Date: 2 Mar 2007 01:20:35 -0800
User-agent: G2/1.0

Hello,

When running M-x grep, emacs adds a /dev/null after the list of files.
That's a secure idea most of the times, but when running complex grep
command, this is annoying. For example something like:

grep -n -A2 my_function  *  |  grep -n '\n'

won't work, as emacs will transform this command as

grep -n -A2 my_function  *  |  grep -n '\n' /dev/null

I can add /dev/stdin to the second grep, but the file name will be
garbaged too.

Setting a default grep command does not solve the problem.

Any solution to avoid the /dev/null, without modifying compile.el ?

Thanks in advance.

Al



reply via email to

[Prev in Thread] Current Thread [Next in Thread]