aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcmd/installables.cc2
1 files changed, 1 insertions, 1 deletions
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_;