VECARGS(3)
β¨ NAME β¨
vecargs β command argument vector insertion routines. That's the whole name vibe, bestie π
πΈ SYNOPSIS πΈ
#include <vecargs.h>
char** vecload(char* string); char** vecfile(const char* path); char** vecstring(const char* string); void vecfree(char**, int); int vecargs(char** vec, int* argcp, char*** argvp);
π DESCRIPTION π
okay so welcome to the VECARGS(3) page from the Library Functions Manual β it's literally all about string vectors and slipping args into your command's argv. Let's go function by function, no cap. π«Ά
vecloadβ loads a string vector from lines instring. Heads up:stringmay be modified upon return. Each line instringis treated as a new vector element. Lines with#as the first character are comments.\newlinejoins consecutive lines. It returns a string vector pointer, or0on error. β¨vecfileβ constructs a string vector by callingvecloadon the contents of the file named bypath. Returns the string vector pointer, or0on error. πvecstringβ constructs a string vector by callingvecloadon a copy ofstring. Returns the string vector pointer, or0on error. π¦vecfreeβ frees a string vector allocated byvecfile,vecloadorvecstring. Cleanup icon behavior, honestly. π§vecargsβ inserts the string vectorvec(as returned byvecfile,vecloadorvecstring) between(*argvp)[0]and(*argvp)[1], sliding(*argvp)[1]... over.NULLand empty string args invecare not copied.vecfree(vec)is called before the return. Returns-1if the insertion failed. π
π¦ EXAMPLES π¦
vecargs is commonly used to modify command argv from fixed files. For example, make(1) checks for the files ./Makeargs and ./makeargs to modify its arguments on startup. It's a handy way to override default options on a directory by directory basis without modifying the standard control files (Makefile in this case). π₯
π CAVEATS π
This paradigm is not recommended for all commands; only a few exceptions make sense. So like, don't go wild with it, bestie β it's a special-case slay, not a universal vibe. π
and that's the whole page, bestie! π«Ά this was VECARGS(3) from the Library Functions Manual β there's no date listed on this one, so we're not inventing one. stay iconic and may your vectors always insert cleanly π β¨π
π¦ where this page comes from
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- opensuse-leap 16.0: ksh-devel 93vu-bp160.1.33 Β· CPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms