idank / explainshell Goto Github PK
View Code? Open in Web Editor NEWmatch command-line arguments to their help text
License: GNU General Public License v3.0
match command-line arguments to their help text
License: GNU General Public License v3.0
"ssh machine command arguments"
isn't parsed properly, it seems to think "machine command arguments" is all just the machine
Those would also be good to have, along with a choice of your OS.
It would be really cool if I could prefix a string with explain and it outputs the formatted explain text in less. Does this already exist?
The command " _=100" runs well on bash 4.1.2, but it seems that the http://explainshell.com fails to explain.
Command
psql dbname username
http://explainshell.com/explain/psql?args=dbname+username
should be explained as
psql -d dbname -U username
http://explainshell.com/explain/psql?args=-d+dbname+-U+username
I would appreciate command line version, so I could write explain tar xzvf archive.tar.gz
or even explain !!
.
The example command links are too faint with baby blue color. Can we darken the link?
process substitution <(command)
is supported by all major modern shells (ksh/bash/zsh). a practical example might be diff <(ls /archives/$(pwd)) <(ls)
.
Other variations: $(), ``, >().
To submit a missing man page please reply here with a link to it in raw format (nroff). Even better: I created a repo with all the source man pages I used here, clone it and send me a pull request.
For example:
ssh example.com df /
youtube-dl --write-auto-sub --sub-lang en youtubeurl
These options described in youtube-dl -h
Breaks with commands such as 'dd if=/dev/null', whereas a simple 'dd if' works (despite being an invalid use of dd, of course)
(I didn't find any separate project for the website; apologies if I am posting this to the wrong place.)
An autodiscoverable OpenSearch plugin would be a nice addition to the site. Sample plugin code:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>explainshell</ShortName>
<Description>match command-line arguments to their help text</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAIAAAA/QAAAP8AAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPkAAAD+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACFAAAAAQAAAAAAAAAA//8AANP/AACnPwAAyR8AAJMvAACs9wAAyD8AAPq/AADouwAA8L8AAPwHAAD99wAA/gsAAP/zAAD/8wAA//cAAA==</Image>
<Url type="text/html" method="GET" template="http://explainshell.com/explain">
<Param name="cmd" value="{searchTerms}"/>
</Url>
<Url type="application/opensearchdescription+xml" rel="self" template="http://http://explainshell.com/opensearch.xml" />
<moz:SearchForm>http://explainshell.com/</moz:SearchForm>
</OpenSearchDescription>
Sample code for making the plugin autodiscoverable:
<link rel="search" type="application/opensearchdescription+xml" title="explainshell" href="http://explainshell.com/opensearch.xml" />
keyboard shortcuts to navigate the explanations would be really cool.
great site!
e.g.
dpkg -L packagename
Loops need explanation. (:
if i view my design in google chrome and edit all my design according to it
thn if i view it in mozila its alignmnt is affected
cn any1 help
Currently all paths/highlighting is updated when the mouse enters or leave an argument box. If you move the cursor up and down between arguments you get the following behaviour:
I think it would be easier to follow/less distracting if there was a delay between transitions so that it behaved something similar to:
Some conceptual inspiration can be found at http://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown
Hi,
it would be cool if you could turn this into a kind of "Microsoft Office Assistant".
So that it could show you only what the args of "gcc -Wall -ansi -pedantic -g -o" mean, excluding the whole manpage, but not when the manpage is very short.
A step further: "explain !!"
When running the command 'hey="hey"', the application complains that "no man page for hey="hey" " or something to that effect.
What license is the core of explainshell licensed under?
It failes to parse correctly the quoted argument values for single-dashed options when they are joined together with the option e.g.
cut -f1-2 -d' '
Instead it lists the first quote '
as the argument value and the remaining part is flagged as unknown. More over when this is followed by pipe, the quotation mark is shown as the pipe and the pipe itself is concatenated together with the following command name.
For example this command is perfectly valid, but not recognized correctly:
echo "a b c d" | cut -f1-2 -d' ' | grep -e'a b'
As I posted on Hacker News:
I agree it's beautiful, and a really great idea. I'll also add my vote with others that this would make an even better commandline tool.
It had difficulty with:
find . -name ".cpp" | xargs -i grep -His "oops" "{}"
http://explainshell.com/explain?cmd=find+.+-name+%22*.cpp%22...
It seems to think the -His belongs to xargs rather than grep.
It would be useful, if service would strip common paths for binaries (/usr/bin
, /usr/sbin
, /usr/local/bin
, etc) when searching for binaries in man database.
For example, rsync -h most likely is the same as /usr/bin/rsync -h,
In the example git log(1) --graph --abbrev-commit --pretty=oneline origin..mybranch
, why git log(1)
is the 3rd box?
missing manpage for usermod
It should be fairly easy to make the parser aware of history expansions so the matcher could give more accurate help for things like !!
.
Original bug report by VolMi:
It appears as if the BASH man page is not included…?!?
At least the commandlinefu.com #1 commandsudo !!
is not explained correctly.
But on my debian, the "!!" syntax is explained in man bash, like here:!! Refer to the previous command. This is a synonym for '!-1'.
The branches at the end of the command should not be part of the --pretty
. Would be great to get an explanation of the meaning of origin..mybranch
.
hi
can some1 help where are privelages in phpmyadmin of wamp server ??
For some reason I've grown up typing this to start the mysql shell:
mysql -u -p
I'm not putting the password on the command line (that would be inadvisable, especially if I'm pasting that into explainshell). I'm saying "ask me for my password, and this is the database " which is exactly how the command is designed to work.
Explainshell parses that command incorrectly. It groups -p together as though it was -p even though you can't have a space after -p if you want what follows to be the password.
P.S. Thanks for explainshell. It's great.
Hi, pacman which is the packet manager of ArchLinux was missing.
Thanks in advance,
honky
It's not right now :)
e.g. in find -print0|xargs -r0n1 basename
, 1
is grouped with basename
, not with n
.
e.g. in find -print0|xargs -r0n1 basename
, basename
should be recognized and documented
When the command with sudo
is entered, all the arguments are parsed as the arguments for sudo
, not for that command. Here's a simple example.
I tried it out with a random line from my .bashrc:
lremvd=`svn diff $@ | grep "^-" | grep -v "^---" | wc -l`
And everything until the first pipeline was picked up as a single command. I tried simplifying it a bit by removing the assignment:
echo `svn diff $@ | grep "^-" | grep -v "^---" | wc -l`
However, it that made it think I was echoing the text "`svn diff $@" through the pipeline. I tried getting rid of the echo:
`svn diff $@ | grep "^-" | grep -v "^---" | wc -l`
And it couldn't find a man page for "`svn".
The conclusion is that there is no code to detect code inside backticks. This is a great tool otherwise, though.
After installing with gem I get the following error on my Ubuntu machine:
$ explain tar
Couldn't get a file descriptor referring to the console
The reason for this is that Ubuntu's /bin/open is a symlink to openvt which is not exactly what we want here. Replacing open by xdg-open solves the issue. Maybe that's possible for other platforms as well?
After we search for a command when we click on the search bar again it expands and comes over the github logo. The github logo should expand as well. I will try to check and correct it but I am not that good with css so it might take some time.
Some of the pgp commands are not getting the explanation.
rsync -avplHtxS --compress --rsh=''ssh -o "Compression no"'' --progress --stats
This is actually a valid (and used) way to pass parameters to the rsync underlying ssh transport to turn off compression.
Probably the shell command should stick to the top so that easier to refer the description when scrolling down
The explanation boxes should be shrinkable / collapsible / able to hide to a size where only the title or short explanation can be read.
This way the user could hide the things too big or already known to him.
example search:
cat foo.txt | grep "function"
the description of the pipeline takes up so much space I have to scroll down for every other information on my screen.
Here is an example :
http://www.explainshell.com/explain/scp?args=-P2762+~%2Fmy.cpt+mdk%40exp.com%3A~%2F
the -P2762 is understood, but underlined with the ~/my.cpt it should not, -P2762 is --port 2762 and ~/my.cpt is the first "[[user@]host1:]file1", seems that you parse "-P2762" as a long option and ~/my.cpt as a value of the long option.
The app don't explain nested shells (sub-shells) command
or $(command)
like this command:
ls | while read file; do echo "$(echo "$file" | sed -e "s/foo/bar/")"; done
I suggest allowing urls to support a single groupings of args, like http://explainshell.com/explain/?args=mysql+-u+root+-p+-h+192.168.1.2
This way, I can use Chrome custom search engines to use explainshell
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.