wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.74k stars 794 forks source link

Add option to pre-populate user prompts with custom text #6002

Open ekorchmar opened 2 months ago

ekorchmar commented 2 months ago

Is your feature request related to a problem? Please describe. I would love an option to specify "default" text for wezterm.action.PromptInputLine, for example when using it to rename the active tab. For this case, that could be the tab name or a shared prefix for manually named tabs (e.g. M:)

Describe the solution you'd like Add another parameter default to function wezterm.action.PromptInputLine that would define a text string to place in prompt for user to edit, rather than starting with an empty input.

Describe alternatives you've considered Hooking up a SendText callback with the desired text, but it is not immediately obvious how to do it after spawning the prompt.

Additional context A callback parameter to conditionally style the text while it is being entered would be good, too, but it is a lot of overhead for little use-case.

sumeetgadagkar commented 1 month ago

Would love to have this as well