Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions cmd/limactl/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,25 @@ const copyHelp = `Copy files between host and guest
Prefix guest filenames with the instance name and a colon.

Backends:
auto - Automatically selects the best available backend (rsync preferred, falls back to scp)
rsync - Uses rsync for faster transfers with resume capability (requires rsync on both host and guest)
scp - Uses scp for reliable transfers (always available)
- **auto**: Automatically selects the best available backend (rsync preferred, falls back to scp)
- **rsync**: Uses rsync for faster transfers with resume capability (requires rsync on both host and guest)
- **scp**: Uses scp for reliable transfers (always available)

Examples:
# Copy file from guest to host (auto backend)
limactl copy default:/etc/os-release .
#### Copy file from guest to host (auto backend)
limactl copy default:/etc/os-release .

# Copy file from host to guest with verbose output
limactl copy -v myfile.txt default:/tmp/
#### Copy file from host to guest with verbose output
limactl copy -v myfile.txt default:/tmp/

# Copy directory recursively using rsync backend
limactl copy --backend=rsync -r ./mydir default:/tmp/
#### Copy directory recursively using rsync backend
limactl copy --backend=rsync -r ./mydir default:/tmp/

# Copy using scp backend specifically
limactl copy --backend=scp default:/var/log/app.log ./logs/
#### Copy using scp backend specifically
limactl copy --backend=scp default:/var/log/app.log ./logs/

# Copy multiple files
limactl copy file1.txt file2.txt default:/tmp/
#### Copy multiple files
limactl copy file1.txt file2.txt default:/tmp/

Copy link
Member

Choose a reason for hiding this comment

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

The output of --help isn't expected to be markdown.

The rendering issue should be better resolved in https://github.com/lima-vm/lima/blob/master/cmd/limactl/gendoc.go

Copy link
Member

Choose a reason for hiding this comment

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

We could wrap the whole help text in a code block, but that would not be so easy to read either?

But escaping the newlines and the # characters would be nice, so that they are not mis-interpreted...

Copy link
Member

@afbjorklund afbjorklund Oct 2, 2025

Choose a reason for hiding this comment

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

Something like this: (line breaks with two spaces before newline , escape the comments with \#)


Backends:
auto - Automatically selects the best available backend (rsync preferred, falls back to scp)
rsync - Uses rsync for faster transfers with resume capability (requires rsync on both host and guest)
scp - Uses scp for reliable transfers (always available)

Examples:
# Copy file from guest to host (auto backend)
limactl copy default:/etc/os-release .


Instead of this: https://lima-vm.io/docs/reference/limactl_copy/

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@afbjorklund afbjorklund Oct 2, 2025

Choose a reason for hiding this comment

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

After fixing the markdown, I found out that the examples were in the wrong place (or it would have been escaped automatically)... But it is still good to fix the output of other commands, to escape the markdown.

Copy link
Contributor Author

@olamilekan000 olamilekan000 Oct 4, 2025

Choose a reason for hiding this comment

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

Just seeing that the intension behind this PR has been adressed. Thanks @afbjorklund
I'll be closing this.

Not to be confused with 'limactl clone'.
`
Expand Down
Loading