Fix shell autocomplete (#591)

This commit is contained in:
Vincent Ollivier 2024-03-09 13:24:06 +01:00 committed by GitHub
parent 84d4d2edf4
commit 6652df77e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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());