Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
02a8a664
Commit
02a8a664
authored
May 21, 2013
by
Francis Lavoie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
split command in different files
parent
d40fe828
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
38 deletions
+35
-38
plugins/python/pybeautifyjson.fish
plugins/python/pybeautifyjson.fish
+6
-0
plugins/python/pyclean.fish
plugins/python/pyclean.fish
+10
-0
plugins/python/pyhttp.fish
plugins/python/pyhttp.fish
+9
-0
plugins/python/pysmtp.fish
plugins/python/pysmtp.fish
+10
-0
plugins/python/python.load
plugins/python/python.load
+0
-38
No files found.
plugins/python/pybeautifyjson.fish
0 → 100644
View file @
02a8a664
# beautify json string
# use : pybeautifyjson '{"foo": "lorem", "bar": "ipsum"}'
function pybeautifyjson
echo $argv | python -mjson.tool
end
plugins/python/pyclean.fish
0 → 100644
View file @
02a8a664
# clean current directory recursively from any .pyc and .pyo files
function pyclean
if test -n $argv
set path2CLEAN $argv
else
set path2CLEAN .
end
find $path2CLEAN -name "*.pyc" -delete -o -name "*.pyo" -delete
end
\ No newline at end of file
plugins/python/pyhttp.fish
0 → 100644
View file @
02a8a664
# 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
plugins/python/pysmtp.fish
0 → 100644
View file @
02a8a664
# 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
plugins/python/python.load
View file @
02a8a664
...
...
@@ -2,41 +2,3 @@ if test -d /usr/local/share/python
set PATH /usr/local/share/python $PATH
end
# clean current directory recursively from any .pyc and .pyo files
function pyclean
if test -n $argv
set path2CLEAN $argv
else
set path2CLEAN .
end
find $path2CLEAN -name "*.pyc" -delete -o -name "*.pyo" -delete
end
# 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
python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
end
# beautify json string
# use : pybeautifyjson '{"foo": "lorem", "bar": "ipsum"}'
function pybeautifyjson
echo $argv | python -mjson.tool
end
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment