diff options
| author | ruki <[email protected]> | 2024-06-29 19:53:25 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-29 19:53:25 +0800 |
| commit | dba39b4f68e133258d18d0ef6207727ba1be5d55 (patch) | |
| tree | 4fc0c187262f4a09520e3d2d262c91355d6a1943 | |
| parent | bdd90dbcdcc6fbfc35bb0e29ef4606a5572c8767 (diff) | |
| parent | 3e76e86227593adeaa4c8098c643740cef11d62f (diff) | |
Merge pull request #5275 from JackLin00/master
[fix]Fixed the failure of the command line completion function in linux
| -rw-r--r-- | xmake/modules/private/utils/completer.lua | 4 |
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 |
