Skip to content

Commit

Permalink
quick cmd: export cmd vars while running the command
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunmahishi committed Mar 4, 2024
1 parent 31302de commit 2b733e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/flow/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ local cmd = require("flow.cmd")
local output = require("flow.output")
local sql = require("flow.sql")
local windows = require("flow.windows")
local vars = require("flow.vars")

local default_setup_options = {
output = {
Expand Down Expand Up @@ -90,8 +91,10 @@ local function reload_plugin()
end

local function run_quick_cmd()
local v = vars.vars_to_export()
windows.open_quick_cmd_window(function(quick_cmd)
output.handle_output(quick_cmd, setup_options.output)
local cmd_with_vars = v .. "; " .. quick_cmd
output.handle_output(cmd_with_vars, setup_options.output)
end)
end

Expand Down

0 comments on commit 2b733e0

Please sign in to comment.