public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/pie] epel10: v1.5.0
@ 2026-09-17 5:57 Remi Collet
0 siblings, 0 replies; only message in thread
From: Remi Collet @ 2026-09-17 5:57 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/pie
Branch : epel10
Commit : 4f1ebde2f84ae23ce33d083491c473d072f666c6
Author : Remi Collet <remi@fedoraproject.org>
Date : 2026-09-17T07:57:03+02:00
Stats : +45/-13 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/pie/c/4f1ebde2f84ae23ce33d083491c473d072f666c6?branch=epel10
Log:
v1.5.0
(cherry picked from commit af59354b06c8101b099abc483e9a12b918f70b2a)
---
diff --git a/.gitignore b/.gitignore
index cedcb57..b60230f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ clog
/pie-1.4.8.tgz
/pie-1.4.9.tgz
/pie-1.4.10.tgz
+/pie-1.5.0.tgz
diff --git a/pie-bash-completion b/pie-bash-completion
index 8847c8d..f521379 100644
--- a/pie-bash-completion
+++ b/pie-bash-completion
@@ -16,27 +16,45 @@ _sf_pie() {
fi
done
- # Use newline as only separator to allow space in completion values
- local IFS=$'\n'
local sf_cmd="${COMP_WORDS[0]}"
+ local sf_cmd_parts
- # for an alias, get the real script behind it
+ # for an alias, get the real command behind it, which may carry arguments
sf_cmd_type=$(type -t $sf_cmd)
if [[ $sf_cmd_type == "alias" ]]; then
sf_cmd=$(alias $sf_cmd | sed -E "s/alias $sf_cmd='(.*)'/\1/")
+ read -ra sf_cmd_parts <<< "$sf_cmd"
elif [[ $sf_cmd_type == "file" ]]; then
- sf_cmd=$(type -p $sf_cmd)
+ sf_cmd_parts=("$(type -p $sf_cmd)")
+ else
+ sf_cmd_parts=("$sf_cmd")
+ fi
+
+ # the command must be a function, an executable of the PATH or an executable file
+ if [[ $sf_cmd_type != "function" ]] \
+ && ! type -P "${sf_cmd_parts[0]}" > /dev/null \
+ && [[ ! -x ${sf_cmd_parts[0]} ]] \
+ ; then
+ return 1
fi
- if [[ $sf_cmd_type != "function" && ! -x $sf_cmd ]]; then
+ # The bash-completion package provides the parsing of the current command line
+ if ! declare -F _get_comp_words_by_ref > /dev/null; then
+ >&2 echo "The completion of pie requires the \"bash-completion\" package to be installed and loaded."
+
return 1
fi
+ # this must run with the default IFS: bash-completion 1.x, still shipped on
+ # macOS, joins every word into a single one when IFS is a newline
local cur prev words cword
_get_comp_words_by_ref -n := cur prev words cword
- local completecmd=("$sf_cmd" "_complete" "--no-interaction" "-sbash" "-c$cword" "-a1")
- for w in ${words[@]}; do
+ # Use newline as only separator to allow space in completion values
+ local IFS=$'\n'
+
+ local completecmd=("${sf_cmd_parts[@]}" "_complete" "--no-interaction" "-sbash" "-c$cword" "-a1")
+ for w in "${words[@]}"; do
w="${w//\\\\/\\}"
# remove quotes from typed values
quote="${w:0:1}"
@@ -54,8 +72,15 @@ _sf_pie() {
done
local sfcomplete
- if sfcomplete=$(SHELL_VERBOSITY=0 ${completecmd[@]} 2>&1); then
+ if sfcomplete=$(SHELL_VERBOSITY=0 "${completecmd[@]}" 2>&1); then
local quote suggestions
+
+ # for the "--option=value" form, the suggestions are the values: readline
+ # keeps the "--option=" part, which is a word of its own for it
+ if [[ "$cur" == -*=* ]]; then
+ cur="${cur#*=}"
+ fi
+
quote=${cur:0:1}
# Use single quotes by default if suggestions contains backslash (FQCN)
@@ -64,8 +89,11 @@ _sf_pie() {
fi
if [ "$quote" == \' ]; then
- # single quotes: no additional escaping (does not accept ' in values)
- suggestions=$(for s in $sfcomplete; do printf $'%q%q%q\n' "$quote" "$s" "$quote"; done)
+ # single quotes: escape the single quotes contained in the values
+ suggestions=$(for s in $sfcomplete; do
+ s=${s//\'/\'\\\'\'}
+ printf $'%q%q%q\n' "$quote" "$s" "$quote";
+ done)
elif [ "$quote" == \" ]; then
# double quotes: double escaping for \ $ ` "
suggestions=$(for s in $sfcomplete; do
diff --git a/pie.spec b/pie.spec
index 879bc01..fd6f130 100644
--- a/pie.spec
+++ b/pie.spec
@@ -11,8 +11,8 @@
%global gh_owner php
%global gh_project pie
-%global upstream_version 1.4.10
-#global upstream_prever rc.1
+%global upstream_version 1.5.0
+#global upstream_prever rc.3
%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null)
%global bashcomproot %(dirname %{bashcompdir} 2>/dev/null)
@@ -134,6 +134,9 @@ done
%changelog
+* Thu Sep 17 2026 Remi Collet <remi@remirepo.net> - 1.5.0-1
+- update to 1.5.0
+
* Thu Aug 20 2026 Remi Collet <remi@remirepo.net> - 1.4.10-1
- update to 1.4.10
diff --git a/sources b/sources
index 50e9718..da67391 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pie-1.4.10.tgz) = 7e18dde31661daccab84e3816d5fba6266d6d387f33e093bf057031b6f403325aaadf41df21dde024ce236429197ce86a8afb04cf1800b7d24a2699c546a4e8e
+SHA512 (pie-1.5.0.tgz) = 523b8997fbb7364ee741ecba8ee4fc05679b532a375c23e1e0df47cbd6ec56b83084f58cd2fcd227a33d1ff24edeebf116a181705b22dd173646b6bc5a01efde
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-17 5:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 5:57 [rpms/pie] epel10: v1.5.0 Remi Collet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox