-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
61 lines (48 loc) · 1.18 KB
/
.bashrc
File metadata and controls
61 lines (48 loc) · 1.18 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# ~/.bashrc: executed by bash(1) for non-login shells.
# History
export HISTTIMEFORMAT="%h %d %H:%M:%S> "
#export HISTCONTROL=ignoredups
export HISTCONTROL=ignoredups:erasedups:ignorespace
export HISTSIZE=1000000
shopt -s histappend
# '<hostname>:<directory>$ '
export PS1='\h:\w\$ '
# Initial value of file permission bits for newly created files
umask 022
# utf8
export LANG=ru_RU.UTF-8
export LC_ALL=ru_RU.UTF-8
# Colorized ls
if which dircolors >/dev/null; then
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
else
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
fi
# make and ninja aliases with notifications
function notify() {
osascript -e "display notification \"$1\" with title \"Term\" sound name \"Ping\""
}
function notify_after_command() {
$@;
notify "$*";
}
IGNOREEOF=1
alias make='notify_after_command nice -n6 make'
alias ninja='notify_after_command nice -n6 ninja'
alias vim='mvim -v'
# Utils
function range () {
if [ $1 -ge $2 ]; then
return
fi
a=$1
b=$2
while [ $a -le $b ]; do
echo $3$a$4; a=$(($a+1)); done
}
export range