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
wordexp. 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_DOOFFSin the first call to
wordexp, you must also set it when you append to the results.
we_offsfield says how many slots to leave. The blank slots contain null pointers.
wordexp. Instead of allocating a new vector of words, this call to
wordexpwill 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_pathvanew after each call.
wordexpgives these commands a standard error stream that discards all output.
Go to the first, previous, next, last section, table of contents.