forked from pinktrink/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
70 lines (50 loc) · 1.48 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
#!/usr/bin/env bash
source $HOME/.dotfiles/all.sh/rc
for inc in $HOME/.dotfiles/bash/funcs/*; do
if [[ -f $inc ]]; then
source $inc
fi
done
# Attempt to correct mistyped dirs
shopt -s cdspell
# Do not attempt to show possibilities for empty lines
shopt -s no_empty_cmd_completion
# Ignore case in globs
shopt -s nocaseglob
# Multi-line commands become single lines
shopt -s cmdhist
# Fancier globbing support
shopt -s extglob
# Append history rather than overwriting it
shopt -s histappend
# Erase previous duplicates in the history
export HISTCONTROL=erasedups
# Press ctrl+d twice instead of once to exit the shell
export IGNOREEOF=2
# Allow entering the job name to resume a stopped job
export auto_resume=1
# Set the history size to 10000
export HISTFILESIZE=10000
# Add a timestamp to the history
export HISTTIMEFORMAT='%D %r :: '
# Macros
# ctrl+g to run git status
bind -x '"\C-g":"git status"' 2> /dev/null
# ctrl+o to reload .bashrc
bind -x '"\e\C-r":"bash ~/.bashrc"' 2> /dev/null
if [[ $BASH_VERSION = 4* ]]; then
source $HOME/.dotfiles/bash/bash4rc
fi
use colors
PROMPT_USER_NORMAL="$pink"
PROMPT_DIR_INHOME="$bold $pink"
PROMPT_PROMPT_NORMAL="$bold $pink"
PROMPT_EXIT_ZERO="$pink"
PROMPT_REPO_FILECHANGE_GOOD="$bold $pink"
PROMPT_REPO_INSERTION="$pink"
PROMPT_REPO_NO_CHANGE="$dim $pink"
PROMPT_BATTERY_GOOD="$bold $pink"
PROMPT_BATTERY_CHARGED="$bold $pink"
source $HOME/.dotfiles/bash/alias
source $HOME/.dotfiles/bash/prompt
source $HOME/.dotfiles/bash/afterrc