-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execute Arbitrary Command Via Keybinding #418
Comments
Do you know a library (in any language) that already supports theses features ?
Could you please confirm that you want something like this:
https://github.com/kkawakam/rustyline/blob/master/src/completion.rs#L52 pub trait Completer {
...
fn complete_line(&self
someContext: SomeContext, // to be defined
config: &Config,
) -> Result<Option<Cmd>> {
// current default behaviour (redefined by nushell)
}
} So rustyline let nushell customize the display of candidates and user interaction.
Could you please confirm that you want something like this: |
@gwenn - I'm coming up to speed on the current threads, but these are my early thoughts: for #302 - I think what we want is more than just tabbing, but it's a start. Part of the problem here is that rustyline supports skim, but skim doesn't support Windows. We've been holding off adding support in nushell until the Windows support is available. Being able to do our own completions does have some advantages, so we could optionally call out into an external command like Right, there'd need to be some contract between rustyline and the code handling the completion that things come back in a state that rustyline can handle. For #342 - I think the request here is more around binding a keyboard shortcut to a special function, which for nushell would call into nushell to do something. From there, I'm guessing it would just return a string. Undo from that point would undo the string. I don't think we're asking for arbitarily complex edit commands, rather a way to call into things like the |
Thanks for responding @gwenn
At the bottom of [this page] (https://github.com/junegunn/fzf/wiki/Windows#powershell-support)is some windows implementations however, I wouldn't call any of them libraries. They're more of a wrapper around Actually, if you peruse this page, all implementations mac/*nix/win seem to be wrappers around the executable versus libraries. @jonathandturner answered the other questions nicely, so I'll leave those mostly alone and say, yes, #302 and #342 sound interesting but #342 where it's more inline with this comment and #306. |
What is the current status on this? |
As a lover of fzf, I don't think any external tools like that should be coupled with the shell. If we could map arbitrary params, we could implement integrations like this ourselves in user-land. |
Since we have introduced keybindings in
nushell
we're getting some interest in usingfzf
sinceskim
doesn't work on Windows. Along with that comes the ability to execute any arbitrary program via those configured keybindings. Is it possible to 'shell out' and execute a command that is defined in a keybinding today? I can't find it if it is. If it isn't can you point me to the location where this could be inserted via PR?To be clear, this is really a two-pronged question.
Thanks.
The text was updated successfully, but these errors were encountered: