2
0
Fork 0
mirror of https://github.com/nushell/nushell synced 2025-02-13 12:43:48 +00:00
Commit graph

256 commits

Author SHA1 Message Date
John-Goff
c13fe83784
Rename count to length ()
* update docs to refer to length instead of count

* rename count to length

* change all occurrences of 'count' to 'length' in tests

* format length command
2021-03-14 10:46:40 +13:00
Jonathan Turner
22ae962b57
Bump to 0.28 () 2021-03-09 23:40:17 +13:00
Jonathan Turner
aa6c6120f6
Bump to 0.27.2 ()
* Bump to 0.27.2

* Fix clippy and test
2021-02-26 17:55:25 +13:00
Jonathan Turner
deff1aa63b
Bump to 0.27.1 () 2021-02-18 18:54:48 +13:00
Jonathan Turner
039f223b53
Bump to 0.27 () 2021-02-16 19:20:05 +13:00
ammkrn
aa564f5072
display boolean config options as true/false instead of Yes/No () 2021-02-11 21:50:33 +13:00
Jonathan Turner
c83aea3c89
Bump to 0.26.1 () 2021-02-05 19:38:04 +13:00
Leonhard Kipp
d0a2a02eea
Add possibility to declare optional parameters and switch flags ()
* Add possibility to declare optional parameters and switch flags

With this commit applied it is now possible to specify optional parameters and flags
as switches. This PR **only** makes guarantees about **parsing** optional flags and
switches correctly. This PR **does not guarantee flawless functionality** of
optional parameters / switches within scripts.
functionality within scripts. Example:

test.nu
```shell
def my_command [
    opt_param?
    opt_param2?: int
    --switch
] {echo hi nushell}
```

```shell
> source test.nu
> my_command -h
───┬─────────
 0 │ hi
 1 │ nushell
───┴─────────
Usage:
  > my_command <mandatory_param> (opt_param) (opt_param2) {flags}

Parameters:
  <mandatory_param>
  (opt_param)
  (opt_param2)

Flags:
  -h, --help: Display this help message
  --switch
  --opt_flag <any>
```

* Update def docs
2021-01-28 06:31:29 +13:00
Jonathan Turner
388973e9ab
Bump to 0.26.0 () 2021-01-26 23:07:08 +13:00
Rust大闸蟹
088e662285
Replace git current_branch to shadow-rs branch ()
* update to shadow-rs 0.4. use easy

* update shadow-rs to 0.5

* fix version not used

* update

* update Cargo.lock

* update Cargo.lock

* fix wasm build error when use dependence git2
fix error link:https://dev.azure.com/nushell/nushell/_build/results?buildId=4858&view=logs&j=1a745d4c-b027-5f34-06d8-d6f256bfe9f9&t=a0a335cb-fa1f-5bbf-be01-1a90d6899e54

* remove code not used; fix warning by RUSTFLAGS="-D warnings" build error

* upgrade shadow-rs 0.5.2

* upgrade shadow-rs 0.5.7

make nushell reduce dependence crates smaller and  build fast.

* upgrade shadow-rs 0.5.8

fix when use api 'strip_prefix()' method in less than rust1.45.0 build failed

* use shadow-rs branch replace with current_branch method;
remove and reduce git dependencies.

* upgrade shadow-rs 0.5.12-pre,test build error with wasm

* upgrade Cargo.lock

* upgarde shadow-rs depencdence

* fix build error in wasm

* add clippy warning
2021-01-16 07:06:29 +13:00
Leonhard Kipp
f9b0b81eb2
Add def documentation () 2021-01-15 20:21:18 +13:00
Leonhard Kipp
63a62e19f9
Update alias docs () 2021-01-13 14:46:15 +13:00
Louis Pilfold
dfb1e22559
Update alias docs to new syntax ()
This confused me today after upgrading Nu. I believe this is now correct.
2021-01-13 08:30:27 +13:00
Jonathan Turner
7d07881d96
Bump to 0.25.2 () 2021-01-12 07:50:53 +13:00
Jonathan Turner
5e72b2a797
Bump to 0.25.1 for the hotfix release () 2021-01-06 15:16:08 +13:00
Jonathan Turner
d297199d7c
Bump to 0.25.0 () 2021-01-05 18:10:24 +13:00
Joseph T. Lyons
a5f7600f6f
Fix typos () 2021-01-02 17:24:32 +13:00
Leonhard Kipp
48f535f02e
Display aliases and custom commands in which; fix ()
* Display aliases and custom commands in which; Fix 

Example output of nu after the commit is applied:

```shell
/home/leo/repos/nushell(feature/which_inspect_alias)> def docker-ps [] { docker ps --format '{{json .}}' | from json -o }
/home/leo/repos/nushell(feature/which_inspect_alias)> which docker-ps
───┬───────────┬────────────────────────┬─────────
 # │    arg    │          path          │ builtin
───┼───────────┼────────────────────────┼─────────
 0 │ docker-ps │ nushell custom command │ No
───┴───────────┴────────────────────────┴─────────
/home/leo/repos/nushell(feature/which_inspect_alias)> alias d = gid pd
/home/leo/repos/nushell(feature/which_inspect_alias)> which d
───┬─────┬───────────────┬─────────
 # │ arg │     path      │ builtin
───┼─────┼───────────────┼─────────
 0 │ d   │ nushell alias │ No
───┴─────┴───────────────┴─────────
```

* Update documentation
2021-01-02 06:40:44 +13:00
Jonathan Turner
ac578b8491
Multiline scripts part 2 ()
* Begin allowing comments and multiline scripts.

