Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set default options

0 views
Skip to first unread message

Robert Riebisch

unread,
Sep 11, 2009, 4:49:40 PM9/11/09
to
Hi!

I use GNU diffutils very often. Shell is either command.com / cmd.exe or
bash.exe Is there any way to pass some default options to diff.exe? I'd
like to make "-aprNU5" default.

--
Robert Riebisch
Bitte NUR in der Newsgroup antworten!
Please reply to the Newsgroup ONLY!

Allan

unread,
Sep 11, 2009, 7:04:23 PM9/11/09
to

"Robert Riebisch" <Robert....@arcor.de> wrote in message
news:7gvrf4F...@mid.individual.net...

> Hi!
>
> I use GNU diffutils very often. Shell is either command.com / cmd.exe or
> bash.exe Is there any way to pass some default options to diff.exe? I'd
> like to make "-aprNU5" default.
>
If you invoke diff from within emacs there is the variable `diff-switches'.

Eli Zaretskii

unread,
Sep 12, 2009, 4:06:39 AM9/12/09
to dj...@delorie.com
> From: Robert Riebisch <Robert....@arcor.de>
> Date: Fri, 11 Sep 2009 22:49:40 +0200

>
> I use GNU diffutils very often. Shell is either command.com / cmd.exe or
> bash.exe Is there any way to pass some default options to diff.exe? I'd
> like to make "-aprNU5" default.

You could define an alias in both Bash and cmd.exe (but not in
command.com, AFAIK). With cmd.exe, you say something like this
(untested):

doskey diff=diff -aprNU5 $*

Rugxulo

unread,
Sep 16, 2009, 11:28:55 AM9/16/09
to
Hi,

On Sep 12, 3:06 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: Robert Riebisch <Robert.Riebi...@arcor.de>

Yes, that sounds right. Of course, CMD won't let you use aliases
inside .BAT scripts (while 4DOS or Bash will). What is the ideal place
for Bash, inside _bashrc?

Eli Zaretskii

unread,
Sep 16, 2009, 1:21:21 PM9/16/09
to dj...@delorie.com
> From: Rugxulo <rug...@gmail.com>
> Date: Wed, 16 Sep 2009 08:28:55 -0700 (PDT)

>
> What is the ideal place for Bash, inside _bashrc?

Yes.

mike

unread,
Sep 19, 2009, 4:39:45 PM9/19/09
to
> > What is the ideal place for Bash, inside _bashrc?
>
> Yes.

alias diff="diff -aprNU5"

0 new messages