-
Notifications
You must be signed in to change notification settings - Fork 2.1k
help commands and $nu.scope.commands should both have name columns instead of one being called command #6922
Copy link
Copy link
Closed
Labels
category:inconsistent-behaviorBehavior between different commands or types inconsistent/unexpectedBehavior between different commands or types inconsistent/unexpectedgood first issueGood for newcomersGood for newcomersnotes:breaking-changesThis PR implies a change affecting users and has to be noted in the release notesThis PR implies a change affecting users and has to be noted in the release notes
Milestone
Description
Describe the bug
I was trying to do some work with $nu.scope.commands, but was repeatedly getting hurled because, even though $nu.scope.commands is supposed to be a superset of help commands's output, it uses a completely different name for one of its columns. (See title).
How to reproduce
〉$nu.scope.commands | columns
╭────┬───────────────╮
│ 0 │ command │
│ 1 │ module_name │
│ 2 │ category │
│ 3 │ signature │
│ 4 │ usage │
│ 5 │ examples │
│ 6 │ is_builtin │
│ 7 │ is_sub │
│ 8 │ is_plugin │
│ 9 │ is_custom │
│ 10 │ is_keyword │
│ 11 │ is_extern │
│ 12 │ creates_scope │
│ 13 │ extra_usage │
│ 14 │ search_terms │
╰────┴───────────────╯
〉help commands | columns
╭───┬──────────────╮
│ 0 │ name │
│ 1 │ category │
│ 2 │ is_plugin │
│ 3 │ is_custom │
│ 4 │ is_keyword │
│ 5 │ usage │
│ 6 │ search_terms │
╰───┴──────────────╯
〉
Expected behavior
Both columns should be called name. I understand this may be a compat break for certain tools, so the other name (command on $nu.scope.commands) can exist in a deprecated state for awhile.
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.70.0 |
| branch | |
| commit_hash | 9ef65dc |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.64.0 (a55dd71d5 2022-09-19) |
| rust_channel | stable-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.64.0 (387270bc7 2022-09-16) |
| pkg_version | 0.70.0 |
| build_time | 2022-10-18 18:55:02 +00:00 |
| build_rust_channel | release |
| features | database, dataframe, default, trash, which, zip |
| installed_plugins |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category:inconsistent-behaviorBehavior between different commands or types inconsistent/unexpectedBehavior between different commands or types inconsistent/unexpectedgood first issueGood for newcomersGood for newcomersnotes:breaking-changesThis PR implies a change affecting users and has to be noted in the release notesThis PR implies a change affecting users and has to be noted in the release notes