Closed erawhctim closed 3 years ago
I don't know. I have --sort-files
in my ~/.ackrc, too.
Did you cut & paste the --sort-files
from somewhere that might have made the hyphens something other than normal old hyphens? Try deleting the --sort-files
line from your ~/.ackrc and retype it manually and see if that does it.
I think that's it. The hyphen in sort-files
is an en-dash or an em-dash. I cut and pasted your message from above and did a hexdump on it.
$ cat > foo
Unknown option: sort−files
$ cat foo
Unknown option: sort−files
$ xxd foo
00000000: 556e 6b6e 6f77 6e20 6f70 7469 6f6e 3a20 Unknown option:
00000010: 736f 7274 e288 9266 696c 6573 0a sort...files.
See that between "sort" and "files" there are three bytes.
I manually edited foo
and redumped and it looks like this:
$ vim foo
$ xxd foo
00000000: 556e 6b6e 6f77 6e20 6f70 7469 6f6e 3a20 Unknown option:
00000010: 736f 7274 2d66 696c 6573 0a sort-files.
oh wow, yeah that was definitely it. Sorry about that! (and thanks for the help 🙂)
You're welcome. I'm glad that's all it was. 👍
--version output:
running macOS 11.4
when my
.ackrc
looks like this:or
Running commands via ack (e.g.
ack "test"
) returns this error:Unknown option: sort−files
Adding the--sort-files
flag manually (e.g.ack "test" --sort-files
) works fine.What am I missing?