-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
65 lines (53 loc) · 1.74 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
#
# ~/.bashrc
#
# Copied from Nix-generated /etc/bashrc
# Needs to happen *before* the interactivity check
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Source the profile if it wasn't already
[[ ! $PROFILE_SOURCED ]] && source ~/.profile
#load aliases from alias file:
[[ -f ~/.bash_aliases ]] && . ~/.bash_aliases
PS1='[\u@\h \W]\$ '
# 8601 with a TAB at the end
HISTTIMEFORMAT='%Y-%m-%dT%H:%M:%S'$'\t'
# Unlimited history size
HISTFILESIZE=-1
HISTSIZE=-1
# "If the list of values includes ignorespace, lines which begin with a space
# character are not saved in the history list. A value of ignoredups causes lines
# matching the previous history entry to not be saved."
HISTCONTROL=ignorespace,ignoredups
# append to history, don't overwrite it
shopt -s histappend
# attempt to save all lines of a multiple-line command in the same history entry
shopt -s cmdhist
# save multi-line commands to the history with embedded newlines
shopt -s lithist
# enable bash completion in interactive shells
if ! shopt -oq posix; then
PROFILE_BASH_COMPLETIONS=$(for profile in $NIX_PROFILES ; do echo "$profile"/share/bash-completion/bash_completion ; done)
for i in /usr/share/bash-completion/bash_completion /etc/bash_completion $PROFILE_BASH_COMPLETIONS ; do
if [ -e "$i" ] ; then
. "$i"
fi
done
fi
#enable vi mode
set -o vi
if type -p complete_alias > /dev/null; then
source $(type -p complete_alias)
aliases=(
sc
ssc
scu
dfh
)
for c in "${aliases[@]}" ; do
complete -F _complete_alias $c
done
fi