Commit Graph

363 Commits

Author SHA1 Message Date
Jakub Žádník
6a0f404558
Treating environment variables as Values (#497)
* Proof of concept treating env vars as Values

* Refactor env var collection and method name

* Remove unnecessary pub

* Move env translations into a new file

* Fix LS_COLORS to support any Value

* Fix spans during env var translation

* Add span to env var in cd

* Improve error diagnostics

* Fix non-string env vars failing string conversion

* Make PROMPT_COMMAND a Block instead of String

* Record host env vars to a fake file

This will give spans to env vars that would otherwise be without one.
Makes errors less confusing.

* Add 'env' command to list env vars

It will list also their values translated to strings

* Sort env command by name; Add env var type

* Remove obsolete test
2021-12-17 12:04:54 +11:00
JT
2013e9300a
Make config default if broken (#482)
* Make config default if broken

* Make config default if broken
2021-12-13 14:16:51 +11:00
Darren Schroeder
9d7685e565
add temp-path to $nu (#471) 2021-12-11 14:00:29 -06:00
Darren Schroeder
c2aa6c708d
add cwd to $nu (#469)
* add `cwd` to `$nu`

* oops
2021-12-11 13:38:36 -06:00
Darren Schroeder
626b1b99cd
add keybinding-path to $nu (#470) 2021-12-11 13:29:56 -06:00
Darren Schroeder
4103abc685
add home-path to $nu (#468) 2021-12-11 13:12:30 -06:00
Fernando Herrera
865906e450
Dataframe commands name (#457)
* corrected missing shellerror type

* batch dataframe commands

* removed option to find declaration with input

* ordered dataframe folders

* dataframe command name
2021-12-09 18:17:11 -06:00
kiloson
9fd680ae2b
fix: Implicit coercion of boolean false and empty value #4094 (#4120)
Signed-off-by: closetool <c299999999@qq.com>
2021-12-09 14:19:51 +02:00
JT
610e3911f6
Bump to 0.41 (#4187) 2021-12-08 06:21:00 +13:00
Fernando Herrera
1fd26727c5
Batch of dataframe commands (#442)
* corrected missing shellerror type

* batch dataframe commands

* removed option to find declaration with input

* ordered dataframe folders
2021-12-06 17:09:49 +13:00
Jakub Žádník
71a8eb6f8e
Add signature to $scope.commands (#434)
* Add signature to $scope.commands

* Change signature command column name
2021-12-04 22:01:51 +02:00
Jakub Žádník
405a4e58c7
Fix 'help commands'; Add 'is_custom' column (#420)
* Fix fetching commands; Add is_custom column

* Remove old comment
2021-12-03 20:45:29 +02:00
Fernando Herrera
f3c8d35eb7
Plugin repeated (#417)
* not repeated decl in file and help

* implemented heashmap for repeated

* sorted scope commands
2021-12-03 14:29:55 +00:00
JT
c08e145501
Fix clippy warnings (#4176) 2021-12-03 07:05:38 +13:00
Fernando Herrera
99de2b1d77
plugin path for $nu (#398) 2021-12-02 06:35:32 +00:00
Fernando Herrera
56307553ae
Plugin with evaluated call (#393)
* plugin trait

* impl of trait

* record and absolute path

* plugin example crate

* clippy error

* correcting cargo

* evaluated call for plugin
2021-12-02 05:42:56 +00:00
Jakub Žádník
c17e1473db
Hiding of environment variables (#362)
* Remember environment variables from previous scope

* Re-introduce env var hiding

Right now, hiding decls is broken

* Re-introduce hidden field of import patterns

All tests pass now.

* Remove/Address tests TODOs

* Fix test typo; Report hiding error

* Add a few more tests

* Fix wrong expected test result
2021-11-30 19:14:05 +13:00
Fernando Herrera
c8b16c14d5
Option to replace command same name (#374)
* option to replace command same name

* moved order of custom value declarations

* arranged dataframe folders and objects

* sort help commands by name

* added dtypes function for debugging

* corrected name for dataframe commands

* command names using function
2021-11-28 19:35:02 +00:00
JT
f7f8b0dbff
A few help cleanups (#372) 2021-11-28 07:16:20 +13:00
Braulio Valdivielso Martínez
fb197f562a
save --append: create file if it doesn't exist (#4156)
* have save --append create file if not exists

Currently, doing:

echo a | save --raw --append file.txt

will fail if file.txt does not exist. This PR changes that

* test that `save --append` will create new file
2021-11-26 12:27:41 -06:00
Tshepang Lekhonkhobe
91c270c14a
fix markup (#4155) 2021-11-26 07:37:50 -06:00
JT
f052b3313d
Move row condition to block (#368) 2021-11-26 16:49:03 +13:00
Edward Betts
3e93ae8af4
Correct spelling (#4152) 2021-11-25 11:11:20 -06:00
Fernando Herrera
76019f434e
Dataframe feature (#361)
* custom value trait

* functions for custom value trait

* custom trait behind flag

* open dataframe command

* command to-df for basic types

* follow path for dataframe

* dataframe operations

* dataframe not default feature

* custom as default feature

* corrected examples in command
2021-11-23 08:14:40 +00:00
ahkrr
e06df124ca
upgrading dependencies (#4135)
* upgrade dependencies
num-bigint 0.3.1 -> 0.4.3
bigdecimal-rs 0.2.1 -> bigdecimal 0.3.0
s3hander 0.7 -> 0.7.5
bat 0.18 -> 0.18, default-features = false

* upgrade arboard 1.1.0 -> 2.0.1

* in polars use comfy-table instead of prettytable-rs
the last release of prettytable-rs was `0.8.0 Sep 27, 2018`
and it uses `term 0.5` as a dependency

* upgrade dependencies

* upgrade trash -> 2.0.1

Co-authored-by: ahkrr <alexhk@protonmail.com>
2021-11-20 07:11:11 -06:00
Fernando Herrera
88988dc9f4
Plugins signature load (#349)
* saving signatures to file

* loading plugin signature from file

* is_plugin column for help command
2021-11-19 15:51:42 +13:00
Jakub Žádník
f8f437b060
Separate Overlay into its own thing (#344)
It's no longer attached to a Block. Makes access to overlays more
streamlined by removing this one indirection. Also makes it easier to
create standalone overlays without a block which might come in handy.
2021-11-17 17:23:55 +13:00
Fernando Herrera
b35914bd17
Category option for signature (#343)
* category option for signature

* category option for signature

* column description for $scope
2021-11-17 17:22:37 +13:00
JT
2590fcbe5c
Bump to 0.40 (#4129) 2021-11-16 21:53:03 +13:00
Jakub Žádník
5459d30a24
Add environment variable support for modules (#331)
* Add 'expor env' dummy command

* (WIP) Abstract away module exportables as Overlay

* Switch to Overlays for use/hide

Works for decls only right now.

* Fix passing import patterns of hide to eval

* Simplify use/hide of decls

* Add ImportPattern as Expr; Add use env eval

Still no parsing of "export env" so I can't test it yet.

* Refactor export parsing; Add InternalError

* Add env var export and activation; Misc changes

Now it is possible to `use` env var that was exported from a module.

This commit also adds some new errors and other small changes.

* Add env var hiding

* Fix eval not recognizing hidden decls

Without this change, calling `hide foo`, the evaluator does not know
whether a custom command named "foo" was hidden during parsing,
therefore, it is not possible to reliably throw an error about the "foo"
name not found.

* Add use/hide/export env var tests; Cleanup; Notes

* Ignore hide env related tests for now

* Fix main branch merge mess

* Fixed multi-word export def

* Fix hiding tests on Windows

* Remove env var hiding for now
2021-11-16 12:16:06 +13:00
JT
0f107b2830
Add a config variable with engine support (#332)
* Add a config variable with engine support

* Add a config variable with engine support

* Oops, cleanup
2021-11-15 08:25:57 +13:00
ahkrr
74b812228c
upgrade dependencies (#4116)
* remove unused dependencies

* upgrade dependency bytes 0.5.6 -> 1.1.0

* upgrade dependency heapless 0.6.1 -> 0.7.8

* upgrade dependency image 0.22.4 -> 0.23.14

* upgrade dependency mp4 0.8.2 -> 0.9.0

* upgrade dependency bson 0.14.1 -> 2.0.1

Bson::Undefined, Bson::MaxKey, Bson::MinKey and Bson::DbPointer
weren't present in the previous version.

Co-authored-by: ahkrr <alexhk@protonmail.com>
2021-11-14 19:32:21 +13:00
JT
14a2918bba
Fix some nightly clippy warnings (#329) 2021-11-13 13:42:13 +13:00
JT
568e566adf
Add record literal syntax (#326) 2021-11-11 12:14:00 +13:00
JT
bb1740d733
Add from csv and from tsv (#320) 2021-11-10 09:17:37 +13:00
JT
34617fabd9
Do some str collect cleanup (#312) 2021-11-09 17:46:26 +13:00
JT
b5bade6187
Let list and table exprs get indexed (#307) 2021-11-08 12:18:00 +13:00
JT
02b8027749
Improve external output in subexprs (#294) 2021-11-06 18:50:33 +13:00
JT
d856cebebd Add a simple scope variable 2021-11-02 16:08:05 +13:00
JT
cf3f3fde92 Add some support for 2021-10-30 07:15:17 +13:00
Yogi
75782f0f50
Fix #4070: Inconsistent file matching rule for ls and rm (#4099) 2021-10-28 15:05:07 +03:00
JT
2b06ce27d3
Bump to 0.39 (#4097) 2021-10-27 08:36:41 +13:00
JT
85a69c0a45 WIP 2021-10-26 10:14:21 +13:00
JT
d29208dd9e WIP 2021-10-26 09:04:23 +13:00
JT
5d19017603 WIP 2021-10-26 05:58:58 +13:00
JT
b5965ee8ef WIP 2021-10-25 19:31:39 +13:00
JT
b6d269e90a WIP 2021-10-25 17:01:02 +13:00
JT
b322a12f58 Add more helper functions 2021-10-20 18:58:25 +13:00
JT
0d7b10fd0b Remove bad fixmes 2021-10-14 17:43:49 +13:00
JT
dcda7a4e50 Touchups to help 2021-10-14 06:58:39 +13:00
JT
fdd2c35fd9 Add the default help flag 2021-10-14 06:53:27 +13:00
JT
6024a001b4 Clarify todo/fixmes 2021-10-13 06:44:23 +13:00
JT
5f14faf4b4 Custom switch support 2021-10-12 17:49:17 +13:00
JT
96419f168b Also fix the flag params 2021-10-12 10:17:45 +13:00
JT
63e3552eef Add the remaining missing operators 2021-10-12 09:35:12 +13:00
JT
38bc394a12 Expose errors early when possible 2021-10-12 07:45:31 +13:00
JT
c3a032950d Add initial batch of into conversions 2021-10-11 14:56:19 +13:00
Arthur Targaryen
9e7e8ed48f Handle not-in operator 2021-10-09 19:40:47 +02:00
Arthur Targaryen
8783cf0138 Add basic in operator support 2021-10-09 19:27:54 +02:00
JT
44fbf0fce3
Merge pull request #108 from nushell/help_and_start_split
Port help and start porting split
2021-10-09 14:07:13 +13:00
JT
4ddc953e38 Port help and start porting split 2021-10-09 14:02:01 +13:00
JT
64d83142c3 More external cleanup 2021-10-09 11:30:10 +13:00
JT
dea9c1482b Allow vars and subexprs in extern args 2021-10-09 10:51:47 +13:00
JT
e1ebd461d2
Bump to 0.28 (#4064) 2021-10-06 06:35:25 +13:00
JT
535ece4e76 Add unit parsing and eval support 2021-10-05 15:27:39 +13:00
JT
a88058006a Add path completions 2021-10-05 08:21:31 +13:00
JT
63a0aa6088 Let strings be cell paths 2021-10-02 18:43:43 +13:00
JT
5843acec02 Add wrap and get and cell_path parsing 2021-10-02 15:59:11 +13:00
JT
c5e9ff5f14 add ps and early help 2021-10-02 10:53:13 +13:00
Squirrel
4e0d7bc77c
Less deps (#4038)
* compiles on nightly now. (breaking change)

* less deps

* Switch over to new resolver

(it's been stable for a while.)

* let's leave num-format for another PR
2021-09-28 07:17:00 +13:00
JT
abb0d7bd22 Add support for module imports 2021-09-27 07:39:19 +13:00
Fernando Herrera
660e8b5b73 external with redirection 2021-09-23 17:42:03 +01:00
Fernando Herrera
29771c7d23 clippy errors 2021-09-20 10:42:03 +01:00
Fernando Herrera
cb0914ecb0 remove enter scope 2021-09-20 10:32:55 +01:00
Fernando Herrera
672dd5a868 external with input 2021-09-19 22:48:33 +01:00
Fernando Herrera
96af23f370 clippy errors 2021-09-19 20:41:35 +01:00
Fernando Herrera
bafc50fd5c external command 2021-09-19 20:29:58 +01:00
Tw
1297499d7a
add command g to switch shell quickly (#4014)
Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-17 10:39:14 +01:00
JT
8581bec891
bump 0.37.1 (#4019) 2021-09-16 13:32:22 +12:00
Jakub Žádník
cc3653cfd9
Path commands: Put column path args behid flag; Allow path join appending without flag (#4008)
* Change path join signature

* Appending now works without flag
* Column path operation is behind a -c flag

* Move column path arg retrieval to a function

Also improves errors

* Fix path join tests

* Propagate column path changes to all path commands

* Update path command examples with columns paths

* Modernize path command examples by removing "echo"

* Improve structured path error message

* Fix typo
2021-09-15 21:03:51 +03:00
JT
1d80a68f4c
bump to 0.37 (#4006) 2021-09-15 06:44:24 +12:00
Fernando Herrera
1a9247b77f Merge branch 'main' of https://github.com/nushell/engine-q into externals 2021-09-14 07:19:31 +01:00
Fernando Herrera
8f07f40f22 external call 2021-09-12 16:34:43 +01:00
Jakub Žádník
cc5c4d38bb
Small fixes and refactors to paths & source command (#3998)
* Expand path when converting value -> PathBuf

Also includes Tagged<PathBuf>.

Fixes #3605

* Expand path for PATH env. variable

Fixes #1834

* Remove leftover Cows after nu-path refactor

There were some unnecessary Cow conversions leftover from the old
nu-path implementation.

* Use canonicalize in source command; Improve errors

Previously, `source` used `expand_path()` which does not follow
symlinks.

As a follow up, I improved the source error messages so they now tell
why the source file could not be canonicalized or read into string.
2021-09-12 02:36:14 +03:00
Jakub Žádník
4749776984 Add stepping to ranges & enable reverse ranges
Follows the following syntax: <start>..<next-value>..<end>
2021-09-11 14:28:46 +03:00
Marcin Puc
51c74eebd0
Add general refactorings (#3996) 2021-09-10 10:44:22 +12:00
JT
bb6781a3b1 Add row conditions 2021-09-10 09:47:20 +12:00
JT
b0ab78a767 Switch tables to list/streams of records 2021-09-07 19:07:11 +12:00
JT
bdce34676a Allow rest vars to have a custom name 2021-09-07 15:37:02 +12:00
JT
3b7d7861e3 Add cell paths 2021-09-07 10:02:24 +12:00
JT
979faf853a Block params 2021-09-06 14:20:02 +12:00
JT
aaee3a8b61 WIP 2021-09-06 11:16:27 +12:00
Jakub Žádník
f0d469f1d4 Fix clippy warnings 2021-09-05 01:40:15 +03:00
Jakub Žádník
0b412cd6b3 Add support for positive integer ranges
Including support for variables and subexpressions as range bounds.
2021-09-05 00:52:57 +03:00
Tw
ae9f4135c0
support appending when saving file (#3992)
This patch implements `>>` operation in bash.

Signed-off-by: Tw <tw19881113@gmail.com>
2021-09-05 06:12:08 +12:00
JT
5e33b8536b Add discrete list/table 2021-09-04 18:52:28 +12:00
JT
12d80c2732 Fix test 2021-09-03 15:49:14 +12:00
JT
750502c870 Fix up for_in 2021-09-03 14:57:18 +12:00
JT
df63490266 Fix up calls and pipelines 2021-09-03 14:15:01 +12:00
JT
7c8504ea24 Add commands 2021-09-03 10:58:15 +12:00
JT
94687a7603 Back to working state 2021-09-03 06:21:37 +12:00
JT
e1be8f61fc WIP 2021-09-02 20:25:22 +12:00
JT
3d252a9797 Add nu-protocol 2021-09-02 13:29:43 +12:00
JT
c4c4d82bf4 Try putting streams in Value 2021-09-02 09:20:53 +12:00
JT
46d2efca13 Fix table parsing 2021-08-29 07:17:30 +12:00
Jakub Žádník
d95375d494
nu-path crate refactor (#3730)
* Resolve rebase artifacts

* Remove leftover dependencies on removed feature

* Remove unnecessary 'pub'

* Start taking notes and fooling around

* Split canonicalize to two versions; Add TODOs

One that takes `relative_to` and one that doesn't.
More TODO notes.

* Merge absolutize to and rename resolve_dots

* Add custom absolutize fn and use it in path expand

* Convert a couple of dunce::canonicalize to ours

* Update nu-path description

* Replace all canonicalize with nu-path version

* Remove leftover dunce dependencies

* Fix broken autocd with trailing slash

Trailing slash is preserved *only* in paths that do not contain "." or
"..". This should be fixed in the future to cover all paths but for now
it at least covers basic cases.

* Use dunce::canonicalize for canonicalizing

* Alow cd recovery from non-existent cwd

* Disable removed canonicalize functionality tests

Remove unused import

* Break down nu-path into separate modules

* Remove unused public imports

* Remove abundant cow mapping

* Fix clippy warning

* Reformulate old canonicalize tests to expand_path

They wouldn't work with the new canonicalize.

* Canonicalize also ~ and ndots; Unify path joining

Also, add doc comments in nu_path::expansions.

* Add comment

* Avoid expanding ndots if path is not valid UTF-8

With this change, no lossy path->string conversion should happen in the
nu-path crate.

* Fmt

* Slight expand_tilde refactor; Add doc comments

* Start nu-path integration tests

* Add tests TODO

* Fix docstring typo

* Fix some doc strings

* Add README for nu-path crate

* Add a couple of canonicalize tests

* Add nu-path integration tests

* Add trim trailing slashes tests

* Update nu-path dependency

* Remove unused import

* Regenerate lockfile
2021-08-28 15:59:09 +03:00
JT
7fe05b8296
bump to 0.36.1 (#3972) 2021-08-27 20:48:58 +12:00
JT
24cd1b591c Update todo 2021-08-27 14:30:10 +12:00
Hristo Filaretov
b8e2bdd6b1
Allow different names for ...rest (#3954)
* Allow different names for ...rest

* Resolves #3945

* This change requires an explicit name for the rest argument in `WholeStreamCommand`,
  which is why there are so many changed files.

* Remove redundant clone

* Add tests
2021-08-27 05:58:53 +12:00
Hristo Filaretov
88817a8f10
Allow environment variables to be hidden (#3950)
* Allow environment variables to be hidden

This change allows environment variables in Nushell to have a value of
`Nothing`, which can be set by the user by passing `$nothing` to
`let-env` and friends.

Environment variables with a value of Nothing behave as if they are not
set at all. This allows a user to shadow the value of an environment
variable in a parent scope, effectively removing it from their current
scope. This was not possible before, because a scope can not affect its
parent scopes.

This is a workaround for issues like #3920.

Additionally, this allows a user to simultaneously set, change and
remove multiple environment variables via `load-env`. Any environment
variables set to $nothing will be hidden and thus act as if they are
removed. This simplifies working with virtual environments, which rely
on setting multiple environment variables, including PATH, to specific
values, and remove/change them on deactivation.

One surprising behavior is that an environment variable set to $nothing
will act as if it is not set when querying it (via $nu.env.X), but it is
still possible to remove it entirely via `unlet-env`. If the same
environment variable is present in the parent scope, the value in the
parent scope will be visible to the user. This might be surprising
behavior to users who are not familiar with the implementation details.

An additional corner case is the the shorthand form of `with-env` does
not work with this feature. Using `X=$nothing` will set $nu.env.X to the
string "$nothing". The long-form works as expected: `with-env [X
$nothing] {...}`.

* Remove unused import

* Allow all primitives to be convert to strings
2021-08-26 08:15:58 -05:00
JT
35c3622405 Add a few operators. Needs parser work 2021-08-26 07:29:36 +12:00
JT
991a4801b1
Bump to 0.36 (#3963) 2021-08-25 06:01:17 +12:00
Hristo Filaretov
6db5692be4
Only allow unaliasing in current scope, add tests (#3936)
* unalias only removes aliases in the current scope

* Add a test and fix previous ones which did not function as expected
2021-08-19 19:05:36 +12:00
soumil-07
9bd408449e
Add the ability to remove and list aliases (#3879)
* Add the ability to remove and list aliases

* Fix failing unit tests

* Add a test to check unalias shadowing blocks
2021-08-17 08:56:35 -05:00
JT
739425431a improve type inference 2021-08-17 12:26:05 +12:00
JT
ceea7e5aeb Remove lifetime from eval state 2021-08-16 14:30:31 +12:00
JT
579814895d Fix up eval params and refactor 2021-08-16 10:33:34 +12:00
JT
1355a5dd33 refactor to subcrates 2021-08-11 06:51:08 +12:00
hedonihilist
c9b87c4c03
Count the size of the directories when calculating the size in DirInfo (#3902)
* take dir entry size into consideration when calculting the size of a directory in DirInfo

* fmt check
2021-08-08 05:50:02 +12:00
JT
b6728efcd4
in/not-in for strings (#3906) 2021-08-07 09:49:37 +12:00
soumil-07
cd814851da
Use bigdecimal-rs patch (#3905)
* Use bigdecimal-rs patch

* fix nu-serde's bigdecimal dependency
2021-08-07 09:27:19 +12:00
JT
bc682066d8
Bump to 0.35 (#3884) 2021-08-03 20:01:09 +12:00
JT
e602647d4d
Fix clippy lint and disable broken lint (#3865) 2021-07-30 08:11:47 +12:00
Fernando Herrera
83b28cad8d
Remove dependencies (#3853)
* nuframe in its own type in UntaggedValue

* Removed eager dataframe from enum

* Dataframe created from list of values

* Corrected order in dataframe columns

* Returned tag from stream collection

* Removed series from dataframe commands

* Arithmetic operators

* forced push

* forced push

* Replace all command

* String commands

* appending operations with dfs

* Testing suite for dataframes

* Unit test for dataframe commands

* improved equality for dataframes

* moving all dataframe operations to protocol
2021-07-27 14:20:06 -05:00
JT
226739d13f
Bump to 0.34.1 (#3835) 2021-07-25 22:58:33 +12:00
Fernando Herrera
f1ee9113ac
All is a DataFrame (#3812)
* nuframe in its own type in UntaggedValue

* Removed eager dataframe from enum

* Dataframe created from list of values

* Corrected order in dataframe columns

* Returned tag from stream collection

* Removed series from dataframe commands

* Arithmetic operators

* forced push

* forced push

* Replace all command

* String commands

* appending operations with dfs

* Testing suite for dataframes

* Unit test for dataframe commands

* improved equality for dataframes
2021-07-25 22:01:54 +12:00
JT
71f4ea9d76
Bump to 0.34.0 (#3766) 2021-07-14 05:57:41 +12:00
Darren Schroeder
9a1e1d5b1e
move lang command to $nu (#3720) 2021-07-01 13:09:50 -05:00
Darren Schroeder
008bdfa43f
a new command to query the nushell internals (#3704)
* a new command to query the nushell internals

* added signature

* a little cleanup
2021-06-29 09:27:16 -05:00
JT
6202c67fe8
Fix #3430 (#3693) 2021-06-26 17:38:36 +12:00
JT
edbc828fc3
Bump to 0.33.1 (#3671) 2021-06-23 19:57:41 +12:00
Andrés N. Robalino
03c9eaf005
Variable completions. (#3666)
In Nu we have variables (E.g. $var-name) and these contain `Value` types.
This means we can bind to variables any structured data and column path syntax
(E.g. `$variable.path.to`) allows flexibility for "querying" said structures.

Here we offer completions for these. For example, in a Nushell session the
variable `$nu` contains environment values among other things. If we wanted to
see in the screen some environment variable (say the var `SHELL`) we do:

```
> echo $nu.env.SHELL
```

with completions we can now do: `echo $nu.env.S[\TAB]` and we get suggestions
that start at the column path `$nu.env` with vars starting with the letter `S`
in this case `SHELL` appears in the suggestions.
2021-06-23 19:21:39 +12:00
JT
55cab9eb4f
Bump to 0.33 (#3667) 2021-06-22 17:22:33 +12:00
Niklas Jonsson
a8f6a13239
Move path handling to nu-path (#3653)
* fixes #3616
2021-06-20 11:07:26 +12:00
Nathan Thomas
9e39284de9
Add unlet_env command (#3629)
* Add ability to remove env variables

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Implement unlet_env command

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Update parameter description

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Migrate to new filestructure

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Added tests for unlet-env

Signed-off-by: nathom <nathanthomas707@gmail.com>

* Formatting

Signed-off-by: nathom <nathanthomas707@gmail.com>
2021-06-19 15:00:07 +12:00
JT
a74d05061d
Begin directory contrib docs and split commands (#3650)
* Begin directory contrib docs and split commands

* Fix unused import warning
2021-06-19 12:06:44 +12:00
Jakub Žádník
4140834e4c
Remove dir-s/ectories/ectories-support features (#3647) 2021-06-19 11:29:29 +12:00
JT
fe5055cf29
Relax groups and blocks to output at pipeline level (#3643)
* Relax groups and blocks to output at pipeline level

* Fix up tests and add ignore command
2021-06-18 13:04:51 +12:00
JT
d9d956e54f
Fix issue in external subexpression paths (#3642)
* Fix issue in external subexpression paths

* new clippy dropped

* clippy
2021-06-18 07:59:58 +12:00
Darren Schroeder
02bac0a326
fix FlatShape::Garbage's default foreground color (#3634) 2021-06-16 15:43:15 -05:00
Andrés N. Robalino
7c8fb060f1
Extract completions into subcrate. (#3631) 2021-06-16 15:20:01 -05:00
Andrés N. Robalino
7c7e5112ea
Make Nu bootstrap itself from main. (#3619)
We've relied on `clap` for building our cli app bootstrapping that figures out the positionals, flags, and other convenient facilities. Nu has been capable of solving this problem for quite some time. Given this and much more reasons (including the build time caused by `clap`) we start here working with our own.
2021-06-15 17:43:25 -05:00
Sam Bordo
d60d71a697
Begin porting mkdir (#3607)
* Begin porting mkdir

* Addressed comments
2021-06-15 06:57:21 +12:00
JT
de99e35106
Refactor rarely changing engine state into its own struct (#3612)
* WIP

* Finish up EngineState refactor

* Fix Windows calls

* Fix Windows calls

* Fix Windows calls
2021-06-14 15:19:12 +12:00
Darren Schroeder
2846e3f5d9
enable theming of the command line syntax (#3606)
* enable theming of the command line syntax

* added missing flatshape, sorted flatshapes for easier reading.

* sorted flat shapes again and saved it this time

* added sample rwb.json syntax them file to docs
2021-06-11 14:17:43 -05:00
JT
b9ca3b2039
Remove EvaluationContext::from_args (#3604) 2021-06-11 18:35:21 +12:00
JT
8ac572ed27
Make arg eval lazy, remove old arg evaluation code (#3603)
* Remove old argument eval

* Merge main

* fmt

* clippy

* clippy

* clippy
2021-06-11 13:57:01 +12:00
Fernando Herrera
c4163c3621
Series arithmetic (#3602)
* operations with series

* contains operations with series

* Checked division and masked operations
2021-06-11 09:39:51 +12:00
JT
3ae3e3d23d
Further improve arg errors (#3598)
* Further improve arg errors

* Fix note

* Fix note
2021-06-10 20:33:06 +12:00
JT
fc07e849fe
Improve the errors for arg types (#3597) 2021-06-10 18:47:06 +12:00