The objective of this issue is to discuss a decision about the syntax of the token for the filenames in the examples written in the tldr-pages. As soon as there is a decision, I could mass change the discarded token to the chosen one.
In this case I address the {{filename}} and {{file_name}} token. To know the current situation I run the next script to know the current state in the English pages:
grep -o "{{file_name}}" pages/*/*.md && grep -o "{{file_name}}" pages/*/*.md | wc -l
For {{filename}} there are 170 results in English pages (gist with the results and for {{file_name}} there are 18 results (gist with the results.
I prefer to use {{filename}}, not because it is the token more used, but because, if I am not wrong, in English it is correct to use "filename" when we are talking about the name of the files in a computing context (Wordreference definition).
What do you think about it?
I want to invite to @glenacota to participate in this issue about the inconsistency of this token, as the creator of #2509 and interested in the syntax of the project, as well as @waldyrious, @mfrw and @agnivade for their participation of the mentioned issue.
I prefer filename. A more comprehensive guideline for token names is needed, though.
A more comprehensive guideline for token names is needed, though.
I think we should be able to express this kind of requirements in a effective way in the contributing guidelines. For example, if we agree it must be used one over another, it should be added to the contributing guideline and express in a easy to understand way.
Hey! I think we've already settled on filename - at least that's the more popular one.
It depends on the length of the command though. For most I think path/to/filename is preferable - unless it's a particularly long one.
It depends on the length of the command though. For most I think
path/to/filenameis preferable - unless it's a particularly long one.
This is another think in which I thought: filename or always prefer path/to/filename, or use it unless the command is very long (as you said).
Definitely agree. Changing occurrences of file_name with filename sounds like a good idea.
@mebeim, what do you think above to use path/to/filename as @sbrl suggest?
@ivanhercaz I'd say that most of the times path/to/file (notice file not filename) is the one which makes most sense. It highly depends on the context though. The change file_name -> filename does not depend on context.
Including the path/to/ bit might have to be a manual review. The file_name ->filename can definitely be automated though.
I will do a PR on the next days to change file_name to filename!
Most helpful comment
I will do a PR on the next days to change
file_nametofilename!