59 lines
1.2 KiB
Plaintext
59 lines
1.2 KiB
Plaintext
# --------------------------------
|
|
# 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 EDITOR=vim
|
|
export EDITOR=nvim
|
|
export PATH=~/bin:~/.local/bin:$PATH
|
|
|
|
#
|
|
# Aliases
|
|
#
|
|
alias ls='ls -altrh --color'
|
|
alias q=exit
|
|
alias a=clear
|
|
alias h=history
|
|
alias e=$EDITOR
|
|
alias n=$EDITOR
|
|
alias gn='neovide --fork'
|
|
|
|
#
|
|
# Functions
|
|
#
|
|
function myvim () {
|
|
gvim $1 >& /dev/null &
|
|
disown %1
|
|
}
|
|
|
|
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 new -A -s DevEnv
|
|
}
|