Last active
June 26, 2025 22:54
-
-
Save jerlendds/3a5f28440f4fe0a0402a9fb34f89bd21 to your computer and use it in GitHub Desktop.
.bashrc
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
| # | |
| # ~/.bashrc | |
| # | |
| # If not running interactively, don't do anything | |
| [[ $- != *i* ]] && return | |
| alias ls='ls --color=auto' | |
| alias grep='grep --color=auto' | |
| alias ..="cd .." | |
| alias ...="cd ../.." | |
| alias ....="cd ../../.." | |
| alias la="ls -la" | |
| __fancy_ps1 () { | |
| local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`' | |
| export PS1="[\e[3;m\e[32m\u@\h \e[38;5;48m\w\e[0m] \e[38;5;111m$__git_branch\e[0m\n$ " | |
| } | |
| __fancy_ps1 | |
| activate () { | |
| if [ -d "./venv/" ]; then | |
| echo "Activating venv (./venv/)" | |
| source "$(pwd)/venv/bin/activate" | |
| else | |
| echo "Activating venv (./.venv)" | |
| source "$(pwd)/.venv/bin/activate" | |
| fi | |
| } | |
| # https://github.com/pyenv/pyenv | |
| eval "$(pyenv init - bash)" | |
| # https://github.com/nvm-sh/nvm | |
| export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
| source <(kubectl completion bash) | |
| # - Radicle (https://radicle.xyz/) | |
| # - Cargo (https://rustup.rs/) | |
| # .local/bin (collection of scripts I made/use) | |
| export PATH="$PATH:/home/$USER/.local/bin/:/home/$USER/.cargo/bin:/home/$USER/.radicle/bin" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PS1 looks like:
