46 lines
1.0 KiB
Bash
46 lines
1.0 KiB
Bash
# Source global definitions.
|
|
if [ -f /etc/bashrc ]; then
|
|
. /etc/bashrc
|
|
fi
|
|
|
|
# User specific environment.
|
|
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
|
|
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
|
fi
|
|
export PATH
|
|
|
|
# Aliases.
|
|
alias l="ls"
|
|
alias L="ls -A"
|
|
alias t="tree"
|
|
alias T="tree -a"
|
|
fuck() { eval "sudo $(history -p !!)"; }
|
|
alias e=$EDITOR
|
|
alias o="xdg-open"
|
|
|
|
# Git aliases.
|
|
alias gatus="git status"
|
|
alias gadd="git add"
|
|
alias gommit="git commit"
|
|
alias gerge="git merge"
|
|
alias gecko="git checkout"
|
|
alias gush="git push"
|
|
alias gremo="git remote"
|
|
alias granch="git branch"
|
|
alias grm="git rm"
|
|
alias glone="git clone"
|
|
alias glog="git log"
|
|
alias giff="git diff"
|
|
alias gint="git init"
|
|
|
|
# Prompt.
|
|
# [user@host ~/pwd branch]$ commands
|
|
GRAY1="\[\e[0;90;2m\]"
|
|
GRAY2="\[\e[37m\]"
|
|
BLUE="\[\e[0;94;1m\]"
|
|
RED="\[\e[0;91;1m\]"
|
|
BRANCH="\[\e[93;3m\]"
|
|
RESET="\[\e[0m\]"
|
|
PROMPT_COMMAND='PS1_CMD1=$(git branch --show-current 2>/dev/null | sed "/./ s/^/ /")'
|
|
PS1=${GRAY1}'['${BLUE}'\u'${GRAY1}'@'${RED}'\h '${RESET}${GRAY2}'\w'${BRANCH}'${PS1_CMD1}'${GRAY1}']'${RESET}'\$ '
|