mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Merge pull request #544 from google/change_HEAD
Project import generated by Copybara.
This commit is contained in:
commit
43f20c3611
|
@ -809,8 +809,16 @@ mybinary ${flags}
|
||||||
# Command expansions return single strings, not arrays. Avoid
|
# Command expansions return single strings, not arrays. Avoid
|
||||||
# unquoted expansion in array assignments because it won’t
|
# unquoted expansion in array assignments because it won’t
|
||||||
# work correctly if the command output contains special
|
# work correctly if the command output contains special
|
||||||
# characters.
|
# characters or whitespace.
|
||||||
|
|
||||||
|
# This expands the listing output into a string, then does special keyword
|
||||||
|
# expansion, and then whitespace splitting. Only then is it turned into a
|
||||||
|
# list of words. The ls command may also change behavior based on the user's
|
||||||
|
# active environment!
|
||||||
declare -a files=($(ls /directory))
|
declare -a files=($(ls /directory))
|
||||||
|
|
||||||
|
# The get_arguments writes everything to STDOUT, but then goes through the
|
||||||
|
# same expansion process above before turning into a list of arguments.
|
||||||
mybinary $(get_arguments)
|
mybinary $(get_arguments)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user