mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2025-01-22 13:05:14 +08:00
[split] Move python plugin to oh-my-fish/plugin-python
https://github.com/oh-my-fish/plugin-python
This commit is contained in:
parent
c1cf464e7e
commit
497350c771
|
@ -1,8 +0,0 @@
|
|||
# Use python2 if found, otherwise fallback to python.
|
||||
function _python
|
||||
if which python2
|
||||
python2 $argv
|
||||
else
|
||||
python $argv
|
||||
end
|
||||
end
|
|
@ -1,5 +0,0 @@
|
|||
# beautify json string
|
||||
# use : pybeautifyjson '{"foo": "lorem", "bar": "ipsum"}'
|
||||
function pybeautifyjson
|
||||
echo $argv | _python -mjson.tool
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
# clean current directory recursively from any .pyc and .pyo files
|
||||
function pyclean
|
||||
set -l path2CLEAN
|
||||
|
||||
if set -q $argv
|
||||
set path2CLEAN .
|
||||
else
|
||||
set path2CLEAN $argv
|
||||
end
|
||||
|
||||
find $path2CLEAN -name "*.py[co]" -type f -delete
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
# start in-place a simple http server, take a optional parameter for the port number
|
||||
function pyhttp
|
||||
if test -n "$argv"
|
||||
set HTTPPORT $argv
|
||||
else
|
||||
set HTTPPORT 1025
|
||||
end
|
||||
|
||||
_python -m SimpleHTTPServer $HTTPPORT;
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
# start smtp debugging server, can pass an option port parameter. Default to 1025
|
||||
function pysmtp
|
||||
if test -n "$argv"
|
||||
set SMTPPORT $argv
|
||||
else
|
||||
set SMTPPORT 1025
|
||||
end
|
||||
|
||||
echo "smtp server started on port" $SMTPPORT;
|
||||
_python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
|
||||
end
|
Loading…
Reference in New Issue
Block a user