Created
September 15, 2010 04:06
-
-
Save dpie/580226 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
# Terminitor (Ruby gem) command shortcuts | |
# term PROJECT >> terminitor start PROJECT | |
# term PROJECT open >> terminitor open PROJECT | |
function term() { | |
if [ -z "$1" ]; then | |
echo Project argument required | |
else | |
local terminator_project="$1" | |
local terminitor_action="${2:-start}" | |
terminitor "$terminitor_action" "$terminator_project"; | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Woops, damnit.
${var:-default} is the syntax for specifying a default expansion value. The '-' doesn't imply anything really, it's just a syntax token.