Commit Graph

1983 Commits

Author SHA1 Message Date
Alex van de Sandt
b304de8199 Rewrite which (#1144)
* Detect built-in commands passed as args to `which`

This expands the built-in `which` command to detect nushell commands
that may have the same name as a binary in the path.

* Allow which to interpret multiple arguments

Previously, it would discard any argument besides the first. This allows
`which` to process multiple arguments. It also makes the output a stream
of rows.

* Use map to build the output

* Add boolean column for builtins

* Use macros for entry creation shortcuts

* Process command args and use async_stream

In order to use `ichwh`, I'll need to use async_stream. But in order to
avoid lifetime errors with that, I have to process the command args
before using them. I'll admit I don't fully understand what is going on
with the `args.process(...)` function, but it works.

* Use `ichwh` for path searching

This commit transitions from `which` to `ichwh`. The path search is now
done asynchronously.

* Enable the `--all` flag on `which`

* Make `which` respect external commands

Escaped commands passed to wich (e.g., `which "^ls"`), are now searched
before builtins.

* Fix clippy warnings

This commit resolves two warnings from clippy, in light of #1142.

* Update Cargo.lock to get new `ichwh` version

`ichwh@0.2.1` has support for local paths.

* Add documentation for command
2020-01-01 19:45:27 +13:00
Jonathan Turner
72838cc083
Move to using clippy (#1142)
* Clippy fixes

* Finish converting to use clippy

* fix warnings in new master

* fix windows

* fix windows

Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
2019-12-31 20:36:08 +13:00
Ludwig Stecher
8093612cac Allow moving in text with Ctrl+ArrowLeft, Ctrl+ArrowRight (#1141)
* Allow moving in text with Ctrl+ArrowLeft, Ctrl+ArrowRight

* Document changes

* Format
2019-12-31 17:06:36 +13:00
Ryan Blecher
f37f29b441 Add uniq command (#1132)
* start playing with ways to use the uniq command

* WIP

* Got uniq working, but still need to figure out args issue and add tests

* Add some tests for uniq

* fmt

* remove commented out code

* Add documentation and some additional tests showing uniq values and rows. Also removed args TODO

* add changes that didn't get committed

* whoops, I didn't save the docs correctly...

* fmt

* Add a test for uniq with nested json

* Add another test

* Fix unique-ness when json keys are out of order and make the test json more complicated
2019-12-31 17:05:02 +13:00
Russell
dba82ac530 handle single quoted external command args (#1139)
fixes #1138
2019-12-31 06:47:14 +13:00
Andrés N. Robalino
0615adac94
Inc refactoring, Value helper test method extractions, and more integration helpers. (#1135)
* Manifests check. Ignore doctests for now.

* We continue with refactorings towards the separation of concerns between
crates. `nu_plugin_inc` and `nu_plugin_str` common test helpers usage
has been refactored into `nu-plugin` value test helpers.

Inc also uses the new API for integration tests.
2019-12-29 00:17:24 -05:00
Kevin DCR
21e508009f Refactor struct names for old commands (ls, cd, pwd) (#1133) 2019-12-29 10:33:31 +13:00
Jonathan Turner
a9317d939f
Update README.md 2019-12-28 15:27:51 +13:00
Andrés N. Robalino
65d843c2a1
Merge pull request #1128 from andrasio/nu-plugin-extract
Extract nu-plugin crate.
2019-12-27 09:16:18 -05:00
Andrés N. Robalino
f6c62bf121 Nu plugins now depend on nu-plugin crate. 2019-12-27 08:52:15 -05:00
Jonathan Turner
b4bc5fe9af
Merge pull request #1126 from jonathandturner/utf8_fix
UTF8 fix for twitter-reported issue
2019-12-27 19:48:42 +13:00
Jonathan Turner
10368d7060 UTF8 fix for twitter-reported issue 2019-12-27 19:25:44 +13:00
Jonathan Turner
68a314b5cb UTF8 fix for twitter-reported issue 2019-12-27 19:03:00 +13:00
Jonathan Turner
3c7633ae9f
Merge pull request #1125 from notryanb/update-readme
update readme to reflect >= 0.7.2 $nu variables
2019-12-27 15:42:25 +13:00
notryanb@gmail.com
dba347ad00 update readme to show >= 0.7 nu path 2019-12-26 20:08:30 -05:00
Jonathan Turner
bfba2c57f8
Merge pull request #1124 from quebin31/master
Fix positional macro on crate nu-macros
2019-12-27 07:16:47 +13:00
Kevin
c69bf9f46f
Merge branch 'master' of https://github.com/nushell/nushell 2019-12-26 12:32:28 -05:00
Kevin
7ce1ddc6fd
Fixed optional and required argument in signature.
This fixes issues like #1117
2019-12-26 12:29:41 -05:00
Jonathan Turner
e7ce6f2fcd
Merge pull request #1113 from jonathandturner/bump_0_7_2
Bump to 0.7.2
2019-12-24 14:51:58 +13:00
Jonathan Turner
0c786bb890 Bump to 0.7.2 2019-12-24 14:51:10 +13:00
Jonathan Turner
8d31c32bda
Merge pull request #1112 from jonathandturner/assorted_fixes
Fix an assortment of issues
2019-12-24 14:45:15 +13:00
Jonathan Turner
e7fb15be59 Fix an assortment of issues 2019-12-24 14:26:47 +13:00
Jonathan Turner
be7550822c
Merge pull request #1109 from nushell/ctrl_l_clear
Move to git rustyline to fix Ctrl-L
2019-12-24 05:48:42 +13:00
Jonathan Turner
0ce216eec4
Move to git rustyline to fix Ctrl+L 2019-12-24 05:26:30 +13:00
Jonathan Turner
1fe85cb91e
Merge pull request #1108 from thegedge/faster-pipelines
Wait for process instead of polling its status.
2019-12-23 07:06:16 +13:00
Jason Gedge
8cadc5a4ac Wait for process instead of polling its status.
This provides a huge performance boost for pipelines that end in an
external command. Rough testing shows an improvement from roughly 400ms
to 30ms when `cat`-ing a large file.
2019-12-22 14:14:03 -03:30
Jonathan Turner
f9da7f7d58
Merge pull request #1102 from jonathandturner/bump_nu
Bump nu version
2019-12-20 10:54:30 +13:00
Jonathan Turner
367f11a62e Bump nu version 2019-12-20 09:03:54 +13:00
Jonathan Turner
8a45ca9cc3
Merge pull request #1100 from nushell/fix-stable
Fix the stable plugins to correct list
2019-12-20 06:37:55 +13:00
Jonathan Turner
e336930fd8
Update Cargo.toml 2019-12-20 06:18:06 +13:00
Jonathan Turner
172ccc910e
Fix the stable plugins to correct list 2019-12-20 06:01:42 +13:00
Jonathan Turner
a8425daf14
Merge pull request #1097 from jonathandturner/fix_workspace
Fix the workspace I commented out
2019-12-18 10:14:16 -08:00
Jonathan Turner
b629136528 Fix the workspace I commented out 2019-12-19 06:58:23 +13:00
Jonathan Turner
91ebb7f718
Merge pull request #1096 from jonathandturner/copy_core_plugins
Copy core plugins back so we can publish
2019-12-18 08:54:31 -08:00
Jonathan Turner
96484161c0 Copy core plugins back so we can publish 2019-12-19 05:35:17 +13:00
Jonathan Turner
d21ddeeae6
Merge pull request #1094 from jonathandturner/rename_test_support
Rename test-support to nu-test-support
2019-12-17 11:08:24 -08:00
Jonathan Turner
4322d373e6 More renames 2019-12-18 07:54:39 +13:00
Jonathan Turner
08571392e6 Rename test-support to nu-test-support 2019-12-18 07:41:47 +13:00
Jonathan Turner
f52235b1c1
Merge pull request #1093 from jonathandturner/fix_asset
Try to fix asset building
2019-12-17 10:28:15 -08:00
Jonathan Turner
a66147da47 Try to fix asset building 2019-12-18 07:09:38 +13:00
Jonathan Turner
df778afd1f Try to fix asset building 2019-12-18 07:05:12 +13:00
Jonathan Turner
d7ddaa376b
Merge pull request #1092 from jonathandturner/oops
More oops
2019-12-17 09:11:52 -08:00
Jonathan Turner
2ce892c6f0 More oops 2019-12-18 06:11:14 +13:00
Jonathan Turner
28179ef450
Merge pull request #1091 from jonathandturner/add_descs
Oops
2019-12-17 09:09:30 -08:00
Jonathan Turner
2c6336c806 Oops 2019-12-18 06:08:45 +13:00
Jonathan Turner
761fc9ae73
Merge pull request #1090 from jonathandturner/add_descs
Add missing descriptions and licenses to subcrates
2019-12-17 09:07:36 -08:00
Jonathan Turner
314c3c4a97 Add missing descriptions and licenses to subcrates 2019-12-18 06:07:00 +13:00
Jonathan Turner
f7f1fba94f
Merge pull request #1089 from jonathandturner/bump
Bump Nu version
2019-12-17 08:54:02 -08:00
Jonathan Turner
14817ef229 Subcrate versions 2019-12-18 05:18:10 +13:00
Jonathan Turner
98233dcec1 Subcrate versions 2019-12-18 05:09:53 +13:00