/** * less-compatible environment lookup. * * less searches local lesskey variables first, then the real process * environment, then system lesskey variables. LESSNOCONFIG filters every * lookup except the raw TERM/POSIXLY_CORRECT/platform probes which call * `actualEnv` explicitly. */ /** A library caller's own value for a variable, if it set one. */ export declare function sessionEnv(name: string): string | undefined; /** * True when the CALLER supplied this variable, rather than it coming * from the ambient process environment. The overlay is the embedding * application's own configuration, so it can be trusted with choices * the surrounding shell cannot be. */ export declare function fromSessionEnv(name: string): boolean; /** Installs (or clears) a library call's environment overlay. */ export declare function setSessionEnv(vars: Record | null): void; /** Starts a fresh invocation before lesskey tables are loaded. */ export declare function initEnvironment(): void; /** Clears only lesskey-provided values, used by isolated parser tests. */ export declare function resetLesskeyEnvironment(): void; /** Adds one #env value to the matching lesskey table. */ export declare function setLesskeyEnv(name: string, value: string, system?: boolean): void; /** Removes a broken value from the matching lesskey table. */ export declare function deleteLesskeyEnv(name: string, system?: boolean): void; /** Reads the unfiltered process environment, like less's direct * getenv calls. */ export declare const actualEnv: (name: string) => string | undefined; /** * Reads less's ladder alone: user lesskey #env, then the real process * environment, then system lesskey #env, then the compiled defaults. * * This is what the ENVIRONMENT says with the caller's overlay taken * away, so it is the view policy must be read through. A deployment * hardens a session through any of these tiers - $LESS in the parent * shell, or a #env line in ~/.lesskey - and a library caller may * tighten what it finds here but never relax it. */ export declare function ambientEnv(name: string): string | undefined; /** * Reads a less environment value with user > process > system precedence. * Empty real-environment values are absent, while an empty lesskey value * remains a winning table entry just like cmd_decode(EV_OK). */ export declare function lgetenv(name: string): string | undefined; /** TERM uniquely falls back to real getenv even under LESSNOCONFIG. */ export declare const terminalEnv: () => string | undefined; /** Integer lookup with less's atoi-style invalid fallback. */ export declare function envInteger(name: string, fallback: number): number; /** Positive millisecond option, preserving the compiled default otherwise. */ export declare function envDelay(name: string, fallback: number): number; /** True during less's initial no-poll screen-fill grace period. */ export declare function screenFillGrace(): boolean;