unibi_get_aliases(3)

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

okay so this is a page from the unibilium manual, section 3, and we're talking about the <rainbow>unibi_get_aliases</rainbow> family. strap in, it's actually so cute.


✨ NAME ✨

unibi_get_aliases, unibi_set_aliases β€” the way to get at (and set!) the aliases of a terminal object πŸŽ€


✨ SYNOPSIS ✨

#include <unibilium.h>

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

like, look at those signatures. so clean. so iconic. πŸ’…


✨ DESCRIPTION ✨

okay bestie, here's the tea πŸ“

unibi_get_aliases returns the list of aliases from ut. unibi_set_aliases sets it to v. and the format of this list? it's literally just like argv β€” a null-terminated vector of strings. same energy, no cap. 🫢

and where does the contents of this list even come from? 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 β€” she's the main character, obviously. πŸ‘‘

lowkey important: the last part of the name section can be more verbose, and that bit is NOT stored in the aliases list. if you want it, you gotta go get it with unibi_get_name. iykyk. πŸ™ˆ

⚠️ and now the serious part, bestie, listen up β€” 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). not a single copy. none. so if you free that memory later, you are on your own, fr fr. πŸ’€

✨ RETURN VALUE ✨

unibi_get_aliases returns a pointer to a null-terminated vector of strings. that's the whole vibe. ⭐


✨ SEE ALSO ✨

go read those too, they're all part of the same little friend group πŸ¦‹πŸŒΈ


okay that's the whole page!! this was unibilium-2.1.4, dated 2026-09-07, and honestly? she ate. mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from