sail
sail copied to clipboard
Open subdirectories
I frequently open lib/vscode within code-server.
Maybe
sail run codercom/code-server lib/vscode
@sreya92 has a similar workflow where he's at the project's dir and wants to do sail run .
I think these concepts can be merged, and if the directory we're pointing is a subdir of a project, to open it with that relative path.
The project will still need to be in the canonical directory, or else we have issues of sail run <org>/<project> becoming ambiguous.
Half of the problem solved here: https://github.com/cdr/sail/pull/198
Some additional thinking will need to be done on default behavior when opening subdirectories so I pulled them apart
Mainly, what to do when a user opens a subdirectory of an already running container. I thought up 3 possible solutions but would like some feedback.
- Remove the existing mount and remount the given new subdirectory This could be weird if there is another open sail window
- Restart code-server and set its base directory to the new subdirectory This would also mean we need to keep track of what directory code-server is open on and suffers from the same problem as option 1
- Make an entirely new container just for that subdirectory Potentially wasteful (?)
Not really sure what sail should do here. Opinions? @ammario @kylecarbs