Message ID | 20211130204333.174967-1-greenfoo@u92.eu (mailing list archive) |
---|---|
Headers | show |
Series | vimdiff: new implementation with layout support | expand |
On Tue, Nov 30, 2021 at 3:43 PM Fernando Ramos <greenfoo@u92.eu> wrote: > * Use "$" inside arithmetic expressions $((...)) > NOTE: "shellcheck" issues a warning stating that "$" is not needed inside > arithmetic expressions. Just a side note: I understand that [1] recommended adding the "$" inside arithmetic expressions, but by chance I happened to be browsing the history of CodingGuidelines and ran across 32b5fe7f0e (CodingGuidelines: drop arithmetic expansion advice to use "$x", 2020-05-04) which dropped[2] the recommendation to use "$" inside the expression. Anyhow, certainly not worth a re-roll. By the way, since you've removed Bashisms, do you still need the `#!/bin/bash` at the top of the script? [1]: https://lore.kernel.org/git/CAJDDKr5KZK3wpox6FJPOL9koPr=k5+qTzZtPPFEmg4iZsvwoog@mail.gmail.com/ [2]: https://lore.kernel.org/git/20200504160709.GB12842@coredump.intra.peff.net/
On 21/12/01 12:03AM, Eric Sunshine wrote: > Just a side note: I understand that [1] recommended adding the "$" > inside arithmetic expressions, but by chance I happened to be browsing > the history of CodingGuidelines and ran across 32b5fe7f0e > (CodingGuidelines: drop arithmetic expansion advice to use "$x", > 2020-05-04) which dropped[2] the recommendation to use "$" inside the > expression. Anyhow, certainly not worth a re-roll. I don't mind preparing a v4 with this change. I also think it makes the code cleaner. I'll do that :) > By the way, since you've removed Bashisms, do you still need the > `#!/bin/bash` at the top of the script? Good catch. Will do. I'll wait a few more days for extra comments and prepare a v4 with these changes. Thanks for the suggestions.