Commit Graph

2717 Commits

Author SHA1 Message Date
Darren Schroeder
9b35aae5e8
update sample configs (#2242)
* update sample configs

* change rustyline to line_editor
2020-07-23 06:49:25 -05:00
Darren Schroeder
7e9f87c57f
Expose all rustyline configuration points (#2238)
* Added all rustyline config points

* comments cleanup

* my good friend fmt keeps changing his mind
2020-07-23 09:43:52 +12:00
morrme
5d17b72852
update config documentation (#2178)
* update config documentation

* update config syntax

* update config syntax

* Update alias.md

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2020-07-23 09:42:04 +12:00
k-brk
6b4634b293
Convert table of primitives to positional arguments for external cmd (#2232)
* Convert table of primitives to positional arguments for external cmd

* Multiple file test, fix for cococo
2020-07-23 09:41:34 +12:00
Jonathan Turner
2a084fc838
Bump to 0.17.0 (#2237) 2020-07-22 06:41:49 +12:00
Joseph T. Lyons
a36d2a1586
Revert "hopefully the final fix for history (#2222)" (#2235)
This reverts commit 6829ad7a30.
2020-07-21 18:19:04 +12:00
Darren Schroeder
32b875ada9
sample config settigns (#2233) 2020-07-20 21:15:58 -05:00
Darren Schroeder
aaed9c4e8a
added ansi example (#2230)
* added ansi example

* added strcollect to example
2020-07-20 18:33:39 -05:00
Darren Schroeder
b9278bdfe1
Char example (#2231)
* added ansi example

* added another example

* changed example

* ansi changes here by mistake
2020-07-20 14:25:38 -05:00
Joseph T. Lyons
6eb2c94209
Add flag for case-insensitive sort-by (#2225)
* Add flag for case-insensitive sort-by

* Fix test names

* Fix documentation comments
2020-07-21 05:31:58 +12:00
Darren Schroeder
7b1a15b223
Campbell colors (#2219)
* added campbell theme to html colors

* updated test results. had to make change for ci.

* hopefully the last changes for this stupid test :)

* moved tests to html.rs

* remove unnecessary using statement.

* still fighting with tests and tests are winning.
2020-07-20 07:57:29 -05:00
bailey-layzer
836efd237c
fix internal command parsing (args.is_last) (#2224) 2020-07-20 05:49:40 +12:00
Pierre-André Gagnon
aad3cca793
Add benchmark command (#2223) 2020-07-20 05:39:43 +12:00
Darren Schroeder
6829ad7a30
hopefully the final fix for history (#2222) 2020-07-19 07:47:55 -05:00
Philip Peterson
1f0962eb08
Add some tests for parse_arg (#2220)
* add some tests for parse

* Format

* fix warnings
2020-07-19 19:12:56 +12:00
Jonathan Turner
c65acc174d
Add hex pretty print to 'to html' (#2221) 2020-07-19 16:44:15 +12:00
Jonathan Turner
2dea392e40
Add hex pretty print to 'to html' (#2217) 2020-07-19 12:14:40 +12:00
Jonathan Turner
0c43a4d04b
Add hex pretty print to 'to html' (#2216) 2020-07-19 10:12:17 +12:00
Jonathan Turner
ebc2d40875
Expose more registry APIs (#2215) 2020-07-19 06:01:05 +12:00
k-brk
3432078e77
Fix uniq to work with simple values (#2214) 2020-07-19 05:19:03 +12:00
Joseph T. Lyons
9e5170b3dc
Clean up lines command (#2207) 2020-07-19 05:17:56 +12:00
Y.Horie
0ae7c5d836
Fix if description (#2204) (#2213) 2020-07-19 05:16:35 +12:00
Darren Schroeder
d0712a00f4
made it easier to change colors (#2212)
* made it easier to change colors
and the beginning of html theming

* fmt
2020-07-18 11:05:45 -05:00
Jonathan Turner
5e722181cb
Export more defs from nu-cli (#2205) 2020-07-18 16:47:03 +12:00
Shaurya Shubham
ffe3e2c16b
Rename calc to math eval and allow it to optionally take an expression as an argument (#2195)
* Rename `calc` to `math eval` and allow it to optionally take the expression as an argument

* Moved calc tests to math eval
Also added 2 tests and changed 1 test

* Move calc docs to math eval
2020-07-18 16:11:19 +12:00
Darren Schroeder
04e8aa31fe
update history max size with two different calls. (#2202)
Closes #2193
2020-07-18 15:26:32 +12:00
Jason Gedge
9d24b440bb
Introduce completion abstractions to nushell. (#2198)
* Introduce completion abstractions to nushell.

Currently, we rely on rustyline's completion structures. By abstracting this
away, we are more flexible to introduce someone elses completion engine, or our
own.

* Update value_shell.rs

Co-authored-by: Jonathan Turner <jonathandturner@users.noreply.github.com>
2020-07-18 14:55:10 +12:00
Jonathan Turner
d8594a62c2
Add wasm support (#2199)
* Working towards a PoC for wasm

* Move bson and sqlite to plugins

* proof of concept now working

* tests are green

* Add CI test for --no-default-features

* Fix some tests

* Fix clippy and windows build

* More fixes

* Fix the windows build

* Fix the windows test
2020-07-18 13:59:23 +12:00
Joseph T. Lyons
dbe0effd67
User error propagation operator (#2201) 2020-07-18 13:12:06 +12:00
Arash Outadi
b358804904
Auto-Generate Documentation for nushell.com (#2139)
* Very rough idea

* Remove colour codes

* Work on command for generating docs

* Quick comment

* Use nested collapsible markdown

* Refine documentation command

* Clippy and rename docs

* This layout probably seems best

Also moved some code to documentation.rs to avoid making help.rs massive

* Delete summaries.md

* Add usage strings

* Remove static annotations

* get_documentation produces value

Which will be used like
'help generate_docs | save "something"'
The resulting yaml can be passed to a script for generating HTML/MD files in the website

* Fix subcommands

* DRY code

* Address clippy:

* Fix links

* Clippy lints

* Move documentation to more central location
2020-07-18 10:22:43 +12:00
Darren Schroeder
7b02604e6d
changed colors as per Jörn's suggestion. (#2200)
* changed colors as per Jörn's suggestion.

* cleaned up old comments
2020-07-17 15:02:54 -05:00
k-brk
6497421615
Keep until and while as subcommands of keep (#2197) 2020-07-18 07:06:48 +12:00
Joseph T. Lyons
f26151e36d
Silence Rust 1.45 Clippy warnings (#2196)
* Silence Rust 1.45 Clippy warnings dealing with using `map_err()`

* Silence false Clippy warning

* Fix last Clippy error for unnecessary conversion

* Fix `and_then` clippy warnings
2020-07-18 05:57:15 +12:00
Joseph T. Lyons
0f688d7da7
Use '?' for error propagation, remove match (#2194) 2020-07-17 05:39:51 +12:00
Darren Schroeder
a04dfca63a
added ability to supply --dark_bg to to html (#2189)
* added ability to supply --dark_bg to to html

* fmt + fixed tests

* updated other html tests

* fmt
2020-07-16 08:19:29 -05:00
Jonathan Turner
72f6513d2a
Keybindings and invocation fix (#2186) 2020-07-15 19:51:59 +12:00
Joseph T. Lyons
7c0a830d84
Match cleanup (#2184)
* Use `unwrap_or()` to remove `match`

* Use `?` for error propogation, and remove `match`
2020-07-15 19:51:41 +12:00
Joseph T. Lyons
c299d207f7
Remove unnecessary match (#2183) 2020-07-15 19:50:38 +12:00
George Pollard
42a1adf2e9
Indices are (now) green, bold, right-aligned (#2181)
With https://github.com/nushell/nushell/pull/355 the (numeric) index column of tables was changed to be right-aligned. After the move to `nu-table` the index column is now centered instead of right-aligned. I think this is a copy-paste bug where [this line](71e55541d7/crates/nu-cli/src/commands/table.rs (L190)) has been copied from [this line](71e55541d7/crates/nu-cli/src/commands/table.rs (L207)), since the code is out-of-sync with the comment. This change restores harmony between the description and the function of the code.
2020-07-15 15:48:20 +12:00
Andrés N. Robalino
b4761f9d8a
Remove commands meant for internal use. (#2182) 2020-07-14 21:49:46 -05:00
Andrés N. Robalino
71e55541d7
Merge skip command varieties into one command with sub commands. (#2179) 2020-07-14 20:44:49 -05:00
Joseph T. Lyons
5f1075544c
Remove unnecessary match statement (#2177) 2020-07-14 20:17:28 -04:00
Joseph T. Lyons
0934410b38
Use matches!() for true/false returning match statements (#2176) 2020-07-14 20:11:41 -04:00
Joseph T. Lyons
17e6c53b62
Add str reverse subcommand (#2170)
* Add str reverse subcommand

* rustfmt
2020-07-15 08:47:04 +12:00
Sam Hedin
80d2a7ee7a
Fix autoenv executing scripts multiple times (#2171)
* Fix autoenv executing scripts multiple times

Previously, if the user had only specified entry or exitscripts the scripts
would execute many times. This should be fixed now

* Add tests

* Run exitscripts

* More tests and fixes to existing tests

* Test solution with visited dirs

* Track visited directories

* Comments and fmt
2020-07-15 07:16:50 +12:00
Ali Mousa
8fd22b61be
Add variance and stddev subcommands to math command (#2154)
* add variance (population)
subcommand to math

* impl variance subcommand with spanning errors for invalid types

* add stddev subcommand to math

* rename bytes to filesize

* clippy fix -- use expect instead of unwrap in variance tests
2020-07-15 07:15:02 +12:00
Andrés N. Robalino
e9313a61af
Make str more strict. (#2173) 2020-07-14 10:04:00 -05:00
Andrés N. Robalino
f2c4d22739
group-by can generate custom grouping key by block evaluation. (#2172) 2020-07-14 08:45:19 -05:00
Jason Gedge
8551e06d9e
Ensure source buffer is cleared after reading in MaybeTextCodec. (#2168) 2020-07-14 11:24:52 +12:00
Arash Outadi
97cedeb324
Fix str --to-int usages (#2167) 2020-07-13 15:07:34 -04:00