Last active
February 16, 2017 20:09
-
-
Save erickzanardo/3829866eab8488026b6a4677c84d737f to your computer and use it in GitHub Desktop.
star-command
This file contains hidden or 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 | |
function star-command { | |
if [ "$1" == "" ] || [ "$1" == "-h" ]; then | |
echo "star-command \"command to store on your favorites\"" | |
echo "star-command -l \"list your favorites\"" | |
elif [ "$1" == "-l" ]; then | |
cat ~/.star-commands | |
else | |
echo "$1" >> ~/.star-commands | |
fi | |
} | |
alias star-last='star-command "`fc -ln -1 | cut -b 3-`"' | |
alias edit-stars='$EDITOR ~/.star-commands' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment