meaningful-ooo / sponge

🧽 Clean fish history from typos automatically
MIT License
270 stars 2 forks source link

Fix issues with starting sponge #5

Open halostatue opened 7 months ago

halostatue commented 7 months ago

I got the following error block after installing 1.1.0 on every new tab.

contains: Key not specified
test: Unexpected argument type at index 1
= true -a true = true
 ^
~/.config/fish/functions/sponge_filter_failed.fish (line 4):
  if test $previously_in_history = true -a $sponge_allow_previously_successful = true
     ^
in function 'sponge_filter_failed' with arguments '0 ""'
    called on line 14 of file ~/.config/fish/functions/_sponge_on_postexec.fish
in function '_sponge_on_postexec'
    called on line 1 of file ~/.config/fish/config.fish
in event handler: handler for generic event “fish_postexec”
    called on line 378 of file ~/.config/fish/config.fish

This fixes both issues. Everything else appears to work. This may address #4.

halostatue commented 7 months ago

I'm not convinced that this is related to #4 anymore, but I have emit fish_postexec at the end of my config.fish so that direnv hooks are called on shell start. These changes are required in this case.