Ability to save selected text as a sendInput
action
#12857
Labels
Area-Settings
Issues related to settings and customizability, for console or terminal
good first issue
This is a fix that might be easier for someone to do as a first contribution
Help Wanted
We encourage anyone to jump in on these.
In-PR
This issue has a related PR
Issue-Task
It's a feature request, but it doesn't really need a major design.
Needs-Tag-Fix
Doesn't match tag requirements
Product-Terminal
The new Windows Terminal.
Milestone
I write some long command. I need to use this frequently (or infrequently), but I don't want to have to remember all the args. I want to be able to pull it up straight from the command palette. So I want to write the command once, select it, and {perform some action}1 that lets me save it as a
sendInput
action.The action should
Send "git log --graph --abbrev-commit --decorate..." to the Terminal
is not useful to anyone.Just doing the immediate save would be a good enough start on this, to the point I'd consider that an easy starter. The UI - that's Hard, for reasons listed below.
As an initial version of this, it's more than good enough to just save the selected text as an action without the UI. We can iterate on the UI in follow-ups.
dev/migrie/fhl/save-command
AppCommandlineArgs
stuff for now. That's spicier.TerminalPage::_HandleSaveTask
, we will want to try and save the current selection as asendInput
action, if there's nocommandline
specified.Toast
the user with a message "Saved selected text as a new action".TerminalPage::IdentifyWindow
has an example of aToast
Footnotes
Obviously, easiest way is via cmdpal or keybinding. Also consider a right-click context menu entry, Request: Right-click menu inside TerminalControl (w/ Copy & Paste?) #3337 ↩
This has it's own challenges. It can't be a
ContentDialog
(https://github.com/microsoft/microsoft-ui-xaml/issues/3804). It could be nested in aFlyout
, maybe. Hopefully the dialog thing is limited just to ContentDialogs and not all Flyouts. It probably shouldn't be aTeachingTip
(Auto-focus window renamer textbox on open #12798). We could roll our own ContentDialog for this of course (Warn before the user runs a new commandline elevated #11308). ↩Might be tricky - we'd have to hand on to an instance of the actual
Command
itself, so we can edit it... in place? and hopefully writing to the settings would then just refresh all the other name->command maps instantly. ↩The text was updated successfully, but these errors were encountered: