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
1 changed files with 3 additions and 3 deletions

View File

@ -55,15 +55,15 @@ if [ -n "$LIST" ]; then
fi
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'
# 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"
else
printf "find missing"
read -r _
exit 1
exit 1
fi
fi