You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Thanks for the handy library. I've written a couple of commands that take package names. I would like those commands to autocomplete with package names. Would you be open to allowing users to define command-specific completions? If so, some thoughts on how this could work:
Commands would be registered with a basic api like Ex.registerCommandCompletions('command_name', completionFn). completionFn would be a function that takes one argument, the string of text after a command. For example, if a user typed command foo bar, the completionFn would receive 'foo bar'.
If a command doesn't have a completionFn registered, default to the excellent file completion introduced in Implement tab completion #29
Let me know your thoughts. Can create a PR if interested.
Cheers, Gabriel
The text was updated successfully, but these errors were encountered:
Hi. Thanks for the handy library. I've written a couple of commands that take package names. I would like those commands to autocomplete with package names. Would you be open to allowing users to define command-specific completions? If so, some thoughts on how this could work:
Ex.registerCommandCompletions('command_name', completionFn)
.completionFn
would be a function that takes one argument, the string of text after a command. For example, if a user typedcommand foo bar
, the completionFn would receive 'foo bar'.Let me know your thoughts. Can create a PR if interested.
Cheers, Gabriel
The text was updated successfully, but these errors were encountered: