mirror of https://github.com/vinc/moros.git
Fix shell autocomplete (#591)
This commit is contained in:
parent
84d4d2edf4
commit
6652df77e8
|
@ -63,7 +63,7 @@ fn shell_completer(line: &str) -> Vec<String> {
|
|||
let i = args.len() - 1;
|
||||
|
||||
// Autocomplete command
|
||||
if i == 2 && !args[i].starts_with('/') && !args[i].starts_with('~') {
|
||||
if i == 0 && !args[i].starts_with('/') && !args[i].starts_with('~') {
|
||||
for cmd in autocomplete_commands() {
|
||||
if let Some(entry) = cmd.strip_prefix(&args[i]) {
|
||||
entries.push(entry.into());
|
||||
|
|
Loading…
Reference in New Issue