Add support for --file,-f configuration_file for reading a list of commands from a file #7542

Open
opened 2026-01-31 01:06:51 +00:00 by claunia · 2 comments
Owner

Originally created by @zadjii-msft on GitHub (Apr 22, 2020).

From the original spec:

Run these commands in the given Windows Terminal session. Enables opening new
tabs in already running Windows Terminal windows. See Future
Considerations
for more details.

Originally created by @zadjii-msft on GitHub (Apr 22, 2020). From the original spec: > Run these commands in the given Windows Terminal session. Enables opening new > tabs in already running Windows Terminal windows. See [Future > Considerations](#Future-Considerations) for more details.
claunia added the Issue-TaskProduct-TerminalArea-Commandline labels 2026-01-31 01:06:51 +00:00
Author
Owner

@driver1998 commented on GitHub (May 30, 2020):

I guess it might be better to be able to read commands from a pipe? So that we can
echo -p "Powershell"; split-pane -p "Ubuntu" | wt.exe

or
type commands.txt | wt.exe

or even
some_launcher | wt.exe
when some_launcher splits the commands?

@driver1998 commented on GitHub (May 30, 2020): I guess it might be better to be able to read commands from a pipe? So that we can echo -p "Powershell"; split-pane -p "Ubuntu" | wt.exe or type commands.txt | wt.exe or even some_launcher | wt.exe when some_launcher splits the commands?
Author
Owner

@zadjii-msft commented on GitHub (Feb 25, 2022):

From #12583:

There is "persisted window layout" and there are subcommands (sp) to start a new windows with some layout. However, it's not really easy to have a new window with a specific layout.

This feature request asks to load some layout definition file like this (from zellij.dev/documentation/layouts.html):

tabs:
  - direction: Vertical
    parts:
      - direction: Horizontal
        parts:
          - direction: Vertical
          - direction: Vertical
      - direction: Horizontal

for instance via wt -layout preset.yaml. The preset file can be enhanced further with profile name to load, starting directory, or even with a start command (eg, launch some additional task).

This raises the good point - we might want it to be something like a list of actions to perform. We already serialize the window state to JSON, so why can't we just parse a list of actions from a JSON file to execute. This might be more flexible than just a list of subcommands, with the caveat that now all actions need to be able to work before the terminal window is created, not just the few known well-behaving subcommands.

@zadjii-msft commented on GitHub (Feb 25, 2022): From #12583: > There is "persisted window layout" and there are subcommands (sp) to start a new windows with some layout. However, it's not really easy to have a new window with a specific layout. > > This feature request asks to load some layout definition file like this (from [zellij.dev/documentation/layouts.html](https://zellij.dev/documentation/layouts.html)): > > ``` > tabs: > - direction: Vertical > parts: > - direction: Horizontal > parts: > - direction: Vertical > - direction: Vertical > - direction: Horizontal > ``` > > for instance via `wt -layout preset.yaml`. The preset file can be enhanced further with profile name to load, starting directory, or even with a start command (eg, launch some additional task). This raises the good point - we might want it to be something like a list of actions to perform. We already serialize the window state to JSON, so why can't we just parse a list of actions from a JSON file to execute. This might be _more_ flexible than just a list of subcommands, with the caveat that now _all_ actions need to be able to work before the terminal window is created, not just the few known well-behaving subcommands.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7542