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
15fd9c84
Commit
15fd9c84
authored
Nov 09, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(bundler): simplify `bundled_commands` array operations
parent
98b48015
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
bundler.plugin.zsh
plugins/bundler/bundler.plugin.zsh
+4
-7
No files found.
plugins/bundler/bundler.plugin.zsh
View file @
15fd9c84
...
...
@@ -81,14 +81,12 @@ bundled_commands=(
)
# Remove $UNBUNDLED_COMMANDS from the bundled_commands list
for
cmd
in
$UNBUNDLED_COMMANDS
;
do
bundled_commands
=(
${
bundled_commands
#
$cmd
}
)
;
done
bundled_commands
=(
${
bundled_commands
:|UNBUNDLED_COMMANDS
}
)
unset
UNBUNDLED_COMMANDS
# Add $BUNDLED_COMMANDS to the bundled_commands list
for
cmd
in
$BUNDLED_COMMANDS
;
do
bundled_commands+
=(
$cmd
)
;
done
bundled_commands+
=(
$BUNDLED_COMMANDS
)
unset
BUNDLED_COMMANDS
# Check if in the root or a subdirectory of a bundled project
_within-bundled-project
()
{
...
...
@@ -126,5 +124,4 @@ for cmd in $bundled_commands; do
compdef
"_
$cmd
"
"bundled_
$cmd
"
=
"
$cmd
"
fi
done
unset
cmd bundled_commands
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