Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 8 additions & 6 deletions lua/cmder/init.lua → lua/tmuxcmd/init.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
local Window = require("cmder.window")
local Window = require("tmuxcmd.window")

local M = {}

function M.setup()
end
function M.setup() end

function M.openMainMenu()
local options = {
Expand All @@ -22,16 +21,19 @@ function M.openMainMenu()
Window.createTelescopeWindow(options, select_current_line, nil, "Available Commands")
end

local function executeCommand(command)
vim.fn.system('tmux send-keys -t scratch "' .. command .. '" ^M')
end
function M.executeCommand(command)
if command == "Build and Test" then
vim.fn.system("tmux send-keys -t scratch \"dotnet build --interactive && dotnet test\" ^M")
executeCommand("dotnet build --interactive && dotnet test")
elseif command == "Build with only errors" then
vim.fn.system("tmux send-keys -t scratch \"dotnet build /property:WarningLevel=0\" ^M")
executeCommand("dotnet build /property:WarningLevel=0")
end
vim.fn.system("tmux select-window -t scratch")
end

vim.api.nvim_create_user_command("Cmder", function()
vim.api.nvim_create_user_command("Tmuxcmd", function()
M.openMainMenu()
end, { nargs = "*", desc = "Cmder plugin" })

Expand Down
File renamed without changes.
Loading