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
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
Fernando Herrera
e7958bebac
sqlite query without collect ( #6217 )
2022-08-02 21:29:02 +01: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
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
WindSoilder
586c0ea3d8
Add bits not command ( #6143 )
...
Add `bits not`
Options: `--number-bytes` and `--sized`
2022-07-30 11:25:44 +02: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
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
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
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
JT
9695331eed
require variable names to follow additional restrictions ( #6125 )
2022-07-27 14:08:54 +12:00
JT
2b7c811402
fix 0.66 nu-command crate ( #6138 )
2022-07-27 11:20:12 +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
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
JT
475d32045f
Revert "Refactor external command ( #6083 )" ( #6116 )
...
This reverts commit 0646f1118c
.
2022-07-26 05:37:15 +12:00
Justin Ma
9097e865ca
fix typo of port
command ( #6120 )
2022-07-25 07:07:26 -05:00
pwygab
8b35239bce
remove misleading example from source
( #6118 )
2022-07-25 11:52:16 +03:00
Matthew Ma
87e2fa137a
Allow cp multiple files at once ( #6114 )
...
* Allow cp multiple files at once
* Expand destination with expand_ndots
2022-07-25 10:42:25 +03:00
pwygab
5706eddee3
throw error if any? or all? expression invokes invalid command ( #6110 )
...
* throw error if any? or all? expression invokes invalid command
* fix tests for windows
2022-07-24 06:28:12 -05:00
Darren Schroeder
388ff78a26
trim spaces when converting strings to ints ( #6105 )
2022-07-23 09:23:04 -05:00
Matthew Ma
7d46177cf3
Allow mv multiple files at once ( #6103 )
...
* Allow mv multiple files at once
* Expand dots in mv src + dst
2022-07-23 07:51:41 -05:00
Kangaxx-0
0646f1118c
Refactor external command ( #6083 )
...
Co-authored-by: Frank <v-frankz@microsoft.com>
2022-07-21 19:56:57 -04:00
Darren Schroeder
0bcfa12e0d
enable find to work on some external streams ( #6094 )
2022-07-21 13:19:16 -05:00
Fernando Herrera
b2ec32fdf0
concat string with lazy expressions ( #6093 )
2022-07-21 18:05:56 +01:00
pwygab
8f00848ff9
add a fair amount ofsearch terms ( #6090 )
2022-07-21 06:29:41 -05:00
Fernando Herrera
604025fe34
append string to series ( #6089 )
2022-07-21 10:42:12 +01:00
Darren Schroeder
db9b88089e
enable find to be able to highlight some hits ( #6086 )
...
* enable find to be able to highlight some hits
* oops, deps in the wrong place
2022-07-20 10:09:33 -05:00
WindSoilder
a35a71fd82
Make Semicolon stop on error ( #6079 )
...
* introduce external command runs to failed error, and implement semicolon relative logic
* ignore test due to semicolon works
* not raise ShellError for external commands
* update comment
* add relative test in for windows
* fix type-o
Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2022-07-20 07:44:42 -05:00
pwygab
558cd58d09
make into string --decimals
add decimals to integer numbers ( #6084 )
...
* make `into string --decimals` add decimals to integer numbers
* add exception for 0
2022-07-20 06:16:35 -05:00
Kangaxx-0
eeaca50dee
Conditionally disable expansion for external command ( #6014 )
...
* Fix 5978
* Add unit test for explicit glob
* Format
* Expansion vs none-expansion
* Add unit tests
* Fix format..
* Add debug message for MacOS
* Fix UT on Mac and add tests for windows
* cleanup
* clean up windows test
* single and double qoutes tests
* format...
* Save format.
* Add log to failed windows unit tests
* try `touch` a file
* PS or CMD
* roll back some change
* format
* Remove log and test case
* Add unit test comments
* Fix
Co-authored-by: Frank <v-frankz@microsoft.com>
2022-07-17 16:30:33 -05:00