Skip to content

Commit 7ab903b

Browse files
authored
Merge pull request #1 from jawee/feat/rename-and-lint
Feat/rename and lint
2 parents 25f44e9 + ff7795d commit 7ab903b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lua/cmder/init.lua lua/tmuxcmd/init.lua

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
local Window = require("cmder.window")
1+
local Window = require("tmuxcmd.window")
22

33
local M = {}
44

5-
function M.setup()
6-
end
5+
function M.setup() end
76

87
function M.openMainMenu()
98
local options = {
@@ -22,16 +21,19 @@ function M.openMainMenu()
2221
Window.createTelescopeWindow(options, select_current_line, nil, "Available Commands")
2322
end
2423

24+
local function executeCommand(command)
25+
vim.fn.system('tmux send-keys -t scratch "' .. command .. '" ^M')
26+
end
2527
function M.executeCommand(command)
2628
if command == "Build and Test" then
27-
vim.fn.system("tmux send-keys -t scratch \"dotnet build --interactive && dotnet test\" ^M")
29+
executeCommand("dotnet build --interactive && dotnet test")
2830
elseif command == "Build with only errors" then
29-
vim.fn.system("tmux send-keys -t scratch \"dotnet build /property:WarningLevel=0\" ^M")
31+
executeCommand("dotnet build /property:WarningLevel=0")
3032
end
3133
vim.fn.system("tmux select-window -t scratch")
3234
end
3335

34-
vim.api.nvim_create_user_command("Cmder", function()
36+
vim.api.nvim_create_user_command("Tmuxcmd", function()
3537
M.openMainMenu()
3638
end, { nargs = "*", desc = "Cmder plugin" })
3739

File renamed without changes.

0 commit comments

Comments
 (0)