Thread (9 messages) flat view 9 messages, 6 authors, 2016-06-15

Shell script cleanups/style changes?

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:25

Hi, I wanted to ask what the general stance towards shell script
cleanups and simplifications would be.  For example, I find the expr
usage quite inscrutable in commit, and there is no necessity of
putting "shift" in every case branch instead of once behind it, and a
lot of conditionals and other manipulations can be made much easier on
the eye by using parameter expansion patterns that are, as far as I
can see, available with every reasonable Bourne Shell and clones.

Here is an example context diff (in this case, I find it more readable
than unified) to illustrate (untested!, please don't apply without a
regular formatted git patch).

Should I bother doing such cleanups as I read up on code, or should I
just leave things alone?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help