-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_bashrc.tmpl
38 lines (31 loc) · 1.15 KB
/
dot_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
# vim: set filetype=bash:
echo "*** sourcing ~/.bashrc ***"
{{template "interactive_shell.tmpl" .}}
export HISTFILESIZE=$HISTSIZE
export PROMPT_COMMAND="history -a" # Update history file after each command.
shopt -s histappend
set -o vi
bind -s 'set completion-ignore-case on' > /dev/null
shopt -s extglob
shopt -s globstar # the ** pattern recursively matches subdirectories and files.
alias h="history -a && history -r && history" # List history from all shell instances.
# set fancy prompt color differently for servers.
# see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
case $(hostname) in
nuc1)
PS1='\[\n\033[1;36m\]\u@\h \[\033[1;33m\w\033[0m\]\n$ '
;;
nuc2)
PS1='\[\n\033[1;31m\]\u@\h \[\033[1;33m\w\033[0m\]\n$ '
;;
*)
PS1='\[\n\033[1;32m\]\u@\h \[\033[1;33m\w\033[0m\]\n$ '
;;
esac
# Set up fzf key bindings and fuzzy completion.
{{/*
NOTE: fzf `--bash`, `--zsh` options to install key bindings and completions are only available in fzf 0.48.0 or later -- https://github.com/junegunn/fzf#using-linux-package-managers).
*/}}
eval "$(fzf --bash)"
# Set up zoxide and alias to cd and cdi.
eval "$(zoxide init --cmd cd bash)"