Skip to content

Commit 3db9dcb

Browse files
committed
Fix
1 parent 29704be commit 3db9dcb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/core/builtins/complete.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,10 @@ fn complete_large_w(core: &mut ShellCore, args: &[String]) -> i32 {
163163

164164
fn complete_r(core: &mut ShellCore, args: &[String]) -> i32 {
165165
for command in &args[1..] {
166-
core.completion.entries.remove(command);
166+
if core.completion.entries.remove(command).is_none() {
167+
let err_str = format!("{}: no completion specification", &command);
168+
return builtins::error_(1, "complete", &err_str, core);
169+
}
167170
}
168171

169172
0

0 commit comments

Comments
 (0)