I totally love this, it's already incredibly helpful! It's super-functional, and frankly it's very, very nice looking. To Mr. Idan Kamara, the creator of this, I have nothing but the highest praise!<p>Now, I hate to get side-tracked, but for much larger commands, like this one:<p><pre><code> ps x -o "%r %c " | grep "someScript.sh" | awk -F' ' '{print $1}' | xargs -I % /bin/kill -TERM -- -%
</code></pre>
that has a lot of parts, it can be hard to connect the different options to the various explanations[0], since there are so many lines and they frequently have similar colors and you have to keep scrolling up and down the page. Being able to do something like click on a command/option and have the page jump to the corresponding explanation would be very helpful.<p>[0] - <a href="http://explainshell.com/explain?cmd=ps+x+-o++%22%25r+%25c+%22+|+grep+%22webLauncher.sh%22+|+awk+-F%27+%27+%27{print+%241}%27+|+xargs+-I+%25+%2Fbin%2Fkill+-TERM+--+-%25" rel="nofollow">http://explainshell.com/explain?cmd=ps+x+-o++%22%25r+%25c+%2...</a>
Gorgeous. Amazing. Absolutely fantastic. Easy the coolest and most useful thing I've seen on hacker news in a while.<p>Enough gushing, now some bug reports:<p>"read -r random_line < <(sort -R file)"
yields
"syntax: expecting filename or fd (position 22)"<p>"nc HOST PORT | tee movie.mp4 | mplayer -"
I can hover over movie.mp4, but I can't scroll down the see the description without losing the emphasis on that path. I'd suggest letting the user click on the portion, or perhaps a long-hover effect?
The UI with the svg "wiring" is awesome. You should consider abstracting away that functionality so that it can be reused by other projects.<p>Right now I'm imagining explainphys ;) where each term in a physics equation is explained e.g. The magnetic force felt by a particle of charge q moving with velocity \vec{v} in a magnetic field \vec{B} is<p><pre><code> \vec{F}_B = q \vec{v} × \vec{B}
| | | | |______magnetic field
magnetic force | | |
| | cross
charge | prod.
|
velocity of particle</code></pre>
Very well done. Now I just wish this was a shell program!<p><pre><code> user@server:~$ explain iptables -A INPUT -i eth0 -s ip-to-block -j DROP</code></pre>
This is pretty cool but what I found annoying was matching the snippet of code and the description together. Take this for example: <a href="http://explainshell.com/explain?cmd=true+%26%26+%7B+echo+success%3B+%7D+%7C%7C+%7B+echo+failed%3B+%7D" rel="nofollow">http://explainshell.com/explain?cmd=true+%26%26+%7B+echo+suc...</a><p>The command is: true && { echo success; } || { echo failed; }<p>But the top box description is for echo parameters. The next one is for echo. Why can't it go from top to bottom in order of the command? EG: Start with true, then &&, then {, then echo, etc.<p>The way it is, I spend a lot of mental energy matching things up.
This is a wonderful idea and an upstanding social service, in the same vein of giving heroin addicts access to free clean needles, pure heroin, and a safe place to shoot up.<p>There is no perfect solution -- in the ideal world, everyone would use safe healthy programming languages, and nobody would be addicted to shell scripting.<p>But in the real world, many people still choose to use shell scripting as a quick and easy short term solution to their problems.<p>Like the unhealthy temptation to use regexps for parsing html, shell scripting just causes more problems, which snowball out of control until you have the dire situation we're in today, with a whole generation of urban hipsters who learned cargo-cult cut-n-paste shell scripting by typing "more ./configure".<p>So it's much better to treat shell scripting as a health problem rather than a criminal problem.<p>My only suggestion is that you should sponsor links to "recovery programs," where people can learn to solve their problems with safe healthy programming languages instead of shell scripts. For the popular rube-goldbergesque shell incantations, you could show how to accomplish the same thing more comprehensibly in Python, Ruby, JavaScript, Lisp, Forth, Mathematica, Quartz Composer, etc. ;)
So I fed it :
cat ./trunk/.config |awk ' /CONFIG_TARGET_BOARD/ { gsub(/\"/,""); split($0,a,"="); print a[2] }'<p>A little one-liner I worked up a few days ago to quickly show me which architecture my OpenWRT trunk was last built with. I'd really like it to explain in much more detail <i>what</i> each of the terms inside the awk command do. Perhaps make "explain" modular so that people can add more detail to the gazillion things that can happen inside awks, seds, greps, etc?<p>Fabulous idea. This should have been in unix all along as part of the man system.
It unfortunately can't decode :(){ :|:& };:, a classic unintelligible forkbomb. I suppose it's only lack of function support that's the issue!<p>Really neat program, nonetheless!
This is quite impressive.<p>I'd love to see the argument explanations narrow down sub-arguments. For instance, "find -type f" ought to just show the top-level description for -type and the description for 'f', not all the other type characters.
Source <a href="https://github.com/idank/explainshell" rel="nofollow">https://github.com/idank/explainshell</a><p>This is truly stunning. It's a small thing, and what it does is not stupendous. But the design, aesthetics, ease of use, in a word elegance makes the combined whole a superlative tool.
Impressive but I agree with all who said you can't read the callouts below the 2nd or 3rd, because you have to scroll, which loses the focus on the item. I think it might work better if you just pop up one explanation box at a time, directly below the command, as the mouse sweeps across.<p>Also missing some obvious things like on this basic zip command [0]. It can't explain -9, probably because that's not in the man page as itself but as "-n". But also has nothing to offer about the zip file target or the input folder, which are in the man page as symbolic arguments.<p>[0] <a href="http://explainshell.com/explain?cmd=zip+-vr9+foo.zip+somefolder" rel="nofollow">http://explainshell.com/explain?cmd=zip+-vr9+foo.zip+somefol...</a>
Really cool. A suggestion. For long explains, it'd be great to be able to click on the part to jump to that part of the explanation, and then offer some way to "jump back to top".<p>Alternatively, I was thinking there might be a nice "swipe" or "carousel" interface applicable here. e.g. you hit left/right arrows and it explains every individual atom of the command-line.<p>That said, very nice as it is now. You deserve major kudos simply for bringing most manpages online in a searchable, good-looking interface! Instantly added as a "dev" bookmark for me.
Lots more where that came from (great resource btw!): <a href="http://pineapple.io/resources/tagged/bash+terminal" rel="nofollow">http://pineapple.io/resources/tagged/bash+terminal</a>
It's surprisingly good, overall, but there are some glaring omissions. For instance:<p>sudo apt-get install tree
Only sudo is explained. I understand apt-get is distro-specific, but it's widespread enough to deserve a special case. Interestingly, apt-get install tree (without sudo) works better.<p>Common, widely known system configuration files like /etc/issue, /etc/hosts, /etc/hostname, /etc/fstab ... deserve to be special-cased, too. Many of them actually have their man pages, so it's possible to script.
This is brilliant. (I've forwarded it to novices and pros alike, and everyone else's response has been much the same.)<p>If you were to open up donations to support development, I would HAPPILY contribute.
I agree it's beautiful, and a really great idea. I'll also add my vote that this would make an even better commandline tool.<p>It had difficulty with:<p>find . -name "<i>.cpp" | xargs -i grep -His "oops" "{}"<p><a href="http://explainshell.com/explain?cmd=find+.+-name+%22*.cpp%22+|+xargs+-i+grep+-His+%22oops%22+%22{}%22" rel="nofollow">http://explainshell.com/explain?cmd=find+.+-name+%22*.cpp%22...</a><p>It seems to think the -His belongs to xargs rather than grep.
It's a nice toy, but seems to break down with more interesting stuff. For instance:<p><pre><code> for FILE in `ls`; do echo $FILE ; done
</code></pre>
<a href="http://explainshell.com/explain?cmd=+for+FILE+in+%60ls%60%3B+do+echo+%24FILE+%3B+done" rel="nofollow">http://explainshell.com/explain?cmd=+for+FILE+in+%60ls%60%3B...</a><p>That's a simpler equivalent of something I cooked up which probably didn't belong in a single line of shell anyhow.
This is amazing! It's great for someone like me who, while knowing their way around the shell, isn't as well versed as some of my more veteran co-workers. While it's great to hear explanations of some of the more dense lines they give me to run, that's not always possible and can be a bit annoying. This could help take some of the pressure off of them to drag me through. :P
Amazing tool for beginners, but also helpful for advanced users.<p>GREAT: find / -type f -print0 |xargs -0 grep heythere<p>I tried some sub-shells, and seemed to not work so well. $() and `` would be nice.<p>ps -fp $(pgrep -d, krb5kdc)<p>ps -fp `pgrep -d, krb5kdc`<p><a href="http://explainshell.com/explain?cmd=ps+-fp+%24%28pgrep+-d%2C+krb5kdc%29" rel="nofollow">http://explainshell.com/explain?cmd=ps+-fp+%24%28pgrep+-d%2C...</a><p>edit: newlines
Very nice. It was challenged by my go to command:<p><pre><code> tar cf - . | (cd /dest/dir ; tar xvf -)
</code></pre>
Which uses tar to copy a directory tree. It didn't know '.' stood for the current directory, it missed out that 'f -' was the file "standard in" / "standard out"
I give out this link to all my developers that are just getting a feel for the terminal. Thanks so much for this!<p>A nice to have: Having the command that was originally entered follow you down at the top of the window so when I'm looking at a long piped command, it makes it easier to follow
Hey, very nice! What about allowing users to take notes and tags on the search results? I have a bunch of bash commands I run I always forget, this would help me a lot to keep track of things (like all the ssh-ing stuff that I can't seem to fit in my memory...).
Very cool! It would be great if you would provide common usages for a given command if the user didn't provide any switches. That could be links like the ones you have in the "examples" section on the landing page.
Great tool. Would have preferred to use it locally without all of those dependencies on a machine without networking. But OTOH having it online means that it is easier to centrally manage and update.
This is incredible.<p>One small change request: the longer commands make me scroll down the page, and I can no longer see what each block is pointing to. Maybe you could fix the command to a top-bar as you scroll down?
This is beautiful! It will come in handy for filling in the vast holes in my knowledge. I think it would also make a great resource for those just starting to work with shell. Very well done indeed!
Wow. I've only tried a few queries but they worked well! This could be great for breaking down some of the "copy paste to install this" commands you see from open-source projects.
It fails to parse the command if you start with a redirect.<p><a href="http://explainshell.com/explain?cmd=%3E+foo" rel="nofollow">http://explainshell.com/explain?cmd=%3E+foo</a>
I'd like it if hovering on a parsed item moved it's explanation to the top rather than just highlighting it. Not so much scrolling required if any.
Doesn't seem to support backquotes? For example<p><pre><code> for x in `ls ~/foo`; do echo $x; done
</code></pre>
doesn't yield anything remotely interesting.
This is fantastic. Even with simple examples like `ls -la` it shows the documentation and other flag synonyms for all of the passed flags. Very impressed.
Nothing useful said for:<p><pre><code> for word in foo bar baz; do echo $word; done
</code></pre>
Seems to think COLUMNS is a command in:<p><pre><code> COLUMNS=20 ls</code></pre>
Very neat!<p>I did choke at the end of this little favorite:<p><pre><code> find -name "*.[hc]" -o -name "*.[hc]pp"|xargs grep -siP 'apa'</code></pre>