-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbashrc.common
109 lines (84 loc) · 2.63 KB
/
bashrc.common
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
unset PREFIX_LIST # someone seems to reset $PATH while leaving PREFIX_LIST
source ~/scripts/bashrc_add_prefix
#add_prefix ~/apps # crashes gnome3 session, even if ~/apps does not exist
export PATH=~/.local/bin:$PATH
export LIBRARY_PATH=~/.local/lib
export LD_LIBRARY_PATH=~/.local/lib
export PKG_CONFIG_PATH=~/.local/lib/pkgconfig
export PATH=~/bin:~/scripts:$PATH
# If running interactively, then:
if [ "$PS1" ]; then
# enable color support of ls and also add handy aliases
#eval `dircolors`
#unalias ls
alias ls='ls -r -t --color=auto '
alias l=ls
alias s=ls
alias pstree='pstree -G'
alias qmv="qmv -e emacs --format=do"
alias łess='less'
#alias ll='ls -l'
#alias la='ls -A'
#alias l='ls -CF'
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias c=cd
# set a fancy prompt
PS1='\u@\h:\w\$ '
# . /etc/bash_completion
# resize correctly, please
#export PROMPT_COMMAND='kill -WINCH $$'
shopt -s checkwinsize
alias en="export LC_MESSAGES=C"
# bash/readline configuration (inputrc)
bind 'set completion-ignore-case on'
bind 'set show-all-if-ambiguous on'
bind 'set mark-symlinked-directories on'
# suspend terminal (Ctrl-s) is an anti-feature
stty -ixon
fi
export HISTIGNORE='*#[Rr][Mm]:?:halt:poweroff'
export HISTCONTROL="ignoredups"
export HISTFILESIZE=160000
export HISTSIZE=160000
shopt -s histreedit
shopt -s histappend
if type nvim > /dev/null; then
export EDITOR=nvim
export VISUAL=nvim
else
export EDITOR=vim
export VISUAL=vim
fi
export RSYNC_RSH=ssh
# export SHELL=bash
export SHELL=/bin/bash
export SCONSFLAGS="-Q -u"
#export LESS='-R --chop-long-lines'
export LESS='-R'
# Use bash-completion, if available
# Too slow!
#if [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
#fi
if [ -e /etc/bash_completion.d/git-prompt ]; then
. /etc/bash_completion.d/git-prompt
fi
if [ -e /usr/share/bash-completion/completions/git ]; then
. /usr/share/bash-completion/completions/git
fi
complete -o bashdefault -o default -o nospace -F _git i
if [ -d ~/.caldav-remind ]; then
~/scripts/calshow-rust/target/release/calshow
fi
# messy chdir history
mkdir -p $HOME/.chdir
export PROMPT_COMMAND='(( echo -n "$SECONDS " ; pwd ) >> $HOME/.chdir/bash_$$.cwd ) 2>/dev/null'
# from http://stackoverflow.com/questions/5138110/emacs-create-new-file-with-ido-enabled
#source ~/scripts/bash-ido
# rxvt-unicode-256color not understood by most remote hosts
export TERM='xterm-256color'
export DOTNET_CLI_TELEMETRY_OPTOUT=true