unibi_set_aliases(3)

πŸ’– unibi_set_aliases β€” bestie edition πŸ’–

okay so this is unibi_set_aliases(3) from the unibilium manual, and we're about to get so acquainted with it, no cap ✨


🌸 NAME 🌸

unibi_get_aliases</p>, unibi_set_aliases</p> β€” the way that these two literally just access the aliases of a terminal object πŸŽ€ that's it, that's the job, and they do it flawlessly


✨ SYNOPSIS ✨

#include <unibilium.h>

const char **unibi_get_aliases(const unibi_term *ut);
void unibi_set_aliases(unibi_term *ut, const char **v);

look at that signature. iconic. no notes. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

unibi_get_aliases</p> hands you the list of aliases from ut, and unibi_set_aliases</p> sets that list to v. and the format of this list? it's giving argv energy fr fr β€” a null-terminated vector of strings. that's the whole vibe check.

where does this list even come from, you ask? πŸ‘€ it comes from the ('|'-separated) name section in terminfo entries. it's supposed to be a list of lowercase words or abbreviations that refer to this terminal, and the first one is the most common name. main character energy for the first string only, basically. πŸ‘‘

and lowkey important: the last part of the name section can be more verbose, and it is not stored in the aliases list. if you want that one you gotta go get it with unibi_get_name instead. different lane, different function, iykyk.

🫢 okay bestie, real talk for a sec, this next bit matters: unibi_set_aliases simply stores the pointer it is given. it will not free v, and it will not make a copy of it β€” or of any of the strings it points to. so like, that pointer is yours now. the memory is your problem. don't be out here freeing things twice, I'm begging 😭

πŸ’œ RETURN VALUE πŸ’œ

unibi_get_aliases</p> returns a pointer to a null-terminated vector of strings. slay. that's the whole return value. 🌈


πŸŽ€ SEE ALSO πŸŽ€


and that's the page!! mwah πŸ’– this was unibilium-2.1.4, dated 2026-09-07, from the unibi_set_aliases(3) manual β€” go forth and alias responsibly, bestie πŸ§šπŸŒΈπŸ’…

πŸ“¦ where this page comes from