-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix global creation - Re-apply fix with gmatch on wildcard in diffmatchpatch - Fix issue with names arguments to make and apply commands - Add completions provider
- Loading branch information
Showing
7 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
local function completeMultipleChoice(text, options) | ||
local results = {} | ||
for n=1, #options do | ||
local option = options[n] | ||
if #option > #text and option:sub(1, #text) == text then | ||
local result = option:sub(#text + 1) | ||
table.insert(results, result .. " ") | ||
end | ||
end | ||
return results | ||
end | ||
|
||
local options = { | ||
"dest", "dump-settings", "exec", "install", "list", | ||
"remove", "repl", "search", | ||
|
||
"add-patchspec", "add-rockspec", "apply-patches", "fetch", "make-patches" | ||
} | ||
|
||
local function completeBsRocks(shell, index, text, previous) | ||
if index == 1 then | ||
return completeMultipleChoice(text, options) | ||
elseif nIndex == 2 then | ||
if previous[2] == "exec" then | ||
return fs.complete(sText, shell.dir(), true, false ) | ||
end | ||
end | ||
end | ||
|
||
shell.setCompletionFunction(shell.resolve(...), completeBsRocks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ return function(options) | |
_VERSION = _VERSION | ||
} | ||
_G._G = _G | ||
_G._ENV = _ENV | ||
|
||
local env = { | ||
_G = _G, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters