nushell/crates/nu-protocol/src/engine
Stefan Holderbach 881c3495c1
Exclude deprecated commands from completions (#9612)
# Description
We previously simply searched all commands in the working set. As our
deprecated/removed subcommands are documented by stub commands that
don't do anything apart from providing a message, they were still
included.
With this change we check the `Signature.category` to not be
`Category::Deprecated`.

## Note on performance
Making this change will exercise `Command.signature()` more
frequently! As the rust-implemented commands include their builders here
this probably will cause a number of extra allocations. There is
actually no valid reason why the commands should construct a new
`Signature` for each call to `Command.signature()`.
This will introduce some overhead to generate the completions for
commands.
# User-Facing Changes
Example: `str <TAB>`


![grafik](https://github.com/nushell/nushell/assets/15833959/4d5ec5fe-aa93-45af-aa60-3854a20fcb04)
2023-07-05 23:13:16 +02:00
..
call_info.rs Back to working state 2021-09-03 06:21:37 +12:00
capture_block.rs revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
command.rs Re-implement aliases (#8123) 2023-02-27 20:44:05 +13:00
engine_state.rs Exclude deprecated commands from completions (#9612) 2023-07-05 23:13:16 +02:00
mod.rs Add pattern matching (#8590) 2023-03-24 14:52:01 +13:00
overlay.rs Improve type hovers (#9515) 2023-06-29 05:19:48 +12:00
pattern_match.rs make the pattern-matcher and eval engine use the same unit computation (#8973) 2023-05-12 12:18:11 -05:00
stack.rs revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00