mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 10:08:21 +02:00
fix(completion): completions.external.enable config option not respected (#15443)
Fixes #15441 # Description Actually I made a small change to the original behavior: ``` ^foo<tab> ``` will still show external commands, regardless of whether it's enabled or not. I think that's the only thing people want to see when they press tab with a `^` prefix. # User-Facing Changes # Tests + Formatting +1 # After Submitting Should I document that minor behavior change somewhere in GitHub.io? --------- Co-authored-by: Yash Thakur <45539777+ysthakur@users.noreply.github.com>
This commit is contained in:
@ -486,9 +486,10 @@ impl NuCompleter {
|
||||
externals: bool,
|
||||
strip: bool,
|
||||
) -> Vec<SemanticSuggestion> {
|
||||
let config = self.engine_state.get_config();
|
||||
let mut command_completions = CommandCompletion {
|
||||
internals,
|
||||
externals,
|
||||
externals: !internals || (externals && config.completions.external.enable),
|
||||
};
|
||||
let (new_span, prefix) = strip_placeholder_if_any(working_set, &span, strip);
|
||||
let ctx = Context::new(working_set, new_span, prefix, offset);
|
||||
|
Reference in New Issue
Block a user