dotfiles/bashrc

46 lines
1.1 KiB
Bash
Raw Normal View History

2022-12-14 20:25:27 +05:00
PATH=$HOME/.scripts:/opt:$PATH
2022-11-19 01:23:53 +05:00
HISTSIZE=999999
HISTFILESIZE=999999
2023-01-09 13:42:55 +05:00
2023-01-09 13:27:29 +05:00
export GPG_TTY=$(tty) #Set GPG_TTY veriable, needed for signing git commits other gpg stuff
2022-11-19 01:23:53 +05:00
2023-01-09 13:27:29 +05:00
export SSH_CA_FILES=/home/shihaam/git/alliedmaldives/ops/ssh-ca
2022-11-19 01:23:53 +05:00
#load ble.sh
source ~/.local/share/blesh/ble.sh
#load seafly prompt
source ~/.bash-seafly-prompt/command_prompt.bash
#always open last dir
cd(){ builtin cd "$@" && pwd > ~/.cache/whereami;}
cdl(){ cd $(cat ~/.cache/whereami);};cdl
2022-12-14 20:38:29 +05:00
2023-01-09 13:27:29 +05:00
####### ALIASES ##########
2022-11-19 01:23:53 +05:00
alias nano='nano -i'
2022-11-19 01:25:36 +05:00
alias hdd='cd /mnt/hdd'
2023-01-09 13:27:29 +05:00
#########################
2022-11-19 01:23:53 +05:00
2022-12-14 20:38:29 +05:00
#Adding output colors
alias ls='ls --color=always'
2023-01-09 13:27:29 +05:00
alias grep='grep --color=auto'
2022-12-14 20:38:29 +05:00
alias less='less -R'
2022-11-19 01:23:53 +05:00
2023-01-09 13:27:29 +05:00
##################### Some cool funcations hehe ###############################
# do math in shell
2022-11-19 01:23:53 +05:00
math(){ echo $1 | bc;}
2023-01-09 13:27:29 +05:00
# Simpleway to see IP resolved to DNS record
checkip(){ dig $1 +short;}
# search for term and edit first file with that specific text
edit(){ nano $(grep $1 * -R | awk '{print $1}'|cut -f1 -d ':' | head -n1);}
2023-01-17 15:30:34 +05:00
root(){ su -c "$@";}
2023-01-09 13:27:29 +05:00
###############################################################################
2022-11-19 01:23:53 +05:00
#load neofetch
neofetch