-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.bashrc
51 lines (35 loc) · 1.41 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
# Check for an interactive session
[ "$-" != "${-%i*}" ] || return
file="$HOME/.shellrc"; [ -f "$file" ] && source "$file"
# shell opts: see bash(1)
shopt -s autocd checkwinsize cdspell cmdhist cdable_vars checkjobs dirspell dotglob extglob \
histappend histverify nocaseglob no_empty_cmd_completion
# notify of completed background jobs immediately
set -o notify
# disable core dumps
ulimit -S -c 0
# bash-completion
bind 'set completion-ignore-case On'
bind 'TAB:menu-complete'
bind 'set mark-symlinked-directories on'
try_source "$HOME/.bash_prompt"
# from https://github.com/mrzool/bash-sensible/blob/master/sensible.bash
# Prevent file overwrite on stdout redirection
# Use `>|` to force redirection to an existing file
set -o noclobber
# Automatically trim long paths in the prompt (requires Bash 4.x)
PROMPT_DIRTRIM=2
# Enable history expansion with space
# E.g. typing !!<space> will replace the !! with your last command
bind Space:magic-space
# Perform file completion in a case insensitive fashion
bind "set completion-ignore-case on"
# Treat hyphens and underscores as equivalent
bind "set completion-map-case on"
# Display matches for ambiguous patterns at first tab press
bind "set show-all-if-ambiguous on"
# Record each line as it gets issued
PROMPT_COMMAND='history -a'
[ "$UID" = "0" ] \
&& export PS1="\[${BOLD}${BLUE}\]\H\[$WHITE\]:\[$YELLOW\] \w \[$WHITE\]\[$RED\]ϟ \[$WHITE\]\[$RESET\]"
moo