Skip to content
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

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

Open
zadjii-msft opened this issue Apr 22, 2020 · 2 comments
Labels
Area-Commandline wt.exe's commandline arguments Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@zadjii-msft
Copy link
Member

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.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 22, 2020
@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. Area-Commandline wt.exe's commandline arguments labels Apr 22, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 22, 2020
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.x milestone Apr 22, 2020
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 22, 2020
@driver1998
Copy link

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?

@zadjii-msft
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Commandline wt.exe's commandline arguments Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants