wordexp.h(7POSIX)
π wordexp.h(7POSIX) β word-expansion types π
okay bestie, so this page is from the POSIX Programmer's Manual, and we're talking about wordexp.h β the header that holds all the word-expansion types. π
Quick heads-up before we dive in: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so pls consult the corresponding Linux manual page for the deets on Linux behavior), or the interface may not be implemented on Linux at all. π
β¨ NAME β¨
wordexp.h β word-expansion types
π¦ SYNOPSIS π¦
#include <wordexp.h>
πΈ DESCRIPTION πΈ
The <wordexp.h> header shall define the structures and symbolic constants used by the wordexp() and wordfree() functions. periodt.
π«Ά the struct (it's giving main character)
The <wordexp.h> header shall define the wordexp_t structure type, which shall include at least the following members:
size_t we_wordc Count of words matched by words.
char **we_wordv Pointer to list of expanded words.
size_t we_offs Slots to reserve at the beginning of we_wordv.
π the flags
The <wordexp.h> header shall define the following symbolic constants for use as flags for the wordexp() function:
WRDE_APPENDβ Append words to those previously generated.WRDE_DOOFFSβ Number of null pointers to prepend towe_wordv.WRDE_NOCMDβ Fail if command substitution is requested.WRDE_REUSEβ The pwordexp argument was passed to a previous successful call towordexp(), and has not been passed towordfree(). The result is the same as if the application had calledwordfree()and then calledwordexp()withoutWRDE_REUSE.WRDE_SHOWERRβ Do not redirectstderrto/dev/null.WRDE_UNDEFβ Report error on an attempt to expand an undefined shell variable.
π the error return values
The <wordexp.h> header shall define the following symbolic constants as error return values:
WRDE_BADCHARβ One of the unquoted charactersβ<newline>,'|','&',';','<','>','(',')','{','}'βappears in words in an inappropriate context.WRDE_BADVALβ Reference to undefined shell variable whenWRDE_UNDEFis set in flags.WRDE_CMDSUBβ Command substitution requested whenWRDE_NOCMDwas set in flags.WRDE_NOSPACEβ Attempt to allocate memory failed.WRDE_SYNTAXβ Shell syntax error, such as unbalanced parentheses or unterminated string.
π§ size_t moment
The <wordexp.h> header shall define the size_t type as described in <stddef.h>.
β the functions
The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.
int wordexp(const char *restrict, wordexp_t *restrict, int);
void wordfree(wordexp_t *);
The following sections are informative. (iykyk β¨)
π APPLICATION USAGE π
None. literally nothing. iconic of her tbh.
π RATIONALE π
None.
π FUTURE DIRECTIONS π
None.
π SEE ALSO π
<stddef.h>- The System Interfaces volume of POSIX.1β2017, Section 2.6, Word Expansions
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole vibe check, bestie π this page came to you courtesy of IEEE/The Open Group, dated 2017, filed under wordexp.h(7POSIX) β slay, ate, no crumbs, periodt. π«Άβ¨
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms