Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic code completion (related to #6)

  • Loading branch information...
commit 0323047dd34b02f9fbbe3d10ba159d4e65d84dff 1 parent 1d2645a
Andreas Creten andreascreten authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 wp-cli-completion.bash
15 wp-cli-completion.bash
View
@@ -0,0 +1,15 @@
+# Very basic code completion
+#
+# Code taken from here: http://www.debian-administration.org/article/317/An_introduction_to_bash_completion_part_2
+_wp()
+{
+ local cur prev opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ opts="core plugin option theme home help"
+
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+}
+complete -F _wp wp
Please sign in to comment.
Something went wrong with that request. Please try again.