# -------------------------------- # Shell RC # -------------------------------- # If git-prompt does not exist, get it with following command: # # $ wget https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh [ -r /usr/share/bash-completion/completions/git ] && . /usr/share/bash-completion/completions/git if [ -f /etc/bash_completion.d/git-prompt ]; then source /etc/bash_completion.d/git-prompt fi if [ -f /usr/share/git/git-prompt.sh ]; then source /usr/share/git/git-prompt.sh fi export GIT_PS1_SHOWDIRTYSTATE=1 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostnamectl hostname)\[\033[01;34m\] \w\[\033[01;35m\]$(__git_ps1 "  %s") \[\033[0m\]$ ' # # Variables # export PATH=~/bin:~/.local/bin:$PATH export IGNOREEOF=50 # Ignore first 50 Ctrl-D on shell export GPG_TTY=$(tty) # # Editor setup # export PATH=/opt/neovim:$PATH export EDITOR=nvim function n () { /opt/neovim/nvim $* || nvim $* } # # Aliases # alias ls='ls -altrh --color' alias q=exit alias a=clear alias h=history alias gn='neovide --fork' # # Functions # function pyedit () { gedit $1 >& /dev/null & disown %1 } function hgrep () { history | grep $1 } function pgrep () { ps aux | grep $1 } function start_tmux () { TERM=screen-256color tmux -u new -A -s DevEnv } function start_gitui() { GPG_TTY=$(tty) gitui }