import { type Dialect } from 'posix-regex'; /** * Platform differences, like less's per-platform defines headers * (defines.h for unix, defines.wn for Windows, defines.ds/o2 for the * DOS and OS/2 builds): file names, shells, editors and quoting all * differ between the Windows console world and unix. Node's unix * family (linux, darwin, the BSDs, aix, sunos) takes less's autoconf * build values; win32 takes defines.wn's. */ export declare const isWindows: boolean; /** * The home directory, like less resolving $HOME with main.c's Windows * fallback to HOMEDRIVE+HOMEPATH; $HOME wins when set on either * platform, like lgetenv("HOME"). */ export declare function homeDir(): string; /** The history file name (LESSHISTFILE: ".lesshst" / "_lesshst"). */ export declare const HISTFILE_NAME: string; /** The lesskey source name (DEF_LESSKEYINFILE: ".lesskey"/"_lesskey"). */ export declare const LESSKEYIN_NAME: string; /** The binary lesskey name (LESSKEYFILE: ".less" / "_less"). */ export declare const LESSKEYFILE_NAME: string; /** The system-wide lesskey source (LESSKEYINFILE_SYS). */ export declare const LESSKEYIN_SYS: string; /** The default system-wide compiled lesskey file (LESSKEYFILE_SYS). */ export declare const LESSKEYFILE_SYS: string; /** The default editor (EDIT_PGM: "vi", "edit" on Windows). */ export declare const EDIT_PGM: string; /** * True where less's --exit-follow-on-close can actually fire: check_poll * (os.c:167) exits the F wait only on a BARE POLLHUP — a drained, * closed pipe reports exactly that on Linux, but Darwin adds POLLIN * (EOF counts as readable) and less's Windows build has no HUP check at * all, so less's F on a closed pipe just keeps waiting there — and so * do we. */ export declare const POLLHUP_EXITS_F: boolean; /** * The regex dialect less's own search would use here. * * configure.ac tries POSIX regcomp FIRST and only falls through to * PCRE2/PCRE/GNU when it is missing or broken, so less links whatever * regcomp the platform's libc ships: Spencer's on the BSDs, glibc * everywhere else. The two disagree on what POSIX leaves undefined, so * the dialect is a platform fact like DEF_METACHARS, not a preference. * The library's own default IS the glibc shape, so only the BSDs need * saying and everything else falls through to it. * * (less's Windows build links neither — defines.wn takes Spencer's V8 * regcomp, which has no {n,m} intervals at all. We keep the POSIX * reading there rather than give a JS user a pager whose search has * lost counted repetition.) */ export declare const REGEX_DIALECT: Dialect; /** Shell metacharacters (DEF_METACHARS, defines.wn's smaller set). */ export declare const DEF_METACHARS: string; /** The metachar escape (DEF_METAESCAPE): the Windows shell has no * backslash escaping, so names quote-wrap instead. */ export declare const DEF_METAESCAPE: string; /** * The shell argv for a ! command or a preprocessor pipe: unix runs * `$SHELL -c cmd` (less's HAVE_SHELL, with LESS_SHELL_COPTION replacing * -c and a bare "-" dropping the wrapper); less's Windows build has * HAVE_SHELL=0 and hands the command to system(), i.e. %COMSPEC% /c, * with an empty command opening the shell itself (lsystem.c). */ export declare function shellArgv(cmd: string): [string, string[]];