Update to 2.8.1

This commit is contained in:
Daniel Berteaud 2023-06-16 23:13:33 +02:00
parent 9a5f07d52d
commit 097dd6fefa
4 changed files with 30 additions and 5 deletions

BIN
wp-cli-2.5.0.phar (Stored with Git LFS)

Binary file not shown.

BIN
wp-cli-2.8.1.phar (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,14 +1,15 @@
%define name2 wp
Name: wp-cli
Version: 2.5.0
Release: 3%{?dist}
Version: 2.8.1
Release: 0%{?dist}
Summary: The command line interface for WordPress
License: MIT
URL: http://%{name}.org/
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}.phar
Source1: LICENSE
Source2: wp.1
Source3: wp-completion.bash
BuildArch: noarch
%description
@ -34,6 +35,7 @@ install -p -m 0755 %{SOURCE0} %{buildroot}%{_bindir}/%{name2}
cp -f %SOURCE1 LICENSE
mkdir -p %{buildroot}%{_mandir}/man1
install -p -m 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/
install -p -m 0644 %{SOURCE3} %{buildroot}%{bash_completion_dir}/
%files

23
wp-completion.bash Normal file
View File

@ -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