-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc.m4
70 lines (52 loc) · 1.46 KB
/
.bashrc.m4
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
m4_dnl Changing quoting/escaping characters to something that won't be used!
m4_changequote(`<<<@@||',`||@@>>>')
# This .bashrc is sourced only on interactive sessions.
# This script sets up interactive utilities.
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
# Global options
# huponexit - makes sure child processes are sent SIGHUP when login interactive bash exits
# xpg_echo - align with ZSH behaviour
# lastpipe - align with ZSH behaviour
# no_empty_cmd_completion - align with ZSH behaviour
shopt -s autocd \
cdspell \
checkhash \
checkjobs \
checkwinsize \
cmdhist \
extglob \
globstar \
histappend \
huponexit \
interactive_comments \
lastpipe \
lithist \
no_empty_cmd_completion \
shift_verbose \
xpg_echo
HISTFILE="${HOME}/.bash_history"
HISTSIZE=10000
HISTFILESIZE=10000
HISTCONTROL='ignoreboth'
HISTTIMEFORMAT='%F %T '
# Bash Environment Variables
source "${HOME}/.bash_env"
export TTY="$(tty)"
# Bash Functions
m4_include(shell_functions.conf.m4)
: '
repeat - Repeatedly run a command. Basically the same as ZSH `repeat`.
Usage: repeat <times> <command>
'
repeat () {
times="$1"
shift
seq "$times" | xargs -I -- $*
}
# Bash Aliases
m4_include(shell_aliases.conf.m4)
# Bash Prompt
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u ➜ \h ➜ \[\e[33m\]\w\[\e[0m\]\n \$ '
PS2='$> ';
PS4='$0 - $LINENO $+ '