-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUserRadLine.lua
66 lines (54 loc) · 2.03 KB
/
UserRadLine.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
require "RadLine"
command_fn["set"] = FindPotentialDefault
command_command["set"] = FindPotentialEnv
command_fn["start"] = FindPotentialDefault
command_command["start"] = FindPotentialExe
function FindPotentialWhere(params, p)
local s,i = GetParam(params, p)
if p > 1 and params[p - 1] == "/R" then
return FindFiles(s.."*", FindFilesE.DirOnly), i
else
return FindPathExeFiles(s), i
end
end
command_fn["where.exe"] = FindPotentialWhere
command_options["where.exe"] = { "/r", "/q", "/f", "/t" }
command_fn["regsvr32.exe"] = FindPotentialDlls
command_options["regsvr32.exe"] = { "/u", "/s", "/i", "/n" }
command_command["ping.exe"] = FindPotentialDefault
command_command["ping.exe"] = { "www.google.com" }
function FindPotentialReg(params, p)
local s,i = GetParam(params, p)
if p == 3 then
return FindRegKey(s), i
else
return FindPotentialDefault(params, p)
end
end
command_fn["reg.exe"] = FindPotentialReg
command_command["reg.exe"] = {
"query", "add", "delete", "copy", "save", "load",
"unload", "restore", "compare", "export", "import", "flags"
}
command_fn["winget.exe"] = FindPotentialDefault
command_command["winget.exe"] = {
"install", "show", "source", "search", "list",
"upgrade", "uninstall", "hash", "validate", "settings",
"features", "export", "import"
}
command_options["winget.exe"] = {
"-e", "--exact",
"--verbose", "--verbose-logs"
}
command_fn["git.exe"] = FindPotentialDefault
command_command["git.exe"] = {
"clone", "init", "add", "mv", "reset", "rm", "bisect", "grep", "log", "show", "status",
"branch", "checkout", "commit", "diff", "merge", "rebase", "tag", "fetch", "pull", "push", "help"
};
command_fn["scoop.cmd"] = FindPotentialDefault
command_command["scoop.cmd"] = {
"alias", "bucket", "cache", "checkup", "cleanup", "config", "create", "depends", "export", "help",
"hold", "home", "info", "install", "list", "prefix", "reset", "search", "status", "unhold",
"uninstall", "update", "virustotal", "which"
}
want "UserRadLine2"