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
dd117c82
Commit
dd117c82
authored
Nov 11, 2013
by
Wolfgang Richter
Committed by
Bruno Pinto
Nov 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oh-my-fish.fish: add helper function to test directory
- existence of dir - and also if it is already in the path list
parent
34967e61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
oh-my-fish.fish
oh-my-fish.fish
+11
-8
No files found.
oh-my-fish.fish
View file @
dd117c82
...
@@ -2,17 +2,22 @@
...
@@ -2,17 +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 begin; test -d $fish_path/$plugin_path; and not contains \
if _test_dir $fish_path/$plugin_path $fish_function_path
$fish_path/$plugin_path $fish_function_path; end
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 begin; test -d $fish_custom/$plugin_path; and not contains \
if _test_dir $fish_custom/$plugin_path $fish_function_path
$custom_path/$plugin_path $fish_function_path; end
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
...
@@ -44,13 +49,11 @@ function _fish_source_plugin_load_file
...
@@ -44,13 +49,11 @@ function _fish_source_plugin_load_file
end
end
function _fish_load_theme
function _fish_load_theme
if begin; test -d $fish_path/themes/$fish_theme; and not contains \
if _test_dir $fish_path/themes/$fish_theme $fish_function_path
$fish_custom/themes/$fish_theme $fish_function_path; end
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 begin; test -d $fish_custom/themes/$fish_theme; and not contains \
if _test_dir $fish_custom/themes/$fish_theme $fish_function_path
$fish_custom/themes/$fish_theme $fish_function_path; end
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
...
...
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