Justin Ma
4bbdb73668
Bump dev version ( #6350 )
2022-08-18 21:14:17 +12:00
Antoine Stevan
62d3497bbb
fix links to the "think in nu" page in --help ( #6348 )
...
This commit uses `sed` on all the files of the code base to
replace each and every instance of https://www.nushell.sh/book/thinking_in_nushell.html ,
which is a broken link, to https://www.nushell.sh/book/thinking_in_nu.html ,
which is the new URL to the book page.
This exact command was
```nushell
ls **/* -f |
where type == file |
each {
|it|
sed -i 's|https://www.nushell.sh/book/thinking_in_nushell.html |https://www.nushell.sh/book/thinking_in_nu.html |' $it.name
}
```
Co-authored-by: amtoine <44101798+AntoineStevan@users.noreply.github.com>
2022-08-17 13:51:07 -04:00
JT
33674d3a98
bump to 0.67 ( #6336 )
2022-08-17 05:47:47 +12:00
Stefan Holderbach
cc263ee15d
Update to reedline 0.10.0 ( #6327 )
...
Release notes:
https://github.com/nushell/reedline/releases/tag/v0.10.0
2022-08-15 13:00:00 +02:00
WindSoilder
21770367e2
make date format
supports locale ( #6306 )
...
* add --locale flag to make output support locale
* implement again based on nu-utils get_system_locale_string
* add comment
2022-08-14 08:07:04 -05:00
Richard Braakman
6145f734b7
Add repository info to all workspace crates ( #6320 )
...
This helps people who find these crates on crates.io
2022-08-14 07:21:20 -05:00
Fernando Herrera
9d8d305e9d
lazy dataframe reader ( #6321 )
...
* lazy dataframe reader
* correct space for polars dependencies
2022-08-14 13:06:31 +01:00
Andrés N. Robalino
eb55fd2383
cmd(df/first): returns the first row by default. ( #6312 )
2022-08-13 14:08:00 -05:00
Reilly Wood
613d2fb8df
Bump chrono dependency to fix panic ( #6317 )
2022-08-13 11:21:28 -07:00
Jakub Žádník
8783742060
Add 'as' keyword to 'overlay add' ( #6314 )
2022-08-13 17:28:18 +03:00
Jakub Žádník
20528e96c7
Add hide-env
to hide environment variables ( #6313 )
...
* Add hide-env to hide env vars; Cleanup tests
Also, there were some old unalias tests that I converted to hide.
* Add missing file
* Re-enable hide for env vars
* Fix test
* Rename did you mean error back
It was causing random tests to break
2022-08-13 12:55:06 +03:00
Reilly Wood
3b6c4c1bb5
run_external: only suggest alternative commands when file not found ( #6311 )
2022-08-13 00:27:50 -04:00
Björn Richter
cb18dd5200
Add decimals to int when using into string --decimals
( #6085 )
...
* Add decimals to int when using `into string --decimals`
* Add tests for `into string` when converting int with `--decimals`
* Apply formatting
* Merge `into_str` test files
* Comment out unused code and add TODOs
* Use decimal separator depending on system locale
* Add test helper to run closure in different locale
* Add tests for int-to-string conversion using different locales
* Add utils function to get system locale
* Add panic message when locking mutex fails
* Catch and resume panic later to prevent Mutex poisoning when test fails
* Move test to `nu-test-support` to keep `nu-utils` free of `nu-*` dependencies
See https://github.com/nushell/nushell/pull/6085#issuecomment-1193131694
* Rename test support fn `with_fake_locale` to `with_locale_override`
* Move `get_system_locale()` to `locale` module
* Allow overriding locale with special env variable (when not in release)
* Use special env var to override locale during testing
* Allow callback to return a value in `with_locale_override()`
* Allow multiple options in `nu!` macro
* Allow to set locale as `nu!` macro option
* Use new `locale` option of `nu!` macro instead of `with_locale_override`
Using the `locale` options does not lock the `LOCALE_OVERRIDE_MUTEX`
mutex in `nu-test-support::locale_override` but instead calls the `nu`
command directly with the `NU_LOCALE_OVERRIDE` environment variable.
This allows for parallel test excecution.
* Fix: Add option identifier for `cwd` in usage of `nu!` macro
* Rely on `Display` trait for formatting `nu!` macro command
- Removed the `DisplayPath` trait
- Implement `Display` for `AbsolutePath`, `RelativePath` and
`AbsoluteFile`
* Default to locale `en_US.UTF-8` for tests when using `nu!` macro
* Add doc comment to `nu!` macro
* Format code using `cargo fmt --all`
* Pass function directly instead of wrapping the call in a closure
https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
* Pass function to `or_else()` instead of calling it inside `or()`
https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call
* Fix: Add option identifier for `cwd` in usage of `nu!` macro
2022-08-12 21:13:50 -05:00
Jakub Žádník
c3efb12733
Allow overlays to import prefixed definitions ( #6301 )
...
* WIP
* Fix overlay prefix not preserving correctly
* Work around failing REPL tests
* Remove wrong code when removing with --keep-custom
2022-08-12 21:06:51 +03:00
Fernando Herrera
ae64c58f59
Polars upgrade 0.23 ( #6303 )
...
* more lazy expressions
* upgrade polars and correct functions
* arg-where example
* cargo clippy
* restore modified filter files
* correct string addition with str
* correct string addition with str
* correct message in test
2022-08-12 13:10:36 +01:00
Stefan Holderbach
c2f4969d4f
Clippy fix for Rust 1.63 ( #6299 )
...
Take more sensitive lints into account
Somewhat ugly in some cases is the replacement of `.get(0)` with
`.first()`
2022-08-11 11:54:54 -05:00
Darren Schroeder
58094987ff
update a few nushell dependencies ( #6291 )
...
* update a few nushell dependencies
* update a test
2022-08-10 14:56:15 -05:00
Darren Schroeder
ce26ef97e4
Revert "Allow using the system's copy of zstd for Polars ( #6232 )" ( #6292 )
...
This reverts commit 9f131d998d
.
2022-08-10 13:26:04 -05:00
nibon7
45dd7d8770
Fix panic when building without git ( #6289 )
...
Signed-off-by: nibon7 <nibon7@163.com>
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-10 10:31:12 -05:00
WindSoilder
0f10d984c3
add -n for path expand, so it doesn't follow symlink ( #6255 )
...
* add -p for path expand, so it doesn't follow symlink
* fix arg name
* rename from no-dereferenct to no-follow-link
* rename from no-follow-link to no-symlink, and change short -p to -n
* follow strict first
* fix
* simplify test
* fix clippy
* fix test on windows
2022-08-10 08:43:56 -05:00
Darren Schroeder
2e5d981a09
add search terms to ignore command ( #6288 )
2022-08-10 08:42:21 -05:00
nibon7
271fda7c91
Return error when moving a source directory to a target directory which contains a subdirectory with the same name as the source ( #6284 )
...
Fixes #6275
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-10 06:51:11 -05:00
Reilly Wood
0e5886ace1
Fix unused import warning on Linux+Mac ( #6281 )
2022-08-10 00:28:03 -04:00
Reilly Wood
4b89c5f900
ignore tests that fail on local machines ( #6279 )
2022-08-09 23:30:40 -04:00
Reilly Wood
dcab255d59
Support running batch files without typing their extension ( #6278 )
...
* Support running batch files without typing their extension
* suppress warning
2022-08-09 19:24:08 -04:00
Darren Schroeder
e10ef4aaae
bump lscolors to v12.0 ( #6272 )
2022-08-09 09:32:30 -05:00
Darren Schroeder
0b70ca8451
escape single quotes and remove ansi escape sequences ( #6271 )
...
* escape single quotes and remove ansi escape sequences prior to storing strings in db
* clippy
2022-08-09 07:58:36 -05:00
JT
555d9ee763
Fix intermittent test crash ( #6268 )
...
* Fix intermittent test crash
* fix windows build
2022-08-09 14:06:46 +12:00
JT
121b801baa
bump dev version ahead of language changes ( #6267 )
2022-08-09 08:15:41 +12:00
Darren Schroeder
9adcecbbf1
new command into sqlite
allows you to take lists and create a sqlite db ( #6266 )
2022-08-08 14:12:42 -05:00
Winter
9f131d998d
Allow using the system's copy of zstd for Polars ( #6232 )
2022-08-08 10:58:40 -05:00
Reilly Wood
cd0a04f02a
Delete most deprecated commands ( #6260 )
2022-08-08 07:46:59 -07:00
nibon7
2f0cb044a5
Refactor shell listing related code ( #6262 )
...
* Refactor shell listing related code
Signed-off-by: nibon7 <nibon7@163.com>
* add test
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-08 06:31:24 -05:00
Darren Schroeder
8b55757a0b
add more verbose error messages to mv ( #6259 )
...
* add more verbose error messages to mv
* tweak output
* clippy
* yet another tweak
2022-08-07 15:25:05 -05:00
Reilly Wood
84fae6e07e
Suggest alternative when command not found ( #6256 )
...
* Suggest alternative when command not found
* Add tests for command-not-found suggestions
* Put suggestion in label
* Fix tests
2022-08-07 14:40:41 -04:00
nibon7
63e220a763
Refactor shell switching related code ( #6258 )
...
* Refactor shell switching related code
Signed-off-by: nibon7 <nibon7@163.com>
* add tests
Signed-off-by: nibon7 <nibon7@163.com>
* fix tests
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-07 13:30:40 -05:00
Reilly Wood
a96fc21f88
Windows: only shell out to cmd for specific commands ( #6253 )
2022-08-06 13:03:06 -07:00
nibon7
1ba5b25b29
Make g -
switch to the last used shell ( #6249 )
...
* Make `g -` switch to the last used shell
Related #6223
Signed-off-by: nibon7 <nibon7@163.com>
* simplify error handling
Signed-off-by: nibon7 <nibon7@163.com>
* update NUSHELL_LAST_SHELL environment
Signed-off-by: nibon7 <nibon7@163.com>
* add test
Signed-off-by: nibon7 <nibon7@163.com>
* fix description
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-06 10:11:03 -05:00
pwygab
a871f2344a
fix examples and let into decimal convert bools too ( #6246 )
2022-08-06 07:10:33 -05:00
Kangaxx-0
a217bc0715
Fix issue 6223 ( #6241 )
...
* Fix6223
* clippy fix
Co-authored-by: Frank <v-frankz@microsoft.com>
2022-08-06 07:09:14 -05:00
Justin Ma
48f1c3a49e
add bits ror
and bits rol
commands ( #6224 )
2022-08-05 15:40:01 +02:00
nibon7
692376e830
export get_shells
and get_current_shell
( #6236 )
...
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-05 07:58:40 -05:00
Justin Ma
cc99df5ef1
upgrade chrono to v0.4.20 ( #6235 )
2022-08-05 06:53:01 -05:00
Darren Schroeder
cdeb8de75d
replace the regex crate with the fancy-regex crate ( #6227 )
2022-08-04 14:51:02 -05:00
Justin Ma
606547ecb4
Some code refactor for shells related commands ( #6226 )
2022-08-04 12:55:49 -05:00
pwygab
3b809b38e8
make cd
, cp
, ls
, mv
, open
and rm
automatically strip ansi codes ( #6220 )
...
* make `cd`, `cp`, `ls`, `mv`, `open` and `rm` automatically strip ansi escape code
* fix nu-cli test
* fix nu-cli test 2
* fix nu-cli test 3
* remove `include-ansi` arg
* fix test
2022-08-04 06:59:20 -05:00
nibon7
7c49a42b68
Fix path_contains_hidden_folder ( #6173 )
...
* Fix path_contains_hidden_folder
Signed-off-by: nibon7 <nibon7@163.com>
* add test
Signed-off-by: nibon7 <nibon7@163.com>
2022-08-03 20:59:57 -05:00
Stefan Holderbach
87823b0cb5
Reduce dev-deps by narrowing rstest
features ( #6215 )
...
`rstest = 0.12` added support for asynchronous timeouts during testing
thus requiring a larger set of dependencies. Since `rstest = 0.14` this
can be disabled if not used.
Should keep build times for local or CI tests in check.
2022-08-03 11:55:58 +02:00
Kangaxx-0
ebf845f431
Change how to identify custom comamnd ( #6187 )
...
Co-authored-by: Frank <v-frankz@microsoft.com>
2022-08-02 18:40:07 -05:00
Justin Ma
ce6df93d05
Add bits shl
and bits shr
command ( #6202 )
...
* Add `bits shift-left` and `bits shift-right` command
* update bits shift error tips
* some code refactor
* update shift right
* some code refactor for bits shift commands
* rename bits shift commands align with bits operators
* update search term
* Update crates/nu-command/src/bits/not.rs
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
* Update crates/nu-command/src/bits/shift_left.rs
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
* Update crates/nu-command/src/bits/shift_right.rs
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
* ci skip
* change default number-bytes for bits shift
* fix bits not tests
* fix bits tests
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
2022-08-02 15:52:04 -05:00