Variable: ghostel-environment
ghostel-environment is a customizable variable defined in ghostel.el.
Value
nil
Documentation
Extra environment variables for ghostel shell processes.
A list of "KEY=VALUE" strings, prepended to process-environment
before spawning the shell. A bare "KEY" (no =) unsets the variable.
For local spawns, entries here take precedence over ghostel's own variables (TERM, INSIDE_EMACS, PWD, EMACS_GHOSTEL_PATH, shell-integration vars), so a user who sets TERM here wins — which will also disable ghostel's shell integration if the chosen TERM breaks its assumptions.
Also honored via dir-locals.el for per-project overrides.
TRAMP caveats:
- Entries with = are propagated to the remote shell.
- TERM/TERMINFO/TERM_PROGRAM/TERM_PROGRAM_VERSION/COLORTERM here
are ignored for remote spawns and overridden unconditionally by
the per-spawn /bin/sh -c wrapper after infocmp-probing the
remote for xterm-ghostty terminfo. TRAMP's
tramp-local-environment-variable-p filter strips env entries
that match the local default top-level process-environment,
so pushing TERM via env was unreliable; the wrapper exports
these from inside the remote shell instead, where the filter
doesn't reach. Customize ghostel-term (locally, or per-host
via dir-locals or connection-local-set-profile-variables) to
change what gets advertised; on a customized branch the wrapper
exports TERM=$ghostel-term only — no TERM_PROGRAM* ghostty
advertisement. Every other entry in this list still propagates.
- INSIDE_EMACS is rewritten by TRAMP via tramp-inside-emacs,
which appends ,tramp:VER to whatever value is in scope. For
ghostel that means the remote shell sees ghostel,tramp:VER
rather than the bare ghostel set locally — the leading
ghostel segment is preserved.
- Bare "KEY" unset works for TRAMP-sh methods (ssh, sudo, ...)
which emit unset KEY in the remote wrapper, but is dropped by
the generic handler used by adb and sshfs.
Example: '("LANG=en_US.UTF-8" "CC=clang")
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defcustom ghostel-environment nil
"Extra environment variables for ghostel shell processes.
A list of \"KEY=VALUE\" strings, prepended to `process-environment'
before spawning the shell. A bare \"KEY\" (no `=') unsets the variable.
For local spawns, entries here take precedence over ghostel's own
variables (TERM, INSIDE_EMACS, PWD, EMACS_GHOSTEL_PATH,
shell-integration vars), so a user who sets TERM here wins — which
will also disable ghostel's shell integration if the chosen TERM
breaks its assumptions.
Also honored via `dir-locals.el' for per-project overrides.
TRAMP caveats:
- Entries with `=' are propagated to the remote shell.
- TERM/TERMINFO/TERM_PROGRAM/TERM_PROGRAM_VERSION/COLORTERM here
are ignored for remote spawns and overridden unconditionally by
the per-spawn `/bin/sh -c' wrapper after `infocmp'-probing the
remote for `xterm-ghostty' terminfo. TRAMP's
`tramp-local-environment-variable-p' filter strips env entries
that match the local default top-level `process-environment',
so pushing TERM via env was unreliable; the wrapper exports
these from inside the remote shell instead, where the filter
doesn't reach. Customize `ghostel-term' (locally, or per-host
via dir-locals or `connection-local-set-profile-variables') to
change what gets advertised; on a customized branch the wrapper
exports `TERM=$ghostel-term' only — no `TERM_PROGRAM*' ghostty
advertisement. Every other entry in this list still propagates.
- INSIDE_EMACS is rewritten by TRAMP via `tramp-inside-emacs',
which appends `,tramp:VER' to whatever value is in scope. For
ghostel that means the remote shell sees `ghostel,tramp:VER'
rather than the bare `ghostel' set locally — the leading
`ghostel' segment is preserved.
- Bare \"KEY\" unset works for TRAMP-sh methods (`ssh', `sudo', ...)
which emit `unset KEY' in the remote wrapper, but is dropped by
the generic handler used by `adb' and `sshfs'.
Example: \\='(\"LANG=en_US.UTF-8\" \"CC=clang\")"
:type '(repeat string))