Commit Graph

5066 Commits

Author SHA1 Message Date
Jakub Žádník
94a0e3060a
Update CI (#4445)
* Add different features combinations

* Specify styles manually

* Fix args

* Fix typo

* Let other CI jobs finish if one fails

* Fix unused symbols without plugin feature

* Put "which" tests behind "which" feature

* Add Python virtualenv job

* Oops forgot git command

* Install Nushell in virtualenv tests

* Add names to steps; Test v.env in separate step

* cd into virtualenv

* Do not run on Python 2.7

* Build Nushell after formatting and clippy checks
2022-02-12 22:48:17 +02:00
JT
eceb2d5106
Early return on subcommands (#4443)
* Early return on subcommands

* More streamlining
2022-02-12 11:39:38 -05:00
JT
9829e449e3
Update bug_report.yml
Put example pipeline in the placeholder also
2022-02-12 10:24:38 -05:00
Justin Ma
baf6348e66
feat: add unalias to deprecated command (#4440) 2022-02-12 17:06:52 +02:00
JT
cc171b6ad4
Improve completions with no starting characters (#4433)
* Improve completions with no starting characters

* Fix subexpressions, crashes, and differentiate externals
2022-02-12 10:04:10 -05:00
Darren Schroeder
0256e42e3b
tweak plugin names in cargo.toml (#4441) 2022-02-12 08:14:17 -06:00
Darren Schroeder
48f4766a5f
forgot some plugins (#4439) 2022-02-12 06:55:20 -06:00
Darren Schroeder
8ccc8e445f
tweak the wix (#4438) 2022-02-12 06:43:52 -06:00
Fernando Herrera
1fd7b9ac38
roll commands (#4437)
* roll commands

* removed repeated funtion
2022-02-12 06:11:54 -05:00
Darren Schroeder
b4b7524206
changed example description (#4434) 2022-02-12 06:10:41 -05:00
Jakub Žádník
328f7e92a0
Hide alias (#4432)
* Add alias interning

Now, AliasId is used to reference aliases stored in EngineState, similar
to decls, blocks, etc.

* Fix wrong message

* Fix using decl instead of alias

* Extend also alias id visibility

* Merge also aliases from delta

* Add alias hiding code

Does not work yet but passes tests at least.

* Fix wrong alias lookup and visibility appending

* Add hide alias tests

* Fmt & Clippy

* Fix random clippy warnings in "which" command
2022-02-12 11:50:37 +02:00
Fernando Herrera
fcc13224c1
headers command (#4414)
* headers command

* correct behaviour headers
2022-02-11 21:06:49 -05:00
Robert O'Shea
926177235c
Added quiet flag rm command #4423 (#4430)
* rm now uses -f flag to not print anything

* changed quiet flag to q not f

* Changed value passed to Value::Nothing in rm command
2022-02-12 01:22:40 +02:00
Genna Wingert
85d1a681c7
Remove stringification for binary values in save command (#4428)
* Remove stringification for binary values in `save`

* Fix typo and clippy warning
2022-02-11 14:26:36 -05:00
Darren Schroeder
968ef1e953
add parameter to set thread count for parallel commands (#4424) 2022-02-11 12:46:36 -06:00
JT
a16e485cce
Add support for defining known externals with their own custom completions (#4425)
* WIP for known externals

* Now completions can work from scripts

* Add support for definiing externs

* finish cleaning up old proof-of-concept
2022-02-11 13:38:10 -05:00
JT
a767fa369c
Improve quote path completions with drill-down (#4422) 2022-02-11 09:42:15 -05:00
JT
886ed5ab2d
Fix captures (#4421)
* Fix rowcondition and import captures

* Only check extra blocks if not yet seen
2022-02-11 07:37:10 -05:00
JT
e16d6ae00c
Improve external command completions with spaces (#4420) 2022-02-11 07:05:48 -05:00
Darren Schroeder
ba4d8ae8c3
tweak wording (#4415) 2022-02-10 17:27:51 -06:00
JT
e6db37bc82
Fix multi-command variable captures (#4413) 2022-02-10 18:15:15 -05:00
Darren Schroeder
0e5f4d88c5
turn down the volume a little bit (#4412) 2022-02-10 15:22:39 -06:00
JT
2e3b2a48ee
Fix string interpolation paren cases (#4410) 2022-02-10 11:09:08 -05:00
Fernando Herrera
5cf91cb30d
deprecated commands (#4405)
* deprecated commands

* deprecated insert command
2022-02-10 12:55:19 +00:00
Darren Schroeder
28947ff9a9
fix broken -w param for grid (#4397) 2022-02-10 07:29:53 -05:00
JT
c2118e7505
Fix help flag (#4398)
* Match 'help command' to 'command --help'

* Fix tests
2022-02-09 21:24:29 -05:00
Stefan Holderbach
e1f98c1bfd
Fix trash-support feature flag (#4394)
Pass it through to be inclued with `--all-features`

Make clippy without `--all-features` happy
2022-02-09 18:20:46 -05:00
Genna Wingert
12d4c2986c
Fix docs for kill command in engine-q (#4393) 2022-02-09 18:20:20 -05:00
Darren Schroeder
f275644e13
add --perf cli param (#4391)
* add `--perf` cli param

* clippy

* fixed 2 `cp` tests on windows
2022-02-09 16:08:16 -06:00
JT
fc88a8538b
Make let-env work like let (#4389)
* Make let-env work like let

* Fix tests
2022-02-09 13:41:41 -05:00
JT
5d18e07b7d
Bump reedline (#4388) 2022-02-09 11:04:31 -05:00
JT
5a1d81221f
Move 'nth' into 'select' (#4385) 2022-02-09 09:59:40 -05:00
JT
43850bf20e
Re-port filesystem commands (#4387)
* Re-port the filesystem commands

* Remove commented out section
2022-02-09 09:56:27 -05:00
Ray Henry
94ab981235
Fix "Index out of bounds" when input to the group-by filter is empty. #4369 (#4382)
* Fix "index out of bounds" when input to group-by is empty #4369

* Fix formatting #4369

* Adds test for empty input

Co-authored-by: Ray Henry <ray.henry@thermofisher.com>
2022-02-09 08:47:47 -06:00
JT
f9e1c4ef50
Use 'table' on scripts and -c commands (#4377)
* Use 'table' on scripts and -c commands

* Fix tests

* Oops, missed a spot
2022-02-09 05:58:54 -05:00
Stefan Holderbach
659da3c4a4
Make ANSI stripping lazy in more places (#4380)
Same rationale as in #4378

Also accelerate `grid`

before:

```
Command being timed: "./eager_nu -c for i in 0..100000 { echo whatever } | grid"
        User time (seconds): 0.21
        System time (seconds): 0.05
        Percent of CPU this job got: 36%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.71
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 48112
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 10580
        Voluntary context switches: 266
        Involuntary context switches: 2595
        Swaps: 0
        File system inputs: 0
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```

after:

```
Command being timed: "./lazy_nu -c for i in 0..100000 { echo whatever } | grid"
        User time (seconds): 0.14
        System time (seconds): 0.05
        Percent of CPU this job got: 33%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.60
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 48272
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 1
        Minor (reclaiming a frame) page faults: 10582
        Voluntary context switches: 286
        Involuntary context switches: 831
        Swaps: 0
        File system inputs: 56
        File system outputs: 0
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0
```
2022-02-08 18:25:31 -06:00
Stefan Holderbach
9c7feb2b19
Reduce table allocs: only strip ANSI if necessary (#4378)
For the width calculations for table layout the `strip_ansi` function
has to be called frequently. By checking for the ASCII control chars
(0x00 to 0x1f) except `\n` that are stripped by `strip_ansi_escapes` the number of
necessary allocations can be reduced significantly for the simple case
of text not containing ANSI escapes.

**Benchmark:**

```
nu -c "for i in 0..1000 { ls } | flatten | table"
```

**Allocation reduction**

Running on the nushell repo root as the directory, this change reduces the
allocation volume by approximately 400 MB

(Measured run via KDE heaptrack)
**Speed improvement to output**

Measured via `/usr/bin/time -v`

*before*

```
Command being timed: "./eager_nu -c for i in 0..1000 {ls} | flatten | table"
	User time (seconds): 0.87
	System time (seconds): 0.14
	Percent of CPU this job got: 87%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.16
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 18888
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 4809
	Voluntary context switches: 38
	Involuntary context switches: 14
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
```

*after*

```
Command being timed: "./lazy_nu -c for i in 0..1000 {ls} | flatten | table"
	User time (seconds): 0.63
	System time (seconds): 0.14
	Percent of CPU this job got: 80%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.97
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 18660
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 0
	Minor (reclaiming a frame) page faults: 5149
	Voluntary context switches: 24
	Involuntary context switches: 5
	Swaps: 0
	File system inputs: 0
	File system outputs: 0
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0
```
2022-02-08 17:43:32 -06:00
panicbit
cf20eed7bc
Support records in reject command (#4373)
* support records in reject command

* add reject command tests
2022-02-08 15:57:46 -05:00
Darren Schroeder
6d303f2ca3
update starship docs (#4375) 2022-02-08 13:08:02 -06:00
JT
b16e72f0a5
Update README.md 2022-02-08 13:59:08 -05:00
JT
56ba57c74a
Update README.md 2022-02-08 13:57:40 -05:00
Darren Schroeder
baceb54660
update ls_colors defaults (#4371) 2022-02-08 11:13:04 -06:00
JT
19caef260d
Fix 'enter' to expand path before checking for it (#4370) 2022-02-08 11:21:17 -05:00
Darren Schroeder
565be6aaef
change pivot to transpose 2022-02-08 09:32:27 -06:00
JT
7242e52faa
Merge pull request #4364 from nushell/merge-engine-q
Merge engine-q into Nushell (second try)
2022-02-08 10:02:28 -05:00
JT
101f4f62a8 gitignore conflict fix 2022-02-08 09:23:41 -05:00
JT
5fabfda57b merge main 2022-02-08 08:28:21 -05:00
JT
a660720b68
Bump to 0.44 (#4365) 2022-02-07 20:15:46 -05:00
JT
d70d91e559 Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Fernando Herrera
10c4c50f1f removed old files 2022-02-07 19:28:22 +00:00