You are correct to expect no difference !
> Are you running the same ack executable each time? What does “which ack”
> say in each case?
>
> What does ack —version say in each case?
1. Indeed yes, "which" and "ack --version" are great diagnostics.
They could nail this. If bash's PATH has ack1 ahead of ack2, this
would be the expected result, ack1 would require a -a or -u flag to
find a text file without extension or shebang, but ack2 reversed that
behavior.
Another couple of diagnostics to try in both shells and report results of --
2. While I am a assuming they are in the *same* $HOME directory, let
us "Trust but Verify"(*) as Gorbachev taught us to say:
If one see a ackrc with a restricted --type and the other doesn't, it
would also produce this result.
We want to double-check that they would use the same .ackrc.
And are they actually on the same system?
uname -a; ls -d $HOME /etc/ackrc $HOME/.ackrc ./[._]ackrc
eg for me,
uname -a; ls -d $HOME /etc/ackrc $HOME/.ackrc ./[._]ackrc
Linux islay 4.4.0-91-generic #114-Ubuntu SMP Tue Aug 8 11:56:56 UTC
2017 x86_64 x86_64 x86_64 GNU/Linux
ls: cannot access '/etc/ackrc': No such file or directory
ls: cannot access './[._]ackrc': No such file or directory
/home/wdr /home/wdr/.ackrc
(If not cd $HOME, actually need to check every .. to $HOME, but your
example shows $HOME so that's ok.)
(*) Which really _is_ funnier in the original Russian:
"Доверяй, но проверяй"
Doveryai, no proveryai
since it rhymes!
3. Check if ack is getting options from .bash_rc or one of the other
bash-ish dot-files ; compare what options ack is using
(e.g. ACK_OPTIONS='--type=perl' or most any other would skip the file)
env | ack 'ACK|PERL' # maybe 'printenv |' on some csh but should work as is
ack --dump
# in modern bash, you can do both at once to compare and only report differences
diff <(ack -f) <(csh -c "ack -f")
diff <(ack --dump) <(csh -c "ack --dump")
[ I get no differences, but that's no surprise, i haven't touched a
.cshrc in very long time. ]
4. Final debug is "ack -f" , it will list all files it thinks are eligible.
ack -f # in each
# or
diff <(ack -f) <(csh -c "ack -f")
--
Bill Ricker
bill....@gmail.com
https://www.linkedin.com/in/n1vux