Skip to content

Commit cb5547e

Browse files
authored
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
1 parent bffbc91 commit cb5547e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6956,6 +6956,16 @@ const usage_fetch =
69566956
\\Usage: zig fetch [options] <path>
69576957
\\
69586958
\\ Copy a package into the global cache and print its hash.
6959+
\\ <url> must point to one of the following:
6960+
\\ - A git+http / git+https server for the package
6961+
\\ - A tarball file (with or without compression) containing
6962+
\\ package source
6963+
\\ - A git bundle file containing package source
6964+
\\
6965+
\\Examples:
6966+
\\
6967+
\\ zig fetch --save git+https://example.com/andrewrk/fun-example-tool.git
6968+
\\ zig fetch --save https://example.com/andrewrk/fun-example-tool/archive/refs/heads/master.tar.gz
69596969
\\
69606970
\\Options:
69616971
\\ -h, --help Print this help and exit

0 commit comments

Comments
 (0)