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
00236e5a
Commit
00236e5a
authored
Nov 20, 2013
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidying
parent
5ed67522
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
140 deletions
+138
-140
plugins/django/djtest.fish
plugins/django/djtest.fish
+0
-1
plugins/emoji-clock/emoji-clock.fish
plugins/emoji-clock/emoji-clock.fish
+60
-60
plugins/gi/gi.load
plugins/gi/gi.load
+9
-10
plugins/php/phphttp.fish
plugins/php/phphttp.fish
+69
-69
No files found.
plugins/django/djtest.fish
View file @
00236e5a
...
...
@@ -9,5 +9,4 @@ function djtest
else
time python manage.py test $VERBOSE
end
end
plugins/emoji-clock/emoji-clock.fish
View file @
00236e5a
...
...
@@ -12,77 +12,77 @@ function emoji-clock
set minutes (date '+%M')
switch $hour
case 01
if test $minutes -ge 30
set clock "🕜"
else
set clock "🕐"
end
if test $minutes -ge 30
set clock "🕜"
else
set clock "🕐"
end
case 02
if test $minutes -ge 30
set clock "🕝"
else
set clock "🕑"
end
if test $minutes -ge 30
set clock "🕝"
else
set clock "🕑"
end
case 03
if test $minutes -ge 30
set clock "🕞"
else
set clock "🕒"
end
if test $minutes -ge 30
set clock "🕞"
else
set clock "🕒"
end
case 04
if test $minutes -ge 30
set clock "🕟"
else
set clock "🕓"
end
if test $minutes -ge 30
set clock "🕟"
else
set clock "🕓"
end
case 05
if test $minutes -ge 30
set clock "🕠"
else
set clock "🕔"
end
if test $minutes -ge 30
set clock "🕠"
else
set clock "🕔"
end
case 06
if test $minutes -ge 30
set clock "🕡"
else
set clock "🕕"
end
if test $minutes -ge 30
set clock "🕡"
else
set clock "🕕"
end
case 07
if test $minutes -ge 30
set clock "🕢"
else
set clock "🕖"
end
if test $minutes -ge 30
set clock "🕢"
else
set clock "🕖"
end
case 08
if test $minutes -ge 30
set clock "🕣"
else
set clock "🕗"
end
if test $minutes -ge 30
set clock "🕣"
else
set clock "🕗"
end
case 09
if test $minutes -ge 30
set clock "🕤"
else
set clock "🕘"
end
if test $minutes -ge 30
set clock "🕤"
else
set clock "🕘"
end
case 10
if test $minutes -ge 30
set clock "🕥"
else
set clock "🕙"
end
if test $minutes -ge 30
set clock "🕥"
else
set clock "🕙"
end
case 11
if test $minutes -ge 30
set clock "🕦"
else
set clock "🕚"
end
if test $minutes -ge 30
set clock "🕦"
else
set clock "🕚"
end
case 12
if test $minutes -ge 30
set clock "🕧"
else
set clock "🕛"
end
if test $minutes -ge 30
set clock "🕧"
else
set clock "🕛"
end
case '*' set clock "⌛"
end
echo $clock
...
...
plugins/gi/gi.load
View file @
00236e5a
# gitignore.io cli for fish
#
function gi
#curl http://gitignore.io/api/$argv
set -l params (echo $argv|tr ' ' ',')
curl http://gitignore.io/api/$params
set -l params (echo $argv|tr ' ' ',')
curl http://gitignore.io/api/$params
end
# enable the complation by invoking `gi list`
if not set -q -g gi_list
timeout 2 ping -c 1 -q gitignore.io >/dev/null
set gi_available $status
if test $gi_available
set -g gi_list (gi list| tr ',' ' ' ^/dev/null)
end
timeout 2 ping -c 1 -q gitignore.io >/dev/null
set gi_available $status
if test $gi_available
set -g gi_list (gi list| tr ',' ' ' ^/dev/null)
end
end
complete -c gi -a "$gi_list"
\ No newline at end of file
complete -c gi -a "$gi_list"
plugins/php/phphttp.fish
View file @
00236e5a
# PHP HTTP server.
function phphttp
set -l port 8000
set -l path
set -l host 127.0.0.1
set -l port 8000
set -l path
set -l host 127.0.0.1
# Ignore argument for slice.
set argv $argv ignore
# Ignore argument for slice.
set argv $argv ignore
# Process options. I think that fish should have some builtin for
# option parsing, but it doesn't.
while count $argv > /dev/null
set -l option $argv[1]
# Process options. I think that fish should have some builtin for
# option parsing, but it doesn't.
while count $argv > /dev/null
set -l option $argv[1]
switch $option
# When two hyphens appear, stop processing, while removing
# hyphens from $argv.
case --
set argv $argv[2..-1]
break
switch $option
# When two hyphens appear, stop processing, while removing
# hyphens from $argv.
case --
set argv $argv[2..-1]
break
# Public mode.
case -p\* --p --pu --pub --publ --publi --public p public
if test $host = 0
echo phphttp: Duplicate option --public >&2
end
set host 0
# Public mode.
case -p\* --p --pu --pub --publ --publi --public p public
if test $host = 0
echo phphttp: Duplicate option --public >&2
end
set host 0
# Help.
case -h\* --h --he --hel --help '-\?' h help
echo 'phphttp [--public] <port=8000> <path=.>'
return
# Help.
case -h\* --h --he --hel --help '-\?' h help
echo 'phphttp [--public] <port=8000> <path=.>'
return
# Anything else stops processing.
case \*
break
end
# Check if the option was one letter.
switch $option
case --\*
# Doesn't count as single option
# Anything else stops processing.
case \*
break
end
case -\?\?\*
set argv[1] -(expr substr $argv[1] 3 length $argv[1])
continue
end
# Check if the option was one letter.
switch $option
case --\*
# Doesn't count as single option
set argv $argv[2..-1]
case -\?\?\*
set argv[1] -(expr substr $argv[1] 3 length $argv[1])
continue
end
if test (count $argv[1..-1]) -ge 4
echo 'phphttp: Expected up to two arguments, got '(math (count $argv) - 1)'.' >&2
return
end
set argv $argv[2..-1]
end
# argv is bigger by 1 because of "ignore" argument.
if test (count $argv) -ge 2
# Check legality of first argument
switch $argv[1]
# Fine values
case {0,1,2,3,4,5,6,7,8,9}\*
# Do nothing
if test (count $argv[1..-1]) -ge 4
echo 'phphttp: Expected up to two arguments, got '(math (count $argv) - 1)'.' >&2
return
end
case \*
# The dev team thinks of everything. Or something.
if test -d $argv[1]
if test (count $argv) -eq 2
echo "phphttp: directory specified without port." >&2
else
echo "phphttp: swapped directory and port arguments." >&2
end
return
else
echo "phphttp: $argv[1] is not a port." >&2
return
end
end
# argv is bigger by 1 because of "ignore" argument.
if test (count $argv) -ge 2
# Check legality of first argument
switch $argv[1]
# Fine values
case {0,1,2,3,4,5,6,7,8,9}\*
# Do nothing
set port $argv[1]
end
if test (count $argv) -eq 3
set path -t$argv[2]
case \*
# The dev team thinks of everything. Or something.
if test -d $argv[1]
if test (count $argv) -eq 2
echo "phphttp: directory specified without port." >&2
else
echo "phphttp: swapped directory and port arguments." >&2
end
return
else
echo "phphttp: $argv[1] is not a port." >&2
return
end
end
php -S$host:$port $path
set port $argv[1]
end
if test (count $argv) -eq 3
set path -t$argv[2]
end
php -S$host:$port $path
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