Last active
October 6, 2023 06:46
-
-
Save bfren/82695380c25bb18a29e2f6669f4dbb88 to your computer and use it in GitHub Desktop.
This file contains 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_right_prompt | |
string match -qi "*.utf-8" -- $LANG $LC_CTYPE $LC_ALL | |
set -l d (set_color brgrey)(date "+%R")(set_color normal) | |
set -l duration "$cmd_duration$CMD_DURATION" | |
if test $duration -gt 100 | |
set duration (math $duration / 1000)s | |
else | |
set duration | |
end | |
set -q VIRTUAL_ENV_DISABLE_PROMPT | |
or set -g VIRTUAL_ENV_DISABLE_PROMPT true | |
set -q VIRTUAL_ENV | |
and set -l venv (string replace -r '.*/' '' -- "$VIRTUAL_ENV") | |
set_color normal | |
string join " " -- $venv $duration $d | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment