mirror of
https://github.com/nushell/nushell.git
synced 2025-02-28 00:12:36 +01:00
* Add dice subcommand to random command * Update random dice test name * Stream results of random dice * Thanks Clippy!
867 B
867 B
random
Use random
to generate random values
bool
random bool
: Generate a random boolean value
bool Flags
-b
,--bias
<number>: Adjusts the probability of a "true" outcome
bool Examples
> random bool
false
> random bool --bias 0.75
true
dice
random dice
: Generate a random dice roll
dice Flags
d
,--dice
<integer>: The amount of dice being rolleds
,--sides
<integer>: The amount of sides a die has
dice Examples
> random dice
4
> random dice -d 10 -s 12
───┬────
0 │ 11
1 │ 11
2 │ 11
3 │ 11
4 │ 5
5 │ 3
6 │ 10
7 │ 7
8 │ 3
9 │ 1
───┴────
uuid
random uuid
: Generate a random uuid4 string
uuid Examples
> random uuid
8af4de39-acbc-42f0-94d1-7cfad6c01f8b