Comment on Shell Gamification (how I learn to use my shell aliases)Comments−columbo13yHere's another hackish way to do this, probably a bad idea, insert in your profile git() { if [[ $@ == "status" ]]; then echo "NOT TODAY BUB (hint, use gs)"; else command git "$@"; fi; } alias gs='git status -' edit: removed ' | more'−dbaupp13yWhy the piping into more?−hackmiester13yI don't know. I thought it was because if you pipe into "less," it will wait for you to hit 'q' until letting you carry on entering commands. But "more" does not have this behavior.−xyzzyb13yPassing -F to less causes it to automatically quit if the file can be displayed on one screen.−columbo13yHah, that would be because I copied the line from a blog/example somewhere and just replaced a few of the words without really looking at the script.
Comments
Here's another hackish way to do this, probably a bad idea, insert in your profile
edit: removed ' | more'Why the piping into more?
I don't know. I thought it was because if you pipe into "less," it will wait for you to hit 'q' until letting you carry on entering commands. But "more" does not have this behavior.
Passing -F to less causes it to automatically quit if the file can be displayed on one screen.
Hah, that would be because I copied the line from a blog/example somewhere and just replaced a few of the words without really looking at the script.