Files
redux-scraper/.devcontainer/fish-shell-conf-d/prompt.fish
2024-12-18 18:51:07 +00:00

18 lines
665 B
Fish
Executable File

function fish_prompt -d "Write out the prompt"
# This shows up as USER@HOST /home/user/ >, with the directory colored
# $USER and $hostname are set by fish, so you can just use them
# instead of using `whoami` and `hostname`
printf '%s %s%s> ' \
(printf '%s%s%s' (set_color -d grey) $USER (set_color normal)) \
(printf '%s%s%s' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)) \
(fish_git_prompt)
end
function fish_right_prompt -d "Write out the right prompt"
set_color red
if [ $RAILS_ENV = "development" ]
set_color -d green
end
printf '%s%s' (echo $RAILS_ENV) (set_color normal)
end