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
1a6870b3
Commit
1a6870b3
authored
Nov 20, 2013
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #82 from theonewolf/fix-duplicating-function-path
parents
241e2a40
605028a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
oh-my-fish.fish
oh-my-fish.fish
+14
-5
No files found.
oh-my-fish.fish
View file @
1a6870b3
...
@@ -2,15 +2,22 @@
...
@@ -2,15 +2,22 @@
# Helper functions
# Helper functions
###
###
function _test_dir
set -l path $argv[1]
set -l paths $argv[2]
return (test -d $path; and not contains $path $paths)
end
function _fish_add_plugin
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 -d $fish_path/$plugi
n_path
if
_test_dir $fish_path/$plugin_path $fish_functio
n_path
set fish_function_path $fish_path/$plugin_path $fish_function_path
set fish_function_path $fish_path/$plugin_path $fish_function_path
end
end
if
test -d $fish_custom/$plugi
n_path
if
_test_dir $fish_custom/$plugin_path $fish_functio
n_path
set fish_function_path $fish_custom/$plugin_path $fish_function_path
set fish_function_path $fish_custom/$plugin_path $fish_function_path
end
end
end
end
...
@@ -42,11 +49,11 @@ function _fish_source_plugin_load_file
...
@@ -42,11 +49,11 @@ function _fish_source_plugin_load_file
end
end
function _fish_load_theme
function _fish_load_theme
if
test -d $fish_path/themes/$fish_theme
if
_test_dir $fish_path/themes/$fish_theme $fish_function_path
set fish_function_path $fish_path/themes/$fish_theme $fish_function_path
set fish_function_path $fish_path/themes/$fish_theme $fish_function_path
end
end
if
test -d $fish_custom/themes/$fish_theme
if
_test_dir $fish_custom/themes/$fish_theme $fish_function_path
set fish_function_path $fish_custom/themes/$fish_theme $fish_function_path
set fish_function_path $fish_custom/themes/$fish_theme $fish_function_path
end
end
end
end
...
@@ -66,7 +73,9 @@ set user_function_path $fish_function_path[1]
...
@@ -66,7 +73,9 @@ set user_function_path $fish_function_path[1]
set -e fish_function_path[1]
set -e fish_function_path[1]
# Add all functions
# Add all functions
set fish_function_path $fish_path/functions/ $fish_function_path
if not contains $fish_path/functions/ $fish_function_path
set fish_function_path $fish_path/functions/ $fish_function_path
end
# Add all defined plugins
# Add all defined plugins
for plugin in $fish_plugins
for plugin in $fish_plugins
...
...
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