Skip to content

Commit 4130f5b

Browse files
authored
typo and describe -G mode with -- and -
Add explanation on `-G` with double-dash and single-dash
1 parent ccd24b6 commit 4130f5b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,17 @@ produce output suitable for bash `eval(1)` but can be parsed by your own
6565
code. Double-dash `--` will be kept.
6666

6767
`-G` is a variant of Global mode, which prefixes the globals mangled named with
68-
`<prefix>` + `_` + `Mangled_name`.
68+
`<prefix>` + `_` + `Mangled_name`. In this mode double-dash `--` and single-dash
69+
`-` will be kept and will be mangled.
6970

7071
* `--Long-Option` ==> `prefix_Long_Option`
71-
* etc.
72+
* `--` ==> `prefix___`
73+
* `-` ==> `prefix__`
7274

7375
Note that prefixed invalid mangled names still raise an error, if they resolve to
7476
invalid bash identifier.
7577

76-
Prefix gobals variable makes it easy to filter variable with `grep` or such or to
78+
Prefix gobals variable makes it easy to filter variable with `grep` or such, or to
7779
avoid globals name collision.
7880

7981
Handling `[-]` in global mode is not supported and raises an error when trying to mangle `-`.
@@ -118,12 +120,12 @@ they are faked for repeatable arguments with the following access syntax:
118120
${args[ARG,1]} # the second argument to ARG, etc.
119121
```
120122

121-
Associative mode don't skipp double-dash `--` it will be part of the keys
123+
Associative mode don't skip double-dash `--` it will be part of the keys
122124
as boolean value present or not.
123125

124126
### How arguments are associated to variables
125127

126-
What ever output mode hase been selected.
128+
What ever output mode has been selected.
127129

128130
The arguments are stored as follows:
129131

0 commit comments

Comments
 (0)