68
68
if [[ " $COMSPEC " ]]; then
69
69
alias convert=" magick convert" # Shun MS Windows' "convert" command.
70
70
fi
71
-
71
+
72
72
cleanup () {
73
73
echo -n $' \e\\ ' # Escape sequence to stop SIXEL.
74
74
stty echo # Reset terminal to show characters.
@@ -193,7 +193,7 @@ main() {
193
193
readarray -t < <( printf " %s\n" " $@ " | sort)
194
194
195
195
# Only show first frame of animated GIFs if filename not specified.
196
- for x in ${! MAPFILE[@]} ; do
196
+ for x in " ${! MAPFILE[@]} " ; do
197
197
if [[ ${MAPFILE[$x]} =~ (gif| webp)$ ]]; then
198
198
MAPFILE[$x ]=" ${MAPFILE[$x]} [0]"
199
199
fi
@@ -205,7 +205,7 @@ main() {
205
205
for arg; do
206
206
if [ -d " $arg " ]; then
207
207
echo Recursing on $arg
208
- (cd " $arg " ; $lsix )
208
+ (cd " $arg " || exit ; $lsix )
209
209
else
210
210
nodirs+=(" $arg " )
211
211
fi
@@ -215,7 +215,7 @@ main() {
215
215
216
216
217
217
# Resize on load: Save memory by appending this suffix to every filename.
218
- resize=" [${tilewidth} x${tileheight} ]"
218
+ # resize="[${tilewidth}x${tileheight}]" ### DONE: SC2034 (warning): resize appears unused. Verify use (or export if used externally).
219
219
220
220
imoptions=" -tile ${numtiles} x1" # Each montage is 1 row x $numtiles columns
221
221
imoptions+=" -geometry ${tilewidth} x${tileheight} >+${tilexspace} +${tileyspace} " # Size of each tile and spacing
@@ -234,7 +234,7 @@ main() {
234
234
# While we still have images to process...
235
235
onerow=()
236
236
goal=$(( $# - numtiles)) # How many tiles left after this row
237
- while [ $# -gt 0 -a $# -gt $goal ]; do
237
+ while [ $# -gt 0 ] && [ $# -gt $goal ]; do
238
238
len=${# onerow[@]}
239
239
onerow[len++]=" -label"
240
240
onerow[len++]=$( processlabel " $1 " )
0 commit comments