nushell/crates
Antoine Stevan ba6d8ad261
add std repeat command to replace "foo" * 3 (#10339)
related to
- https://github.com/nushell/nushell/issues/10233
- https://github.com/nushell/nushell/pull/10293
- https://github.com/nushell/nushell/pull/10292

inspired by @kubouch 

# Description
this PR adds a `repeat` command to the standard library

# User-Facing Changes
a new `repeat` command in `std`
```nushell
repeat anything a bunch of times, yielding a list of *n* times the input

# Examples
    repeat a string
    > "foo" | std repeat 3 | str join
    "foofoofoo"

Usage:
  > repeat <n>

Flags:
  -h, --help - Display the help message for this command

Parameters:
  n <int>: the number of repetitions, must be positive

Input/output types:
  ╭───┬───────┬───────────╮
  │ # │ input │  output   │
  ├───┼───────┼───────────┤
  │ 0 │ any   │ list<any> │
  ╰───┴───────┴───────────╯
```

# Tests + Formatting
a new test called `repeat_things` in `test_std.nu`

# After Submitting
2023-09-12 21:59:31 +02:00
..
nu_plugin_custom_values Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_example Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_formats Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_gstat Bump git2 from 0.17.2 to 0.18.0 (#10207) 2023-09-04 21:10:25 +00:00
nu_plugin_inc Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cli Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
nu-cmd-base Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-dataframe Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-cmd-extra Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-cmd-lang Allow parse-time evaluation of if (#10326) 2023-09-12 21:35:47 +03:00
nu-color-config rename the types with spaces in them to use - (#9929) 2023-09-06 13:22:12 -05:00
nu-command add a few more columns to linux ps -l output (#10344) 2023-09-12 14:50:05 -05:00
nu-engine Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-explore Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-glob bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-json Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-parser Use slices directly instead of &Vec (#10328) 2023-09-12 11:38:20 +08:00
nu-path Support Termux (#10013) 2023-08-28 09:53:25 +03:00
nu-plugin Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
nu-pretty-hex Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-protocol Allow parse-time evaluation of if (#10326) 2023-09-12 21:35:47 +03:00
nu-std add std repeat command to replace "foo" * 3 (#10339) 2023-09-12 21:59:31 +02:00
nu-system Remove Cargo.lock in subcrates (#10280) 2023-09-09 00:45:43 +02:00
nu-table Update crates-ci/typos and fix new typos (#10313) 2023-09-11 12:37:06 +02:00
nu-term-grid bump nushell to dev version 0.84.1 (#10101) 2023-08-23 15:23:27 -05:00
nu-test-support Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
nu-utils Make cursor_shape optional (#10289) 2023-09-09 13:42:36 -05:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.