fix(stress): shorten terminal buffer name and clean up CSES versions
Problem: stress terminal buffer showed the full nix python path and absolute script path, making it illegible. CSES language maps included unused version variants. Solution: rename stress terminal buffer to a readable `term://stress.py` format. Use `python` instead of `python3` in `build_run_cmd`. Trim CSES `LANGUAGE_VERSIONS`, `CSES_LANGUAGES`, and `EXTENSIONS` to only the default versions.
This commit is contained in:
parent
446f87f98c
commit
516d1b02b7
3 changed files with 5 additions and 10 deletions
|
|
@ -53,7 +53,7 @@ local function build_run_cmd(file)
|
|||
end
|
||||
return './' .. bin
|
||||
elseif ext == 'py' then
|
||||
return 'python3 ' .. file
|
||||
return 'python ' .. file
|
||||
end
|
||||
return './' .. file
|
||||
end
|
||||
|
|
@ -171,6 +171,7 @@ function M.toggle(generator_cmd, brute_cmd)
|
|||
|
||||
vim.cmd.terminal(cmdline)
|
||||
local term_buf = vim.api.nvim_get_current_buf()
|
||||
pcall(vim.api.nvim_buf_set_name, term_buf, ("term://stress.py '%s' '%s' '%s'"):format(gen_cmd, brute_run_cmd, binary))
|
||||
local term_win = vim.api.nvim_get_current_win()
|
||||
|
||||
local cleaned = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue