Skip to content

Commit

Permalink
fzcd: avoid using non-portable xargs flag
Browse files Browse the repository at this point in the history
  • Loading branch information
N-R-K committed Feb 1, 2022
1 parent ffd0468 commit 24db74f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/fzcd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 24db74f

Please sign in to comment.