Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to using clippy #1142

Merged
merged 6 commits into from Dec 31, 2019
Merged

Move to using clippy #1142

merged 6 commits into from Dec 31, 2019

Conversation

sophiajt
Copy link
Member

This finishes the work from #1136 to add clippy by default to CI, and finishes fixing the clippy warnings so that we can be fully clippy-clean.

fixes #1136

@gitpod-io
Copy link

gitpod-io bot commented Dec 31, 2019

@sophiajt sophiajt merged commit 72838cc into nushell:master Dec 31, 2019
@sophiajt sophiajt deleted the clippy branch December 31, 2019 07:36
@notryanb notryanb mentioned this pull request Dec 31, 2019
avandesa added a commit to avandesa/nushell that referenced this pull request Dec 31, 2019
This commit resolves two warnings from clippy, in light of nushell#1142.
sophiajt pushed a commit that referenced this pull request Jan 1, 2020
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants