Add exportBuffer action (1.13)#479
Conversation
From microsoft/terminal#12097 ## Buffer Exporting ### Export Buffer This allows the user to export the text of the buffer to a file. If the file doesn't exist, it will be created. If the file already exists, its contents will be replaced with the Terminal buffer text. **Command name:** `exportBuffer` **Default bindings:** ```json { "command": { "action": "exportBuffer" } }, ``` #### Actions | Name | Necessity | Accepts | Description | | ---- | --------- | ------- | ----------- | | `path` | Optional | String | If provided, then the Terminal will export the buffer contents to the given file. Otherwise, the Terminal will open a file picker to choose the file to export to. | > [!IMPORTANT] > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview).
|
Docs Build status updates of commit 2bc14a4: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
This adds an action for the context menu entry we added in #11062. That PR added support for exporting the buffer, exclusively through the tab item's context menu. This adds an action that can additionally be bound, which also can export the buffer to a file. This action accepts a `path` param. If empty/ommitted, then the Terminal will prompt for the file to export the buffer to. * Does a part of #9700 * Spec in #11090, but I doubt this is contentious * [x] This will satisfy #12052 * [x] I work here * [x] docs added: MicrosoftDocs/terminal#479
|
Docs Build status updates of commit 2bc14a4: ✅ Validation status: passed
For more details, please refer to the build report. Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report. For any questions, please:
|
|
Export console buffer automatically. I'm not a programmer, but considering this is now a macro, in theory you could create something like: I imagine this would need to be defined in the profiles that opened each TAB.
|
From microsoft/terminal#12097
Buffer Exporting
Export Buffer
This allows the user to export the text of the buffer to a file. If the file doesn't exist, it will be created. If the file already exists, its contents will be replaced with the Terminal buffer text.
Command name:
exportBufferDefault bindings:
{ "command": { "action": "exportBuffer" } },Actions
pathImportant
This feature is only available in Windows Terminal Preview.