mirror of
https://github.com/coder/code-server.git
synced 2025-07-30 05:22:04 +08:00
Allow opening files, folders, and workspaces in existing code-server from CLI (#1994)
Add initial support for opening files / folders in running code-server instance. Current limitations: - unable to open a file in a new window, only folders - unable to use addMode feature - others...
This commit is contained in:
@ -45,6 +45,9 @@ export interface Args extends VsArgs {
|
||||
readonly "proxy-domain"?: string[]
|
||||
readonly locale?: string
|
||||
readonly _: string[]
|
||||
readonly "open-in"?: boolean
|
||||
readonly "reuse-window"?: boolean
|
||||
readonly "new-window"?: boolean
|
||||
}
|
||||
|
||||
interface Option<T> {
|
||||
@ -139,6 +142,18 @@ const options: Options<Required<Args>> = {
|
||||
"show-versions": { type: "boolean", description: "Show VS Code extension versions." },
|
||||
"proxy-domain": { type: "string[]", description: "Domain used for proxying ports." },
|
||||
|
||||
"open-in": { type: "boolean", short: "oi", description: "Open file(s) or folder(s) in running instance" },
|
||||
"new-window": {
|
||||
type: "boolean",
|
||||
short: "n",
|
||||
description: "Force to open a new window. (use with open-in)",
|
||||
},
|
||||
"reuse-window": {
|
||||
type: "boolean",
|
||||
short: "r",
|
||||
description: "Force to open a file or folder in an already opened window. (use with open-in)",
|
||||
},
|
||||
|
||||
locale: { type: "string" },
|
||||
log: { type: LogLevel },
|
||||
verbose: { type: "boolean", short: "vvv", description: "Enable verbose logging." },
|
||||
|
Reference in New Issue
Block a user