beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 140 forks source link

Changing standard input detection from fstat to istty #303

Closed john-peterson closed 11 years ago

john-peterson commented 11 years ago

-t not supported in MSYS

Problem

-t isn't supported in MSYS

This is a problem because

-t doesn't detect the fstat mode S_ISREG

This is a problem because

The output from

echo test > input.txt

perl -e 'print "" . (-p STDIN) ? 1 : 0 . "\n"'
echo test | perl -e 'print "" . (-p STDIN) ? 1 : 0 . "\n"'
cat input.txt | perl -e 'print "" . (-p STDIN) ? 1 : 0 . "\n"'
perl -e 'print "" . (-p STDIN) ? 1 : 0 . "\n"' < input.txt

perl -e 'print "" . (not -t STDIN) ? 1 : 0 . "\n"'
echo test | perl -e 'print "" . (not -t STDIN) ? 1 : 0 . "\n"'
cat input.txt | perl -e 'print "" . (not -t STDIN) ? 1 : 0 . "\n"'
perl -e 'print "" . (not -t STDIN) ? 1 : 0 . "\n"' < input.txt

is

uname -a
Linux ubuntu 3.8.0-23-generic #34-Ubuntu SMP Wed May 29 20:22:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
perl --version
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi
0
1
1
0

0
1
1
1

uname -a
CYGWIN_NT-6.1-WOW64 pc 1.7.18(0.263/5/3) 2013-04-19 10:39 i686 Cygwin
perl --version
This is perl 5, version 14, subversion 2 (v5.14.2) built for cygwin-thread-multi-64int
0
1
1
0

0
1
1
1

uname -a
MSYS_NT-6.1 PC 1.0.18(0.48/3/2) 2012-11-21 22:34 i686 Msys
perl --version
This is perl, v5.8.8 built for msys-64int
0
0
0
0

0
1
1
1

Communication at github.com compared to groups.google.com

communicate this message to https://groups.google.com/forum/#!forum/ack-users Because that's how we do it

What's the reason for communicating this message to groups.google.com in addition to github.com?

I.o.w. what's the benefit of communication at groups.google.com compared to github.com?

petdance commented 11 years ago

What's the reason for communicating this message to groups.google.com in addition to github.com?

Because that's how we do it. Discussion about ack development happens on the mailing list.

petdance commented 11 years ago

Closing for lack of discussion. I don't know what msys is, and the changes that you're proposing will have huge effects elsewhere.