Commit ef890add authored by Charles Thorley's avatar Charles Thorley

Merge remote-tracking branch 'upstream/master'

Merging in preparation of a rebase, per maintainer's request.
parents 89655b2e ba1b9ab0
# Use python2 if found, otherwise fallback to python.
function _python
if which python2
python2
else
python
end
end
# beautify json string
# use : pybeautifyjson '{"foo": "lorem", "bar": "ipsum"}'
function pybeautifyjson
echo $argv | python -mjson.tool
end
\ No newline at end of file
echo $argv | _python -mjson.tool
end
# clean current directory recursively from any .pyc and .pyo files
function pyclean
if test -n $argv
set path2CLEAN $argv
else
set -l path2CLEAN
if set -q $argv
set path2CLEAN .
else
set path2CLEAN $argv
end
find $path2CLEAN -name "*.py[co]" -type f -delete
end
\ No newline at end of file
end
......@@ -5,5 +5,6 @@ function pyhttp
else
set HTTPPORT 1025
end
python -m SimpleHTTPServer $HTTPPORT;
_python -m SimpleHTTPServer $HTTPPORT;
end
......@@ -5,6 +5,7 @@ function pysmtp
else
set SMTPPORT 1025
end
echo "smtp server started on port" $SMTPPORT;
python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
_python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
end
function subl --description 'Open Sublime Text 2'
if test -d "/Applications/Sublime Text 2.app"
function subl --description 'Open Sublime Text'
if test -d "/Applications/Sublime Text.app"
"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" $argv
else if test -d "/Applications/Sublime Text 2.app"
"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $argv
else if test -x "/opt/sublime_text/sublime_text"
"/opt/sublime_text/sublime_text" $argv
else
echo "No Sublime Text installation found"
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment