Skip to content

Commit

Permalink
remove random integer in favor of random int (#10568)
Browse files Browse the repository at this point in the history
related to
- #10520

# Description
this PR is a followup to #10520
and removes the `random integer` command completely, in favor of `random
int`.

# User-Facing Changes
`random integer` has been fully moved to `random int`
```nushell
> random integer 0..1
Error: nu::parser::extra_positional

  × Extra positional argument.
   ╭─[entry #1:1:1]
 1 │ random integer 0..1
   ·        ───┬───
   ·           ╰── extra positional argument
   ╰────
  help: Usage: random
```

# Tests + Formatting
tests have been moved from
`crates/nu-command/tests/commands/random/integer.rs` to
`crates/nu-command/tests/commands/random/int.rs`

# After Submitting
mention in 0.87.0 release notes
  • Loading branch information
amtoine committed Oct 19, 2023
1 parent 999f7b2 commit c5e1b64
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 133 deletions.
1 change: 0 additions & 1 deletion crates/nu-command/src/default_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState {
RandomDice,
RandomFloat,
RandomInt,
RandomInteger,
RandomUuid,
};

Expand Down
130 changes: 0 additions & 130 deletions crates/nu-command/src/random/integer.rs

This file was deleted.

2 changes: 0 additions & 2 deletions crates/nu-command/src/random/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ mod chars;
mod dice;
mod float;
mod int;
mod integer;
mod random_;
mod uuid;

Expand All @@ -12,6 +11,5 @@ pub use self::chars::SubCommand as RandomChars;
pub use self::dice::SubCommand as RandomDice;
pub use self::float::SubCommand as RandomFloat;
pub use self::int::SubCommand as RandomInt;
pub use self::integer::SubCommand as RandomInteger;
pub use self::uuid::SubCommand as RandomUuid;
pub use random_::RandomCommand as Random;

0 comments on commit c5e1b64

Please sign in to comment.