diff options
author | Olle Jonsson <olle.jonsson@gmail.com> | 2021-05-20 23:04:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 23:04:54 +0200 |
commit | 5f07ab264eeff21124188eb471368eddf6fd3439 (patch) | |
tree | 6e4688418a150537f6d829a2dbbc62b724a6c591 /README.md | |
parent | da257162d78b27aa18ec156e85c9cf848d9ebf97 (diff) | |
download | slop-5f07ab264eeff21124188eb471368eddf6fd3439.tar.gz |
README: Clarify how to enter an empty array (#267)
* README: Clarify how to enter an empty array
[ci skip]
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -135,9 +135,11 @@ opts = Slop.parse do |o| o.array '--files', 'a list of files', delimiter: ',' end -# both of these will return o[:files] as ["foo.txt", "bar.rb"]: +# Both of these will return o[:files] as ["foo.txt", "bar.rb"]: # --files foo.txt,bar.rb # --files foo.txt --files bar.rb +# This will return o[:files] as []: +# --files "" ``` If you want to disable the built-in string-splitting, set the delimiter to |