Compare commits
3 Commits
9a5f07d52d
...
bbcdcb1432
Author | SHA1 | Date |
---|---|---|
Daniel Berteaud | bbcdcb1432 | |
Daniel Berteaud | 9af61e9259 | |
Daniel Berteaud | 097dd6fefa |
|
@ -1 +1 @@
|
|||
2.5.0-3 ./
|
||||
2.8.1-1 ./
|
||||
|
|
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.
12
wp-cli.spec
12
wp-cli.spec
|
@ -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
|
||||
|
||||
|
|
|
@ -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