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
..
2019-10-03 16:27:04 +05:30
2019-11-15 15:37:41 +01:00
2019-10-18 20:43:37 -04:00
2019-10-08 18:32:42 +11:00
2019-12-15 13:56:26 +01:00
2019-11-10 14:12:59 +05:30
2019-10-01 11:21:56 -03:00
2019-10-01 06:14:56 -04:00
2019-10-03 16:54:28 +05:30
2019-10-03 20:13:22 +02:00
2019-12-02 11:02:58 -08:00
2019-12-02 11:02:59 -08:00
2019-10-25 20:47:00 +02:00
2019-12-02 11:02:58 -08:00
2019-11-16 15:31:28 +01:00
2019-12-15 13:56:26 +01:00
2019-12-02 11:02:58 -08:00
2019-10-03 08:18:51 -04:00
2019-10-03 06:09:01 +02:00
2019-12-02 11:02:59 -08:00
2019-10-07 02:08:20 +08:00
2019-11-14 16:59:39 -05:00
2019-11-15 15:53:58 +01:00
2019-12-02 11:02:58 -08:00
2019-10-02 15:03:28 +05:30
2019-12-02 11:02:59 -08:00
2019-12-02 11:02:58 -08:00
2019-11-10 14:41:23 +05:30
2019-11-01 17:25:08 -05:00
2019-10-18 20:43:37 -04:00
2019-10-06 23:20:48 +08:00
2019-12-15 13:56:26 +01:00
2019-10-04 06:44:45 +05:30
2019-10-06 22:35:38 +08:00
2019-12-31 17:05:02 +13:00
2019-12-02 11:02:58 -08:00
2019-12-02 11:02:59 -08:00
2020-01-01 19:45:27 +13:00

How do I get started?

Pick any command from the checklist and write a comment acknowledging you started work.

Instructions for documenting a Nu command of your choosing

Name the file after the command, like so:

command.md

Example: If you want to add documentation for the Nu command enter, create a file named enter.md, write documentation, save it at /docs/commands/[your_command_picked].md as and create your pull request.

What kind of documentation should I write?

Anything you want that you believe it best documents the command and the way you would like to see it. Here are some of our ideas of documentation we would love to see (feel free to add yours):

  • Examples of using the command (max creativity welcomed!)
  • Description of the command.
  • Command usage.

Anything else?

Of course! (These are drafts) so feel free to leave feedback and suggestions in the same file.

Happy Documenting.