aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/generate_bash_completion.sh
diff options
context:
space:
mode:
authorGravatar aehlig <aehlig@google.com>2017-07-18 16:25:46 +0200
committerGravatar Klaus Aehlig <aehlig@google.com>2017-07-19 10:19:11 +0200
commit672510ebbace33eb62ac36b0f9985e6f696b6c9e (patch)
treeb6e664bd53b0dbaf06a282a8dbee1a400a83fc47 /scripts/generate_bash_completion.sh
parent5518ce1f0d9a5a12dbf54ba3a6bc2e10d1cae979 (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-xscripts/generate_bash_completion.sh2
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=