diff options
author | aehlig <aehlig@google.com> | 2017-07-18 16:25:46 +0200 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2017-07-19 10:19:11 +0200 |
commit | 672510ebbace33eb62ac36b0f9985e6f696b6c9e (patch) | |
tree | b6e664bd53b0dbaf06a282a8dbee1a400a83fc47 /scripts/generate_bash_completion.sh | |
parent | 5518ce1f0d9a5a12dbf54ba3a6bc2e10d1cae979 (diff) |
generate_bash_completion.sh: add explict end-of-options for expr
Some implementations of expr(1) get confused if the first argument
is not an option argument but starts with a minus sign. To make this
script more portable, add an explict '--' argument, signaling "end of
options", which seems to be understood by most implementations.
PiperOrigin-RevId: 162349479
Diffstat (limited to 'scripts/generate_bash_completion.sh')
-rwxr-xr-x | scripts/generate_bash_completion.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/generate_bash_completion.sh b/scripts/generate_bash_completion.sh index 83851e39ff..3166def23a 100755 --- a/scripts/generate_bash_completion.sh +++ b/scripts/generate_bash_completion.sh @@ -34,7 +34,7 @@ die() { } get_optarg() { - expr "${1}" : "[^=]*=\\(.*\\)" + expr -- "${1}" : "[^=]*=\\(.*\\)" } append= |