beyondgrep / ack2

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

please support --markdown #593

Closed paul-hammant closed 7 years ago

paul-hammant commented 8 years ago

you know, like --python, etc

afeld commented 7 years ago

I'd still like to see this 😄

petdance commented 7 years ago

What extensions would that include?

afeld commented 7 years ago

.md and .markdown are the most common, though there are others.

petdance commented 7 years ago

there are others.

Which is why I asked my question.

What extensions are you using for Markdown in your .ackrc?

afeld commented 7 years ago

https://superuser.com/questions/249436/file-extension-for-markdown-files/285878#285878

has an exhaustive list, but .md and .markdown (in that order of prevalence) are the only ones I've seen in the wild. Thanks for reopening!

petdance commented 7 years ago

That exhaustive list could be listing everything everyone has ever come up with, so it's hard to put much credence into it.

What are you using in your .ackrc?

afeld commented 7 years ago
$ cat ~/.ackrc | grep md
--type-add=markdown=.md,.markdown
--type-add=md=.md,.markdown
petdance commented 7 years ago

Why two different types?

xtaran commented 7 years ago

I've seen .mdwn in the wild, too. And I use it myself occassionally because .markdown is too long for my tastes (especially for README files) and depending on the context .md can be ambiguous.

Real life case where someone was unhappy about the .md suffix: I named a file README.md in a context of a tool working in file systems in the farest sense and since Linux Software RAID is also known as "MD RAID", someone filed a bug report that this file name is misleading. Solved that case differently, though, by dropping the suffix completely upon deployment...

petdance commented 7 years ago

I'm leaning toward .md and .markdown because they seem like the least worst options.

paul-hammant commented 7 years ago

Agree with .md and .markdown :)

petdance commented 7 years ago

This will happen in ack3: https://github.com/petdance/ack3/issues/62

petdance commented 7 years ago

This is now done in ack3. 519a577