Skip to content

Safe way to print output from callback fn #51

@Gautham

Description

@Gautham

First of all, thanks for this library! This awesome 🥇

This is not strictly a zsh-async qn but it might be helpful to others so asking here: What would be the recommended way to display output from the callback fn?

  1. Using normal echo can result in a messy output since the echo output could mess with the current BUFFER making both the output and the command being typed unreadable.
  2. I use powerlevel10k which has a feature called transient prompt. The tl:dr; is that it triggers a zle reset-prompt as a preexec function which basically clears any printed text from the (now-)previous-line prompt.

Do you have any suggestions on how I can safely show my output given the above two constraints?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions