-
Notifications
You must be signed in to change notification settings - Fork 199
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
autocomplete prompt action #657
Comments
This could be interesting for some use-cases, we'll look into it. |
I think what could be a general extension is "replace prompt" with 2 variables: sk --bind="ctrl+i:prompt_mod[${prompt} {}]"
# ${prompt} - current prompt contents
# {} - current highlighted item Examples of applications: E.g. b): function toggle_flag() {
# parses input with flags and toggles desired one
}
sk --bind="ctrl+i:prompt_mod[toggle_flag ${prompt} i]" So that:
So these are just 2 examples, but this would allow a high degree of customisation. To it seems like this could be 2 extensions:
As this variable could be useful for other actions as well. |
I found that (2) is already there. I.e. Placeholder for "command prompt contents" already exists. At least for --preview, being So I think this narrows it down to |
And actions can already use all placeholders. :) So this boils down to |
I have looked for this functionality, but could not find it.
What I would like is to be able to press "tab" which would replace prompt text with contents of highlighted line from the search list.
E.g.
>lib.*/lib.*
/library/library
path>/library/library
Thanks.
The text was updated successfully, but these errors were encountered: