unibi_from_term(3)

✨ unibi_from_term ✨

okay bestie, welcome to the unibilium corner of the man pages, section 3 πŸŽ€ this one's called unibi_from_term, and it's literally the little function that goes and finds the terminfo entry for a terminal by name. no biggie. just a whole scavenger hunt for terminal definitions πŸ¦‹


🌸 NAME 🌸

unibi_from_term β€” read a terminfo entry for a named terminal πŸ’…


🫢 SYNOPSIS 🫢

#include <unibilium.h>

unibi_term *unibi_from_term(const char *name);

like. that's it. that's the whole vibe. one include, one function, one const char *name and she's off πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so what this does is: it locates the terminfo file for name, and then it hands things over to unibi_from_file. that's the whole plot. the drama is entirely in where she goes looking πŸ”βœ¨

and the search order is, in order, no skipping, no shuffling:

  1. if the environment variable TERMINFO is set, it gets interpreted as the name of the directory to search for local terminal definitions β€” and it checks there before checking in the standard place. so like, local first, bestie. always local first 🏠
  2. otherwise, $HOME/.terminfo gets tried. your own little personal stash of terminal definitions πŸ’œ
  3. if that was not successful and TERMINFO_DIRS is set, it gets interpreted as a colon-separated list of directories to search. colon-separated!! plural!! a whole list of places to check πŸ—ΊοΈ
  4. if TERMINFO_DIRS is not set, then a compiled-in fallback called unibi_terminfo_dirs is used instead. the built-in backup plan. the safety net. the "don't worry babe I got you" of it all 🧚
not me listing all four steps in exact order because the order is literally the entire point of this function 😭 don't reorder them, that's not a vibe, that's a bug.

⭐ RETURN VALUE ⭐

see unibi_from_file(3). yeah she's delegating again. the return value lore lives over there, go read that one, I'll wait 🫢


🌈 SEE ALSO 🌈


and that's the whole page, periodt πŸ’… this was unibilium-2.1.4, dated 2026-09-07, brought to you by the unibi_from_term(3) girlies. go find your terminals, bestie, you got this πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from