Placeholders are substituted twice for stored commands
還沒有人認領這個 Issue。
評估
研究方向
閱讀 #44 中新增的 set_task_command、run_task、歷史選擇器和檔名檢查。追蹤已儲存命令和單次命令在哪裡進行佔位符替換,接著檢查歷史選擇器的命令路徑。完成條件是:已儲存命令只替換一次、單次命令仍可正常運作,而且包含 $E_FN 的檔名會被接受。
由索引模型根據 Issue 內容生成。
描述
A command that uses $E_FN is filled in when it is set (set_task_command), and then searched for $E_FN again when it runs (run_task). The history picker also passes an already filled-in command back through set_task_command.
For normal filenames the second pass finds nothing. If the filename itself contains the text $E_FN, the second pass replaces it again and produces a broken command. For example, a file named test_$E_FN.js would run echo 'test_'test_$E_FN.js'.js' instead of echo 'test_$E_FN.js'.
Since #44, such filenames are rejected with an error, so this cannot produce a broken or unsafe command. The proper fix is to fill in placeholders only once:
run_tasksubstitutes placeholders only for one-off commands; a stored command is already filled in.- The history picker stores the chosen entry directly instead of passing it through
set_task_commandagain.
Once that is done, the filename check added in #44 can be removed.
- 主要語言
- Lua
- 星號
- 161
- 分支
- 12
- 平均合併
- 25 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
google/executor.nvim 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
google/executor.nvim#45 ·
-
難度 5/5 一週以上 新手友好度 20/100
google/executor.nvim#38 ·
-
難度 3/5 1-2 天 新手友好度 45/100
google/executor.nvim#35 ·
-
[Feature Request] Option to run ExecutorShowDetail when the current task finishes可能已有人在做 @jackfranklin 於 513 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 35/100
google/executor.nvim#33 · 9 則留言 ·
-
難度 5/5 一週以上 新手友好度 15/100
google/executor.nvim#26 · 3 則留言 ·
查看 google/executor.nvim 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
teradata-labs/loom#624 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
lsp
難度 1/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