nushell/docs/commands
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
..
add.md Create docs for add command 2019-10-03 16:27:04 +05:30
append.md Add append command documentation 2019-11-15 15:37:41 +01:00
average.md fix typos and incorrect commands 2019-10-18 20:43:37 -04:00
cd.md Add documentation for cd - 2019-10-08 18:32:42 +11:00
compact.md add documentation for compact command 2019-12-02 11:02:59 -08:00
config.md update links to books 2019-12-15 13:56:26 +01:00
count.md Add docs for the count command 2019-11-10 14:12:59 +05:30
date.md Fix typo in date.cmd 2019-10-01 11:21:56 -03:00
default.md add documentation for default command 2019-12-02 11:02:59 -08:00
echo.md Add echo command documentation 2019-10-01 06:14:56 -04:00
edit.md Create docs for edit command 2019-10-03 16:54:28 +05:30
enter.md Add documentation for the enter command 2019-10-07 23:21:58 +08:00
env.md Created Docs for env command 2019-10-03 20:13:22 +02:00
exit.md Update some command docs 2019-12-02 11:02:58 -08:00
fetch.md Add documentation for the fetch command 2019-10-07 02:17:57 +08:00
first.md add documentation file for first command 2019-10-02 15:49:44 -04:00
format.md add documentation for format 2019-12-02 11:02:59 -08:00
from-csv.md combine functions behind to/from-c/tsv commands 2019-11-19 16:02:35 +00:00
from-json.md add documentation for from-json, from-yaml, history, split-row 2019-12-02 11:02:59 -08:00
from-toml.md Create docs for from-toml command 2019-10-25 20:47:00 +02:00
from-tsv.md add documentation for from-tsv, from-xml 2019-12-02 11:02:58 -08:00
from-xml.md add documentation for from-tsv, from-xml 2019-12-02 11:02:58 -08:00
from-yaml.md add documentation for from-json, from-yaml, history, split-row 2019-12-02 11:02:59 -08:00
get.md add documentation for get, ps 2019-12-02 11:02:58 -08:00
group-by.md add group-by command documentation 2019-11-16 15:31:28 +01:00
help.md update links to books 2019-12-15 13:56:26 +01:00
histogram.md update histogram, nth documentation 2019-12-02 11:02:59 -08:00
history.md add documentation for from-json, from-yaml, history, split-row 2019-12-02 11:02:59 -08:00
inc.md Update some command docs 2019-12-02 11:02:58 -08:00
last.md fix grammar 2019-10-03 08:18:51 -04:00
lines.md Add documentation for lines 2019-10-03 06:09:01 +02:00
nth.md update histogram, nth documentation 2019-11-28 19:32:31 +01:00
open.md Add documentation for the open command 2019-10-07 02:08:20 +08:00
pick.md Add documentation for the pick and reject command 2019-11-10 12:37:27 +05:30
pivot.md Document pivot command 2019-11-14 16:59:39 -05:00
prepend.md Add prepend command documentation 2019-11-15 15:53:58 +01:00
ps.md add documentation for get, ps 2019-12-02 11:02:58 -08:00
README.md More command documentation instructions. 2019-09-25 11:35:58 -05:00
reject.md Fix minor error in reject command docs 2019-12-06 17:27:14 +05:30
reverse.md Create docs for reverse command 2019-10-02 15:03:28 +05:30
save.md fix error in save.md 2019-12-02 11:02:59 -08:00
shells.md Update some command docs 2019-12-02 11:02:58 -08:00
size.md Make documentation for size command 2019-11-10 14:41:23 +05:30
sort-by.md Add documentation for histogram, split-column 2019-12-02 11:02:59 -08:00
split-column.md Add documentation for histogram, split-column 2019-12-02 11:02:59 -08:00
split-row.md add documentation for from-json, from-yaml, history, split-row 2019-12-02 11:02:59 -08:00
str.md Updated Doc, error on bad input 2019-11-01 17:25:08 -05:00
sum.md fix typos and incorrect commands 2019-10-18 20:43:37 -04:00
sys.md Add documentation for the sys command 2019-10-06 23:20:48 +08:00
tags.md update links to books 2019-12-15 13:56:26 +01:00
to-csv.md combine functions behind to/from-c/tsv commands 2019-11-19 16:02:35 +00:00
to-json.md Fix minor typo 2019-10-04 06:44:45 +05:30
to-toml.md Added improvements suggested by @andrasio 2019-10-04 06:40:16 +05:30
to-tsv.md Added improvements suggested by @andrasio 2019-10-04 06:40:16 +05:30
to-url.md Added improvements suggested by @andrasio 2019-10-04 06:40:16 +05:30
to-yaml.md Added improvements suggested by @andrasio 2019-10-04 06:40:16 +05:30
trim.md Add documentation for the trim command 2019-10-06 22:35:38 +08:00
uniq.rs Add uniq command (#1132) 2019-12-31 17:05:02 +13:00
version.md Update some command docs 2019-12-02 11:02:58 -08:00
where.md Update where.md 2019-12-02 11:02:59 -08:00
which.md Rewrite which (#1144) 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.