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
ed76c2e5
Commit
ed76c2e5
authored
Jul 29, 2012
by
Bruno Pinto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin and completion load cleanup
parent
a0331634
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
16 deletions
+36
-16
oh-my-fish.fish
oh-my-fish.fish
+36
-16
No files found.
oh-my-fish.fish
View file @
ed76c2e5
###
# Helper functions
###
function _fish_add_plugin
set -l plugin $argv[1]
set -l plugin_path "plugins/$plugin"
if test -d $FISH/$plugin_path
set fish_function_path $FISH/$plugin_path $fish_function_path
end
if test -d $FISH_CUSTOM/$plugin_path
set fish_function_path $FISH_CUSTOM/$plugin_path $fish_function_path
end
end
function _fish_add_completion
set -l plugin $argv[1]
set -l completion_path "plugins/$plugin/completions"
if test -d $FISH/$completion_path
set fish_complete_path $FISH/$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
###
# Configuration
###
# Set FISH_CUSTOM to the path where your custom config files
# Set FISH_CUSTOM to the path where your custom config files
# and plugins exists, or else we will use the default custom.
# and plugins exists, or else we will use the default custom.
if not set -q FISH_CUSTOM
if not set -q FISH_CUSTOM
...
@@ -13,27 +47,13 @@ set fish_function_path $FISH/functions/ $fish_function_path
...
@@ -13,27 +47,13 @@ set fish_function_path $FISH/functions/ $fish_function_path
# Add all defined plugins
# Add all defined plugins
for plugin in $FISH_PLUGINS
for plugin in $FISH_PLUGINS
set fish_function_path $FISH/plugins/$plugin $fish_function_path
_fish_add_plugin $plugin
_fish_add_completion $plugin
# Add plugin completion
if test -e $FISH/plugins/$plugin/completions
set fish_complete_path $FISH/plugins/$plugin/completions $fish_complete_path
end
end
end
# Add user defined theme
# Add user defined theme
set fish_function_path $FISH/themes/$FISH_THEME $fish_function_path
set fish_function_path $FISH/themes/$FISH_THEME $fish_function_path
# Add all custom plugins
for plugin in $FISH_CUSTOM/plugins/*
set fish_function_path $plugin $fish_function_path
# Add plugin completion
if test -e $plugin/completions
set fish_complete_path $plugin/completions $fish_complete_path
end
end
# Source all files inside custom folder
# Source all files inside custom folder
for config_file in $FISH_CUSTOM/*.fish
for config_file in $FISH_CUSTOM/*.fish
. $config_file
. $config_file
...
...
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