Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev - enhancements and fixes #156

Merged
merged 36 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4f28865
WIP [common] Adds basic wrapper for tables
vladimir-kotikov Aug 20, 2015
94fc4b5
WIP [common] Fixes tables wrapper to assign metatable correctly
vladimir-kotikov Sep 9, 2015
3f10c2e
WIP [common] Rework matchers using new table wrapper
vladimir-kotikov Sep 9, 2015
bc8149c
Merge branch 'master' into dev
vladimir-kotikov Sep 9, 2015
89610a3
Merge branch 'master' into dev
chrisant996 Aug 15, 2022
cfc97b1
Fix #103; show also remote branches in git merge.
chrisant996 Aug 15, 2022
fd89185
Fix #117; .init.lua isn't loaded under some circumstances.
chrisant996 Aug 15, 2022
93c1b8f
Fixing #117 requires a change in Cmder.
chrisant996 Aug 15, 2022
2ae1083
Explicitly add the completions directory.
chrisant996 Aug 15, 2022
4ca0fdc
Fix #16; add curl completions.
chrisant996 Aug 15, 2022
d05159d
Fix #145; add sudo argmatcher.
chrisant996 Aug 15, 2022
bc477dd
Rename to path_module so builtin path APIs are available.
chrisant996 Aug 16, 2022
c258089
Fix base git flags bleeding thru to commands.
chrisant996 Aug 16, 2022
bbeb9c9
Smarter completions for git add and git checkout.
chrisant996 Aug 16, 2022
6ca09be
Fix `hide=true` for linked argmatchers.
chrisant996 Aug 16, 2022
57dee1e
Fix #131; add winget completions.
chrisant996 Aug 16, 2022
5c839bb
Simplify help_parser unsupported short circuit.
chrisant996 Aug 16, 2022
481feef
Merge branch 'master' into dev
chrisant996 Aug 16, 2022
c0af933
matchers.ext_files improvements.
chrisant996 Aug 17, 2022
282419f
Add comments for some matchers module exports.
chrisant996 Aug 17, 2022
225d6c0
Add some common argmatchers.
chrisant996 Aug 17, 2022
860c9fb
Add robocopy argmatcher.
chrisant996 Aug 17, 2022
d0fbf81
Some explicit version checks, just in case.
chrisant996 Aug 17, 2022
06d0a76
Add premake5 argmatcher.
chrisant996 Aug 17, 2022
e6ad803
Add msbuild argmatcher.
chrisant996 Aug 17, 2022
cc11140
Add argmatchers for GNU grep and sed.
chrisant996 Aug 17, 2022
32aad28
Better capitalization function in robocopy argmatcher.
chrisant996 Aug 17, 2022
4204e53
Add adb/fastboot/scrcopy argmatchers.
chrisant996 Aug 18, 2022
94cc933
Fix typo in winget complete position.
chrisant996 Aug 18, 2022
c81ed68
Fix #76; better display of yarn run completions.
chrisant996 Aug 19, 2022
856d08d
Merge branch 'master' into dev
chrisant996 Aug 20, 2022
4e378ab
Fix `yarn` completions.
chrisant996 Aug 20, 2022
0114406
Clean luacheck warnings.
chrisant996 Aug 20, 2022
952b1ed
Fix typo in yarn run completions.
chrisant996 Aug 20, 2022
629ebfb
Fix some back-compat issues for v0.4.9.
chrisant996 Aug 20, 2022
e0208ab
Tell luacheck about another Clink API.
chrisant996 Aug 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions !init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-- Note: This happens in both .init.lua and !init.lua because older Cmder
-- versions don't know about !init.lua.

-- Get the parent path of this script.
local parent_path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]]

-- Extend package.path with modules directory, if not already present, to allow
-- using require() with them.
local modules_path = parent_path.."modules/?.lua"
if not package.path:find(modules_path, 1, true--[[plain]]) then
package.path = modules_path..";"..package.path
end

-- Explicitly set the completions dir, in case something (such as Cmder)
-- manually loads completion scripts with them being in a Clink script path.
if os.setenv then
local completions_path = parent_path.."completions"
local env = os.getenv("CLINK_COMPLETIONS_DIR") or ""
if not env:find(completions_path, 1, true--[[plain]]) then
os.setenv("CLINK_COMPLETIONS_DIR", env .. (#env > 0 and ";" or "") .. completions_path)
end
end
25 changes: 22 additions & 3 deletions .init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
-- The line below extends package.path with modules
-- directory to allow to require them
package.path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]] .."modules/?.lua;".. package.path
-- Note: This happens in both .init.lua and !init.lua because older Cmder
-- versions don't know about !init.lua.

-- Get the parent path of this script.
local parent_path = debug.getinfo(1, "S").source:match[[^@?(.*[\/])[^\/]-$]]

-- Extend package.path with modules directory, if not already present, to allow
-- using require() with them.
local modules_path = parent_path.."modules/?.lua"
if not package.path:find(modules_path, 1, true--[[plain]]) then
package.path = modules_path..";"..package.path
end

-- Explicitly set the completions dir, in case something (such as Cmder)
-- manually loads completion scripts with them being in a Clink script path.
if os.setenv then
local completions_path = parent_path.."completions"
local env = os.getenv("CLINK_COMPLETIONS_DIR") or ""
if not env:find(completions_path, 1, true--[[plain]]) then
os.setenv("CLINK_COMPLETIONS_DIR", env .. (#env > 0 and ";" or "") .. completions_path)
end
end
19 changes: 18 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,22 @@ return {
files = {
spec = { std = "+busted" },
},
globals = { "clink", "rl_state", "rl", "settings", "log", "path" }
globals = {
"clink",
"error",
"log",
"os.getcwd",
"os.globfiles",
"os.isdir",
"os.setenv",
"path",
"pause",
"rl",
"rl_state",
"settings",
"string.explode",
"string.matchlen",
"unicode.fromcodepage",
"unicode.iter",
}
}
Loading