Comments (6)
I also don't like how shells --help
lists show
in the usage above. If I had my way, it would look more like this.
❯ shells --help
Display current working directories.
Usage:
> shells (an alias to `show`)
Flags:
-h, --help - Display the help message for this command
Another thing that bothers me is that help shells
is different than shells --help
.
❯ help shells
Alias for `show`
Alias: shells
Expansion:
show
❯ shells --help
Display current working directories.
Usage:
> show
Flags:
-h, --help - Display the help message for this command
from nushell.
These are the commands that are available without doing a use std
in the repl.
nushell/crates/nu-std/src/lib.rs
Lines 54 to 67 in b1cf0e2
You'll notice that show
isn't in there but its alias shells
is.
❯ shells --help
Display current working directories.
Usage:
> show
Flags:
-h, --help - Display the help message for this command
However, I do agree that this stuff should work better.
from nushell.
Yes, it's confused me in the past as well, and I only now think I'm starting to grok it. Put slightly differently, those aliases are defined in std
. It's possible for an alias in a module to:
- point to a command in that module
- still be valid even if the original command itself hasn't been imported
Those aliases are imported at startup, but the original commands they point to are not.
However, I do agree that this stuff should work better.
+1 ;-)
(Rough thinking without any validation or research) Perhaps the original commands should also be imported? Or just reverse the alias and command names?
from nushell.
interesting, thanks for the added context! that does make sense.
so this isn't a bug, just some potentially confusing help messages.
from nushell.
As @fdncred noted, this issue applies to all commands in the shells
category. Not only are they exposed in a "prelude", these aliases are presented like other built-ins in documentation, too.
Oddly, the officials docs pages for dexit
and enter
on the Wayback Machine). Example screenshots showing the resolved drop
and add
commands in the Usage
section1:
![Screenshot 2024-06-30 at 7 42 16 PM](https://private-user-images.githubusercontent.com/658538/344510760-c3cbabbc-8f85-41d0-96c5-a4aac919bb2d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5NTQxNDUsIm5iZiI6MTcxOTk1Mzg0NSwicGF0aCI6Ii82NTg1MzgvMzQ0NTEwNzYwLWMzY2JhYmJjLThmODUtNDFkMC05NmM1LWE0YW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QyMWY1YzZhMzRlMTI0OTc1ZGJkMzRlOTA5NjEwYWIzMTY1MDZmMTM0OWJjMjc4ODIyOGM5YWE1MjIzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.UMAuoVetETWdpiE2rLOHG-gmTpmr3TA98X2Jjji-pUU)
Footnotes
from nushell.
Oddly, the officials docs pages for dexit and enter on the Wayback Machine). Example screenshots showing the resolved drop and add commands in the Usage section1:
I'm guessing that this is because exit
and enter
used to be normal nushell Rust commands. Changing them to the stdlib, which is all nushell scripting, was one of our first attempts at moving commands from Rust to nushell scripting. Although, it could be because the code has changed so much and there's a bug too.
from nushell.
Related Issues (20)
- Lazy loading for custom commands
- cd path/to/file.txt/.. causes directory not found error HOT 3
- `OneOf(String,List(String))` doesn't work in named arguments
- Attention: Nightly build of release binaries failed HOT 1
- Feature Request: Open command supports opening directories HOT 2
- Intermediary output of thefuck (potentially other commands) is lost in pipes since Nu 0.92 HOT 1
- Add 'like' operator (clone of =~) HOT 1
- Extend describe --detailed with schema aggregation HOT 5
- Unspecified behavior of char after ending quotes HOT 5
- Provide $in alias in function body HOT 3
- `ls <dir>` no longer sorted by date HOT 5
- `detect columns --guess` panics when encountering `…` in 2 subsequent rows HOT 3
- `flatten` does not rename conflicting column if parent's conflicting column appears after column to be flattened HOT 1
- Removing symlink ending with `/` removes the original path
- Default parameters don't accept `const` values HOT 3
- Help for `dexit` displays non-existent `Subcommands` section HOT 5
- flag missing completable<string> HOT 3
- Weird error when using `into datetime` HOT 2
- Cannot install nushell via winget HOT 14
- tables with header_on_separator set to true and columns with spaces could appear truncated when they aren't actually
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nushell.