sail icon indicating copy to clipboard operation
sail copied to clipboard

Open subdirectories

Open kylecarbs opened this issue 6 years ago • 2 comments

I frequently open lib/vscode within code-server.

Maybe

sail run codercom/code-server lib/vscode

kylecarbs avatar Apr 24 '19 19:04 kylecarbs

@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.

ammario avatar Apr 25 '19 18:04 ammario

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.

  1. Remove the existing mount and remount the given new subdirectory This could be weird if there is another open sail window
  2. 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
  3. Make an entirely new container just for that subdirectory Potentially wasteful (?)

Not really sure what sail should do here. Opinions? @ammario @kylecarbs

coadler avatar May 24 '19 00:05 coadler