Live data from Hacker News

Explain Shell

explainshell.com

41–50 of 179 posts

Re: Explain Shell

#41

So I fed it : cat ./trunk/.config |awk ' /CONFIG_TARGET_BOARD/ { gsub(/\"/,""); split($0,a,"="); print a[2] }' 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 what each of the terms inside the awk command do. Perhaps make "explain" modular so that people can add more detail to the gazillion thin…

That'd be brilliant.

We should have a `wtf?` command, used like so:

  wtf? yes | sudo apt-get install libpq-dev
Results would be ncurses, top line of screen is command with current subcommand highlighted, and rest of screen is less'ed explanation.

Re: Explain Shell

#45
This is quite impressive.

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.

Re: Explain Shell

#46
post #5

Gorgeous. Amazing. Absolutely fantastic. Easy the coolest and most useful thing I've seen on hacker news in a while. Enough gushing, now some bug reports: "read -r random_line "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?

> 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? What if the command was simply pinned to the top of the screen as you scroll down? This would require some trickiness to make the atoms remain connected to their documentation as the documentation slides under the com…

The wiring is sexy, but this is a textbook cases where tabbed panes would be perfect: just have each command segment be a tab, and the corresponding docs be in a pane underneath.

Re: Explain Shell

#47
Good: it understands &>, which some Unix old-timers don't get.

To improve: it didn't provide any context to what $IFS is used for.

Re: Explain Shell

#48
Its cool and good but gets into the syntax too quickly. To explain "tar xzvf archive.tar.gz" I would say "extract the archive".

Re: Explain Shell

#49
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!

Now, I hate to get side-tracked, but for much larger commands, like this one:

     ps x -o  "%r %c " | grep "someScript.sh" | awk -F' ' '{print $1}' | xargs -I % /bin/kill -TERM -- -%
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.

[0] - http://explainshell.com/explain?cmd=ps+x+-o++%22%25r+%25c+%2...

Re: Explain Shell

#50

Doesn't seem to support backquotes? For example for x in `ls ~/foo`; do echo $x; done doesn't yield anything remotely interesting.

New style subshells aren't supported (yet) either:

   for x in $(ls ~/foo); do echo $x; done
Post reply on HN