Next: Wordexp Example, Previous: Calling Wordexp, Up: Word Expansion
This section describes the flags that you can specify in the
flags argument to wordexp. Choose the flags you want,
and combine them with the C operator |.
WRDE_APPENDwordexp. This way you can effectively expand
several words as if they were concatenated with spaces between them.
In order for appending to work, you must not modify the contents of the
word vector structure between calls to wordexp. And, if you set
WRDE_DOOFFS in the first call to wordexp, you must also
set it when you append to the results.
WRDE_DOOFFSwe_offs field says how many slots to leave.
The blank slots contain null pointers.
WRDE_NOCMDWRDE_REUSEwordexp.
Instead of allocating a new vector of words, this call to wordexp
will use the vector that already exists (making it larger if necessary).
Note that the vector may move, so it is not safe to save an old pointer
and use it again after calling wordexp. You must fetch
we_pathv anew after each call.
WRDE_SHOWERRwordexp gives these
commands a standard error stream that discards all output.
WRDE_UNDEF