Skip to content

Instantly share code, notes, and snippets.

@jerlendds
Last active June 26, 2025 22:54
Show Gist options
  • Save jerlendds/3a5f28440f4fe0a0402a9fb34f89bd21 to your computer and use it in GitHub Desktop.
Save jerlendds/3a5f28440f4fe0a0402a9fb34f89bd21 to your computer and use it in GitHub Desktop.

Revisions

  1. jerlendds revised this gist Jun 26, 2025. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions .bashrc.sh
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@ 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[38;5;111m$__git_branch\e[0m\n$ "
    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

    @@ -44,4 +44,3 @@ source <(kubectl completion bash)
    export PATH="$PATH:/home/$USER/.local/bin/:/home/$USER/.cargo/bin:/home/$USER/.radicle/bin"



  2. jerlendds renamed this gist Jun 26, 2025. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. jerlendds created this gist Jun 26, 2025.
    47 changes: 47 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    #
    # ~/.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[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"