fzcd: avoid using non-portable xargs flag

This commit is contained in:
NRK 2022-02-01 18:00:20 +06:00
parent ffd0468f67
commit 24db74fd7b

View file

@ -55,15 +55,15 @@ if [ -n "$LIST" ]; then
fi fi
done < "$LIST" done < "$LIST"
sel=$(xargs -d '\n' -a "$tmpfile" -I{} find {} -type f -printf "%H//%P\n" | sed '/.*\/\/\(\..*\|.*\/\..*\)/d; s:/\+:/:g' | fzf --delimiter / --tiebreak=begin --info=hidden) sel=$(xargs -d '\n' < "$tmpfile" -I{} find {} -type f -printf "%H//%P\n" | sed '/.*\/\/\(\..*\|.*\/\..*\)/d; s:/\+:/:g' | fzf --delimiter / --tiebreak=begin --info=hidden)
# Alternative for 'fd' # Alternative for 'fd'
# sel=$(xargs -d '\n' -a "$tmpfile" fd . | fzf --delimiter / --tiebreak=begin --info=hidden) # sel=$(xargs -d '\n' < "$tmpfile" fd . | fzf --delimiter / --tiebreak=begin --info=hidden)
rm "$tmpfile" rm "$tmpfile"
else else
printf "find missing" printf "find missing"
read -r _ read -r _
exit 1 exit 1
fi fi
fi fi