Repository navigation
Add --name flag to new-workspace CLI command #2160
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1199,6 +1199,7 @@ class TabManager: ObservableObject { | |||||||||||||
|
|
||||||||||||||
| @discardableResult | ||||||||||||||
| func addWorkspace( | ||||||||||||||
| title: String? = nil, | ||||||||||||||
| workingDirectory overrideWorkingDirectory: String? = nil, | ||||||||||||||
| initialTerminalCommand: String? = nil, | ||||||||||||||
| initialTerminalEnvironment: [String: String] = [:], | ||||||||||||||
|
|
@@ -1226,14 +1227,17 @@ class TabManager: ObservableObject { | |||||||||||||
| let ordinal = Self.nextPortOrdinal | ||||||||||||||
| Self.nextPortOrdinal += 1 | ||||||||||||||
| let newWorkspace = makeWorkspaceForCreation( | ||||||||||||||
| title: "Terminal \(nextTabCount)", | ||||||||||||||
| title: title ?? "Terminal \(nextTabCount)", | ||||||||||||||
| workingDirectory: workingDirectory, | ||||||||||||||
| portOrdinal: ordinal, | ||||||||||||||
| configTemplate: inheritedConfig, | ||||||||||||||
| initialTerminalCommand: initialTerminalCommand, | ||||||||||||||
| initialTerminalEnvironment: initialTerminalEnvironment | ||||||||||||||
| ) | ||||||||||||||
| newWorkspace.owningTabManager = self | ||||||||||||||
| if title != nil { | ||||||||||||||
| newWorkspace.setCustomTitle(title) | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+1238
to
+1240
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||||||||||||||
| wireClosedBrowserTracking(for: newWorkspace) | ||||||||||||||
| if eagerLoadTerminal && !select { | ||||||||||||||
| requestBackgroundWorkspaceLoad(for: newWorkspace.id) | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reject unexpected positional arguments for
new-workspace.Line [1689] only rejects unknown flags, so stray positional tokens are silently ignored (e.g.,
cmux new-workspace --name Build ServerdropsServer). Please fail fast on unexpected non-flag args.💡 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents