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

x-save the commandline in the current window #17758

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

zadjii-msft
Copy link
Member

By manually setting the _windowTarget to 0, we can make sure to toss x-save commandlines at the current terminal window (so long as there is one).

Edge cases:

  • You passed other subcommands with x-save: Well, we'll do whatever we would have normally done for multiple subcommands. We won't x-save in the current window, we'll obey your settings. That seems to make sense
  • You ran wt x-save without an open Terminal window: We'll open a terminal window during the process of handling it. That seems sensible.

Closes #17366

By manually setting the `_windowTarget` to `0`, we can make sure to toss
`x-save` commandlines at the current terminal window (so long as there is one).

Edge cases:
* You passed other subcommands with `x-save`: Well, we'll do whatever we would
  have normally done for multiple subcommands. We won't `x-save` in the current
  window, we'll obey your settings. That seems to make sense
* You ran `wt x-save` without an open Terminal window: We'll open a terminal
  window during the process of handling it. That seems sensible.

Closes #17366
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree. labels Aug 21, 2024
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and short!

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems sensible.

eeeeeeeeeeeeeeeh

but i'll allow it.

// Validate the args now. This will make sure that in the case of a
// single x-save command, we toss that commandline to the current
// terminal window
appArgs.ValidateStartupCommands();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yikes that validate means "change"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and apparently "partially parse"! AppCommandlineArgs.cpp R1044

@DHowett DHowett merged commit 5ff8b80 into main Aug 21, 2024
20 checks passed
@DHowett DHowett deleted the dev/migrie/b/17366-x-save-here branch August 21, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Remoting Communication layer between windows. Often for windowing behavior, quake mode, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.22: wt save should save the command in the current window, if at all possible
3 participants