From: NRK Date: Tue, 1 Feb 2022 12:00:20 +0000 (+0600) Subject: fzcd: avoid using non-portable xargs flag X-Git-Tag: v4.5~30^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=24db74fd7b16d098f2631a421c558181b78caa9b;p=nnn.git fzcd: avoid using non-portable xargs flag --- diff --git a/plugins/fzcd b/plugins/fzcd index fd0b9718..28bd67e7 100755 --- a/plugins/fzcd +++ b/plugins/fzcd @@ -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