1
votes

Bash completion seems to work correctly for the PATH that is set when I start emacs, but if I change the PATH in an emacs shell buffer, I cannot seem to get Emacs to rethink its list of possible completions.

Is there some way to reinitialize Emacs view of the completions?

In a non-emacs shell, everything works as expected with the occasional hash -r thrown in for good measure.

1

1 Answers

1
votes

Assuming you are using completion-at-point, there is a variable exec-path that maintains a list of the directories that are searched for executables. shell-command-completion, which is by default part of shell-dynamic-complete-functions, searches those locations.

You can update that variable with new locations to search for executables, eg. (push "<new-directory>" exec-path).