1
0
mirror of https://github.com/nushell/nushell.git synced 2025-06-29 22:28:35 +02:00
Commit Graph

293 Commits

Author SHA1 Message Date
173d60d59d Deprecate hash base64, extend decode and add encode commands ()
* feat: deprecate `hash base64` command

* feat: extend `decode` and `encode` command families

This commit
- Adds `encode` command family
- Backports `hash base64` features to `encode base64` and `decode base64` subcommands.
- Refactors code a bit and extends tests for encodings
- `decode base64` returns a binary `Value` (that may be decoded into a string using `decode` command)

* feat: add `--binary(-b)` flag to `decode base64`

Default output type is now string, but binary can be requested using this new flag.
2022-06-26 00:35:23 +03:00
1345f97202 Errors when let in, let env and similar commands are passed. ()
* throw `let nu/env/nothing/in` error in parsing

* add tests and fmt

* fix clippy

* suggestions

* fmt

* `lvalue.span` instead of `spans[1]`

* clippy

* fmt
2022-06-25 00:55:25 +03:00
f43a65d7a7 Prevents duplicate fields in transpose -r () 2022-06-22 19:19:06 -05:00
82ae06865c Port command ()
* implement port command

* better comment

* fmt code

* fix example description

* fix usage

* fix tests
2022-06-21 23:27:58 -04:00
7164929c61 Db commands without DB ()
* database commands without db

* database command tests
2022-06-21 12:14:29 -05:00
28c21121cf fixes to nuon for inf, -inf, and NaN () 2022-06-17 21:01:37 +03:00
JT
7ae7394c85 Force floats to output a decimal in nuon ()
* Force floats to output a decimal in nuon

* Add test
2022-06-14 05:45:07 +12:00
caafd26deb Attempts to add // math operator ()
* attempts to add `div` math operator

* allows `//` to be used too

* fmt:

* clippy issue

* returns appropriate type

* returns appropriate type 2

* fmt

* ensure consistency; rename to `fdiv`

* Update parser.rs
2022-06-13 13:54:47 +03:00
888758b813 Fix ls for Windows system files ()
* Fix `ls` for Windows system files

* Fix non-Windows builds

* Make Clippy happy on non-Windows platforms

* Fix new test on GitHub runners

* Move ls Windows code into its own module
2022-06-03 12:37:27 -04:00
a06299c77a Improve <table> output of 'to html', ()
* Fix <table> output of 'to html',

Specifically, add <thead> and <tbody> elements.
That allows for better styling and (future) some neat JavaScript.

* Update tests for previous <table> changes.
2022-06-02 17:34:31 -05:00
ee8a0c9477 Fix cp bug () 2022-05-31 18:24:33 -05:00
0769e9b750 make ls works better with glob ()
* fix glob behavior

* fix doc
2022-05-30 19:13:27 -05:00
219c719e98 make cp can copy folders contains dangling symbolic link ()
* cp with no dangling link

* add -p to not follow symbolic link

* change comment

* add one more test case to check symblink body after copied

* better help message
2022-05-26 10:42:52 -05:00
9602e82029 make sure no duplicate records exists during eval and merge () 2022-05-25 19:10:31 -05:00
ef322a24c5 fix date format () 2022-05-23 09:59:34 -07:00
9e5e9819d6 adjust flatten default behavior () 2022-05-21 08:32:51 -05:00
7c63ce15d8 attempts to allow the test to work when run as root () 2022-05-20 21:48:36 -05:00
2cc5952c37 Fix cp bug ()
* Cleanup - remove old commented code

* Force a / or \ to distinguish between folders and files for cp

* Force a / or \ to distinguish between folders and files for cp

* Remove unneeded code

* Add cp test for checking copy to non existing directory

* Fix warning in test
2022-05-21 09:49:29 +12:00
0d06b6259f Change miette theme based on ANSI config ()
* Change miette theme based on ANSI config

Use the base ansi colors to simplify the use of the terminal emulator
theming.
Turn of most eye-candy (including unicode) when using
`$config.use_ansi_coloring: false`

Addresses 

* Fix error test affected by changed styling
2022-05-19 13:59:14 -05:00
1999e0dcf3 Fix flatten behavior ()
* one step closer to flatten

* integration code is passing, but still need to do one more level flatten for table

* fix flatten

* using match instead of several if let

* make better comment

* fmt code

* better comment
2022-05-19 06:46:48 -05:00
2b1e05aad0 add quantile column () 2022-05-18 20:47:26 -05:00
9c779b071b feat: apply the --numbered option to acc in reduce command. ()
* feat: apply the `-n` option to acc

* feat: update tests and examples
2022-05-18 09:49:34 -05:00
7d9a77f179 fix select tests () 2022-05-18 06:20:26 -05:00
bb079608dd fix move test ()
* fix move test

