forked from spf13/cobra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(bash-v2): various cleanups (spf13#1702)
* use arithmetic evaluation in numeric context * remove unnecessary $ from array index variables * [[ ]] over [ ], == over =, remove unnecessary quoting * use ${foo-} rather than ${foo:-} in emptiness check The result of the expansion is null no matter if the variable is unset or null in both cases; the former form is arguably easier on the eye. * remove unnecessary trailing linefeed removal No longer needed as of f464d6c, saves a subshell. * use herestring in activehelp extraction Herestrings read cleaner than process substitutions, and work in posix mode (but we do and will have some process substitutions so this doesn't matter much). Both approaches may end up using temporary files.
- Loading branch information
Showing
1 changed file
with
25 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters