Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
4b3429d7
Commit
4b3429d7
authored
Jan 16, 2012
by
Arbo von Monkiewitsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing #812: adding plugins w/o plugin.zsh file to fpath.
parent
7a41498b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
oh-my-zsh.sh
oh-my-zsh.sh
+9
-3
No files found.
oh-my-zsh.sh
View file @
4b3429d7
...
...
@@ -19,13 +19,19 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM
=
"
$ZSH
/custom"
fi
is_plugin
()
{
local
base_dir
=
$1
local
name
=
$2
test
-f
$base_dir
/plugins/
$name
/
$name
.plugin.zsh
\
||
test
-f
$base_dir
/plugins/
$name
/_
$name
}
# Add all defined plugins to fpath. This must be done
# before running compinit.
plugin
=
${
plugin
:
=()
}
for
plugin
(
$plugins
)
;
do
if
[
-f
$ZSH_CUSTOM
/plugins/
$plugin
/
$plugin
.plugin.zsh
]
;
then
if
is_plugin
$ZSH_CUSTOM
$plugin
;
then
fpath
=(
$ZSH_CUSTOM
/plugins/
$plugin
$fpath
)
elif
[
-f
$ZSH
/plugins/
$plugin
/
$plugin
.plugin.zsh
]
;
then
elif
is_plugin
$ZSH
$plugin
;
then
fpath
=(
$ZSH
/plugins/
$plugin
$fpath
)
fi
done
...
...
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