* Added padding for numbers in .nmv
* Add skim as an option in fzopen
* Remove unnecessary eval
Thanks @leovilok!
Co-Authored-By: lvgx <l@vgx.fr>
* Added note about whitespace
Co-authored-by: lvgx <l@vgx.fr>
# Description: An almost fully POSIX compliant batch file renamer
#
# Note: nnn auto-detects and invokes this plugin if available
+# Whitespace is used as delimiter for read.
+# The plugin doesn't support filenames with leading or trailing whitespace
#
# Capabilities:
# 1. Basic file rename
fi
fi
-printf "%s" "$arr" | awk '{print NR " " $0}' > "$dst_file"
+lines=$(printf "%s\n" "$arr" | wc -l)
+width=${#lines}
+
+printf "%s" "$arr" | awk '{printf("%'"${width}"'d %s\n", NR, $0)}' > "$dst_file"
items=("~")
while IFS='' read -r line; do
# entry=$(find . -type f 2>/dev/null | fzf --delimiter / --with-nth=-1 --tiebreak=begin --info=hidden)
elif which fzy >/dev/null 2>&1; then
entry=$(find . -type f 2>/dev/null | fzy)
+elif which sk >/dev/null 2>&1; then
+ entry=$(find . -type f 2>/dev/null | sk)
else
exit 1
fi