-
-
Save jcsalterego/172308 to your computer and use it in GitHub Desktop.
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
# put this in ~/.bash_profile or whatever | |
python_or_python () { | |
if [ "$1" == "" ]; then | |
python | |
else | |
python "$@" | |
fi | |
} | |
alias python="python_or_python" |
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
# now `python` on its own launches python | |
$ python -c "print 'hi'" | |
hi | |
$ python | |
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) | |
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> 'woot' | |
'woot' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment