Created
February 28, 2025 22:00
-
-
Save bodadotsh/619eba6465707a618d34afdaf31534af to your computer and use it in GitHub Desktop.
fish_prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt | |
# TODO: set username here! | |
set -l current_path (pwd | string replace -r '^(/home/<your_username>)?/?' '~/' ) | |
set -l git_branch (git branch --show-current 2>/dev/null) | |
set -l virtualenv (if set -q VIRTUAL_ENV; echo "($VIRTUAL_ENV)"; end) | |
set_color -o yellow | |
echo -n "$current_path" | |
if test -n "$git_branch" | |
set_color -o magenta | |
echo -n " ($git_branch)" | |
end | |
set_color -o cyan | |
echo -n " $virtualenv" | |
# newline here - after all prompt elements | |
echo "" | |
set_color normal | |
echo -n "> " | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment