summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Jonsson <olle.jonsson@gmail.com>2021-05-20 23:04:54 +0200
committerGitHub <noreply@github.com>2021-05-20 23:04:54 +0200
commit5f07ab264eeff21124188eb471368eddf6fd3439 (patch)
tree6e4688418a150537f6d829a2dbbc62b724a6c591
parentda257162d78b27aa18ec156e85c9cf848d9ebf97 (diff)
downloadslop-5f07ab264eeff21124188eb471368eddf6fd3439.tar.gz
README: Clarify how to enter an empty array (#267)
* README: Clarify how to enter an empty array [ci skip]
-rw-r--r--README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 7e8223a..cc0e956 100644
--- a/README.md
+++ b/README.md
@@ -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