Commit 2839ee24 authored by Emeric Verschuur's avatar Emeric Verschuur

Update README.md

parent d0b40e7b
......@@ -91,7 +91,7 @@ bashopts_process_args
- All other command (other than argument beginning by '-' or '--') are stored into the ```bashopts_commands``` bash array. You can iterate by ```for command in ${bashopts_commands[@]}; do ...; done```
- All extra arguments (```mytool --arg1 --arg2 cmd1 cmd2 -- --extra-arg1 --extra-arg2 ...```) are stored into the ```bashopts_extra_args``` bash array.
- If the argument value is empty (e.g.: --long-arg "") the value is unset (also usefull to clear an array)
- To add several default value for an array, add: bashopts_declare -e '("value 1" "value 2" "... etc.")'
- To add several default values for an array, add: bashopts_declare -e '("value 1" "value 2" "... etc.")'
## Example
......@@ -151,7 +151,7 @@ OPTIONS:
-l,--last "Smith" Last name - [$last_name] (type:string, default:"")
--display-name "John Smith" Display name - [$display_name] (type:string, default:"$first_name $last_name")
--number 0 Age - [$age] (type:number, default:0)
--email [""] Email adress - [$email_list] (type:string, default:"")
--email Email adress - [$email_list] (type:string, default:"")
```
Test with arguments:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment