diff options
author | David Paleino <d.paleino@gmail.com> | 2009-10-10 17:15:58 +0200 |
---|---|---|
committer | David Paleino <d.paleino@gmail.com> | 2009-10-10 17:15:58 +0200 |
commit | e5a9b6220e93ca656fd9774c6aefa78241edca6f (patch) | |
tree | 4a65aa19b18fe2e8dcec24a1c97ce9746a6f91ff /README | |
parent | 96d00c3d7f1912d4f3f76f8ea21ef68d179b8b30 (diff) | |
download | bash-completion-e5a9b6220e93ca656fd9774c6aefa78241edca6f.tar.gz |
Imported Upstream version 1.1upstream/1.1
Diffstat (limited to 'README')
-rw-r--r-- | README | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -450,6 +450,16 @@ guidelines in mind: These forms of parameter substitutions can also be used on arrays, which makes them very powerful (if a little slow). +- Prefer "compgen -W '...' -- $cur" over embedding $cur in external + command arguments (often e.g. sed, grep etc) unless there's a good + reason to embed it. Embedding user input in command lines can + result in syntax errors and other undesired behavior, or messy + quoting requirements when the input contains unusual characters. + Good reasons for embedding include functionality (if the thing + does not sanely work otherwise) or performance (if it makes a big + difference in speed), but all embedding cases should be documented + with rationale in comments in the code. + - Do not write to the file-system under any circumstances. This can create race conditions, is inefficient, violates the principle of least surprise and lacks robustness. |