2019-08-17 03:06:22 +00:00
|
|
|
# --------------------------------
|
|
|
|
# Shell RC
|
|
|
|
# --------------------------------
|
2021-04-11 03:07:26 +00:00
|
|
|
# If git-prompt does not exist, get it with following command:
|
|
|
|
#
|
2022-02-05 22:16:45 +00:00
|
|
|
# $ 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
|
2021-05-16 18:31:19 +00:00
|
|
|
|
2019-08-23 05:37:36 +00:00
|
|
|
if [ -f /etc/bash_completion.d/git-prompt ]; then
|
|
|
|
source /etc/bash_completion.d/git-prompt
|
|
|
|
fi
|
2021-04-11 03:07:26 +00:00
|
|
|
if [ -f ~/bin/git-prompt.sh ]; then
|
|
|
|
source ~/bin/git-prompt.sh
|
2019-11-18 15:31:43 +00:00
|
|
|
fi
|
2019-08-17 03:06:22 +00:00
|
|
|
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
|
|
|
|
#
|
2022-02-05 22:16:45 +00:00
|
|
|
#export EDITOR=vim
|
|
|
|
export EDITOR=nvim
|
2021-03-09 03:19:16 +00:00
|
|
|
export PATH=~/bin:$PATH
|
2019-08-17 03:06:22 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Aliases
|
|
|
|
#
|
|
|
|
alias ls='ls -altrh --color'
|
|
|
|
alias q=exit
|
|
|
|
alias a=clear
|
|
|
|
alias h=history
|
|
|
|
alias e=$EDITOR
|
2024-04-07 20:07:53 +00:00
|
|
|
alias n=$EDITOR
|
|
|
|
alias gn=neovide
|
2019-08-17 03:06:22 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Functions
|
|
|
|
#
|
|
|
|
function myvim () {
|
|
|
|
gvim $1 >& /dev/null &
|
|
|
|
disown %1
|
|
|
|
}
|
2024-04-07 20:07:53 +00:00
|
|
|
|
2019-08-17 03:06:22 +00:00
|
|
|
function pyedit () {
|
|
|
|
gedit $1 >& /dev/null &
|
|
|
|
disown %1
|
|
|
|
}
|
|
|
|
|
|
|
|
function hgrep () {
|
|
|
|
history | grep $1
|
|
|
|
}
|
|
|
|
|
|
|
|
function pgrep () {
|
|
|
|
ps aux | grep $1
|
|
|
|
}
|
2023-08-27 03:43:35 +00:00
|
|
|
|
|
|
|
function start_tmux () {
|
2024-03-24 19:37:05 +00:00
|
|
|
TERM=screen-256color tmux new -A -s DevEnv
|
2023-08-27 03:43:35 +00:00
|
|
|
}
|