2

When I use company-mode in shell-mode, by default company seems to pull candidates from tokens in open buffers. How can I set up the backend to get candidates from shell commands, directory names, and file names? Googling "company-shell" returns somewhat oily results.

3

company-backends specifies in what backends to try out in which order. The first backend signaling that it can deliver candidates (based on the current input) is used.

To make use of the current major mode's built-in completion facility (as can be used by M-TAB in code/text and TAB in interactive modes), use the new company-capf backend. It should be put as the very first one in more recent installations and can be made use of in at least Emacs 24.4. You can check which backend is used currently by inspecting the modeline lighter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.