Function: ghostel--detect-shell

ghostel--detect-shell is a natively compiled function defined in ghostel-shell.el.

Signature

(ghostel--detect-shell SHELL)

Documentation

Return shell type symbol (bash, zsh, fish, nu) from SHELL path, or nil.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-shell.el
;;; Shell detection & resolution

(defun ghostel--detect-shell (shell)
  "Return shell type symbol (bash, zsh, fish, nu) from SHELL path, or nil."
  (let ((base (file-name-nondirectory shell)))
    (cond
     ((string-match-p "bash" base) 'bash)
     ((string-match-p "zsh" base) 'zsh)
     ((string-match-p "fish" base) 'fish)
     ((member base '("nu" "nushell")) 'nu))))