-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchbash
More file actions
76 lines (62 loc) · 1.86 KB
/
archbash
File metadata and controls
76 lines (62 loc) · 1.86 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
# alias sudo='sudo '
alias pacman='pacman-color'
alias p='pacman'
alias y='yaourt'
export EDITOR="nano"
# To auto complete after man and sudo
complete -cf sudo
complete -cf man
# My alias
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias s='sudo '
alias ss='s -s'
# less
export LESS="-MWi -x4 --shift 5"
export LESSHISTFILE="-" # no less history file
if [ "$UID" != 0 ]; then
# export LESSCHARSET="utf-8"
# if [ -z "$LESSOPEN" ]; then
# if [ "$__distribution" = "Debian" ]; then
# [ -x "`which lesspipe`" ] && eval "$(lesspipe)"
# else
# [ -x "`which lesspipe.sh`" ] && export LESSOPEN="|lesspipe.sh %s"
# fi
# fi
# Yep, 'less' can colorize manpages
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
fi
# Bash History
export HISTSIZE=5000
export HISTFILESIZE=5000
export HISTFILE="$HOME/.bash_history_${HOSTNAME}"
if [ "$UID" != 0 ]; then
export HISTCONTROL="ignoreboth" # ignores duplicate lines next to each other and lines with a leading space
export HISTIGNORE="[bf]g:exit:logout"
fi
# Prompts
#-----------------------------------------------------------------------------
set_prompts() {
# Default
PS1='\[\033[34m\]\u\[\033[00m\]\[\033[01;31m\]@\[\033[00m\]\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;34m\][ \W ] \[\033[00m\]\$ '
export PS1
}
set_prompts
unset -f set_prompts