* clippy

* Finish moving to groups. Test pass

* Keep going

* WIP

* WIP

* BROKEN WIP

* WIP

* WIP

* Fix more tests

* WIP: alias starts working

* Broken WIP

* Broken WIP

* Variables begin to work

* captures start working

* A little better but needs fixed scope

* Shorthand env setting

* Update main merge

* Broken WIP

* WIP

* custom command parsing

* Custom commands start working

* Fix coloring and parsing of block

* Almost there

* Add some tests

* Add more param types

* Bump version

* Fix benchmark

* Fix stuff
2020-12-18 20:53:49 +13:00
Jonathan Turner
5183fd25bb
Bump version () 2020-12-16 09:13:18 +13:00
Jonathan Turner
a30837298d
Bump version () 2020-12-16 06:30:50 +13:00
xolve
f377a3a7b4
Added math abs command. () 2020-12-16 05:37:12 +13:00
Chris Gillespie
af2f064f42
Add random chars cmd () 2020-12-09 06:43:46 +13:00
Jonathan Turner
e299e76fcf
Bump to 0.23 () 2020-11-25 07:22:27 +13:00
Jonathan Turner
cb8491cfee
Bump to 0.22 () 2020-11-04 07:31:41 +13:00
Jonathan Turner
a6fdee4a51
bump to 0.21.1 ()
* bump to 0.21.1

* bump trash version
2020-10-26 21:10:06 +13:00
Andrés N. Robalino
77ffd06715
Allow appending table literals. () 2020-10-22 03:26:30 -05:00
morbatex
0d8064ed2d
Add rounding functionalties ()
* added math round

* added math floor

* added math ceil

* added math.md examples

* moved the detection of nonnumerical values in ceil/floor/round

* math round now works on streams

* math floor now works on streams

* math ceil now works on streams
2020-10-22 13:18:27 +13:00
Joseph T. Lyons
bf2363947b
Add pretty flag to to md ()
* First draft for adding a `pretty` flag to `to md`

* rustfmt

* Fix Clippy warnings

* rustfmt

* Using Clippy suggestion broken code, reverting and putting in a statement to ignore clippy warning

* Add test for `to md -p`
2020-10-15 16:20:55 +13:00
Jonathan Turner
770e5d89f2
Bump to 0.21 () 2020-10-14 06:19:09 +13:00
Andrés N. Robalino
5d945ef869
empty? rewrite. () 2020-10-06 05:21:20 -05:00
Chris Gillespie
2f1016d44f
Add examples to update cmd () 2020-10-01 20:13:42 -05:00
Andrés N. Robalino
a56abb6502
Bar Chart baseline. ()
Bar Chart ready.
2020-09-30 13:27:52 -05:00
Jonathan Turner
ebba89ea31
Bump to 0.20 () 2020-09-22 19:54:46 +12:00
Radek Vít
798766b4b5
Remove panics from random integer and make the constraint more idiomatic ()
* Remove panics from random integer and make the constraint more idiomatic

* Add open intervals to NumericRange
2020-09-20 08:41:49 +12:00
Chris Gillespie
50cbf91bc5
Remove trim in favor of str trim () 2020-09-16 15:59:32 -04:00
Chris Gillespie
3150e70fc7
Add cpu time to ps -l () 2020-09-07 17:02:45 +12:00
smaydew
1ffbb66e64
Initial implementation of random integer subcommand. ()
* Initial implementation of random integer subcommand.

* Added additional examples.

Co-authored-by: Stacy Maydew <stacy.maydew@starlab.io>
2020-09-04 07:23:02 +12:00
Jonathan Turner
882cf74137
Bump to 0.19.0 () 2020-09-02 15:37:06 +12:00
Chris Gillespie
f54cf8a096
Size command: rename max length to bytes ()
Since max length is just getting the byte length, rename to bytes
in order to be more clear.
2020-09-01 14:51:35 +12:00
Chris Gillespie
c14b209276
Add missing math commands to docs () 2020-08-30 15:32:38 +12:00
Gurpreet Singh
303a9defd3
Added math product support ()
* added math product: working initial impl

* resolving merge conflicts

* impl std::ops::Mul for Filesize

* rebased with main; refactored product implementation

* fixed error msg, added docs for math product
2020-08-27 17:58:01 +12:00
Jörn Zaefferer
ee26590011
touch: support multiple arguments ()
Fixes 
2020-08-22 12:08:30 +12:00
Leonhard Kipp
0dd1403a69
Sleep command ()
* Add deserialization of Primitive::Duration; Fixes 

* Implement Sleep command

* Add comment saying you should name your rest field "rest"

* Fix typo

* Add documentation for sleep command
2020-08-22 05:51:29 +12:00
Joseph T Lyons
c6588c661a Add column flag to count command 2020-08-15 07:52:59 -05:00
Joseph T Lyons
8f00713ad2 Update histogram examples 2020-08-15 07:51:12 -05:00
Jonathan Turner
da4d24d082
Bump to 0.18.2. Move starship external. ()
* Bump to 0.18.2. Move starship external.

* Fix failing test
2020-08-14 07:02:45 +12:00
Jonathan Turner
87d71604ad
Bump to 0.18.1 () 2020-08-12 15:59:28 +12:00
Joseph T. Lyons
cc3c10867c
Histogram no longer requires a wrap command before it on unnamed columns () 2020-08-12 09:42:59 +12:00
Jonathan Turner
2ad07912d9
Bump to 0.18 () 2020-08-11 18:44:53 +12:00