From 24db74fd7b16d098f2631a421c558181b78caa9b Mon Sep 17 00:00:00 2001 From: NRK Date: Tue, 1 Feb 2022 18:00:20 +0600 Subject: [PATCH] fzcd: avoid using non-portable xargs flag --- plugins/fzcd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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