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.
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?
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
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).
:) Well I'm tempted to chide you for running arbitrary code from the Internet from an untrusted source, but then I remember that's the entire web via JavaScript and I realize I'm living in a glass house.
At least JavaScript's immune to fork bombs because it has no threading model. Doesn't stop some bored college kid with access to NPM and a vicious streak from mining bitcoin on your computer.
In my defense, it appeared to be a harmless looking sequence of special characters (not quite, as I found to my dismay). Explain Shell didn't help much
This works well, but the web interface seems like an unnecessary layer on top of what could just be a terminal based tool. I'm trying to resist the urge to fork this, putting another project on my todo list I will never finish
The lines connecting each explanation to the relevant part of the command line could be tricky to squeeze into a terminal window. You'd could instead create an interface with a movable "cursor", which highlights a single "chunk" of the command line, and presents the explanation for that "chunk" beneath the entire command line string.
Does anyone know where I can find a completely offline tool that does what this site does?
The source for this seems like a bit of overkill. I'd like to be able to use a cli based tool that shows me relevant man sections for the flags I chose for example
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.
Cool tool. I think what would really be the icing on the cake is if it substitued the actual command into the documentation. Removing that one layer of indirection would make it that much easier to understand.
For example:
foo() { bar }
> This defines a function named "foo".
Also that example fails to parse. Even though :() { :|: };: works so it seems like there is a certian amount of special casing.
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.
There are several commands on OS X that behave a bit differently from their traditional UNIX counterparts. grep is the big one that springs to mind—any given grep shell-fu may just not work on OS X and I'll find myself having to reconstruct the arguments from scratch to get it working.
I'd love to see a fork of explainshell or an option in the interface to deal with items like this which are specific to OS X. Let me put a grep command in for OS X and have it show me what options I'm using which are undocumented—that would be nifty.
Another one is GNU find assuming the current directory if omitted, while BSD find explicitely has to be told the directory to search in.
It's nothing complicated, but breaks many scripts if you only test them on Linux (more or less the same problem like case-insensitive filesystems).
I'll have to add, though, that one could argue that OSX is the one behaving like "traditional UNIX", since most of it's tools derive from BSD-Versions. GNU tools are the ones that deviate from this (which I still find more convenient in day to day use).
Does well, but goes only so far. I fed the command sudo chown -R $USER:$USER /var/www/example.com/html and the tool wasn't capable of recognizing what $USER:$USER is doing.
I thought this was pretty cool but missing something. Until I realized that uMatrix was blocking Cloudflare. Once I loaded the rest of the site... Awesomeness. Great work, whoever made this.
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).
Handy tip for those on a mac using terminal - type a command and press cmd-ctrl-shift-? to get a man page pop-up. (People with touch bars can just tap on the man page icon.)
Very nice. However I find myself trying to decipher regular expressions more often than shell commands. A tool like this for regular expressions would have been more useful.
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.
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'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)
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.