From 7db2a2c826efdcefc44d0a542c59b4815efbe084 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Mon, 10 Oct 2022 18:11:09 -0400 Subject: [PATCH] fix: check if there is cmd input before attempting to add to history (closes #206) --- nature/opts/history.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/nature/opts/history.lua b/nature/opts/history.lua index f7ab1d7..016b22d 100644 --- a/nature/opts/history.lua +++ b/nature/opts/history.lua @@ -1,5 +1,6 @@ local bait = require 'bait' bait.catch('command.exit', function(_, cmd, priv) + if not cmd then return end if not priv and hilbish.opts.history then hilbish.history.add(cmd) end end)