split_shell: use @example

This commit is contained in:
Starbeamrainbowlabs 2024-10-17 00:34:42 +01:00
parent 1677c68a7b
commit a06136812f
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -32,7 +32,7 @@ end
-- - Unclosed quotes are treated as lasting until the end of the string. -- - Unclosed quotes are treated as lasting until the end of the string.
-- - Empty arguments (i.e., consecutive whitespaces) are ignored. -- - Empty arguments (i.e., consecutive whitespaces) are ignored.
-- --
-- Examples: -- @example Different sample inputs / output pairs
-- split_shell("arg1 arg2 arg3") --> {"arg1", "arg2", "arg3"} -- split_shell("arg1 arg2 arg3") --> {"arg1", "arg2", "arg3"}
-- split_shell("arg1 \"arg2 with spaces\" arg3") --> {"arg1", "arg2 with spaces", "arg3"} -- split_shell("arg1 \"arg2 with spaces\" arg3") --> {"arg1", "arg2 with spaces", "arg3"}
-- split_shell("arg1 'arg2\\'s value' arg3") --> {"arg1", "arg2's value", "arg3"} -- split_shell("arg1 'arg2\\'s value' arg3") --> {"arg1", "arg2's value", "arg3"}