wordexp.h(0P)
β¨ wordexp.h β¨
okay bestie, sit down, we're doing a POSIX header today and honestly? it's giving adorable. This is the manual page for wordexp.h from the POSIX Programmer's Manual, section 0P. π
π«Ά PROLOG
So like, real talk: this manual page is part of the POSIX Programmer's Manual. But heads up β the Linux implementation of this interface may differ (so go check the corresponding Linux manual page for the actual Linux behavior), or honestly the interface may not be implemented on Linux at all. π No cap.
πΈ NAME
wordexp.h β word-expansion types. that's it. that's the whole vibe. π
β¨ SYNOPSIS
#include <wordexp.h>
π DESCRIPTION
The <wordexp.h> header shall define the structures and symbolic constants used by the wordexp() and wordfree() functions. iconic behavior, honestly. π
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.
look at her. three whole members. main character energy fr fr.
π the flags (symbolic constants for wordexp())
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. she said NO command substitution, periodt.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. (it's giving "reset, but make it automatic")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. π the malloc said no.WRDE_SYNTAXβ Shell syntax error, such as unbalanced parentheses or unterminated string. (unterminated string bestie... we've all been there)
π the types n' prototypes
The <wordexp.h> header shall define the size_t type as described in <stddef.h>. π¦
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 *);
two functions. one pointer-to-restrict, one void, no drama. slay. β¨
the following sections are informative β aka, the β¨bonus contentβ¨
π APPLICATION USAGE
None. literally none. nothing to see here bestie. π
πΈ RATIONALE
None. also nothing. she's mysterious like that. π
π§ FUTURE DIRECTIONS
None. the future is... unchanged, apparently. β
π 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 page, bestie!! πβ¨ this one came to you from IEEE/The Open Group, dated 2017, and it lives at wordexp.h(0P). love her, study her, expand some words responsibly. mwah ππ«Άπ
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms