Replies: 1 comment
-
For your last two questions, see #544. There is no planned feature or option to allow multiple commands with semicolons per line. Regarding line length, see #80. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to prevent semicolon from splitting lines? I have:
bin="$(tput bold; tput setaf 2)${0##*/}$(tput sgr0)"
which I find is preferable to the
shfmt
ed:because 1) even with the semicolons, it's shorter, 2) usually with variables with tput, it's not so important that each (tput) command warrants its own line and IMO having them on the same line is more intuitive to suggest the string it's styling is wrapped by styling, kind of like
printf '---%s---' "word "
. Even bettershfmt
splits only when the existing line is >80 chars and don't format when it's <=80 chars.Are there any options that take into account of width of line like >80 chars?
shfmt
formatscat > "$prof_path <<EOF
tocat >"$prof_path <<EOF
but the space after>
makes it easier to read. In Bash, why is the convention to remove the space as in>/dev/null
that I often see preferable to> /dev/null
?Similarly, is it possible to enforce 1 space in arrays e.g. prefer
arr=( "itema" "itemb" )
instead of removing the spacearr=("itema" "itemb")
?Much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions