TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

TLDR pages

401 点作者 tkfx超过 9 年前

28 条评论

teddyh超过 9 年前
That project is a symptom of manual pages not having good “EXAMPLES” sections. The examples on that web page should be contributed upstream to the manuals pages of the software that they are for.<p>If you want a fast way to <i>read</i> the EXAMPLES section <i>only</i> for a command, here is a shell function which creates an ‘eg’ command which only displays the “EXAMPLES” section of manual pages:<p><pre><code> eg(){ MAN_KEEP_FORMATTING=1 man &quot;$@&quot; 2&gt;&#x2F;dev&#x2F;null \ | sed --quiet --expression=&#x27;&#x2F;^E\(\x08.\)X\(\x08.\)\?A\(\x08.\)\?M\(\x08.\)\?P\(\x08.\)\?L\(\x08.\)\?E&#x2F;{:a;p;n;&#x2F;^[^ ]&#x2F;q;ba}&#x27; \ | ${MANPAGER:-${PAGER:-pager -s}} } </code></pre> Usage:<p><pre><code> $ eg tar EXAMPLES Create archive.tar from files foo and bar. tar -cf archive.tar foo bar List all files in archive.tar verbosely. tar -tvf archive.tar Extract all files from archive.tar. tar -xf archive.tar $ </code></pre> (Previously: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10025216" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10025216</a>, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7123328" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7123328</a>)
评论 #10802457 未加载
coldtea超过 9 年前
I do find TLDR useful, but is there anything preventing adding it as a standard section of the actual manpages we all use?<p>Perhaps with a switch (man --tldr) or something?<p>Wouldn&#x27;t a project to add those short examples to manpages be good?
评论 #10800980 未加载
评论 #10800875 未加载
评论 #10801196 未加载
ravicious超过 9 年前
Maybe instead of creating something entirely new we could improve the existing thing, that is prepend man pages with some examples?
评论 #10800887 未加载
评论 #10800926 未加载
niuzeta超过 9 年前
I find it rather redundant to bropages: <a href="http:&#x2F;&#x2F;bropages.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;bropages.org&#x2F;</a><p>Still, a readable manpage alternative is always welcome!
masukomi超过 9 年前
To everyone suggesting people send patches in to the original repos instead of using this, or anything like it:<p>Have you ever tried hunting down the canonical source repo for any of those ancient commands? It&#x27;s nigh-impossible for many (most?). Seriously, give it a try for one of the small ones that haven&#x27;t been touched in a few years.
评论 #10803526 未加载
no_gravity超过 9 年前
Instead of installing one of the clients, it might be easier to just put this line into your bash.rc:<p><pre><code> function tldr { curl https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;tldr-pages&#x2F;tldr&#x2F;master&#x2F;pages&#x2F;common&#x2F;$1.md; }</code></pre>
评论 #10801259 未加载
评论 #10800977 未加载
评论 #10800934 未加载
sergiotapia超过 9 年前
Also see bropages! <a href="http:&#x2F;&#x2F;bropages.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;bropages.org&#x2F;</a><p>Very interesting tools. I still don&#x27;t know how to navigate man pages to find what I need.
评论 #10800915 未加载
peteretep超过 9 年前
One thing I love about Perl, which has seemed sorely lacking in many other languages, is the habit of documenting all modules with a &quot;Synopsis&quot; section, which is essentially short examples of use. A good 50% of modules I use I don&#x27;t need to read further!
Buetol超过 9 年前
As a side note, `dtrx` is a sane alternative to `tar` that do the right thing by default. <a href="http:&#x2F;&#x2F;brettcsmith.org&#x2F;2007&#x2F;dtrx&#x2F;" rel="nofollow">http:&#x2F;&#x2F;brettcsmith.org&#x2F;2007&#x2F;dtrx&#x2F;</a><p>Just `dtrx yourarchive.tar.xz`.
评论 #10800819 未加载
评论 #10801118 未加载
awalGarg超过 9 年前
I think man pages aren&#x27;t always verbose or unreadable. In fact, most of the time, they are pretty easy on eyes for me.<p>But generally, it is not a &quot;tl;dr&quot; that I am looking for in man pages, it is <i>that one thing</i> I need not very often, but can&#x27;t remember, like &quot;what switch does `git pull` take to rebase&quot; (ok, not very good of an example, but since these are things I &quot;can&#x27;t remember&quot;, I can&#x27;t pull one out of my head right now). And for these cases, `less`, my default pager, has excellent searching capabilities.<p>For instance, I needed to check how to tell OpenVPN CLI client to take username and password from a file instead of stdin. I knew I had done it before, but didn&#x27;t know which flag it was... just the third instance of &quot;username&quot; on the openvpn manpage called it out (--auth-user-pass). Such things, are IMO, more often needed, but not something a tl;dr would cover.<p>Great project anyways :)
morenoh149超过 9 年前
reminds me of <a href="http:&#x2F;&#x2F;bropages.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;bropages.org&#x2F;</a>
brillenfux超过 9 年前
Man pages are really already TLDR pages. They suck for introductory documentation (most times) but are really useful if you just can&#x27;t quite remember the switch or its parameters.<p>I don&#x27;t know what niche this is supposed to fill?
评论 #10800818 未加载
评论 #10800709 未加载
评论 #10800822 未加载
评论 #10800643 未加载
评论 #10800718 未加载
评论 #10800701 未加载
hk__2超过 9 年前
The issue I have with this kind of projects is that people quickly accept that reading manpages is boring and that they should only use `tldr gcc` or a quick stackoverflow lookup instead of actually learning how to use their tools. It’s like learning how to fish vs. bying fish at the supermarket. Sure, if you know how to fish you can still buy at the supermarket if you’re lazy. But if you don’t you’re stuck with what’s at the supermarket.
评论 #10800842 未加载
评论 #10800912 未加载
评论 #10800935 未加载
评论 #10800876 未加载
评论 #10800911 未加载
评论 #10801084 未加载
评论 #10800870 未加载
评论 #10800938 未加载
评论 #10800931 未加载
评论 #10801234 未加载
评论 #10800913 未加载
评论 #10800824 未加载
mch82超过 9 年前
What if we put community energy into contributing improvements to existing man pages for open source projects?<p>As many commenters have noted, it is possible to accomplish the goals of TLDR by improving existing man pages, without establishing a separate documentation system. A man page can be formatted to include any number of sections. All that is needed is an EXAMPLES section that lists examples for typical command usage.<p>Here are instructions for creating a man page: <a href="http:&#x2F;&#x2F;www.schweikhardt.net&#x2F;man_page_howto.html#q3" rel="nofollow">http:&#x2F;&#x2F;www.schweikhardt.net&#x2F;man_page_howto.html#q3</a><p>Side note... isn&#x27;t the usage of TL;DR in this project incorrect? TL;DR is a synonym for &quot;abstract&quot;, &quot;synopsis&quot;, and &quot;executive summary&quot;. It is already confusing enough to use TL;DR in place of those words without overloading the term to mean &quot;tasks&quot;, &quot;example usage&quot;, or &quot;typical use cases&quot;.
评论 #10802423 未加载
评论 #10802270 未加载
Paul_S超过 9 年前
These should be appended to the top of regular man pages.
评论 #10800914 未加载
jkire超过 9 年前
How does this deal with different versions of a utility having different flags&#x2F;commands?
评论 #10800892 未加载
ap22213超过 9 年前
Cool idea - but like others allude, it would be useful if the TRDR content was organized <i>along with</i> the man page content.<p>Even better: it&#x27;d be nice if there was a repository of <i>just content</i> that was structured in some standardized way. Then, some MVC-like system could easily consume <i>all of</i> the content.
haenx超过 9 年前
What about <a href="https:&#x2F;&#x2F;github.com&#x2F;chrisallenlane&#x2F;cheat" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;chrisallenlane&#x2F;cheat</a> ?
评论 #10801068 未加载
cheshire137超过 9 年前
Yes! Thank you, all I want is an example of how to use the command. Man pages never help me, they give a bunch of non-concrete examples. I always just Google for the command and someone&#x27;s blog post helps me out.
skimmas超过 9 年前
love the simplicity put in this little tool. Incredibly easy to remember, gives the answer you need 95% of the times, makes it very easy to contribute with new stuff.
ajones超过 9 年前
TL;DR a collection of TL;DRs for common *nix commands with clients to display the shorter docs
geff82超过 9 年前
most useful thing ever. All you need in 90% of the time. Hope to see it in Redhat soon :)
debaserab2超过 9 年前
Seems like most tools basically provide this with a -h or --help switch.
reitanqild超过 9 年前
Brilliant idea!<p>Now, did I misunderstand or does this need npm?
评论 #10801038 未加载
评论 #10802052 未加载
humility超过 9 年前
there&#x27;s also a ruby gem called bropages!(gem install bropages)<p>example usage:<p>bro man<p>even allows user submission&#x2F;voting on answers
dcposch超过 9 年前
looks just like bro pages<p>bropages.org
draw_down超过 9 年前
Seems like a good idea, man pages can be almost comically obtuse at times.
评论 #10800852 未加载
oldmanjay超过 9 年前
If there was anything the frozen computer interface of the 70s needed to complete itself, it was silly Internet neologisms. Thanks, author, for bringing the worst of several eras together.