Skip to content

Commit

Permalink
init: Fix error upon deleting file on non-GNU systems
Browse files Browse the repository at this point in the history
  • Loading branch information
lcook authored and sayanarijit committed Jul 30, 2023
1 parent eeb7b5d commit 6df168f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6df168f

Please sign in to comment.