Description
@jorgebucaran - Are you open to a PR that would introduce two new variables into the prompt: a pre-prompt and a post-prompt like so...
set --query hydro_pre_prompt || set --global hydro_pre_prompt ""
set --query hydro_post_prompt || set --global hydro_post_prompt " "
The intent of the hydro_pre/post_prompt
variables would be to allow users some to way to customize their prompt without having Hydro have to directly support all the customizations a user might dream up. For example, I like a more spacious prompt similar to Zsh's Pure, so I could get that by setting the pre-prompt variable to a new line in my config like so: set --global hydro_pre_prompt "\n"
.
Theoretically, with these variables a user could do whatever they wanted like adding a low battery indicator 🔋, or a python symbol 🐍 when they're in a python venv, or whatever - all without having to modify hydro itself. I'm open to other ideas on an implementation - just thought this would be a real simple change that would give the user more power in customizing their Hydro prompt.
The only change to Hydro in the PR to implement this would be adding those variables and then changing the fish_prompt
function:
function fish_prompt
echo -e "$hydro_pre_prompt...all-the-other-vars...$hydro_post_prompt"
end
Activity