57 lines
1.1 KiB
Plaintext
57 lines
1.1 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 ~/bin/git-prompt.sh ]; then
|
|
source ~/bin/git-prompt.sh
|
|
fi
|
|
export GIT_PS1_SHOWDIRTYSTATE=1
|
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;92m\]$(hostname)\[\033[01;34m\] \w\[\033[01;35m\]$(__git_ps1 " %s") \[\033[0m\]$ '
|
|
|
|
#
|
|
# Variables
|
|
#
|
|
#export EDITOR=vim
|
|
export EDITOR=nvim
|
|
export PATH=~/bin:$PATH
|
|
|
|
#
|
|
# Aliases
|
|
#
|
|
alias ls='ls -altrh --color'
|
|
alias q=exit
|
|
alias a=clear
|
|
alias h=history
|
|
alias e=$EDITOR
|
|
alias n=nvim
|
|
|
|
#
|
|
# 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 () {
|
|
tmux new -A -s Tenor
|
|
}
|