1
0
Fork 0

fix suddenly malfunctioning dupe function in LF

This commit is contained in:
Luca Bilke 2023-03-27 13:39:33 +02:00
parent 3624a4a353
commit f3e145e1c0
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ cmd paste &{{
cmd dupe %{{
for file in $fx; do
find "$PWD" "$file" | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | (
find "$PWD" "$file" -maxdepth 0 | grep -oP '(?<=.\.~)\d+(?=~$)' | sort -n | tail -1 | (
ext=$(($(cat /dev/stdin)+1))
filedest="$(echo "$file" | sed 's/.~[[:digit:]]*~$//').~$ext~"
cp -r "$file" "$filedest"