-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
74 lines (63 loc) · 1.82 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
# Correct cd typos
shopt -s cdspell
# Update windows size on command
shopt -s checkwinsize
# Append History instead of overwriting file
shopt -s histappend
# Bash attempts to save all lines of a multiple-line command in the same history entry
shopt -s cmdhist
# No empty completion
shopt -s extglob
# No empty completion
shopt -s no_empty_cmd_completion
# Increase history size
export HISTSIZE=1000000
export HISTCONTROL='ignoreboth'
export HISTIGNORE='&:ls:[bf]g:exit'
export HISTTIMEFORMAT='%b %d %H:%M:%S: '
# Terminal Colors
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# Prompt
hash "git-radar" 2>/dev/null && {
export PS1="\[\033[1;32m\]→\[\033[0m\] \[\033[1;36m\]\$(basename \"\$(pwd)\")/\[\033[0m\]\$(git-radar --bash --fetch) "
}
# Include local bin
export PATH="/usr/local/bin:$PATH"
export PATH="/usr/local/sbin:$PATH"
# Completion
source $HOME/.bash_completion
# dotfiles
function dotfiles {
if [[ $@ == "install" ]]; then
command bash "$HOME/.install/install.bash"
else
command git --git-dir="$HOME/.dotfiles" --work-tree="$HOME" "$@"
fi
}
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main dotfiles
dotfiles config status.showUntrackedFiles no
# thefuck
hash "thefuck" 2>/dev/null && {
eval "$(thefuck --alias)"
}
# asdf
export ASDF_DATA_DIR="$HOME/.asdf"
hash "asdf" 2>/dev/null && {
source "$(brew --prefix asdf)/libexec/asdf.sh"
test -s "$ASDF_DATA_DIR/plugins/dotnet/set-dotnet-home.sh" && {
source "$ASDF_DATA_DIR/plugins/dotnet/set-dotnet-home.sh"
}
test -s "$ASDF_DATA_DIR/plugins/java/set-java-home.sh" && {
source "$ASDF_DATA_DIR/plugins/java/set-java-home.sh"
}
}
# direnv
hash "direnv" 2>/dev/null && {
eval "$(direnv hook bash)"
}
# podman
alias docker=podman
alias docker-compose=podman-compose
# Visual Studio Code
alias code="open -b com.microsoft.VSCode"