Closed AlphaTechnolog closed 2 years ago
ok i fixed it using bait
to catch the event command.exit
and then update the prompt, so you can do something like this:
local hilbish = require "hilbish"
local bait = require "bait"
local function update_prompt ()
hilbish.prompt("%d$ ")
end
update_prompt()
bait.catch("command.exit", function ()
update_prompt()
end)
idk if this is the best way to do that, but that works lol
this would just be a matter of hilbish always setting the prompt with the line reader, and i think it makes sense
this would just be a matter of hilbish always setting the prompt with the line reader, and i think it makes sense
yep, but this is the right way to do this? or exists another better way? or i'm doing something wrong?
yep, but this is the right way to do this?
yes
oh ok
so, why is this opened? i solved this problem catching that event
hilbish itself should auto refresh prompt to not need the hook for basic prompts like that (i mentioned that in my opening comment)
oh ok, cool
actually i'll keep it to how it currently is
so if i use the next config:
it works, and it shows me the prompt correctly:
~
but if i go to
~/.config
usingcd
, it don't autorefresh: