mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 07:30:13 +01:00
remove dupes in get_commands/get_command_names (#3308)
This commit is contained in:
parent
e09e3b01d6
commit
005649b6fc
@ -51,7 +51,9 @@ impl Scope {
|
||||
|
||||
for frame in self.frames.lock().iter().rev() {
|
||||
for (name, command) in frame.commands.iter() {
|
||||
output.insert(name.clone(), command.signature());
|
||||
if !output.contains_key(name) {
|
||||
output.insert(name.clone(), command.signature());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,8 +122,8 @@ impl Scope {
|
||||
names.append(&mut frame_command_names);
|
||||
}
|
||||
|
||||
names.dedup();
|
||||
names.sort();
|
||||
names.dedup();
|
||||
|
||||
names
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user