-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bashrc.tmpl
More file actions
43 lines (36 loc) · 1.16 KB
/
dot_bashrc.tmpl
File metadata and controls
43 lines (36 loc) · 1.16 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
# vim: set filetype=bash:
# shellcheck disable=all
{{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.
if command -v fzf &>/dev/null; then
eval "$(fzf --bash)"
fi
# Set up zoxide and alias to cd and cdi.
if command -v zoxide &>/dev/null; then
eval "$(zoxide init bash)"
fi
# Jujutsu command-line completions
if command -v jj &>/dev/null; then
source <(jj util completion bash)
fi