]> Sergey Matveev's repositories - nnn.git/commitdiff
fix shellcheck issues
authorNRK <nrk@disroot.org>
Fri, 17 Feb 2023 14:12:07 +0000 (20:12 +0600)
committerNRK <nrk@disroot.org>
Fri, 17 Feb 2023 14:12:07 +0000 (20:12 +0600)
plugins/.nmv
plugins/.nnn-plugin-helper
plugins/gpge

index 9ab1cdb102de1a0deba36695f71a161f6c6cd72e..bbbdafe7d92063c1d26561657c07e5f0b6eb4a52 100755 (executable)
@@ -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 ."
index c8ef87ea11853f92a5b05a5b291fdd93746c08ca..118e6c77c08e2542bdd033052a1b38a4e0808f9f 100644 (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__
 
index 429fd7dec621cefdb09325aa4ac8092297cc9054..7664cda0037bdfa166c5d34becbe2449e5a7b112 100755 (executable)
@@ -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