summaryrefslogtreecommitdiffstats
path: root/network/wp-cli/files
diff options
context:
space:
mode:
Diffstat (limited to 'network/wp-cli/files')
-rw-r--r--network/wp-cli/files/LICENSE21
-rw-r--r--network/wp-cli/files/wp-completion.bash23
2 files changed, 44 insertions, 0 deletions
diff --git a/network/wp-cli/files/LICENSE b/network/wp-cli/files/LICENSE
new file mode 100644
index 0000000000..017ee0bf17
--- /dev/null
+++ b/network/wp-cli/files/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (C) 2011-2019 WP-CLI Development Group (https://github.com/wp-cli/wp-cli/contributors)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/network/wp-cli/files/wp-completion.bash b/network/wp-cli/files/wp-completion.bash
new file mode 100644
index 0000000000..9df572b6d6
--- /dev/null
+++ b/network/wp-cli/files/wp-completion.bash
@@ -0,0 +1,23 @@
+# bash completion for the `wp` command
+
+_wp_complete() {
+ local OLD_IFS="$IFS"
+ 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
+
+ IFS="$OLD_IFS"
+ return 0
+}
+complete -o nospace -F _wp_complete wp