From 70c7e5ab616db7313655a19ced513703b809add5 Mon Sep 17 00:00:00 2001 From: 0x0kkr Date: Wed, 6 Nov 2024 22:52:19 +0800 Subject: [PATCH] fix: ensure `lastRunCommand` works correctly --- src/commands/nr.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commands/nr.ts b/src/commands/nr.ts index da0fc8a..f5d955f 100644 --- a/src/commands/nr.ts +++ b/src/commands/nr.ts @@ -69,6 +69,8 @@ runCli(async (agent, args, ctx) => { type: 'autocomplete', choices, async suggest(input: string, choices: Choice[]) { + if (!input) + return choices const results = fzf.find(input) return results.map(r => choices.find(c => c.value === r.item.key)) },