Merge pull request #1589 from N-R-K/prefer_sel

fix shellcheck issues
This commit is contained in:
Arun 2023-02-17 21:00:44 +05:30 committed by GitHub
commit b49cc28d80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View file

@ -40,6 +40,7 @@ exit_status=0
dst_file=$(mktemp "$TMPDIR/.nnnXXXXXX")
if nnn_use_selection "Rename"; then
# shellcheck disable=SC2154
arr=$(tr '\0' '\n' < "$selection")
else
findcmd="find . ! -name ."

View file

@ -48,7 +48,7 @@ nnn_use_selection() {
if [ "$NNN_PREFER_SELECTION" -eq 1 ]; then
return 0
else
[ -n "$1" ] && printf "$1 "
[ -n "$1" ] && printf "%s " "$1"
printf "(s)election/(c)urrent? [default=c] "
read -r resp__

View file

@ -21,6 +21,7 @@ if [ "$symmetry" = "s" ]; then
else
if nnn_use_selection; then
clear_sel=1
# shellcheck disable=SC2154
files=$(tr '\0' '\n' < "$selection")
else
clear_sel=0