Skip to content

Instantly share code, notes, and snippets.

@MHolmes91
Created February 15, 2018 17:00
Show Gist options
  • Save MHolmes91/a21c66fba8070751b02882cf225b7596 to your computer and use it in GitHub Desktop.
Save MHolmes91/a21c66fba8070751b02882cf225b7596 to your computer and use it in GitHub Desktop.
A lite implementation of https://github.com/tldr-pages/tldr that only relies on bash and curl.
#!/bin/bash
COMMAND=$*;
COMMAND=${COMMAND// /-};
curl \
--header 'Accept: application/vnd.github.v3.raw' \
https://api.github.com/repos/tldr-pages/tldr/contents/pages/common/${COMMAND}.md?ref=master;
@MHolmes91
Copy link
Author

This can be used in the same manner as the tldr command. Simply replace tldr with the location of the tldrlite.sh file. There are no command line options, and the markdown response is not formatted. All the information is still there though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment