summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackLin <[email protected]>2024-06-29 14:17:07 +0800
committerJackLin <[email protected]>2024-06-29 14:17:07 +0800
commit3e76e86227593adeaa4c8098c643740cef11d62f (patch)
tree4fc0c187262f4a09520e3d2d262c91355d6a1943
parentbdd90dbcdcc6fbfc35bb0e29ef4606a5572c8767 (diff)
[fix]Fixed the failure of the command line completion function in linux
-rw-r--r--xmake/modules/private/utils/completer.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/completer.lua b/xmake/modules/private/utils/completer.lua
index f205ba865..868c1ce09 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