szermatt / emacs-bash-completion

Add programmable bash completion to Emacs shell-mode
GNU General Public License v2.0
279 stars 33 forks source link

Improve Bash process detection #60

Closed montag451 closed 1 year ago

montag451 commented 1 year ago

The current way of checking if a process is a Bash process is not correct particularly with remote Bash processes. For example if the user shell on the local machine is zsh then shell-file-name will be equal to zsh and bash-completion--current-shell will return nil for a remote Bash process (assuming explicit-shell-file-name is nil and the ESHELL environment variable is not set). The new way of checking if a process is a Bash process is more robust as it is not based on the checking of the explicit-shell-file-name variable, the ESHELL environment variable, the shell-file-name variable or the local command used to launch the Bash process.