Skip to content

Commit

Permalink
Update StyleGuide.md to note preference for curl over wget
Browse files Browse the repository at this point in the history
Relates to #18477
  • Loading branch information
mdlinville committed Apr 15, 2024
1 parent 7f39747 commit 7aad0c4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions StyleGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,16 @@ Highlight shell and SQL commands where appropriate using the following info:

Start shell code samples with `~~~ shell` followed by a line break. The first character of the next line must be the terminal marker `$`. For multi-line shell commands, use a backslash (`\`) at the end of each line to indicate a line break.

In an example command to download an artifact using the command line, `curl` is preferred over `wget` because it is included in Linux, macOS, and recent builds of Windows. Use syntax like:

```
curl -o {optional_output_path}/{output_file_name} [-H {header_keys_and_values}] {url}
```

- If you do not specify `-o` or `--output`, the URL's contents are printed to standard output, even if it is a binary file. This can corrupt your terminal session and is useful only when piping or redirecting the output to a subsequent command.
- If you do not include a path in your output file name, the file is saved to the current working directory.
- Headers are optional, but certain APIs such as the CockroachDB Cloud API require certain header fields to be set.

**SQL code samples**

SQL code samples are broken into two sections: commands and responses.
Expand Down

0 comments on commit 7aad0c4

Please sign in to comment.