-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Very often, it is necessary to refer to one tool from another tool's tldr page. For example, the csvcut.md page has a reference to unix's cut tool (Like Unix's cut command, but for tabular data.). I've just proposed that tldr pages could have a 'see also' section (in issue #785); if that is implemented, it would result in a lot more references to other tools.
Currently, the de facto standard for mentioning the name of another tool has been surrounding the name with graves. This works, but it'd be really great if there were a way to unambiguously refer to the name of another tool, so that TLDR clients could provide some easy way to jump to that other page (i.e. web clients could easily insert hyperlinks).
Here's what I have in mind: If you want to talk about a command called "foo", you write [foo]. TLDR clients will automatically determine which OS version of "foo" should be linked. (minor note: TLDR clients would also need to take into consideration that there might not be a tldr page for "foo" -- it's conceivable that you'd want to mention "foo" even if there's not a page for "foo" yet)
If you want to talk about a specific version of "foo", you write [linux/bar] or [common/bar] or whatever. This is very useful if there's a platform-specific tool AND a cross-platform tool of the same name. For example, in PR #764, we couldn't really come up with an easy way for the OS X page for base64 to reference the existence of the GNU coreutils cross-platform base64 tool. Having links like this would allow a mention of that other tool, and solve the issue of confusion there.
The one big issue with the syntax I've described is that it's incompatible with Markdown. Perhaps a better syntax would be <tldr://foo> for referencing any version, or <tldr://foo/linux> or <tldr://foo/common> or whatever for referencing specific versions. This is a valid link destination in Markdown syntax. (I don't think link title syntax -- i.e. [foo](tldr://bar) -- is a good idea, because there's no easy way for CLI clients to display both the link title and the URL)