bug-grep
[Top][All Lists]
Advanced

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

bug#17246: grep-2.19 planning


From: Eli Zaretskii
Subject: bug#17246: grep-2.19 planning
Date: Wed, 14 May 2014 22:47:45 +0300

> Date: Wed, 14 May 2014 12:33:35 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden, address@hidden, address@hidden
> 
> On 05/14/2014 12:28 PM, Eli Zaretskii wrote:
> > Stock Windows shell, of course, cmd.exe.
> 
> Aren't console aliases a standard sort of thing to do for cmd.exe users 
> accustomed to typing "ls" when they mean "dir"?

I don't know what is "standard".  I can tell that cmd.exe aliases have
their own subtle limitations.  E.g., they cannot appear after the
pipe, as in "SOMETHING | fgrep FOO" (if "fgrep" is an alias).  Aliases
are only recognized in the SOMETHING part, i.e. before the pipe.  For
this reason, I stopped using them on Windows almost entirely.

> If so, they would be appropriate for people accustomed to typing
> "fgrep" instead of "grep -F".  Perhaps nstallation of console
> aliases could be put into the grep installation script, to cater to
> people using cmd.exe.

CMD.EXE can run scripts ("batch files"), which can be quite
sophisticated.  But the features you can use in these scripts are not
powerful enough to do everything a Posix shell script can do, even a
simple script such as 'fgrep'.  There are also subtleties with
invoking batch files, in particular with quoted arguments and with
some special characters like ',' and '='.  IOW, you get a script that
works fine in 97% of use cases, but surprises you in the other 3%.  A
compiled program avoids all that, and "just works".





reply via email to

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