fix: check if there is cmd input before attempting to add to history (closes #206)

builtins
TorchedSammy 2022-10-10 18:11:09 -04:00
parent 22f6ea8a3e
commit 7db2a2c826
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 1 additions and 0 deletions

View File

@ -1,5 +1,6 @@
local bait = require 'bait' local bait = require 'bait'
bait.catch('command.exit', function(_, cmd, priv) 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 if not priv and hilbish.opts.history then hilbish.history.add(cmd) end
end) end)