* remove ignore
2022-05-18 06:18:21 -05:00
5fa42eeb8c Make format support nested column and use variable ()
* fix format for nested structure

* make little revert

* add tests

* fix format

* better comment

* make better comment
2022-05-18 06:08:43 -05:00
f0cb2f38df refactor all write_alls to ensure flushing () 2022-05-17 13:28:18 -05:00
fc41a0f96b use reverse iter on value search () 2022-05-16 06:29:40 -05:00
44bcfb3403 fix zip test () 2022-05-15 16:44:32 -05:00
16bd7b6d0d Fix Value::Record compare logic, and pass uniq tests. ()
* fix record compare logic

* add more comment
2022-05-14 06:04:09 -05:00
852de79212 Implement histogram command ()
* finish histogram

* adjust comment

* add test for histogram

* add Date to test

* move hashable value back inside chart package
2022-05-13 06:48:47 -05:00
06f40405fe add rename () 2022-05-13 06:47:11 -05:00
5f39267a80 Make $nothing | into string == "" ()
* Make $nothing | into string == ""

* Fix up existing into string tests

* Add $nothing | into string test

* Formatting

* Windows line endings test fix
2022-05-11 12:26:43 +03:00
8030f7e9f0 add format filesize ()
* add format filesize

* add comment

* add comment

* remove comment
2022-05-10 06:35:14 -05:00
a61d09222f document out positional argument type () 2022-05-08 08:11:28 -05:00
6cc66c8afd complete some commands tests ()
* complete hash test

* unignore source relative tests
2022-05-07 06:23:49 -05:00
768ff47d28 enable cd to work with directory abbreviations ()
* enable cd to work with abbreviations

* add abbreviation example

* fix tests

* make it configurable
2022-05-06 07:58:32 -05:00
JT
98ab31e15e Move uses of trim_quotes to unescape for filenames ()
* Move uses of trim_quotes to unescape for filenames

* Fix Windows tests
2022-05-02 06:37:20 +12:00
7a7aa310aa Remove 'empty' block support reminders, for now. () 2022-04-30 22:32:30 -05:00
4ec4649903 mute false import warning for nu-command test where_ () 2022-04-27 22:45:39 -07:00
e94d13da1b Database commands ()
* database commands

* db commands

* filesystem opens sqlite file

* clippy error

* corrected error in ci file

* removes matrix flag from ci

* flax matrix for clippy

* add conditional compile for tests

* add conditional compile for tests

* correct order of command

* correct error msg

* correct typo
2022-04-24 10:29:21 +01:00
a26272b44b Clean up tests and unused documentation code ()
* Delete unused documentation code+test

* Fix up test to account for new select behavior
2022-04-21 06:13:58 -05:00
JT
ded9d1cedb Some cleanups for clippy () 2022-04-21 12:08:12 +12:00
b501db673a SQLite overhaul: custom value, query db command ()
Clean up query errors
2022-04-20 16:58:21 +12:00
c150e11cb4 Initial SQLite functionality ()
* Add SQLite functionality to open

* Add in-memory SQLite tests

* clippy fixes

* Fix up old SQLite-related tests
2022-04-13 20:15:02 -07:00
JT
97eb8492a3 Improve $in handling ()
* Simplify in logic

* Add tests

* more tests, and fixes
2022-04-09 09:41:05 +12:00
JT
4f974efeba Move 'keep' to 'take' () 2022-04-08 08:49:28 +12:00
4129f15eb9 update str find-replace to str replace () 2022-04-07 08:41:09 -05:00
690ec9abfa Implement rest of touch flags ()
* Add timestamp flag to `touch` command

* Add modify flag to `touch` command

* Add date flag to `touch` command

* Remove unnecessary `touch` test and fix tests setups

* Change `touch` flags descriptions

* Update `touch` example

* Add reference flag to `touch` command

* Add access flag to `touch` command

* Add no-create flag to `touch` command

* Replace `unwrap` with `expect`
2022-04-07 06:44:05 -05:00
19c3570cf9 Allow open to work with 'from ...' block commands ()
* Remove panic from BlockCommands run function

Instead of panicing, the run method now returns an error to prevent
nushell from unexpected termination.

* Add ability to open command to run with blocks

The open command tries to parse the content of the file
if there is a command called 'from (file ending)'.  This works
fine if the command was 'built in' because the run method doesn't
fail in this case.  It did fail on a BlockCommand, though.

This change will first probe if the command contains a block and
evaluate it, if this is the case.  If there is no block, it will run
the command the same way as before.

* Add test open files with BlockCommands

* Update open.rs

* Adjust file type on open with BlockCommand parser

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
2022-04-02 07:52:32 +13:00
JT
4bb95a880f let a simple last be a single value () 2022-04-01 23:12:31 +13:00