From 5f07ab264eeff21124188eb471368eddf6fd3439 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Thu, 20 May 2021 23:04:54 +0200 Subject: README: Clarify how to enter an empty array (#267) * README: Clarify how to enter an empty array [ci skip] --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1