~postmarketos/pmbootstrap

fc3d8b06b338a41605ab6e340e923158f5d2e9d2 — xtex 8 months ago 81fff2c
helpers/envkernel.fish: set prompt prefix in fish-shell

Signed-off-by: xtex <xtexchooser@duck.com>
Reviewed-by: Oliver Smith <ollieparanoid@postmarketos.org>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20240113123358.6142-2-xtex@envs.net%3E
1 files changed, 12 insertions(+), 0 deletions(-)

M helpers/envkernel.fish
M helpers/envkernel.fish => helpers/envkernel.fish +12 -0
@@ 28,3 28,15 @@ end

# Execute generated code
echo -e "$fishcode" | source -

# Set prompt
if test -z "$ENVKERNEL_DISABLE_PROMPT"
    functions -c fish_prompt _old_fish_prompt

    function fish_prompt
        set -l old_status $status
        printf "[envkernel] "
        echo "exit $old_status" | .
        _old_fish_prompt
    end
end