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
help
command: Remove --find
flag in favour of find
command
#7438
Comments
|
What is the reason to not use aliases for faster typing? Aliases seem to be a more general solution for faster typing without the cost of adding a flag on every command. I’m case nushell doesn’t support aliases for flags or even a chain of commands in a pipe, this could be added. |
I would say that we prefer composition using pipes over flags but it's not an absolute rule. We're willing to use redundant flags if they make common use cases easier. I find |
It actually does something slightly different than basic |
What’s the reason to not use the available pipe filtering commands like |
(I am gonna skip jury duty on this question of dogmatic consistency vs. convenience/muscle memory as I personally mostly use |
--find
flag in favour of find
commandhelp
command: Remove --find
flag in favour of find
command
Describe the bug
I'm confused when I should use the
find
flag instead of piping the output into thefind
command.The
find
flag is present on thehelp
command, I'm not sure if it's present anywhere else too.IIUC, the
find
command can do everything the--find
flag can, and more. One difference in thehelp commands --find
flag seems that it doesn't search thesignatures
column. With thefind
command one can pipe throughreject signatures
before. In addition, thefind
command can filter by regex, and works everywhere else already.Currently, these are two ways of doing the same one thing. This creates more complexity for the implementation and subsequent maintenance, as well as creating more confusion and obstacles for the learning user.
It seems commands are preferable over flags where appropriate because a command is usable for every command in the pipe and doesn't need a separate implementation.
Maybe I’m misremembering buy I believe to recall @jntrnr talking about preferring commands over flags somewhere though I can't find the source right now.
The premise of nushell seemed to be not having to remember different flags for every command anymore which change a command's behavior but to use a more structured pipe instead. It seems this fundamental principle is violated here.
How to reproduce
help commands --find select
help commands | find select
Expected behavior
A single one preferred way of doing things instead of multiple.
Screenshots
No response
Configuration
Additional context
No response
The text was updated successfully, but these errors were encountered: