Skip to content

Modify default directory/workspace behavior #1132

@code-asher

Description

@code-asher

The current behavior uses this order:

  1. Workspace query parameter.
  2. Folder query parameter.
  3. Last opened item (either workspace or folder).
  4. Whatever was passed on the command-line (either workspace or folder).

Proposed behavior:

  1. Workspace query parameter.
  2. Folder query parameter.
  3. Last opened item for that port (The default project directory seems to be not working correctly #1123)
  4. Last opened item for any port.
  5. Whatever was passed on the command-line.

The only remaining problem I can think of is that currently if you explicitly call code-server it'll favor the last directory instead of whatever you passed on the command line. It feels unexpected to me but we can't easily change that since if you run this in systemd for example you'd probably expect the opposite behavior when the service restarts (favor the last directory instead of what's passed to code-server).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions