]> Sergey Matveev's repositories - nnn.git/commitdiff
fzcd: avoid using non-portable xargs flag
authorNRK <nrk@disroot.org>
Tue, 1 Feb 2022 12:00:20 +0000 (18:00 +0600)
committerNRK <nrk@disroot.org>
Tue, 1 Feb 2022 12:00:20 +0000 (18:00 +0600)
plugins/fzcd

index fd0b971849c357d1a163a7b261b64e3e389c3c3b..28bd67e78b317c222b415a674cc1003d89b0249f 100755 (executable)
@@ -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