More commands

This commit is contained in:
2021-12-17 20:02:42 +01:00
parent a24692e3ed
commit 9ea06a16fe
6 changed files with 92 additions and 21 deletions

View File

@@ -1,7 +1,5 @@
import { printSyntax, commandList } from "./definitions";
//const commandList = ["about", "navigate", "external", "help", "ed", "nano"];
export function commandCompletion(input: string): string[] {
if (input === "") return [];
const candidates = commandList.filter(cmd => cmd.name.substring(0, input.length) === input).map(cmd => cmd.name);