mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Only allow unaliasing in current scope, add tests (#3936)
* unalias only removes aliases in the current scope * Add a test and fix previous ones which did not function as expected
This commit is contained in:
@ -408,7 +408,7 @@ impl ParserScope for Scope {
|
||||
}
|
||||
|
||||
fn remove_alias(&self, name: &str) {
|
||||
for frame in self.frames.lock().iter_mut().rev() {
|
||||
if let Some(frame) = self.frames.lock().last_mut() {
|
||||
frame.aliases.remove(name);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user