]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: improve command completion
authorPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Wed, 22 Sep 2021 16:23:29 +0000 (18:23 +0200)
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Sat, 25 Sep 2021 08:34:38 +0000 (10:34 +0200)
commitec5849afc86ca6b2df9e7fad5e7d3a1ce92fe714
treec04400dfb425f495e712f880e8ac2005d2365e96
parent14fb8056ceef592c6f392f0f678dc45d11b7417e
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)
bin/sh/histedit.c