init: Fix error upon deleting file on non-GNU systems

pull/659/head
Lewis Cook 9 months ago committed by Arijit Basu
parent eeb7b5d684
commit 6df168f8c1

@ -1995,7 +1995,9 @@ xplr.config.modes.builtin.delete = {
messages = {
{
BashExec0 = [===[
cat "${XPLR_PIPE_RESULT_OUT:?}" | xargs -0 printf '%q\n'
while IFS= read -r -d '' PTH; do
printf '%q\n' "$PTH"
done < "${XPLR_PIPE_RESULT_OUT:?}"
echo
read -p "Permanently delete these files? [Y/n]: " ANS
[ "${ANS:-Y}" = "Y" ] || [ "$ANS" = "y" ] || exit 0
@ -2023,7 +2025,9 @@ xplr.config.modes.builtin.delete = {
messages = {
{
BashExec0 = [===[
cat "${XPLR_PIPE_RESULT_OUT:?}" | xargs -0 printf '%q\n'
while IFS= read -r -d '' PTH; do
printf '%q\n' "$PTH"
done < "${XPLR_PIPE_RESULT_OUT:?}"
echo
read -p "Permanently delete these files? [Y/n]: " ANS
[ "${ANS:-Y}" = "Y" ] || [ "$ANS" = "y" ] || exit 0

Loading…
Cancel
Save