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
90b83b81
Commit
90b83b81
authored
Sep 01, 2013
by
Dimitri Jorge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add completion for package add and remove
parent
dd220152
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
_meteor
plugins/meteor/_meteor
+17
-1
No files found.
plugins/meteor/_meteor
View file @
90b83b81
...
@@ -4,6 +4,13 @@
...
@@ -4,6 +4,13 @@
# Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion
# Meteor Autocomplete plugin for Oh-My-Zsh, based on homebrew completion
# Original author: Dimitri JORGE (https://github.com/jorge-d)
# Original author: Dimitri JORGE (https://github.com/jorge-d)
_meteor_all_packages() {
packages=(`meteor list | cut -d" " -f1`)
}
_meteor_installed_packages() {
installed_packages=(`meteor list --using`)
}
local -a _1st_arguments
local -a _1st_arguments
_1st_arguments=(
_1st_arguments=(
'run:[Default] Run this project in local development mode'
'run:[Default] Run this project in local development mode'
...
@@ -21,6 +28,9 @@ _1st_arguments=(
...
@@ -21,6 +28,9 @@ _1st_arguments=(
'test-packages:Test one or more packages'
'test-packages:Test one or more packages'
)
)
local expl
local -a packages installed_packages
if (( CURRENT == 2 )); then
if (( CURRENT == 2 )); then
_describe -t commands "meteor subcommand" _1st_arguments
_describe -t commands "meteor subcommand" _1st_arguments
return
return
...
@@ -28,5 +38,11 @@ fi
...
@@ -28,5 +38,11 @@ fi
case "$words[2]" in
case "$words[2]" in
help)
help)
_describe -t commands "brew subcommand" _1st_arguments
_describe -t commands "meteor subcommand" _1st_arguments ;;
remove)
_meteor_installed_packages
_wanted installed_packages expl 'installed packages' compadd -a installed_packages ;;
add)
_meteor_all_packages
_wanted packages expl 'all packages' compadd -a packages ;;
esac
esac
\ No newline at end of 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