Last active
August 12, 2019 12:52
-
-
Save akarzim/c279facda5850c656b44acea71397650 to your computer and use it in GitHub Desktop.
Aliases to access README.md files
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
# | |
# Aliases | |
# | |
# Edit README.md in Vim | |
if (( $+commands[vi] )); then | |
alias vir='vi README.md' | |
fi | |
# Show README.md in terminal | |
if (( $+commands[bat] )); then | |
alias catr='bat README.md' | |
else | |
alias catr='cat README.md' | |
fi | |
# Open README.md in viewer | |
if [[ "$OSTYPE" == darwin* ]]; then | |
alias or='open README.md' | |
elif [[ "$OSTYPE" == cygwin* ]]; then | |
alias or='cygstart README.md' | |
else | |
alias or='xdg-open README.md' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment