From 30f821c8f42176eea1110f883cb24622dfde66aa Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 27 Sep 2020 21:04:19 +0200 Subject: [PATCH] Fix example in string length docs Technically the equivalence would be something like string length -q $str test -n (string join \n -- $str | string collect) To handle when str has multiple empty strings; but quoting is easier to remember and enough for most practical purposes. --- doc_src/cmds/string-length.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_src/cmds/string-length.rst b/doc_src/cmds/string-length.rst index d5a9ca359..1cb84058e 100644 --- a/doc_src/cmds/string-length.rst +++ b/doc_src/cmds/string-length.rst @@ -34,6 +34,6 @@ Examples >_ set str foo >_ string length -q $str; echo $status 0 - # Equivalent to test -n $str + # Equivalent to test -n "$str" .. END EXAMPLES