Commit Graph

5887 Commits

Author SHA1 Message Date
Stefan Holderbach
56069af42d
Make open test independent of locale (#6211)
The test was reading the operating system error message which is
dependent on the system locale.

Just test for the `(os error 2)` errorcode instead.
This should support both
unixoid systems and Windows in more locales.
2022-08-02 16:54:26 +02:00
WindSoilder
376d22e331
In unix like system, set foreground process while running external command (#6206)
* while executing external command, make it as foreground

* remove useless file

* add comment, make var more readable

* add comment

* fmt code

* fix windows

* fix func name

* fix clippy

* fix windows clippy

* add comments, introduce `ForegroundProcess and ForegroundChild

* fix windows clippy

* fix on windows

* no need fg_process_setup module

* Revert "no need fg_process_setup module"

This reverts commit 21ee4ffbf6.

* restrict visibility for helper functions
2022-08-02 16:53:50 +02:00
Stefan Holderbach
7fc8ff60fd
Patch lscolors to not blink (#6210)
Unreleased patch for the `lscolors` -> `crossterm` translation, where I
introduced a bug/incompatibility with several terminal emulators causing
blinking

https://github.com/nushell/nushell/pull/6172#issuecomment-1201856518

Refers to patch, can be replaced once a new `lscolors` version is
released:

https://github.com/sharkdp/lscolors/pull/51
2022-08-02 15:15:26 +02:00
Fernando Herrera
1f4791a191
use from table to remove into-db command (#6205)
* use from table to remove into-db command

* correct tests for db expressions
2022-08-01 21:27:55 +01:00
Reilly Wood
2ac7a4d48d
performance improvements for SQLite reads (#6204) 2022-07-31 23:09:03 -07:00
pwygab
01386f4d58
adds a config reset command (#6149)
* moves config files to nu_utils

* fmt

* fix dockerfile

* fix docs
2022-07-31 20:44:33 -05:00
Reilly Wood
1086fbe9b5
Revert query command to query db (#6200) 2022-07-31 15:36:14 -04:00
Darren Schroeder
a83bd4ab20
allow uppercase chars to be captured during suppressed input (#6199) 2022-07-31 08:12:13 -05:00
nibon7
26caf7e1b2
Return error early if seconds part of timestamp is invalid (#6193)
Signed-off-by: nibon7 <nibon7@163.com>
2022-07-31 07:32:16 -05:00
Reilly Wood
dd2a0e35f4
Add $OLDPWD example for cd (#6194)
* add example for cd

* Fix format_conversions tests
2022-07-30 23:29:52 -04:00
Justin Ma
6a4eabf5c7
Add bits or and bits xor command (#6190) 2022-07-30 13:26:37 -05:00
Justin Ma
0e2c888f73
Add bits root command and bits and command (#6188) 2022-07-30 07:34:11 -05:00
Stefan Holderbach
c140da5740
Update crossterm to version 0.24 (#6172)
- Includes version bump for `lscolors = 0.11` and `reedline` as git
patch
2022-07-30 11:41:15 +02:00
WindSoilder
586c0ea3d8
Add bits not command (#6143)
Add `bits not`

Options: `--number-bytes` and `--sized`
2022-07-30 11:25:44 +02:00
Jakub Žádník
d6f4189c7b
Fix file lookup in parser keywords; Refactor nu_repl (#6185)
* Fix file lookup in parser keywords

* Make nu_repl a testbin; Fix wrong cwd test error
2022-07-29 23:42:00 +03:00
Darren Schroeder
7a820b1304
add a new welcome banner to nushell (#6163)
* add a new welcome banner to nushell

* remove top line

* tweaked colors and wording

* changed to dimmed white

* removed a comment

* make config nu stand out a little

* fix type-o
2022-07-30 05:50:12 +12:00
Justin Ma
767201c40d
bump to 0.66.3 dev version (#6183) 2022-07-30 05:48:10 +12:00
Darren Schroeder
3c3614a120
move application reset mode ansi sequence after cmdline execute (#6153) 2022-07-29 08:47:31 -05:00
nibon7
9e24e452a5
Fix touch panics when using invalid timestamp (#6181)
Signed-off-by: nibon7 <nibon7@163.com>
2022-07-29 06:41:28 -05:00
Jakub Žádník
2cffff0c1b
Allow modules to use other modules (#6162)
* Allow private imports inside modules

Can call `use ...` inside modules now.

* Add more tests

* Add a leak test

* Refactor exportables; Prepare for 'export use'

* Fix description

* Implement 'export use' command

This allows re-exporting module's commands and aliases from another
module.

* Add more tests; Fix import pattern list strings

The import pattern strings didn't trim the surrounding quotes.

* Add ignored test
2022-07-29 11:57:10 +03:00
nibon7
cf2e9cf481
Prevent mv panic again (#6171)
Closes #6170

Signed-off-by: nibon7 <nibon7@163.com>
2022-07-29 10:00:52 +03:00
WindSoilder
6b2c7a4c86
update defaut_env (#6176) 2022-07-29 09:57:56 +03:00
JT
98e199f7b5
Move ls back to last-known-good state (#6175)
* revert the recent ls changes

* cargo fmt
2022-07-29 11:00:54 +12:00
JT
10e463180e
Revert cp and mv back to last-known-good state (#6169) 2022-07-29 07:49:20 +12:00
Jakub Žádník
c9d0003818
Quickly patch wrong 'export' command name (#6168)
It was looked up as `alias` which explains issue #6167. Proper fix is still needed to enable the -h flag for `export` subcommands.
2022-07-28 21:06:50 +03:00
Fernando Herrera
e2a21afca8
maintain quotes for arguments (#6161) 2022-07-28 16:35:55 +01:00
nibon7
2ea209bcc0
Prevent mv panic (#6158)
Signed-off-by: nibon7 <nibon7@163.com>
2022-07-28 01:15:02 -04:00
JT
e049ca8ebf
bump to 0.66.2 dev version (#6157) 2022-07-28 11:38:52 +12:00
Darren Schroeder
9037a9467b
winget wants this to match (#6152)
See the link below for more information
https://github.com/microsoft/winget-pkgs/pull/67598#issuecomment-1196952191
2022-07-27 11:43:17 -05:00
nibon7
4c6cf36aa5
Fix ls panics when a file or directory not exists (#6148)
* Fix ls panics when a file or directory not exists

Fixes #6146

Signed-off-by: nibon7 <nibon7@163.com>

* add test

Signed-off-by: nibon7 <nibon7@163.com>
2022-07-27 18:53:00 +03:00
Jakub Žádník
c92211c016
Use relative paths as file-relative when parsing a file (#6150)
* Make function local (not used anywhere else)

* Use path relative to the parsed file

* Do not use real cwd at all
2022-07-27 18:36:56 +03:00
Darren Schroeder
8bd6b5b913
clean up some comments (#6147) 2022-07-27 07:44:05 -05:00
nibon7
b67fe31544
Make path::canonicalize::canonicalize_dot test case more reliable (#6141)
Fixes #6139

Signed-off-by: nibon7 <nibon7@163.com>
2022-07-27 11:30:03 +03:00
JT
c8adb06ca7
fix var names coming from long/short flags (#6142) 2022-07-27 19:27:28 +12:00
JT
9695331eed
require variable names to follow additional restrictions (#6125) 2022-07-27 14:08:54 +12:00
JT
d42cfab6ef
bump to 0.66.1 dev version (#6140) 2022-07-27 13:15:04 +12:00
JT
2b7c811402
fix 0.66 nu-command crate (#6138) 2022-07-27 11:20:12 +12:00
JT
c6cb491e77
bump to 0.66 (#6137) 2022-07-27 07:56:14 +12:00
JT
e2a4632159
move to latest stable reedline (#6136) 2022-07-27 07:19:38 +12:00
Matthew Ma
65f0edd14b
Allow multiple patterns in ls command (#6098)
* Allow multiple patterns in ls command

* Run formatter

* Comply with style

* Fix format error
2022-07-26 13:08:19 -05:00
nibon7
b2c466bca6
Make login.nu work when using nu as a login shell (#6134)
* Make login.nu work when using nu as a login shell

Fixes #6055

Signed-off-by: nibon7 <nibon7@163.com>

* fix clippy warning

Signed-off-by: nibon7 <nibon7@163.com>
2022-07-26 09:41:05 -05:00
Fernando Herrera
6b4e577032
plugin show signature (#6126)
* plugin show signature

* remove expect from macro

* use fold to create string
2022-07-26 14:47:54 +01:00
pwygab
b12a3dd0e5
allow view-source to view aliases (#6135) 2022-07-26 08:06:16 -05:00
Darren Schroeder
d856ac92f4
expand durations to include month, year, decade (#6123)
* expand durations to include month, year, decade

* remove commented out fn

* oops, found more debug comments

* tweaked tests for the new way, borrowed heavily from chrono-humanize-rs

* clippy

* grammar
2022-07-26 08:05:37 -05:00
nibon7
f5856b0914
Use local time for logger (#6132)
Signed-off-by: nibon7 <nibon7@163.com>
2022-07-26 06:20:35 -05:00
Darren Schroeder
8c675a0d31
update some dependencies (#6131) 2022-07-25 21:09:32 -05:00
nibon7
86a0e77065
Fix print_table_or_error when table is overridden (#6130)
Related #6113

Signed-off-by: nibon7 <nibon7@163.com>
2022-07-25 20:11:46 -05:00
nibon7
72c27bd095
Fix PipelineData::print when table is overridden (#6129)
* Fix PipelineData::print when `table` is overridden

Fixes #6113

Signed-off-by: nibon7 <nibon7@163.com>

* don't use deprecated `is_custom_command`

Signed-off-by: nibon7 <nibon7@163.com>

* add test

Signed-off-by: nibon7 <nibon7@163.com>
2022-07-25 18:41:30 -05:00
Jakub Žádník
e4e27b6e11
Use official virtualenv repo for the CI tests (#6127) 2022-07-26 10:20:03 +12:00
JT
475d32045f
Revert "Refactor external command (#6083)" (#6116)
This reverts commit 0646f1118c.
2022-07-26 05:37:15 +12:00