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
b2f87648
Commit
b2f87648
authored
Jan 15, 2015
by
Harsh Singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds completions to wp-cli plugin
parent
c78277fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
wp-cli.plugin.zsh
plugins/wp-cli/wp-cli.plugin.zsh
+22
-0
No files found.
plugins/wp-cli/wp-cli.plugin.zsh
View file @
b2f87648
...
@@ -136,3 +136,25 @@ alias wpwd='wp widget delete'
...
@@ -136,3 +136,25 @@ alias wpwd='wp widget delete'
alias
wpwl
=
'wp widget list'
alias
wpwl
=
'wp widget list'
alias
wpwm
=
'wp widget move'
alias
wpwm
=
'wp widget move'
alias
wpwu
=
'wp widget update'
alias
wpwu
=
'wp widget update'
autoload
-U
+X bashcompinit
&&
bashcompinit
# bash completion for the `wp` command
_wp_complete
()
{
local
cur
=
${
COMP_WORDS
[COMP_CWORD]
}
IFS
=
$'
\n
'
;
# want to preserve spaces at the end
local
opts
=
"
$(
wp cli completions
--line
=
"
$COMP_LINE
"
--point
=
"
$COMP_POINT
"
)
"
if
[[
"
$opts
"
=
~
\<
file
\>\s
*
]]
then
COMPREPLY
=(
$(
compgen
-f
--
$cur
)
)
elif
[[
$opts
=
""
]]
then
COMPREPLY
=(
$(
compgen
-f
--
$cur
)
)
else
COMPREPLY
=(
${
opts
[*]
}
)
fi
}
complete
-o
nospace
-F
_wp_complete wp
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