-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
81 lines (71 loc) · 2.49 KB
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# .bashrc
# Source global definitions
if [ -f /home/akhil/dotfiles/.bashrc.prompt ]; then
. //home/akhil/dotfiles/.bashrc.prompt
fi
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [ -f /home/akhil/dotfiles/.bashrc.arista ]; then
. /home/akhil/dotfiles/.bashrc.arista
fi
# User specific aliases and functions # Akhil
# alias vi="VIMRUNTIME=~/mlocal/share/vim/vim81 ~/mlocal/bin/vim"
#if [[ -n "${WP}" ]]; then
# alias vi="VIMRUNTIME=~/mlocal/share/vim/vim81 ~/mlocal/bin/vim"
#fi
alias v="VIMRUNTIME=~/mlocal/share/vim/vim81 ~/mlocal/bin/vim"
alias l='ls -F'
alias ll='ls -ltrF'
alias la='ls -altrF'
alias ppid='ps -o ppid= -p'
alias vic='vim /tmp/temp.c'
alias vipy='vim /tmp/temp.py'
alias pt='pt --ignore tags '
alias f='find . -iname '
alias gitb='git branch'
#alias tmux="TERM=screen-256color tmux"
alias gr="rg"
alias gl='git log'
alias dag="git log --color --graph --decorate --pretty=oneline --abbrev-commit"
alias gis='git status'
export TERM=xterm-256color # screen-256color
# https://unix.stackexchange.com/questions/4859/
export VISUAL=vi
export EDITOR="$VISUAL"
#
export VIM="/usr/share/vim/"
export PATH="/home/akhil/bin/:$PATH"
export PYTHONPATH=$PYTHONPATH:/home/akhil/bin/
#!! https://stackoverflow.com/questions/19454837
unset HISTFILESIZE # unlimited history
HISTSIZE=100000
#
#!! https://unix.stackexchange.com/questions/18212
HISTCONTROL=ignoredups:erasedups
shopt -s histappend
# PROMPT_COMMAND="history -n; history -w; history -c; history -r; $PROMPT_COMMAND"
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
#
# Set vi binding
set -o vi
# https://medium.com/@crashybang/supercharge-vim-with-fzf-and-ripgrep-d4661fc853d2
# --files: List files that would be searched but do not search
# --no-ignore: Do not respect .gitignore, etc...
# --hidden: Search hidden files and folders
# --follow: Follow symlinks
# --glob: Additional conditions for search (in this case ignore everything in the .git/ folder)
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
#stty -ixon
# export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
# export CLICOLOR=1
# Next line added by a4c-tmux window renaming system, delete to uninstall
#export PATH="/home/akhil/projects/a4c-tmux-window-naming:$PATH"
# Next line added by a4c-tmux window renaming system, delete to uninstall
#export TMUX_TMPDIR="$HOME/tmp"
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
dutvim() {
a dt scp /usr/lib/libgpm* dut:/usr/lib/
a dt scp /usr/lib/perl5/CORE/libperl* dut:/usr/lib/
a dt scp /usr/bin/vim dut:/usr/bin/
}