aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Lynch <mtlynch@users.noreply.github.com>2025-02-13 16:06:10 -0500
committerGitHub <noreply@github.com>2025-02-13 13:06:10 -0800
commitcb5547e3dece175aa372dbfa26e6e9663cdf1c17 (patch)
treeb435e7d6e3cc0ca529182300c682d729029df092 /src
parentbffbc918ee2b349923ca2e7b9b5c8ff8fa1d0cd0 (diff)
downloadzig-cb5547e3dece175aa372dbfa26e6e9663cdf1c17.tar.gz
zig-cb5547e3dece175aa372dbfa26e6e9663cdf1c17.zip
Expand zig fetch usage help doc to explain URL (#22850)
The current zig fetch help docs tell the user to specify a package's URL, but it's unclear what the URL should be. This change expands the help output to explain what URLs the zig fetch command can handle and provides examples of valid URLs. Related: #20096 A git bundle file seems to be the more accurate term, as it's what git uses in its documentation: https://git-scm.com/docs/git-bundle
Diffstat (limited to 'src')
-rw-r--r--src/main.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index 401f6b2296..ce04a92765 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -6956,6 +6956,16 @@ const usage_fetch =
\\Usage: zig fetch [options] <path>
\\
\\ Copy a package into the global cache and print its hash.
+ \\ <url> must point to one of the following:
+ \\ - A git+http / git+https server for the package
+ \\ - A tarball file (with or without compression) containing
+ \\ package source
+ \\ - A git bundle file containing package source
+ \\
+ \\Examples:
+ \\
+ \\ zig fetch --save git+https://example.com/andrewrk/fun-example-tool.git
+ \\ zig fetch --save https://example.com/andrewrk/fun-example-tool/archive/refs/heads/master.tar.gz
\\
\\Options:
\\ -h, --help Print this help and exit