Skip to content

Question about grouping backends #744

@dieggsy

Description

@dieggsy

I recently wrote https://github.com/dieggsy/company-eshell-autosuggest, which includes a backend that grabs any input before point in eshell, and provides as a candidate the single previous history item that matches the input.

The inteded use for this was to rely on something other than company for eshell completion on tab, and use company solely as a mechanism for these history autosuggestions (similar to what fish shell does). In this regard it works well.

However, some may want to use company as their main completion mechanism (see dieggsy/esh-autosuggest#1), and have history suggestions as a sort of "fall back". I saw #142 and was wondering about grouping my backend with company-capf. I tried setting company-backends to '((company-capf company-eshell-autosuggest)), but I only get candidates from the latter if the former has candidates as well. (Note that company-eshell-autosuggest works on prefixes like some input with a space in the middle or trailing). It seems that they only work together if their prefixes are the same.

Is that how it's supposed to work, and is there any way to group these (or similar) backends?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions