-
Notifications
You must be signed in to change notification settings - Fork 0
contrib
XADE edited this page Dec 10, 2023
·
1 revision
go through the documentation.
go through the script.
- I've tried my best to explain it with the help of comments & kept it simple.
- only spaces, no tabs.
- no eval.
- always run
shellcheck
. - use
$(cmd)
instead of`cmd`
. - script should remain posix (sh) compliant.
- use explicit path
./dir
instead ofdir
. - run
shfmt -i 2 -ci -bn -s -p -w
to format the script. - script must remain readable and simple.
- no loss in flexibility and options.
- users choice should be prioritized.
- (I know this is stupid but) no conditional statements for now, but conditional operators can definitely be used.
- avoid
set
, using someone else's rule set for own script is a bad practice. Instead create your rules yourself this will definitely increase the size of code but output will also be definite. check this