tldr-pages / tldr

📚 Collaborative cheatsheets for console commands
https://tldr.sh
Other
50.44k stars 4.12k forks source link

purpose of {{ and }} in output of tldr #731

Closed sigmonsays closed 6 years ago

sigmonsays commented 8 years ago

What is the purpose of the excess of {{ and }} in the output of the pages?

This doesn't seem like a practical format and is only ugly to read. Shouldn't some sort of symbol be used that isn't so ugly?

rubenvereecken commented 8 years ago

Depends on the client you're using. The raw pages will include the double curly braces whereas clients will interpret them and are able to color them for example, dropping the curly braces.

waldyrious commented 8 years ago

By the way, it would be great if we (sometime in the future) could change this markup to the more standard CLI notation <...>, as described e.g. in the docopt standard, but that's probably something to be considered in the long term.

rprieto commented 8 years ago

One reason {{foo}} was chosen over others (including <foo>) is that it makes parsing easier, especially for the more complex examples. E.g.

cat <input.txt >/dev/null
waldyrious commented 8 years ago

@rprieto is that up for revisiting? It would be really neat if we could adopt the standard CLI syntax, and that would also be a concrete requirement for clients, along the lines of what we've discussed in #679 and elsewhere. I realize this would put a burden on all existing clients, so I'm not suggesting a change overnight, just putting that proposal under discussion if you guys agree it may make sense.

waldyrious commented 8 years ago

(That said, I don't feel too strongly about this, so an explicit, publicly recorded consensus to stick to {{...}} instead of <...> would be a positive outcome for this issue as well, IMO.)

rubenvereecken commented 8 years ago

I vote for sticking anytime. Don't feel like there's a real advantage to either since neither is valid markdown, so the one that's easier for clients to parse sticks out. < > is prettier but users should never have to suffer the symbols, just a client rendering.

bwh1te commented 8 years ago

@sigmonsays look how it works in python TLDR client: https://github.com/tldr-pages/tldr-python-client/pull/20

sjackman commented 7 years ago

Is there a web client for TLDR that interprets {{foo}}? Both http://tldr.sh and https://tldr.ostera.io/cut display the raw {{foo}}.

waldyrious commented 7 years ago

@sjackman those are the same client, by the way. @ostera's client is embedded in tldr.sh. The only other web client I know of is DistroWatch's, as indicated in the README. It does consume the {{}}.

sjackman commented 7 years ago

I've opened a feature request at https://github.com/ostera/tldr.jsx/issues/97

sbrl commented 6 years ago

I assume that this issue is resolved now?

agnivade commented 6 years ago

Yes. I believe so.

kshensovato commented 6 months ago

Why is this closed? I'm still seeing double braces in Ubuntu 22.04 terminals.

kbdharun commented 6 months ago

Why is this closed? I'm still seeing double braces in Ubuntu 22.04 terminals.

Double braces are used to highlight placeholders across our pages and most of our clients and all our official clients render them in a different color/style. If you installed tldr from Ubuntu 22.04 repositories you are using the tldr-hs Haskel client which isn't official and inactive (it has been marked as a transactional package and will be officially renamed to tldr-hs from Ubuntu 24.04). I would suggest switching to our official Python client packaged as Snap instead (snap install tldr).