-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
79 lines (62 loc) · 1.6 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
71
72
73
74
75
76
77
78
#
# ~/.bashrc -- depends on .bash/prompt.sh
#
# If not running interactively, don't do anything
if [ "${-#*i}" == *$-* ]; then
return
fi
source $HOME/.bash/prompt.sh
source $HOME/.bash/git.sh
source $HOME/.bash/sshagent.sh
EDITOR=/usr/bin/vim
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias la='ls -la'
alias sudo='sudo '
### history settings
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
### change directory to last nnn directory
if [ -f /usr/share/nnn/quitcd/quitcd.bash_zsh ]; then
source /usr/share/nnn/quitcd/quitcd.bash_zsh
fi
### debian-like autocomplete
bind 'set show-all-if-ambiguous on'
bind 'set completion-ignore-case on'
bind 'TAB:menu-complete'
if ! shopt -oq posix; then
if [ -f /usr/share/bash_completion/bash_completion ]; then
. /usr/share/bash_completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
### colored prompt
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
color_prompt=yes
else
color_prompt=
fi
if [ "$color_prompt" = yes ]; then
trap 'timer_start' DEBUG
set_prompt
PROMPT_COMMAND=timer_stop
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt
### xterm support
# if bash is launched from xterm set window name
case "$TERM" in
xterm*|rxvt*|st*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac