snacks.nvim/lua
Anton Kastritskii 62d99ed2a3
feat(picker.commands): do not autorun commands that require arguments (#879)
## Description

Currently when you use picker.commands to select a command that requires
an argument, it will cause an error. `:BlickCmd` is one example. To
avoid the error we can feed the keys to enter the command mode and
populate the command and leave it to the user what they want to do.

This is also what telescope
[does](415af52339/lua/telescope/builtin/__internal.lua (L399))
in its builtin command picker.

nargs values `*` or `?` mean that the command can be executed both with
arguments and without. I think it is safer to leave it to the user to
decide if they want them to either trigger a run or provide the
arguments. But happy to change it if you think running the commands by
default makes sense.

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2025-02-02 22:16:41 +01:00
..
snacks feat(picker.commands): do not autorun commands that require arguments (#879) 2025-02-02 22:16:41 +01:00
trouble/sources feat(snacks): added Snacks.profiler 2024-12-01 13:35:37 +01:00