Auto-generate markdown command docs (#4451)

* Finish updating

* a couple improvements

* Update renames

* cleanup examples
This commit is contained in:
JT
2022-02-13 21:22:51 -05:00
committed by GitHub
parent 06f5affc0b
commit 8c0a2d3c15
478 changed files with 7676 additions and 8045 deletions

View File

@ -1,128 +1,12 @@
# random
---
title: random
layout: command
version: 0.59.0
---
Use `random` to generate random values
Generate a random values.
## bool
## Signature
* `random bool`: Generate a random boolean value
```> random ```
### bool Flags
* `-b`, `--bias` \<number>: Adjusts the probability of a "true" outcome
### bool Examples
```shell
> random bool
false
```
```shell
> random bool --bias 0.75
true
```
## dice
* `random dice`: Generate a random dice roll
### dice Flags
* `d`, `--dice` \<integer>: The amount of dice being rolled
* `s`, `--sides` \<integer>: The amount of sides a die has
### dice Examples
```shell
> random dice
4
```
```shell
> random dice -d 10 -s 12
───┬────
011
111
211
311
45
53
610
77
83
91
───┴────
```
```shell
> random dice --dice 1024 --sides 16 | histogram | sort-by occurrences
────┬───────┬─────────────┬────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────
# │ value │ occurrences │ percentage │ frequency
────┼───────┼─────────────┼────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────
0657 │ 75.00% │ ***************************************************************************
11259 │ 77.63% │ *****************************************************************************
2359 │ 77.63% │ *****************************************************************************
31660 │ 78.95% │ ******************************************************************************
41361 │ 80.26% │ ********************************************************************************
51162 │ 81.58% │ *********************************************************************************
6562 │ 81.58% │ *********************************************************************************
7962 │ 81.58% │ *********************************************************************************
8463 │ 82.89% │ **********************************************************************************
9864 │ 84.21% │ ************************************************************************************
101065 │ 85.53% │ *************************************************************************************
111566 │ 86.84% │ **************************************************************************************
121467 │ 88.16% │ ****************************************************************************************
13769 │ 90.79% │ ******************************************************************************************
14172 │ 94.74% │ **********************************************************************************************
15276 │ 100.00% │ ****************************************************************************************************
────┴───────┴─────────────┴────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────
```
## uuid
* `random uuid`: Generate a random uuid4 string
### uuid Examples
```shell
> random uuid
8af4de39-acbc-42f0-94d1-7cfad6c01f8b
```
## integer
* `random integer`: Generate a random integer
### integer Flags
* `m`, `--min` \<integer>: The minimum value to generate
* `x`, `--max` \<integer>: The maximum value to generate
### integer Examples
```shell
> random integer
42
```
```shell
> random integer 5000..
8700890823
```
```shell
> random integer ..100
73
```
```shell
> random integer 100000..200000
173400
```
### chars Examples
Generate a random password of length 15
```shell
> random chars -l 15
fWBSbE7QtaoJGeo
```