mirror of
https://github.com/jarun/nnn.git
synced 2024-11-17 16:39:14 +00:00
Merge pull request #1300 from N-R-K/rsynccp_fix
[rsynccp & fzcd]: avoid using non-portable xargs flag
This commit is contained in:
commit
fbb2172627
|
@ -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
|
||||
|
||||
|
|
|
@ -15,10 +15,10 @@ sel=${NNN_SEL:-${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.selection}
|
|||
# Choose one of these two schemes by commenting
|
||||
|
||||
# more verbose
|
||||
xargs -0 -a "$sel" -I % rsync -ah --progress % "$PWD"
|
||||
xargs -0 -I % rsync -ah --progress % "$PWD" < "$sel"
|
||||
|
||||
# less verbose
|
||||
# xargs -0 -a "$sel" -I % rsync -ah --info=progress2 % "$PWD"
|
||||
# xargs -0 -I % rsync -ah --info=progress2 % "$PWD" < "$sel"
|
||||
|
||||
# Clear selection
|
||||
if [ -p "$NNN_PIPE" ]; then
|
||||
|
|
Loading…
Reference in a new issue