Compare commits

...

3 Commits

Author SHA1 Message Date
Daniel Berteaud bbcdcb1432 Automatic commit of package [wp-cli] minor release [2.8.1-1].
Created by command:

/usr/bin/tito tag
2023-06-16 23:17:28 +02:00
Daniel Berteaud 9af61e9259 Include basj_completion 2023-06-16 23:15:54 +02:00
Daniel Berteaud 097dd6fefa Update to 2.8.1 2023-06-16 23:13:33 +02:00
5 changed files with 37 additions and 6 deletions

View File

@ -1 +1 @@
2.5.0-3 ./
2.8.1-1 ./

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: 1%{?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
@ -30,18 +31,25 @@ chmod +x %{SOURCE0}
%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{bash_completion_dir}
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
%license LICENSE
%{_bindir}/%{name2}
%{_mandir}/man1/wp.1*
%{bash_completion_dir}/*
%changelog
* Fri Jun 16 2023 Daniel Berteaud <dbd@ehtrace.com> 2.8.1-1
- Include bash_completion (dbd@ehtrace.com)
- Update to 2.8.1 (dbd@ehtrace.com)
* Tue Jan 11 2022 Daniel Berteaud <dbd@ehtrace.com> 2.5.0-3
- Release bump

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