Commit Graph

1424 Commits

Author SHA1 Message Date
Jakub Žádník
56aacc4852
Use environment variable for env_conversions (#4566)
* Handle string->value env conv. with env. var.

Also adds the environment variable for Path/PATH and removes it from
config.

* Simplify getting the string->value conversion

* Refactor env conversion into its own function

* Use env var for to_string conversion; Remove conf

* Fix indentation in default config
2022-02-20 16:27:59 +02:00
JT
643c5097d6
Default config improvements (#4565)
* Default config improvements

* Finish cleanup

* Add some comments
2022-02-20 07:48:46 -05:00
Fernando Herrera
52ee1917ba
default config file (#4554)
* default config file

* fmt on files

* default file in separate file

* log level flag for performance logs

* clippy error
2022-02-20 05:08:53 -05:00
Justin Ma
aea4355d04
refactor: change column names from 'Column*' to 'column*' (#4556) 2022-02-19 19:26:47 -05:00
Michael Angerman
a6c565ed4e
change wording on config file (#4555) 2022-02-19 19:25:07 -05:00
Fernando Herrera
965cea3af5
flag to pass config file in nu (#4552)
* flag to pass config file in nu

* return when no folder is created

* simple syntax for function
2022-02-19 14:54:43 -06:00
Fernando Herrera
0f4f660759
better keybinding parsing (#4543) 2022-02-18 19:00:23 -06:00
Jakub Žádník
c893cc1485
Add config to NuCompleter (#4538) 2022-02-18 13:54:13 -05:00
JT
06f9047be4
Add an explicit 'print' command (#4535) 2022-02-18 13:43:34 -05:00
JT
786e4ab971
Make 'for' implicitly filter out nothings (#4536)
* Make 'for' implicitly filter out nothings

* Fix test
2022-02-18 13:41:41 -05:00
Genna Wingert
a967854332
Fix stream printing on Windows (#4527)
Co-authored-by: Genna Wingert <wingertge@gmail.com>
2022-02-18 08:10:20 -06:00
Jakub Žádník
c7c427723b
Test support fixes (#4517)
* Fix failing pipeline()

The `skip(1)` was there likely to remove the welcome message.

* Fix typo

* Fix nu! test macro to enter cwd correctly

Nushell's current working directory is determined primarily by the PWD
environment variable.
2022-02-18 00:23:04 +02:00
Stefan Stanciulescu
d50ccdf083
Add newline after version printout (#4508) 2022-02-17 06:29:58 -06:00
JT
6e733f49bc
Require block params (#4505)
* Require block params

* Improve errors
2022-02-17 06:40:24 -05:00
Stefan Stanciulescu
f169a9be3b
Add version as a flag (#4507) 2022-02-17 05:02:46 -06:00
JT
5b6156687e
Use partial_cmp and make -i case insensitive (#4498)
* Use partial_cmp and make -i case insensitive

* Insensitive sort multiple columns
2022-02-16 11:12:49 -05:00
JT
644435bfe3
Move and enable with-env test (#4489) 2022-02-16 04:59:44 -05:00
JT
e763a8dcef
Auto-hide aliases to prevent recursion (#4487) 2022-02-15 17:36:24 -05:00
JT
56b3fc61a3
Remove statements, replaced by pipelines (#4482) 2022-02-15 14:31:14 -05:00
JT
9114a2d31d
Ensure that reduce has a valid span (#4479) 2022-02-15 07:59:51 -05:00
JT
84f85ff9ae
Fix to json escape logic (#4478) 2022-02-15 06:55:57 -05:00
JT
fbaafaa459
Make param parsing more resilient, correct missing param error (#4470) 2022-02-14 12:33:47 -05:00
JT
f3d3e819fb
Fix main in scripts with captures (#4468)
* Fix main in scripts with captures

* Remove old comments
2022-02-14 10:53:48 -05:00
Andrew Barnes
77eb4c4188
Fix default duplicates column (#4452)
* Add test to ensure default not adding dup. columns

* Fix for default adding duplicate columns
2022-02-13 05:38:46 -05:00
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
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
Darren Schroeder
968ef1e953
add parameter to set thread count for parallel commands (#4424) 2022-02-11 12:46:36 -06: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
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
JT
c2118e7505
Fix help flag (#4398)
* Match 'help command' to 'command --help'

* Fix tests
2022-02-09 21:24:29 -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
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
JT
d70d91e559 Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Fernando Herrera
fdce6c49ab engine-q merge 2022-02-07 19:11:34 +00:00
JT
8a373dd554
Add each window (#966) 2022-02-06 20:23:18 -05:00
JT
3eba90232a
Port each group (#953) 2022-02-05 12:34:35 -05:00
JT
f29dbeddd7
Allow let-env to be dynamic (#940) 2022-02-04 16:19:13 -05:00
Jakub Žádník
fefd5fef12
Allow def-env to hide environment variables (#921) 2022-02-04 20:02:03 +02:00
JT
522a53af68
Add support for quick completions (#927) 2022-02-04 10:30:21 -05:00
JT
a008f1aa80
Command tests (#922)
* WIP command tests

* Finish marking todo tests

* update

* update

* Windows cd test ignoring
2022-02-03 21:01:45 -05:00
Stefan Holderbach
ac0b331f00
Update reedline to paste multiple command lines (#920)
* Update reedline to paste multiple command lines

* Remove comments for non-user events
2022-02-03 16:56:39 -06:00
JT
cc1b784e3d
Add initial nu-test-support port (#913)
* Add initial nu-test-support port

* finish changing binary name

* Oops, these aren't Windows-safe tests
2022-02-02 15:59:01 -05:00
Darren Schroeder
004d7b5ff0
query command with json, web, xml (#870)
* query command with json, web, xml

* query xml now working

* clippy

* comment out web tests

* Initial work on query web

For now we can query everything except tables

* Support for querying tables

Now we can query multiple tables just like before, now the only thing
missing is the test coverage

* finish off

* comment out web test

Co-authored-by: Luccas Mateus de Medeiros Gomes <luccasmmg@gmail.com>
2022-02-01 12:45:48 -06:00
JT
4c9df9c7c1
Add a fallback if Windows external spawn fails (#902)
* Add a fallback if Windows external spawn fails

* Remove path workaround

* More fixes

* More fixes

* Be more flexible with error tests
2022-01-31 12:42:12 -05:00
Access
1fd0ddb52c
Maybe solve the none bug? (#860)
* Maybe solve the none bug?

* cargo fmt

* use nothing, not string

* check at last

* I check it at last

* Use error which has span

* use not found error

* fix error

* use a empty value length?

* * Add commit about what I change and fmt

Now all test passed, but I do not know if it is right

* update the test

* check if it is nothing

* update commit

* Rename test

Co-authored-by: Jakub Žádník <kubouch@gmail.com>
2022-01-30 15:23:28 +02:00
JT
44821d9941
Add support for def-env and export def-env (#887) 2022-01-29 15:45:46 -05:00
Michael Angerman
bffb4950c2
add in a table test with multiple columns (#886) 2022-01-29 09:45:16 -08:00