Function: ghostel--terminfo-directory

ghostel--terminfo-directory is a natively compiled function defined in ghostel.el.

Signature

(ghostel--terminfo-directory)

Documentation

Return absolute path to bundled etc/terminfo/ directory if usable.

Usable means a compiled xterm-ghostty entry exists in either the macOS hashed-dir layout (78/xterm-ghostty) or the Linux layout
(x/xterm-ghostty). Returns nil if missing.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--terminfo-directory ()
  "Return absolute path to bundled `etc/terminfo/' directory if usable.
Usable means a compiled xterm-ghostty entry exists in either the
macOS hashed-dir layout (78/xterm-ghostty) or the Linux layout
\(x/xterm-ghostty).  Returns nil if missing."
  (let* ((root (ghostel--resource-root))
         (dir (and root (expand-file-name "etc/terminfo" root))))
    (and dir
         (file-directory-p dir)
         (or (file-readable-p (expand-file-name "78/xterm-ghostty" dir))
             (file-readable-p (expand-file-name "x/xterm-ghostty" dir)))
         dir)))