Closed klausi closed 1 week ago
Problem: For me it is harder to read when a shell command starts immediately after the $ sign. Example:
$
$export DEBIAN_FRONTEND=noninteractive$? $apt update$? $yes '' | apt \ -o Dpkg::Options::=--force-confold \ -o Dpkg::Options::=--force-confdef \ -y --allow-downgrades --allow-remove-essential \ --allow-change-held-packages \ upgrade$? $apt autoremove -y$? $snap refresh --color=never --unicode=never$?
This reads dense for me visually.
Proposed solution: use a coding standard of 1 space after/before the $ sign. Example:
$ export DEBIAN_FRONTEND=noninteractive $? $ apt update $? $ yes '' | apt \ -o Dpkg::Options::=--force-confold \ -o Dpkg::Options::=--force-confdef \ -y --allow-downgrades --allow-remove-essential \ --allow-change-held-packages \ upgrade $? $ apt autoremove -y $? $ snap refresh --color=never --unicode=never $?
Much better, I can see the actual commands better!
What do you think?
We could add such linting option or produce warnings if command is not padded with spaces from left and right. What do you think everyone?
Problem: For me it is harder to read when a shell command starts immediately after the
$
sign. Example:This reads dense for me visually.
Proposed solution: use a coding standard of 1 space after/before the
$
sign. Example:Much better, I can see the actual commands better!
What do you think?