eshell-apply-indices

eshell-apply-indices is a compiled Lisp function in `esh-var.el'.

(eshell-apply-indices VALUE INDICES)

Apply to VALUE all of the given INDICES, returning the sub-result.
The format of INDICES is:

((INT-OR-NAME-OR-OTHER INT-OR-NAME INT-OR-NAME ...)
...)

Each member of INDICES represents a level of nesting. If the first
member of a sublist is not an integer or name, and the value it's
reference is a string, that will be used as the regexp with which is
to divide the string into sub-parts. The default is whitespace.
Otherwise, each INT-OR-NAME refers to an element of the list value.
Integers imply a direct index, and names, an associate lookup using
`assoc'.

For example, to retrieve the second element of a user's record in
'/etc/passwd', the variable reference would look like:

${egrep johnw /etc/passwd}[: 2]