-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc
58 lines (48 loc) · 1.53 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
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[ "$TERM_PROGRAM" != "vscode" ] && [ -z "$TMUX" ] && { tmux attach || exec tmux new-session && exit; }
set -o vi
set -o ignoreeof
shopt -s histappend
npm_config_prefix="$HOME/.local"
alias ls='ls -lh --group-directories-first --color=auto'
alias ya=yarn
alias pn=pnpm
alias vim="nvim --listen /tmp/nvimsocket"
alias b2="backblaze-b2"
BLUE='\[\033[0;94m\]'
YELLOW='\[\033[0;33m\]'
NO_COLOR='\[\033[0;39m\]'
PS1="${YELLOW}\w${BLUE}\$(__git_ps1) ${YELLOW}#${NO_COLOR} "
PATH="$HOME/scripts:$HOME/.local/bin:$PATH:$GEM_HOME/bin"
HISTCONTROL=ignoreboth:erasedups
EDITOR=vim
. "$HOME/.cargo/env"
. /usr/share/bash-completion/bash_completion
. /usr/share/git/completion/git-completion.bash
. /usr/share/git/completion/git-prompt.sh
. /usr/share/fzf/key-bindings.bash
. /usr/share/fzf/completion.bash
# Git bindings
__git_alias() {
alias $2="$1"
[[ $3 ]] && __git_complete $2 $3
}
__git_alias "git status" gs
__git_alias "git branch" gb _git_branch
__git_alias "git diff" gd _git_diff
__git_alias "git commit" gc _git_commit
__git_alias "git pull" gpl _git_pull
__git_alias "git push" gp _git_push
__git_alias "git add" ga _git_add
__git_alias "git log" gl _git_log
__git_alias "git checkout" gco _git_checkout
man() {
LESS_TERMCAP_md=$'\e[01;31m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;44;33m' \
LESS_TERMCAP_ue=$'\e[0m' \
LESS_TERMCAP_us=$'\e[01;32m' \
command man "$@"
}