HomeFreeBSD

sh: improve command completion

Description

sh: improve command completion

When there are many matches, find the longest common substring starting
from the beginning of each command and use that to replace input.

As an example: on my system, llv<tab> will be autocompleted to llvm-
and another <tab> will print all matching llvm commands.

(cherry picked from commit c866d0c798a20b8f0a92df524f4ddd0d81511c88)

Details

Provenance
pstefAuthored on Sep 22 2021, 4:23 PM
Parents
rG14fb8056ceef: sh: reset sh bindings on bind -e, bind -v
Branches
Unknown
Tags
Unknown