It clearly doesn't cover "unix and unix-like" shells, since fish shell syntax isn't supported. It seems to be trying to be bash-compatible since it uses bashlex under the hood, but as another commented noticed, the bash parsing isn't perfect.
>I'm confused. Is PowerShell 'recognized' as a shell?
Yes, given the definiton of shell being a user interface to an operating system, typically command line, powershell is considered a shell and can function as one. For example, while many think of windows servers as being all gui, newer versions of windows (server) can be run entirely in cli mode with no gui via powershell, in which supposedly any management technique normally done through gui can be done through the ps cli.
The main difference between nix shells and powershell is that the nix shells are text based, while powershell is object based due to it's .NET core.
As a sysadmin who uses both bash and powershell, I have to say the more recent versions of powershell are quite powerful and a fresh breath of air to use in the normally stale windows world. Of course, I tend to use pywinrm to remotely run ps commands so I don't too dirty touching the tainted MS ecosystem. (That's my way of saying that while powershell is nice and a large improvement over batch command line files, bash is still the better one due to the underlying unix philosophy and the GNU ecosystem)
and it dealt with it reasonably well. The only part it couldn't understand was `branch -d` at the end. In other words, it was not capable of recognizing that the non-option arguments to `xargs` should actually be recursively interpreted as a command-line.
i discovered this site about two years ago. I still use it for explaining commands that I run across on StackOverflow before I run them in my own terminal.
1. Broken on mobile :(. Default layout is a mess, and "request desktop site" has the lines going to the edge of the screen, making them invisible. S7, Android, Firefox.
2. Totally neeeds to be done as an Emacs mode (preferably offline). Both for checking a particular command and during writing shell scripts.
Given the height of the result, scrolling up and down became a real pain. Maybe collapsable sections or position:fixed for the command or something like that?
Pretty neat! Though it would be nice if it brought into the view the part you highlight when it doesn't fit on screen, otherwise you have to scroll (and highlight is lost).
All it needs is an API and you could easily build a tool which does just that.
Though if you wanted it to actually explain `cat foo.txt > out.txt` and not just output the explanation for `cat foo.txt` to `out.txt` you'd probably have to put that in quotes.
Not really need an API to quickly build a tool for this. Could as well just send a proper request and parse the response, not too much of extra work for this service.
I would love it if the site was encrypted so that I could input raw commands at work without modifying sensitive information. (Yes I understand the host can still record this sensitive information, and no I have not looked through the source code yet to see that this doesn't occur).
Would you believe it if I told you it's running on the smallest digital ocean instance, backed by MongoDB (!), and the only time I had to do any maintenance on it was when DO turned down the machine I happened to run on? The service doesn't exactly scream complexity, but it's nice when you put something out there and it just runs!
I wrote a little shell challenge/tutorial project a little bit ago and was thinking about adapting it to teaching beginners. would love to hear your thoughts -https://cmdchallenge.com
If you hover over something that points to a description that's not currently in view, you can't scroll to the description without unhovering and hence unhighlighting the line pointing to the right description.
91 comments
[ 3.3 ms ] story [ 158 ms ] threadhttps://github.com/mattboyer/optenum
http://explainshell.com/explain?cmd=Get-ChildItem
I thought only unix and unix-like shells would be covered. I wonder what the technical definition of a shell is though.
(genuinely curious, not trying to be snarky)
Yes, given the definiton of shell being a user interface to an operating system, typically command line, powershell is considered a shell and can function as one. For example, while many think of windows servers as being all gui, newer versions of windows (server) can be run entirely in cli mode with no gui via powershell, in which supposedly any management technique normally done through gui can be done through the ps cli.
The main difference between nix shells and powershell is that the nix shells are text based, while powershell is object based due to it's .NET core.
As a sysadmin who uses both bash and powershell, I have to say the more recent versions of powershell are quite powerful and a fresh breath of air to use in the normally stale windows world. Of course, I tend to use pywinrm to remotely run ps commands so I don't too dirty touching the tainted MS ecosystem. (That's my way of saying that while powershell is nice and a large improvement over batch command line files, bash is still the better one due to the underlying unix philosophy and the GNU ecosystem)
The original description was listed as "explain any shell command". That was an erroneous title that's since been updated.
echo $(( 1 + 2 ))
http://explainshell.com/explain?cmd=dd+if%3D%2Fdev%2Furandom...
https://news.ycombinator.com/item?id=13896675
Some quick notes on my way back from work:
1. Broken on mobile :(. Default layout is a mess, and "request desktop site" has the lines going to the edge of the screen, making them invisible. S7, Android, Firefox.
2. Totally neeeds to be done as an Emacs mode (preferably offline). Both for checking a particular command and during writing shell scripts.
http://explainshell.com/explain?cmd=sudo+make+me+a+sandwich
e.g. explain cat foo.txt > out.txt
Though if you wanted it to actually explain `cat foo.txt > out.txt` and not just output the explanation for `cat foo.txt` to `out.txt` you'd probably have to put that in quotes.
Still, the website might be running on a modified version.
Having said that, please don't send sensitive information to a random service on the internet. :)
https://news.ycombinator.com/item?id=6296634
https://news.ycombinator.com/item?id=6834791
Would you believe it if I told you it's running on the smallest digital ocean instance, backed by MongoDB (!), and the only time I had to do any maintenance on it was when DO turned down the machine I happened to run on? The service doesn't exactly scream complexity, but it's nice when you put something out there and it just runs!
http://explainshell.com/explain?cmd=%5B+-f+foo
It seems to rely strongly on common *NIX CLI patterns though. It really doesn't like dd, for example[1].
[1]: http://explainshell.com/explain?cmd=dd+if%3D%2Fdev%2Fsda+of%...
Edit:
Also, it doesn't understand that the token after `-p` for netcat is actually the port argument[2]. I guess it is parsing manpages internally?
[2]: http://explainshell.com/explain?cmd=nc+127.0.0.1+-p+80