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
This commit is contained in:
xtex 2024-01-13 20:33:57 +08:00 committed by Oliver Smith
parent 81fff2c6d6
commit fc3d8b06b3
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -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