Strip prefix in `attr_matches` result (#13943)...
Strip prefix in `attr_matches` result (#13943)
Fixes
#13935
Reasoning behind implementation chosen:
- `a.b.c` prefix in `a.b.c.<tab>` needs to be preserved as otherwise the
completer will replace it with completion rather than appending (so we
cannot just use `.suffix`, we need to use `a.b.c.suffix` here)
- as in the issue we cannot use `a b.suffix` but need to use `b.suffix`
or `.suffix`
- `d['a b']` prefix cannot be split using space splitting so we need to
tokenize
- however, we can do either `a[0].suffix` or `.suffix`