Update to 2.8.1
This commit is contained in:
parent
9a5f07d52d
commit
097dd6fefa
BIN
wp-cli-2.5.0.phar (Stored with Git LFS)
BIN
wp-cli-2.5.0.phar (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
|
@ -1,14 +1,15 @@
|
||||||
%define name2 wp
|
%define name2 wp
|
||||||
|
|
||||||
Name: wp-cli
|
Name: wp-cli
|
||||||
Version: 2.5.0
|
Version: 2.8.1
|
||||||
Release: 3%{?dist}
|
Release: 0%{?dist}
|
||||||
Summary: The command line interface for WordPress
|
Summary: The command line interface for WordPress
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://%{name}.org/
|
URL: http://%{name}.org/
|
||||||
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.phar
|
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.phar
|
||||||
Source1: LICENSE
|
Source1: LICENSE
|
||||||
Source2: wp.1
|
Source2: wp.1
|
||||||
|
Source3: wp-completion.bash
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -34,6 +35,7 @@ install -p -m 0755 %{SOURCE0} %{buildroot}%{_bindir}/%{name2}
|
||||||
cp -f %SOURCE1 LICENSE
|
cp -f %SOURCE1 LICENSE
|
||||||
mkdir -p %{buildroot}%{_mandir}/man1
|
mkdir -p %{buildroot}%{_mandir}/man1
|
||||||
install -p -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/
|
install -p -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/
|
||||||
|
install -p -m 0644 %{SOURCE3} %{buildroot}%{bash_completion_dir}/
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
|
|
@ -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
|
Loading…
Reference in New Issue