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
b621eee2
Unverified
Commit
b621eee2
authored
Oct 05, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cli): fix zsh array syntax for szh 5.0.2
parent
a54148a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
cli.zsh
lib/cli.zsh
+5
-6
No files found.
lib/cli.zsh
View file @
b621eee2
...
...
@@ -91,7 +91,8 @@ function _omz {
# NOTE: $(( CURRENT - 1 )) is the last plugin argument completely passed, i.e. that which
# has a space after them. This is to avoid removing plugins partially passed, which makes
# the completion not add a space after the completed plugin.
local
-a
args
=(
${
words
[4,
$((
CURRENT
-
1
))
]
}
)
local
-a
args
args
=(
${
words
[4,
$((
CURRENT
-
1
))
]
}
)
valid_plugins
=(
${
valid_plugins
:|args
}
)
_describe
'plugin'
valid_plugins
;;
...
...
@@ -214,7 +215,7 @@ function _omz::plugin::disable {
fi
# Check that plugin is in $plugins
local
-a
dis_plugins
=()
local
-a
dis_plugins
for
plugin
in
"
$@
"
;
do
if
[[
${
plugins
[(Ie)
$plugin
]
}
-eq
0
]]
;
then
_omz::log warn
"plugin '
$plugin
' is not enabled."
...
...
@@ -303,7 +304,7 @@ function _omz::plugin::enable {
fi
# Check that plugin is not in $plugins
local
-a
add_plugins
=()
local
-a
add_plugins
for
plugin
in
"
$@
"
;
do
if
[[
${
plugins
[(Ie)
$plugin
]
}
-ne
0
]]
;
then
_omz::log warn
"plugin '
$plugin
' is already enabled."
...
...
@@ -424,10 +425,8 @@ function _omz::plugin::load {
return
1
fi
local
plugins
=(
"
$@
"
)
local
plugin base
has_completion
=
0
for
plugin
in
$plugins
;
do
for
plugin
in
"
$@
"
;
do
if
[[
-d
"
$ZSH_CUSTOM
/plugins/
$plugin
"
]]
;
then
base
=
"
$ZSH_CUSTOM
/plugins/
$plugin
"
elif
[[
-d
"
$ZSH
/plugins/
$plugin
"
]]
;
then
...
...
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