acomagu / fish-async-prompt

Make your prompt asynchronous to improve the reactivity.
MIT License
389 stars 22 forks source link

How to test this? #44

Closed edouard-lopez closed 3 years ago

edouard-lopez commented 3 years ago

How I can create a situation where fish-async-prompt is triggered, so I see the content of my fish_right_prompt_loading_indicator?

I tried something like

  ❯ function fish_right_prompt_loading_indicator
            echo (set_color '#aaa')' … '(set_color normal)
    end
  ❯ sleep 6s

But to no avail. Is there other thing I need to set up?

acomagu commented 3 years ago

@edouard-lopez The loading indicator is shown when the prompt function takes time. So how about inserting sleep command to your fish_right_prompt function, like

function fish_right_prompt
    sleep 6
    ...
end

?