diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-09 23:28:11 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-09 23:28:11 +0200 |
| commit | 3b8ef29ef34d7ea009faca1a35023b454ab2dce1 (patch) | |
| tree | 0924cf066806adb3aa7d7b9dcd7f35303292f897 /doc | |
| parent | 1d48f79b9c6a9b9e9044741d300ded461d765135 (diff) | |
| download | bash-completion-3b8ef29ef34d7ea009faca1a35023b454ab2dce1.tar.gz | |
Cleanups: Use [[ instead of [.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/styleguide.txt | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/doc/styleguide.txt b/doc/styleguide.txt index 76b616ef..0f7ec254 100644 --- a/doc/styleguide.txt +++ b/doc/styleguide.txt @@ -29,13 +29,8 @@ doesn't confuse editors as bad as the latter, and is concise enough. [[ ]] vs [ ] ---------------- -Use [[ ]] instead of [ ] when testing multiple conditions. [ ] is fine -for single conditions where the syntax works. Rationale: [[ ]] has -short circuit behavior within one test containing multiple conditions -separated by && or ||, while [ ] with -a or -o does not. Thus it can -be more efficient in some cases and may reduce need for nesting -conditions, and it's cleaner to write for example [[ ... && ... ]] -than [ ... ] && [ ... ], and in general [[ ]] has more features. +Always use [[ ]] instead of [ ]. Rationale: the former is less error +prone, more featureful, and slightly faster. Line wrapping ------------- |
