8000 Add --ignore-last-opened option by JammSpread · Pull Request #2434 · coder/code-server · GitHub
[go: up one dir, main page]

Skip to content

Add --ignore-last-opened option #2434

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

Merged
merged 3 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
8000 Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change name of --no-project option to --ignore-last-opened
  • Loading branch information
JammSpread committed Dec 15, 2020
commit 69aa52552628054ac8cf69bdc14f047196488489
8 changes: 4 additions & 4 deletions src/node/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface Args extends VsArgs {
"proxy-domain"?: string[]
locale?: string
_: string[]
"no-project"?: boolean
"ignore-last-opened"?: boolean
"reuse-window"?: boolean
"new-window"?: boolean

Expand Down Expand Up @@ -172,10 +172,10 @@ const options: Options<Required<Args>> = {
"uninstall-extension": { type: "string[]", description: "Uninstall a VS Code extension by id." },
"show-versions": { type: "boolean", description: "Show VS Code extension versions." },
"proxy-domain": { type: "string[]", description: "Domain used for proxying ports." },
"no-project": {
"ignore-last-opened": {
type: "boolean",
short: "empty",
description: "Run without a project if a path isn't specified."
short: "e",
description: "Ignore the last opened directory or workspace in favor of an empty window."
},
"new-window": {
type: "boolean",
Expand Down
2 changes: 1 addition & 1 deletion src/node/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class VscodeProvider {
options.args._ && options.args._.length > 0
? { url: path.resolve(options.args._[options.args._.length - 1]) }
: undefined,
!options.args["no-project"] ? lastVisited : undefined,
!options.args["ignore-last-opened"] ? lastVisited : undefined,
])

settings.write({
Expand Down
0