Skip to content

Instantly share code, notes, and snippets.

@bfren
Last active October 6, 2023 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bfren/82695380c25bb18a29e2f6669f4dbb88 to your computer and use it in GitHub Desktop.
Save bfren/82695380c25bb18a29e2f6669f4dbb88 to your computer and use it in GitHub Desktop.
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