File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -809,8 +809,16 @@ mybinary ${flags}
809809# Command expansions return single strings, not arrays. Avoid
810810# unquoted expansion in array assignments because it won’t
811811# work correctly if the command output contains special
812- # characters.
812+ # characters or whitespace.
813+
814+ # This expands the listing output into a string, then does special keyword
815+ # expansion, and then whitespace splitting. Only then is it turned into a
816+ # list of words. The ls command may also change behavior based on the user's
817+ # active environment!
813818declare -a files=($( ls /directory) )
819+
820+ # The get_arguments writes everything to STDOUT, but then goes through the
821+ # same expansion process above before turning into a list of arguments.
814822mybinary $( get_arguments)
815823` ` `
816824
You can’t perform that action at this time.
0 commit comments