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
19700c18
Commit
19700c18
authored
Nov 20, 2013
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'extracting_append_path_function'
parents
985c2387
18a33690
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
169 additions
and
200 deletions
+169
-200
functions/_append_path.fish
functions/_append_path.fish
+13
-0
oh-my-fish.fish
oh-my-fish.fish
+6
-21
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/node/node.load
plugins/node/node.load
+1
-3
plugins/php/phphttp.fish
plugins/php/phphttp.fish
+69
-69
plugins/plenv/plenv.load
plugins/plenv/plenv.load
+2
-7
plugins/pyenv/pyenv.load
plugins/pyenv/pyenv.load
+4
-12
plugins/python/python.load
plugins/python/python.load
+1
-3
plugins/rbenv/rbenv.load
plugins/rbenv/rbenv.load
+4
-14
No files found.
functions/_append_path.fish
0 → 100644
View file @
19700c18
# Appends the path to the specified path list. If no list specified,
# defaults to $PATH
function _append_path
set -l path PATH
if test (echo $argv | wc -w) -eq 2
set path $argv[2]
end
if test -d $argv[1]; and not contains $argv[1] $$path
set $path $argv[1] $$path
end
end
oh-my-fish.fish
View file @
19700c18
...
@@ -13,26 +13,16 @@ function _fish_add_plugin
...
@@ -13,26 +13,16 @@ function _fish_add_plugin
set -l plugin $argv[1]
set -l plugin $argv[1]
set -l plugin_path "plugins/$plugin"
set -l plugin_path "plugins/$plugin"
if _test_dir $fish_path/$plugin_path $fish_function_path
_append_path $fish_path/$plugin_path fish_function_path
set fish_function_path $fish_path/$plugin_path $fish_function_path
_append_path $fish_custom/$plugin_path fish_function_path
end
if _test_dir $fish_custom/$plugin_path $fish_function_path
set fish_function_path $fish_custom/$plugin_path $fish_function_path
end
end
end
function _fish_add_completion
function _fish_add_completion
set -l plugin $argv[1]
set -l plugin $argv[1]
set -l completion_path "plugins/$plugin/completions"
set -l completion_path "plugins/$plugin/completions"
if test -d $fish_path/$completion_path
_append_path $fish_path/$completion_path fish_complete_path
set fish_complete_path $fish_path/$completion_path $fish_complete_path
_append_path $fish_custom/$completion_path fish_complete_path
end
if test -d $fish_custom/$completion_path
set fish_complete_path $fish_custom/$completion_path $fish_complete_path
end
end
end
function _fish_source_plugin_load_file
function _fish_source_plugin_load_file
...
@@ -49,13 +39,8 @@ function _fish_source_plugin_load_file
...
@@ -49,13 +39,8 @@ function _fish_source_plugin_load_file
end
end
function _fish_load_theme
function _fish_load_theme
if _test_dir $fish_path/themes/$fish_theme $fish_function_path
_append_path $fish_path/themes/$fish_theme fish_function_path
set fish_function_path $fish_path/themes/$fish_theme $fish_function_path
_append_path $fish_custom/themes/$fish_theme fish_function_path
end
if _test_dir $fish_custom/themes/$fish_theme $fish_function_path
set fish_function_path $fish_custom/themes/$fish_theme $fish_function_path
end
end
end
###
###
...
...
plugins/django/djtest.fish
View file @
19700c18
...
@@ -9,5 +9,4 @@ function djtest
...
@@ -9,5 +9,4 @@ function djtest
else
else
time python manage.py test $VERBOSE
time python manage.py test $VERBOSE
end
end
end
end
plugins/emoji-clock/emoji-clock.fish
View file @
19700c18
plugins/gi/gi.load
View file @
19700c18
# gitignore.io cli for fish
# gitignore.io cli for fish
#
function gi
function gi
#curl http://gitignore.io/api/$argv
#curl http://gitignore.io/api/$argv
...
...
plugins/node/node.load
View file @
19700c18
### Main program
### Main program
if test -d /usr/local/share/npm/bin
_append_path /usr/local/share/npm/bin
set PATH /usr/local/share/npm/bin $PATH
end
set PATH ./node_modules/.bin $PATH
set PATH ./node_modules/.bin $PATH
plugins/php/phphttp.fish
View file @
19700c18
plugins/plenv/plenv.load
View file @
19700c18
if test -d $HOME/.plenv/bin
_append_path $HOME/.plenv/bin
set PATH $HOME/.plenv/bin $PATH
_append_path $HOME/.plenv/shims
end
if test -d $HOME/.plenv/shims
set PATH $HOME/.plenv/shims $PATH
end
plugins/pyenv/pyenv.load
View file @
19700c18
if test -n "$PYENV_ROOT"
if test -n "$PYENV_ROOT"
if test -d $PYENV_ROOT/bin
_append_path $PYENV_ROOT/bin
set PATH $PYENV_ROOT/bin $PATH
_append_path $PYENV_ROOT/shims
end
if test -d $PYENV_ROOT/shims
set PATH $PYENV_ROOT/shims $PATH
end
else
else
if test -d $HOME/.pyenv/bin
_append_path $HOME/.pyenv/bin
set PATH $HOME/.pyenv/bin $PATH
_append_path $HOME/.pyenv/shims
end
if test -d $HOME/.pyenv/shims
set PATH $HOME/.pyenv/shims $PATH
end
end
end
plugins/python/python.load
View file @
19700c18
if test -d /usr/local/share/python
_append_path /usr/local/share/python
set PATH /usr/local/share/python $PATH
end
plugins/rbenv/rbenv.load
View file @
19700c18
if test -n "$RBENV_ROOT"
if test -n "$RBENV_ROOT"
if test -d $RBENV_ROOT/bin
_append_path $RBENV_ROOT/bin
set PATH $RBENV_ROOT/bin $PATH
_append_path $RBENV_ROOT/shims
end
if test -d $RBENV_ROOT/shims
set PATH $RBENV_ROOT/shims $PATH
end
else
else
if test -d $HOME/.rbenv/bin
_append_path $HOME/.rbenv/bin
set PATH $HOME/.rbenv/bin $PATH
_append_path $HOME/.rbenv/shims
end
if test -d $HOME/.rbenv/shims
set PATH $HOME/.rbenv/shims $PATH
end
end
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