X Tutup
Skip to content

gh cs cp: copy files between local/remote file systems#4553

Merged
adonovan merged 2 commits intotrunkfrom
cs-cp
Oct 18, 2021
Merged

gh cs cp: copy files between local/remote file systems#4553
adonovan merged 2 commits intotrunkfrom
cs-cp

Conversation

@adonovan
Copy link
Copy Markdown
Contributor

@adonovan adonovan commented Oct 18, 2021

This PR adds a 'cs cp' subcommand that copies files between the local and remote file systems, using the "remote:" prefix to indicate the file system of the VM. Argument syntax follows cp and scp convention: one or more source files followed by a destination, which must be directory if there is more than one source. If any source is a directory, the -r (recursive) flag is required.

Fixes #4486

@adonovan adonovan requested a review from a team as a code owner October 18, 2021 15:26
@adonovan adonovan requested review from josebalius and mislav October 18, 2021 15:37
@adonovan adonovan force-pushed the cs-cp branch 3 times, most recently from 730c89b to a1721cc Compare October 18, 2021 16:26
Copy link
Copy Markdown
Contributor

@josebalius josebalius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a quick first pass at it. I think we need to solve the user problem as we shouldn't ship with root hardcoded.

Copy link
Copy Markdown
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this!

Utilizing the remote: prefix for arguments, copying works both ways, right?

@adonovan
Copy link
Copy Markdown
Contributor Author

Utilizing the remote: prefix for arguments, copying works both ways, right?

Yep; you can even copy a mix of local and remote files into a local-or-remote directory, if for some elusive reason you should want to.

Copy link
Copy Markdown
Contributor

@josebalius josebalius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a question but looks great, I took it for a spin 👍

@adonovan adonovan merged commit b96ccb4 into trunk Oct 18, 2021
@adonovan adonovan deleted the cs-cp branch October 18, 2021 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a 'gh cs cp' command to copy files to/from a codespace

4 participants

X Tutup