Commit Graph

5659 Commits

Author SHA1 Message Date
Benoît Cortier
173d60d59d
Deprecate hash base64, extend decode and add encode commands (#5863)
* 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
JT
f2989bf704
Move input/output type from Command to Signature (#5880) 2022-06-26 09:23:56 +12:00
JT
575ddbd4ef
Clippy and remove unused is_binary (#5879) 2022-06-26 08:20:28 +12:00
Darren Schroeder
ef9b72d360
add ability to convert timestamp_millis() (#5876)
* add ability to convert timestamp_millis()

* add example test

* add nanos too
2022-06-25 09:51:41 -05:00
Justin Ma
25349a1eac
Add an example for default command to get an env var with fallback (#5874)
* Add an example for `default` command to get an env var with fallback

* update test

* update test
2022-06-25 17:27:54 +08:00
Justin Ma
99e4c44862
Fix less.exe downloading for windows release pkgs, close #5868 (#5873)
* Fix less.exe downloading for windows release pkgs

* Fix less.exe downloading for windows release pkgs
2022-06-25 09:09:48 +08:00
pwygab
1345f97202
Errors when let in, let env and similar commands are passed. (#5866)
* 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
WindSoilder
f02076daa8
fix plugin path with whitespace (#5871) 2022-06-24 12:44:22 -05:00
JT
533e04a60a
Bump to 0.64.1 dev version (#5865) 2022-06-24 16:47:00 +12:00
pwygab
13c152b00f
finish git fetch custom completions (#5859) 2022-06-23 05:19:11 -05:00
Fernando Herrera
f231a6df4a
Remove quotes from external args (#5846)
* remove quotes from external args

* remove internal quotes

* correct escaped quotes in string
2022-06-22 22:01:44 -05:00
Fernando Herrera
3c0bccb900
Exclude ./... from expansion (#5839)
* exclude ./... from expansion

* use all instead of any

* no path expansion for external arguments

* clippy error

* expand only tilde
2022-06-22 22:00:30 -05:00
pwygab
f43a65d7a7
Prevents duplicate fields in transpose -r (#5840) 2022-06-22 19:19:06 -05:00
Darren Schroeder
0827ed143d
cleanup $config as a built-in (#5852) 2022-06-22 13:13:03 -05:00
Kangaxx-0
4b84825dbf
Remove externa nu from nu config (#5847) 2022-06-22 09:42:18 +03:00
WindSoilder
82ae06865c
Port command (#5849)
* implement port command

* better comment

* fmt code

* fix example description

* fix usage

* fix tests
2022-06-21 23:27:58 -04:00
Darren Schroeder
128ce6f9b7
update reedline config based on recent reedline changes (#5845) 2022-06-21 12:22:11 -05:00
Fernando Herrera
44cbd88b55
allow comparison for similar types (#5844) 2022-06-21 12:15:31 -05:00
Fernando Herrera
7164929c61
Db commands without DB (#5838)
* database commands without db

* database command tests
2022-06-21 12:14:29 -05:00
Justin Ma
848ff8453b
feat: Update dockerfile for latest nu release (#5843) 2022-06-21 18:28:31 +08:00
Kamil
f94ca6cfde
root/admin prompt is red now (#5836)
I really miss bash's visual way of signalising root, i.e. blue: user, red: root

So I brought it to nushell (since you've added `is-admin` the code is fully portable and easily-readable) and hope you'll like it
2022-06-20 15:23:55 -05:00
WindSoilder
fab3f8fd40
fix exit code (#5835)
* fix exit code

* fix usage

* add comment
2022-06-20 09:05:11 -05:00
pwygab
dbcfcdae89
calculates history duration properly (#5827) 2022-06-19 00:44:46 -04:00
Kangaxx-0
08aa248c42
Add more tests for completion (#5826)
* Add more tests for completion

* Fix windows

* Cleanup
2022-06-18 19:42:00 -05:00
Darren Schroeder
9f07bcc66f
first stab at minimizing ansi escapes (#5822) 2022-06-17 22:07:46 -05:00
Reilly Wood
2caa44cea8
Fix parser panic (#5820) 2022-06-17 11:11:48 -07:00
pwygab
28c21121cf
fixes to nuon for inf, -inf, and NaN (#5818) 2022-06-17 21:01:37 +03:00
Darren Schroeder
a17d46f200
add more columns to the history command when using sqlite history (#5817) 2022-06-17 09:35:34 -05:00
Fernando Herrera
6cc8402127
Standardise to commands (#5800)
* standarize to commands

* move from to to into
2022-06-17 07:51:50 -05:00
Kangaxx-0
5f0ad1d6ad
Fix alias completion crash (#5814)
* Solve crash - commit 1

* commit 2 with issue

* Fix corner case

* Unit tests

* Fix windows tests
2022-06-17 07:50:10 -05:00
pwygab
8d7bb9147e
Attempts to fix file completions for open, rm and ls (and other filesystem commands) (#5805)
* fixes the issue for 'open' and other commands that explicitly use `SyntaxShape::Filepath`

* fixes for `rm` and similar commands

* fixes for `ls`: potentially breaking?

* fmt

* a curious fix to the test

* a curious fix to the test, except for Windows this time

* fixes Windows tests failing

* resolves it by putting an explicit check for `ls`

* reverts unnecessary test changes; fmt

* changes the order of completion operations
2022-06-17 07:47:43 -05:00
Michael Angerman
bc48b4553c
Move the history and tutor commands out of core_commands (#5813)
* move history and tutor commands from core to misc

* add in the Misc Category for the history and tutor commands
2022-06-16 09:58:38 -07:00
wolimst
28c07a5072
Add Windows Terminal profile and icon in Windows control panel (#5812)
* Show icon in Windows 'Add/Remove Programs' control panel

* Add install option for Windows Terminal profile

* Re-create icon because the icon was not shwon in Windows Terminal

Procedure: opened the original file with GIMP and simply overwrited it
2022-06-16 09:46:33 -07:00
Jakub Žádník
30c8dabeb4
Add test requirements to PR template (#5809)
* Add test requirements to PR template

* tweak words

* another tweak

* add /tests folder as a suggestion

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2022-06-16 08:14:59 -05:00
nibon7
8b368b6a4e
Fix drop nth with open end range on 32-bit platforms (#5808)
Fixes #5793

Signed-off-by: nibon7 <nibon7@163.com>
2022-06-16 06:39:48 -05:00
WindSoilder
8c0d60d0fb
add notes for def_env (#5807)
* add notes for def_env

* Update crates/nu-command/src/core_commands/export_def_env.rs

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>

* Update crates/nu-command/src/core_commands/def_env.rs

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
2022-06-16 06:37:44 -05:00
WindSoilder
8b0a4ccf4c
add light theme to default_config (#5804) 2022-06-16 06:19:49 -05:00
Michael Angerman
cfe4eff566
update default_context.rs to put the Du command in platform instead core (#5795) 2022-06-15 11:11:26 -07:00
Fernando Herrera
38f3957edf
update polars (#5791) 2022-06-15 11:45:03 -05:00
Justin Ma
cb66d2bcad
Try to fix winget package submit (#5790) 2022-06-15 07:35:28 -05:00
pwygab
ff73623873
shows location of sqlite3 history file (#5784)
* shows location of sqlite3 file

* fmt
2022-06-15 10:06:49 +02:00
JT
d1c719a8cc
bump to 0.64 (#5777)
Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2022-06-15 14:39:17 +12:00
WindSoilder
4d854f36af
add --values flag to sort record by values, by default, sort record by keys (#5782) 2022-06-14 20:42:22 -05:00
Fernando Herrera
8d5848c955
bool type for binary operations (#5779)
* bool type for binary operations

* fixed type in commands
2022-06-14 20:31:14 -05:00
Stefan Holderbach
fe88d58b1e
Pin reedline v0.7.0 for the nushell v0.64.0 release (#5781)
Includes the new History API and sqlite history backend

Release notes: https://github.com/nushell/reedline/releases/tag/v0.7.0
2022-06-14 23:21:14 +02:00
phiresky
42dbfd1fa0
SQLite History MVP with timestamp, duration, working directory, exit status metadata (#5721)
This PR adds support for an SQLite history via nushell/reedline#401

The SQLite history is enabled by setting history_file_format: "sqlite" in config.nu.

* somewhat working sqlite history
* Hook up history command
* Fix error in SQlitebacked with empty lines

When entering an empty line there previously was the "No command run"
error with `SqliteBackedHistory` during addition of the metadata

May be considered a temporary fix

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2022-06-14 22:53:33 +02:00
Kangaxx-0
534e1fc3ce
Add NU config to allow user be able to turn off external completion (#5773)
* 06-07-wsl

* 06-07-linux-issue-with-delete-input

* 06-08-2023

* 06-08-Linux

* commit for merge

* Fix unit test

* format

* clean code

* Add flag to turn off external completion

* change env var to config

* Fix comment

Co-authored-by: Frank Zhang <v-frankz@microsoft.com>
2022-06-14 14:28:11 -05:00
Fernando Herrera
ff946a2f21
each while command (#5771)
* each while command

* test value adjustment
2022-06-14 16:16:31 +02:00
WindSoilder
3c0cbec993
sort not change shape (#5778) 2022-06-14 06:41:45 -05:00
WindSoilder
48e29e9ed6
path join support multi path (#5775) 2022-06-14 06:34:00 -05:00