forked from Mirror/pmbootstrap
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:
parent
81fff2c6d6
commit
fc3d8b06b3
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue