Created
March 31, 2025 22:45
-
-
Save arkady-emelyanov/963d44f837801677eadd16ef79759f4e to your computer and use it in GitHub Desktop.
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
set fish_greeting | |
# psql | |
set -gx PGHOST localhost | |
set -gx PGPORT 5432 | |
set -gx PGUSER user | |
set -gx PGPASSWORD pass | |
set -gx PGDATABASE template1 | |
# defaults | |
set -gx LANGUAGE en_US.UTF-8 | |
set -gx LANG en_US.UTF-8 | |
set -gx LC_MESSAGES en_US.UTF-8 | |
set -gx LC_ALL en_US.UTF-8 | |
set -gx EDITOR nano | |
set -gx HOMEBREW_NO_ENV_HINTS "1" | |
set -gx HOMEBREW_NO_ANALYTICS "1" | |
set -gx BUILDKIT_PROGRESS "plain" | |
set -gx PYENV_VIRTUALENV_DISABLE_PROMPT 1 | |
# brew | |
set -gx GOROOT $HOME/tools/go | |
set -gx PYENV_ROOT $HOME/.pyenv | |
set -gx NODE_ROOT $HOME/node | |
set -gx PATH $NODE_ROOT/bin $PATH | |
set -gx PATH $GOROOT/bin $PATH | |
set -gx PATH $HOMEBREW_HOME/bin $PATH | |
set -gx PATH $PYENV_ROOT/bin $PATH | |
# tools | |
#status --is-interactive; and pyenv init - | source | |
#status --is-interactive; and pyenv virtualenv-init - | source | |
## system | |
set -g fish_user_paths "/usr/local/opt/texinfo/bin" $fish_user_paths | |
set -g fish_user_paths "/usr/local/sbin" $fish_user_paths | |
set fish_color_error ff8a00 | |
# c0 to c4 progress from dark to bright | |
# ce is the error colour | |
set -g c0 (set_color 005284) | |
set -g c1 (set_color 0075cd) | |
set -g c2 (set_color 009eff) | |
set -g c3 (set_color 6dc7ff) | |
set -g c4 (set_color ffffff) | |
set -g ce (set_color $fish_color_error) | |
set fish_git_dirty_color red | |
set fish_git_not_dirty_color white | |
set fish_pyenv_name_color 5fafaf | |
function render_git | |
set -l git_dir (git rev-parse --git-dir 2> /dev/null) | |
if test -n "$git_dir" | |
set -l branch (git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/\1/') | |
set -l git_status (git status -s) | |
if test -n "$git_status" | |
printf ' %s[%s]%s' (set_color $fish_git_dirty_color) $branch (set_color normal) | |
else | |
printf ' %s[%s]%s' (set_color $fish_git_not_dirty_color) $branch (set_color normal) | |
end | |
end | |
end | |
function render_pyenv | |
if test -n "$PYENV_VERSION" | |
printf ' [🐍:%s%s%s]' (set_color $fish_pyenv_name_color) $PYENV_VERSION (set_color normal) | |
end | |
end | |
function render_pwd | |
printf '%s%s%s' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) | |
end | |
function fish_prompt | |
printf '%s%s%s> ' (render_pwd) (render_pyenv) (render_git) | |
end | |
function fish_right_prompt | |
end | |
# | |
alias dps="docker ps --format '{{.ID}}({{.State}}): {{.Names}} ({{.Ports}})'" | |
alias k="/usr/local/bin/kubectl" | |
alias t="/usr/bin/tofu" | |
alias terraform="/usr/bin/tofu" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment