Variable: ghostel-command-finish-functions

ghostel-command-finish-functions is a customizable variable defined in ghostel-shell.el.

Value

nil

Documentation

Hook run when a shell command finishes (OSC 133 D marker).

Each function is called with two arguments: the buffer and the exit status (an integer, or nil if the shell did not report one).

Requires the shell to emit OSC 133 semantic prompt markers. Bash, zsh, and fish shell integration bundled with ghostel emits these markers automatically when ghostel-shell-integration is enabled.

The hook fires synchronously from the terminal parser, so consumers that need a fully rendered buffer should defer their own work via run-at-time. Errors in hook functions are demoted to messages via with-demoted-errors, so a misbehaving hook does not break the parser or stop later hooks — except when debug-on-error is non-nil, in which case the error is re-signalled so the debugger can fire (standard with-demoted-errors semantics).

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-shell.el
(defcustom ghostel-command-finish-functions nil
  "Hook run when a shell command finishes (OSC 133 D marker).
Each function is called with two arguments: the buffer and the
exit status (an integer, or nil if the shell did not report one).

Requires the shell to emit OSC 133 semantic prompt markers.  Bash,
zsh, and fish shell integration bundled with ghostel emits these
markers automatically when `ghostel-shell-integration' is enabled.

The hook fires synchronously from the terminal parser, so consumers
that need a fully rendered buffer should defer their own work via
`run-at-time'.  Errors in hook functions are demoted to messages
via `with-demoted-errors', so a misbehaving hook does not break
the parser or stop later hooks — except when `debug-on-error' is
non-nil, in which case the error is re-signalled so the debugger
can fire (standard `with-demoted-errors' semantics)."
  :type 'hook
  :group 'ghostel)