mirror of
https://github.com/zoriya/jj.nvim.git
synced 2026-08-05 18:56:13 +00:00
Migrate command execution to structured argv lists across the plugin, replacing shell-string command construction with `vim.system` argv execution. The runner API now exposes argv-based execution as the default path:
- `runner.execute_command` -> `runner.execute`
- `runner.execute_command_async` -> `runner.execute_async`
- `runner.execute_command_raw` -> `runner.execute_raw`
- `runner.execute_command_raw_async` -> `runner.execute_raw_async`
- `runner.execute_command_sync` was removed; use `runner.execute` and handle the result directly
BREAKING CHANGES:
- `cmd.new({ args = ... })` now requires `args` as `string[]` argv tokens, not a single string.
- `cmd.log({ ... })` now uses `raw_flags` as `string[]` for raw passthrough flags; `raw = "..."` is no longer supported.
- Direct users of `jj.core.runner` must migrate from the old `execute_command*` string helpers to the new argv-based `execute*` helpers.
13 lines
329 B
Lua
13 lines
329 B
Lua
local M = {}
|
|
|
|
--- Build a jj fileset string literal for a path.
|
|
--- jj path arguments use fileset syntax, so special characters like `$`
|
|
--- must be wrapped in jj string quotes.
|
|
---@param path string
|
|
---@return string
|
|
function M.fileset(path)
|
|
return string.format('"%s"', path:gsub("\\", "\\\\"):gsub('"', '\\"'))
|
|
end
|
|
|
|
return M
|