bashsupport-pro icon indicating copy to clipboard operation
bashsupport-pro copied to clipboard

`Unresolved variable` inspection does not support `$''foo''` syntax

Open 5HT2 opened this issue 8 months ago • 2 comments

IDEA 2024.3.5 / BashSupport Pro 4.6.3.243
# I moved this into a new line because it made the example too wide to read on GitHub:
#'s/^([^\ ]*) ?(\(?[A-z_\.\-]*\)?)(([_\-\ ]*)(PowerShell[^\ ]*)?(.+)[_\-\ ]*Microsoft.+)(\.pdf)$/\1.pdf/g'
fNew=$''$(printf '%s' $''$pdf'' | gsed -E $''$fRgx'')''

# Check if filename is shorter than the original
# No reason to rename if it's just making the filename worse
if (( ${#fNew} < ${#pdf} )); then
    log 0 "# Rename: $pdf → ${fNew}"

    # Check if dest exists
    if [[ -f $''$fNew'' ]]; then
        log 1 "Failed to rename '${pdf}' → '${fNew}', destination exists" || return $?
    fi

    # Rename
    mv $''$pdf'' $''$fNew'' || {
        log 1 "Failed to rename '${pdf}' → '${fNew}'" || return $?
    }

    (( rNum += 1 ))
    filesNew+=($''$fNew'')
else
    (( sNum += 1 ))
    filesNew+=($''$pdf'')
fi

5HT2 avatar May 12 '25 03:05 5HT2