-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbashrc_remotes
More file actions
55 lines (42 loc) · 1.32 KB
/
bashrc_remotes
File metadata and controls
55 lines (42 loc) · 1.32 KB
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
# .bashrc for remotes
PS1="\[\033[01;38;5;135m\]\W\\$\[\033[0m\] "
export TERM='xterm-256color'
export TERM='linux'
# shell options
shopt -s extglob
EDITOR=vim; export EDITOR
if [[ $- == *i* ]]; then
bind TAB:menu-complete
fi
# display options
export LESS='iMWFRSX'
# ================= Aliases ==========================
# quick dotfile access
alias rr='. ~/.bashrc'
alias re='vim ~/.bashrc'
alias ve='vim ~/.vimrc'
alias grep='grep --color=auto'
alias cp='cp --interactive'
alias mv='mv --interactive'
# directory navigation
alias ls='ls --color=auto'
alias h='pwd; ls --color=always -CFh --time-style=long-iso'
alias hh='h -lAt'
alias hi='h -ad .*'
alias p='pwd'
alias u='pushd . > /dev/null; t ..'
alias uu='u;u'
# directory navigation
alias t='dirNav'
dirNav () { path=${1-.}; cd "$path"; pwd; ls --color=always -CF; }
# code exploration
grep_code_case_insensitive () { grep * -rsnI -ie "$@" --color=always|sed 's/:/ /';}
grep_code_case_sensitive () { grep * -rsnI -e "$@" --color=always|sed 's/:/ /';}
alias g="grep_code_case_insensitive"
alias G="grep_code_case_sensitive"
# Disables ctrl+s break to enable vim shortcut
# Note: this will break sudo behavior! Need to escape: sudo \vim
alias vim="stty stop '' -ixoff; vim"
alias sim="stty stop '' -ixoff; sudo \vim"
# dircolors
LS_COLORS=$LS_COLORS:'di=1;35:' ; export LS_COLORS