nushell/crates/nu-cli/src
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
..
commands Break up interdependencies of command crates (#9429) 2023-06-14 23:12:55 +02:00
completions Exclude deprecated commands from completions (#9612) 2023-07-05 23:13:16 +02:00
menus Parameter defaults to $nu.scope.commands (#9152) 2023-05-11 13:59:56 -05:00
config_files.rs Fix config creation during printing (#9353) 2023-06-04 22:04:28 +03:00
eval_cmds.rs Move CLI related commands to nu-cli (#8832) 2023-04-10 10:56:47 +12:00
eval_file.rs Add $env.CURRENT_FILE variable (#8861) 2023-04-13 23:33:29 +03:00
lib.rs cratification: move the bytes command to nu-cmd-extra (#9509) 2023-06-23 12:23:08 -07:00
nu_highlight.rs Box ShellError in Value::Error (#8375) 2023-03-12 09:57:27 +01:00
print.rs Fix config creation during printing (#9353) 2023-06-04 22:04:28 +03:00
prompt.rs FIX: add a space after the default left prompt (#9074) 2023-05-08 13:00:44 -05:00
prompt_update.rs remove nu_cli crate dependency from nu_std (#8807) 2023-04-08 13:53:43 +02:00
reedline_config.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00
repl.rs Bracketed paste refactor (#9547) 2023-07-02 14:11:12 -05:00
syntax_highlight.rs Avoid blocking when o+e> redirects too much stderr message (#8784) 2023-05-17 17:47:03 -05:00
util.rs Fix config creation during printing (#9353) 2023-06-04 22:04:28 +03:00
validation.rs Remove old alias implementation (#8797) 2023-04-07 21:09:38 +03:00