35 lines
1.2 KiB
Bash
35 lines
1.2 KiB
Bash
function _parse_git_branch() {
|
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
|
}
|
|
|
|
export PS1="\[\e[0;97m\]\[\e[37m\e[1m\]\u\[\e[1;94m\]@\[\e[94m\]\H\[\e[37m\]:\w\[\e[33m\]\[\e[0;33m\]\$(_parse_git_branch) \[\e[37m\]\[\e[0;97m\]$\[\e[0m\] "
|
|
export rc=/home/$USERNAME/.bashrc
|
|
export VIRTUALENV_DIR=/home/$USERNAME/.venvs
|
|
|
|
random() {
|
|
if [[ $# -eq 0 ]]; then
|
|
num=32
|
|
else
|
|
num=$1
|
|
fi
|
|
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $num | head -n 1
|
|
}
|
|
|
|
function up() { cd $(eval printf '../'%.0s {1..$1}); }
|
|
|
|
function pipin() { pip freeze | grep $1; }
|
|
|
|
alias bk='cd -'
|
|
alias fuck='sudo $(history -p \!\!)'
|
|
alias ls='ls -lshF --color --group-directories-first --time-style=long-iso'
|
|
alias version='uname -orp && lsb_release -a | grep Description'
|
|
alias activate='source ./bin/activate'
|
|
alias cls='clear'
|
|
alias ls='/usr/bin/ls -lshF --color --group-directories-first --time-style=long-iso'
|
|
alias gmtime='/usr/bin/date -u --iso-8601=seconds'
|
|
alias date='/usr/bin/date --iso-8601=seconds'
|
|
alias whatismyip='curl https://icanhazip.com/'
|
|
alias uuid="python3 -c 'import uuid; print(uuid.uuid4());'"
|
|
alias epoch="python3 -c 'import time; print(time.time());'"
|
|
alias uptime="command uptime --pretty"
|