From 3e76e86227593adeaa4c8098c643740cef11d62f Mon Sep 17 00:00:00 2001 From: JackLin Date: Sat, 29 Jun 2024 14:17:07 +0800 Subject: [PATCH] [fix]Fixed the failure of the command line completion function in linux --- xmake/modules/private/utils/completer.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/modules/private/utils/completer.lua b/xmake/modules/private/utils/completer.lua index f205ba86578..868c1ce09ae 100644 --- a/xmake/modules/private/utils/completer.lua +++ b/xmake/modules/private/utils/completer.lua @@ -206,7 +206,9 @@ function completer:_complete_option_v(options, current, completing) local candidates = {} if #values > 0 and type(values[1]) == "string" then for _, v in ipairs(values) do - table.insert(candidates, { value = v, is_complete = true }) + if v:startswith(completing) then + table.insert(candidates, { value = v, is_complete = true }) + end end else for _, v in ipairs(values) do