Last active
December 9, 2021 08:31
-
-
Save shivansh/a05e3b4152fa75f6f398d423c295edb5 to your computer and use it in GitHub Desktop.
CLI for explainshell - https://github.com/idank/explainshell/issues/4#issuecomment-354709120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
# Here strings are noted to be faster for a small amount of | |
# data as compared to pipes where the setup cost dominates. | |
# https://unix.stackexchange.com/a/219806/158139 | |
response=$(w3m -dump "http://explainshell.com/explain?cmd="$(echo $@ | tr ' ' '+'})) | |
cat -s <(grep -v -e explainshell -e • -e □ -e "source manpages" <<< "$response") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment