fish-fm: add extra prompt

This commit is contained in:
dogeystamp 2023-06-24 12:11:48 -04:00
parent 8e4a4961cc
commit cc4d8e92bc
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -11,6 +11,23 @@
# sel file1 file2 file3
#
# Save the current fish_prompt function as the function _old_fish_prompt.
functions -c fish_prompt _old_fish_prompt
# stolen prompt code from python venv
function fish_prompt
# Save the return status of the last command.
set -l old_status $status
# Output the venv prompt; color taken from the blue of the Python logo.
printf "%s%s%s" (set_color 4B8BBE) "(fishfm) " (set_color normal)
# Restore the return status of the previous command.
echo "exit $old_status" | .
# Output the original/"old" prompt.
_old_fish_prompt
end
if test -z "$OUTPUT"
set OUTPUT /dev/stdout
end