snips/root.bashrc

56 lines
967 B
Plaintext
Raw Normal View History

2019-08-17 03:06:22 +00:00
# ~/.bashrc: executed by bash(1) for non-login shells.
# --------------------------------
# Shell RC
# --------------------------------
2024-03-30 21:28:12 +00:00
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;41m\]$(hostname)\[\033[00m\]\[\033[01;34m\] \w\[\033[00m\] \$ '
2019-08-17 03:06:22 +00:00
#
# Variables
#
2024-04-07 20:07:53 +00:00
export EDITOR=n
2019-08-17 03:06:22 +00:00
export PATH=~/bin:$PATH
#
# Aliases
#
alias ls='ls -al --color'
alias q=exit
alias a=clear
alias h=history
alias e=$EDITOR
#
# Functions
#
function myvim () {
2024-04-07 20:07:53 +00:00
gvim $1 >& /dev/null &
disown %1
}
function n () {
/opt/neovim/nvim $* || nvim $*
2019-08-17 03:06:22 +00:00
}
function hgrep () {
2024-04-07 20:07:53 +00:00
history | grep $1
2019-08-17 03:06:22 +00:00
}
function pgrep () {
2024-04-07 20:07:53 +00:00
ps aux | grep $1
2019-08-17 03:06:22 +00:00
}
2020-04-19 20:19:47 +00:00
function u2d () {
2024-04-07 20:07:53 +00:00
~mahesh/git/snips/get_neovim.sh
~mahesh/git/snips/get_wezterm.sh
cd
if [ -e /etc/arch-release ]; then
pacman -Syu
2024-04-07 20:19:33 +00:00
elif [ -e /etc/debian_version ]; then
2024-04-07 20:07:53 +00:00
apt update && apt full-upgrade -y && apt autoremove -y
else
echo "Auto update not supported."
exit 1
fi
2020-04-19 20:19:47 +00:00
}