Open Artoria2e5 opened 9 years ago
The current typeof
doesn't recurse into levels of references, so a recursive version is also needed.
[TG @JeffBai] @MingcongBai Updated read
trick. Can be slow.
Looks like I forgot all the opts in official_builds…
To-morrow, to-morrow, to-morrow!
In our code, multiple stuffs that should be arrays (e.g. damn flags) are stored as strings, causing undesired results sometime, especially with param expansions.
Basic compatibility for data patterns can be achived in such way:
However, commands cannot return arrays. All they can do are strings. Fortunately, we have
\0
:Or we will make all array-like outputting functions to put their output into a certain
$_ab_tmp_arr
, or usedeclare -n
directives.