From c4a03bc4ae7ac89dfca3ada27d1a7946d568d4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Wed, 22 Dec 2021 16:37:58 +0100 Subject: [PATCH] Fix attr path completion after a dot --- src/libcmd/installables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 5f118b8d0..6c20bb7b1 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -191,7 +191,7 @@ void SourceExprCommand::completeInstallable(std::string_view prefix) auto sep = prefix_.rfind('.'); std::string searchWord; if (sep != std::string::npos) { - searchWord = prefix_.substr(sep, std::string::npos); + searchWord = prefix_.substr(sep + 1, std::string::npos); prefix_ = prefix_.substr(0, sep); } else { searchWord = prefix_;