Follow

@hund you have quotes on the rt.hand side of the icon & img assignments, but no quotes around $img. That's backwards. POSIX rules make quoting the RHS of assignments unnecessary but when you use (expand) the variable something like a space will cause multiple tokens. Luckily those vars don't have spaces in this case but you might want to get in the safer habit of quoting var expansions.

@resist1984 I never use spaces, but it's probably a good idea to use quotes for the variables as well.

@hund @resist1984 shellcheck.net/ is very nice for catching that kind of brittleness in scripts.

@Steinar @hund interesting that shellcheck catches the unquoted $icon, but not the $img or $1. Flagging the unquoted $1 would be more important because that's populated by external input.

Sign in to participate in the conversation
Mastodon 🔐 privacytools.io

Fast, secure and up-to-date instance. PrivacyTools provides knowledge and tools to protect your privacy against global mass surveillance.

Website: privacytools.io
Matrix Chat: chat.privacytools.io
Support us on OpenCollective, many contributions are tax deductible!