Better way to indent gmt examples: use "if gmt" #7614
Closed
jidanni
started this conversation in
Documentation development discussion
Replies: 1 comment
-
Absolutely NO WAY. GMT scripts are supposed to run on Windows as well. |
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
-
In e.g., the cookbook, we often see examples indented like
Well, I have found a way to achieve similar indentation, that is
consistent with all shell script formatters. My new indentation method
can survive multiple runs through such pretty programs intact.
The above should be rewritten:
In fact my solution is so brilliant I think the entire cookbook should
be rewritten using it!
Tested with emacs' Shell-script mode using C-x h TAB.
Anyway: no need to teach the formatters anything special. It just works. Also it is good for you:
yes, you could do "set -ue" to catch more errors, but if
gmt
fails,there is no pointit is just plain dangerous doing the stuff between the
then
...fi
anyway.Beta Was this translation helpful? Give feedback.
All reactions