mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Define keywords (#13213)
# Description Some commands in `nu-cmd-lang` are not classified as keywords even though they should be. # User-Facing Changes In the output of `which`, `scope commands`, and `help commands`, some commands will now have a `type` of `keyword` instead of `built-in`.
This commit is contained in:
@ -934,15 +934,12 @@ pub fn parse_internal_call(
|
||||
let output = signature.get_output_type();
|
||||
|
||||
// storing the var ID for later due to borrowing issues
|
||||
let lib_dirs_var_id = if decl.is_builtin() {
|
||||
match decl.name() {
|
||||
"use" | "overlay use" | "source-env" | "nu-check" => {
|
||||
find_dirs_var(working_set, LIB_DIRS_VAR)
|
||||
}
|
||||
_ => None,
|
||||
let lib_dirs_var_id = match decl.name() {
|
||||
"use" | "overlay use" | "source-env" if decl.is_keyword() => {
|
||||
find_dirs_var(working_set, LIB_DIRS_VAR)
|
||||
}
|
||||
} else {
|
||||
None
|
||||
"nu-check" if decl.is_builtin() => find_dirs_var(working_set, LIB_DIRS_VAR),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
// The index into the positional parameter in the definition
|
||||
|
Reference in New Issue
Block a user