@EXECARRAY[array,command] : Execute the specified command and store the resulting lines in the specified array variable. The array must be one-dimensional.

 

You must define the array before running @EXECARRAY. For example:

 

PROMPT=%@exec[@color 15 on %@if[%@removable[%_disk] eq 0,2,4] & echos [%_cwd%] & color 11 on 0]$s

 

@EXECARRAY will read the number of lines specified in the array size definition, or the number of lines in the command output (whichever is less). @EXECARRAY returns the return value of the command.

 

The number of lines stored in the array is saved in the _EXECARRAY internal variable.