]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: improve command completion
authorPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Sat, 18 Sep 2021 11:26:51 +0000 (13:26 +0200)
committerPiotr Pawel Stefaniak <pstef@FreeBSD.org>
Sat, 25 Sep 2021 08:34:38 +0000 (10:34 +0200)
commitb2b7eb9e23dcb4381780590fb7393b17d19100f5
tree62f47f0ac454b8e904c7b254c4d152abcac59c65
parent8acee856bfc8cf7ef0e2f622aeea5df830619db3
sh: improve command completion

When multiple matches are found, we keep the provided string on the
input line and print unique matches as suggestions.

But the multiple matches might be the same command found in different
directories, so we should deduplicate the matches first and then decide
whether to autocomplete the command or not, based on the number of
unique matches.

(cherry picked from commit b8ff849cbddfee3404d6550cf98f53d6bb617707)
bin/sh/histedit.c