-
-
Save AdamGagorik/ef0462f21fcc97c70d41138d5494aeba to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# alias tldr="~/.gists/bin/tldr" | |
TLDR_COMMAND=/home/linuxbrew/.linuxbrew/bin/tldr | |
if [ $# -eq 0 ]; then | |
$TLDR_COMMAND --help | |
exit 0 | |
fi | |
MARKDOWN_PTH=$(find "$NOTE_DIR" -type f -name "$1.md") | |
if [ -z "$MARKDOWN_PTH" ]; then | |
"$TLDR_COMMAND" "$1" | |
else | |
"$TLDR_COMMAND" "$1" | |
mdcat "$MARKDOWN_PTH" | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment