This repository has been archived by the owner on Sep 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bashrc.tmpl
71 lines (51 loc) · 1.65 KB
/
.bashrc.tmpl
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
export TERM=xterm-256color
alias ls='ls --color=auto'
alias ll='ls --color=auto -o -h --si --time-style=long-iso --group-directories-first'
alias g='git'
alias vi='/usr/bin/nvim'
alias open='mimeopen'
export EDITOR=/usr/bin/nvim
export BROWSER=/usr/bin/firefox
export PATH=$HOME/bin:$HOME/go/bin:$PATH:$HOME/dev-tools/bin:$HOME/.cargo/bin
export RIPGREP_CONFIG_PATH=~/.ripgreprc
export GOPATH=$HOME/go
export DOCKERFILES_REPO_PATH=$HOME/workspace/dockerfiles
export DOTNET_ROOT=/opt/dotnet
# If not running interactively, stop here.
[[ $- != *i* ]] && return
source /usr/share/bash-completion/bash_completion
source /usr/share/git/completion/git-prompt.sh
source /usr/share/git/completion/git-completion.bash
source /usr/share/fzf/completion.bash
source /usr/share/fzf/key-bindings.bash
# Add completion to the `g` alias.
__git_complete g __git_main
bind "set menu-complete-display-prefix on"
bind 'set show-all-if-ambiguous on'
bind 'set completion-ignore-case on'
bind 'set colored-stats on'
bind 'set blink-matching-paren on'
bind 'set show-all-if-ambiguous on'
bind 'set enable-bracketed-paste on'
bind 'TAB:menu-complete'
bind '"\e[Z":menu-complete-backward'
# Jump to projects in workspace.
__workspace_jump__() {
cd ~/workspace/$(ls ~/workspace | fzf)
clear
}
bind '"\C-g":"__workspace_jump__\n"'
eval "$(dircolors)"
prompt_jobs() {
[[ $(jobs | wc -l) -gt 0 ]] && echo " "
}
prompt_git() {
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="verbose"
__git_ps1 ' %s'
}
_col="$(tput setab 2)$(tput setaf 0)"
_end="$(tput sgr0)$(tput setaf 2)$(tput sgr0)"
PS1='${_col} \w$(prompt_git) ${_end}$(prompt_jobs)\n$ '
# vim: ft=sh