You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add back removed ignore-last-opened functionality #4487
changed the title [-]Add back removed `ignore-last-opened` functionality (actually the last opened functionality is missing entirely)[/-][+]Add back removed `ignore-last-opened` functionality [/+]on Nov 10, 2021
We think this may be in main. I will test then close if true.
If you pass that flag, it should open a blank editor (even if you open a new folder - without the folder param, it should be blank).
If you pass that flag as well as give a default directory on the command line, instead of blank, it should always open that workspace.
# should open previously opened
code-server
# should always open blank
code-server --ignore-last-opened
# should always open the default directory
code-server --ignore-last-opened .
code-server # should always open last opened
code-server --ignore-last-opened # should always show blank/no workspace (purple bar)
code-server --ignore-last-opened .# should always open current directory
run code-server
go to localhost:8080
open some directory like /tmp
go to localhost:8080 again (remove ?folder param if any)
Activity
[-]Add back removed `ignore-last-opened` functionality (actually the last opened functionality is missing entirely)[/-][+]Add back removed `ignore-last-opened` functionality [/+]jsjoeio commentedon Nov 16, 2021
Raw Notes
Get the last opened directory (folder or workspace).
This is where it used to be: https://github.com/cdr/code-server/blob/v3.12.0/src/node/vscode.ts#L39-L56
We could write to vscode settings. How do we do that? Maybe the `sett
This is how you get the Settings (StorageService)

If query variables are set, use those instead. Write that to settings.
Priority
ewquery, then we set it toundefined(I guess it means closed)Implementation
_getWorkspaceFromQueryVariables()_getWorkspaceFromSettings()Testing
_getWorkspaceFromCLIjsjoeio commentedon Nov 22, 2021
We believe this has been fixed via coder/vscode#18 but assigning to @code-asher to confirm and close.
code-asher commentedon Nov 29, 2021
jsjoeio commentedon Nov 29, 2021
Ahhh okay so we need to implement this still then.
jsjoeio commentedon Nov 29, 2021
We think this may be in
main. I will test then close if true.If you pass that flag, it should open a blank editor (even if you open a new folder - without the folder param, it should be blank).
If you pass that flag as well as give a default directory on the command line, instead of blank, it should always open that workspace.
"Economists hate this one trick..."
jsjoeio commentedon Nov 30, 2021
I tested the above cases and here is what the results where.
✅ Running code-server should open previously opened directory
This works as expected. Steps to reproduce:
yarn watchto start code-server locallycs-testcs-testopened in new tab✅ Running
code-server --ignore-last-openedshould show blank every timeyarn watch --ignore-last-openedto start code-server locallycs-test✅ Running
code-server --ignore-last-opened .should always open current directoryyarn watch --ignore-last-opened .to start code-server locallycs-test.(in my casecode-server)Awesome work by @TeffenEllis! 🎉
This has indeed been fixed by coder/vscode#18