microsoft / microsoft/terminal
Replace `duplicateTab` with `newTab` with arg
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
# Description of the new feature/enhancement
`duplicateTab` and `newTab` are two different actions whereas `splitPane` accomplishes the functionality of both "duplicate my current pane" and "open a new pane". `splitPane` also lets the user use `NewTerminalArgs` to customize a duplicate pane.
I propose we do one of the following:
1. Deprecate `duplicateTab`:
- add a `mode` arg to `newTab`. Possible values include `duplicateProfile` and `duplicatePaneStructure` (see #4674). Default value is `null`.
- `duplicateTab` still exists, but is just an alias for `newTab` with `mode=duplicateProfile`.
- This gives us `NewTerminalArgs` for free and creates a consistent design across actions creating new panes and new tabs.
2. Split `splitPane` into `splitPane` and `duplicatePane`:
- `duplicatePane` would have 2 args: `size` and `split` (same behavior as from `splitPane`)
- This provides a consistent design, but I feel that it doesn't provide adequate `NewTerminalArgs` benefits.
### Other comments
_Inspired by a comment made by @lhecker_
#4674 Should be kept in mind with the new design.
I'm open to other ideas or different names for these actions/args.
# Resources
[`duplicateTab` docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#duplicate-tab)
[`newTab` docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#new-tab)
[`splitPane` docs](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/actions#split-a-pane)
Contributor guide
Assessment
This issue has not been assessed yet.