A simple and clean prompt for the fish shell

Published on 2023-09-06 • Modified on 2023-09-06

This snippet shows an example of a simple and clean prompt for the fish shell. I first saw this snippet on the blog of Gerald Kaszuba, but it is not available anymore. You can install Tide (link below) for a full-featured prompt. I have used it for several weeks, and it is nice to use and easy to customize.


# Prompt #####################################################################

function fish_prompt -d "Write out the prompt"
    printf "\033[K"
    printf '[%s] %s@%s:%s%s%s$ ' (date "+%H:%M:%S") (whoami) (hostname) (set_color $fish_color_cwd) (pwd) (set_color normal)
end

 More on Stackoverflow   Read the doc  More on the web  Random snippet

  Work with me!


Call to action

Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )

Thank you for reading! And see you soon on Strangebuzz! 😉

COil