author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 01 Aug 2011 11:53:45 +0300 | |
changeset 158 | 1df00afab192 |
parent 157 | 1f5fbfd5f6f4 |
child 168 | 0371cfe5a8f5 |
permissions | -rw-r--r-- |
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
# XXX |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
# [ -f /etc/bashrc ] && . /etc/bashrc |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
119
9013ed85e237
Add ~/usr/bin to PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
104
diff
changeset
|
5 |
[ -d ~/usr/bin ] && export PATH="$PATH":~/usr/bin || : |
9013ed85e237
Add ~/usr/bin to PATH.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
104
diff
changeset
|
6 |
|
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
# XXX for mc, cvs, svn, ... |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
# export EDITOR=vim |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
# XXX vim and gnome-terminal have support for 256 colours in fedora 8 at least |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
# Note debian/ubuntu users should install the ncurses-term package to support this |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
# export TERM=xterm-256color |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
# XXX highlight $HOST:$PWD prompt |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
# PS1='\[\e[1m\]\h:\w\$\[\e[0m\] ' |
17
e11e0adb941b
More verbose prompt, to prevent tangling with another shells.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
16
diff
changeset
|
16 |
PS1='bash# ' |
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
17 |
|
41
d410aac55409
Easy cd to often used dirs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
34
diff
changeset
|
18 |
# Easy cd to often used dirs. |
156 | 19 |
export CDPATH=.:~:~/devel:~/devel/my-devel |
41
d410aac55409
Easy cd to often used dirs.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
34
diff
changeset
|
20 |
|
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
21 |
# Don't store duplicate adjacent items in the history. |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
22 |
# ignorespace do not save lines that start with space |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
23 |
# erasedups all previous lines matching the current line to be removed from |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
24 |
# the history list before that line is saved |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
25 |
HISTCONTROL=igrorespace:erasedups |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
26 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
27 |
# Don't store noisy/dumb items. |
104
653e4ea98ff9
Exclude 'cd' command from history which comes from MC.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
93
diff
changeset
|
28 |
# TIP: MC command start with space. |
107
43f69ef5ec58
Remove ? from patterns as I previously incorrectly understand its meaning.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
29 |
HISTIGNORE=\ |
43f69ef5ec58
Remove ? from patterns as I previously incorrectly understand its meaning.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
30 |
"cd ..":"cd ../..":" cd *":\ |
43f69ef5ec58
Remove ? from patterns as I previously incorrectly understand its meaning.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
31 |
"e *":\ |
43f69ef5ec58
Remove ? from patterns as I previously incorrectly understand its meaning.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
32 |
"sudo mv *":"sudo rm *":"sudo cp *":"sudo mkdir *":"sudo chmod *":"sudo chown *":\ |
43f69ef5ec58
Remove ? from patterns as I previously incorrectly understand its meaning.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
106
diff
changeset
|
33 |
"vlc *":ls:pwd |
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
34 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
35 |
# To these options assigned default value, as they satisfy my needs I comment them. |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
36 |
# HISTFILE=~/.bash_history # where is command history stored |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
37 |
# HISTFILESIZE=500 # how many lines been in $HISTFILE |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
38 |
# HISTSIZE=500 # how many lines been stored in bash process |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
39 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
40 |
# Can be XXX /visible. I like bell. |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
41 |
# set bell-style visible |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
42 |
|
28
da6841fb89e9
Minor errors in the spelling of a directory component in a cd command will be corrected.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
16
diff
changeset
|
43 |
# Minor errors in the spelling of a directory component in a cd command will |
da6841fb89e9
Minor errors in the spelling of a directory component in a cd command will be corrected.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
16
diff
changeset
|
44 |
# be corrected. |
da6841fb89e9
Minor errors in the spelling of a directory component in a cd command will be corrected.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
16
diff
changeset
|
45 |
shopt -s cdspell |
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
46 |
|
43
6c53a61678d7
Added useful bash settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
47 |
# Save all lines of a multiple-line command in the same history entry. |
6c53a61678d7
Added useful bash settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
48 |
shopt -s cmdhist |
6c53a61678d7
Added useful bash settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
49 |
|
6c53a61678d7
Added useful bash settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
50 |
# Allows files beginning with a dot ('.') to be returned in the results of path-name expansion. |
6c53a61678d7
Added useful bash settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
51 |
shopt -s dotglob |
6c53a61678d7
Added useful bash settings.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
42
diff
changeset
|
52 |
|
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
53 |
# Adjust settings according to current terminal window width |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
54 |
# which may have changed while the last command was running |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
55 |
# (which is a common occurance for vim/less/etc.) |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
56 |
# Note this is already set in /etc/bashrc on Fedora 8 at least. |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
57 |
shopt -s checkwinsize |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
58 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
59 |
# Let me have core dumps |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
60 |
ulimit -c unlimited |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
61 |
|
44
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
62 |
################################################################ |
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
63 |
# shortcut aliases |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
64 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
65 |
alias ..="cd .." #go to parent dir |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
66 |
alias ...="cd ../.." #go to grandparent dir |
109
40feef132306
Fix "alias: --: неправильная опция".
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
107
diff
changeset
|
67 |
alias -- -="cd -" # go to previous dir |
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
68 |
alias l.='ls -d .*' #list hidden files |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
69 |
alias ll='ls -lhrt' #extra info compared to "l" |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
70 |
alias lld='ls -lUd */' #list directories |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
71 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
72 |
# make and change to a directory |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
73 |
md () { mkdir -p "$1" && cd "$1"; } |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
74 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
75 |
# GREP_COLOR=bright yellow on black bg. |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
76 |
# use GREP_COLOR=7 to highlight whitespace on black terminals |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
77 |
# LANG=C for speed. See also: http://www.pixelbeat.org/scripts/findrepo |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
78 |
# alias grep='GREP_COLOR="1;33;40" LANG=C grep --color=auto' |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
79 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
80 |
# alias ls="BLOCK_SIZE=\'1 ls --color=auto" #enable thousands grouping and colour |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
81 |
# alias minicom='minicom -c on' #enable colour |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
82 |
# alias cal='cal -3' #show 3 months by default |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
83 |
# alias units='units -t' #terse mode |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
84 |
# alias diff='LC_ALL=C TZ=GMT0 diff -Naur' #normalise diffs for distribution |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
85 |
# alias lynx='lynx -force_html -width=$COLUMNS' #best settings for viewing HTML |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
86 |
# alias links='links -force-html' #need to enable colour in config menu manually |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
87 |
# alias xterm='xterm -fb "" -bg black -fg gray -fa "Sans Mono" -fs 10 +sb -sl 3000 -g 80x50+1+1' |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
88 |
# alias sudo='sudo env PATH=$PATH' #work around sudo built --with-secure-path (ubuntu) |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
89 |
# alias vim='vim -X' #don't try to contact xserver (which can hang on network issues) |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
90 |
# alias gdb='gdb -tui' #enable the text window interface if possible |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
91 |
|
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
92 |
# what most people want from od (hexdump) |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
93 |
# alias hd='od -Ax -tx1z -v' |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
94 |
|
57
99d0eb7974d6
Remove --comment-delimiters-on-blank-lines option from indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
45
diff
changeset
|
95 |
# --blank-lines-after-procedures --break-before-boolean-operator --braces-on-if-line --braces-on-struct-decl-line |
99d0eb7974d6
Remove --comment-delimiters-on-blank-lines option from indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
45
diff
changeset
|
96 |
# --comment-indentationn --space-after-cast --line-comments-indentationn --declaration-indentationn --honour-newlines |
99d0eb7974d6
Remove --comment-delimiters-on-blank-lines option from indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
45
diff
changeset
|
97 |
# --no-space-after-function-call-names --no-tabs --struct-brace-indentationn --start-left-side-of-comments |
99d0eb7974d6
Remove --comment-delimiters-on-blank-lines option from indent.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
45
diff
changeset
|
98 |
alias indent-bifit="indent -bap -bbo -br -brs -cdw -ce -cli0 -c0 -cs -d0 -di0 -hnl -l120 -lc90 -i4 -npcs -ppi 3 -npsl -nut -sbi4 -sc" |
45
5c94d2613433
Added alias for reindent code for our job rules.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
44
diff
changeset
|
99 |
|
11
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
100 |
# canonicalize path (including resolving symlinks) |
339675ac5fd3
Base version of .bashrc.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
101 |
# alias realpath='readlink -f' |
32
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
102 |
|
44
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
103 |
# Use bash-completion, if available. |
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
104 |
if [ -f /etc/bash_completion ]; then |
74
06fb23a66904
Under Cygwin bash completition start a long time.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
57
diff
changeset
|
105 |
# Under Cygwin bash completition start a long time. |
06fb23a66904
Under Cygwin bash completition start a long time.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
57
diff
changeset
|
106 |
if [ ! "$OSTYPE" = cygwin ]; then |
06fb23a66904
Under Cygwin bash completition start a long time.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
57
diff
changeset
|
107 |
. /etc/bash_completion |
06fb23a66904
Under Cygwin bash completition start a long time.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
57
diff
changeset
|
108 |
fi |
44
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
109 |
fi |
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
110 |
if [ -f $HOME/usr/etc/bash_completion ]; then |
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
111 |
. $HOME/usr/etc/bash_completion |
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
112 |
fi |
e4703f904e4b
Use bash-completion, if available.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
43
diff
changeset
|
113 |
|
32
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
114 |
# Special case for CYGWIN to properly display russian letters in rxvt. |
34
cddddb009921
Added useful comment.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
32
diff
changeset
|
115 |
# Don't forget set in Windows SHELL=/bin/bash. If default SHELL is sh then .bashrc will not be read. |
32
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
116 |
if [ -n "$COMSPEC" ]; then |
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
117 |
if [ x$OSTYPE = xcygwin ]; then |
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
118 |
export LANG=ru_RU.CP1251 |
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
119 |
fi |
031655c93305
Special case for CYGWIN to properly display russian letters in rxvt.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
30
diff
changeset
|
120 |
fi |
126
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
121 |
|
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
122 |
export PATH=$PATH:~/usr/bin |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
123 |
|
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
124 |
if [ -z "$MANPATH" ]; then |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
125 |
export MANPATH=~/usr/share/man: |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
126 |
else |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
127 |
export MANPATH=$MANPATH:~/usr/share/man: |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
128 |
fi |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
129 |
|
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
130 |
if [ -z "$INFOPATH" ]; then |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
131 |
export INFOPATH=~/usr/share/info: |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
132 |
else |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
133 |
export INFOPATH=$INFOPATH:~/usr/share/info: |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
134 |
fi |
d342461b401b
Point PATH, MANPATH, INFOPATH to '~/usr'.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
109
diff
changeset
|
135 |
|
150 | 136 |
################################################################ |
137 |
# Completion. |
|
138 |
||
139 |
# user commands see only users |
|
140 |
complete -u su passwd write chfn groups slay w sux |
|
141 |
||
142 |
# bg completes with stopped jobs |
|
143 |
complete -A stopped -P '"%' -S '"' bg |
|
144 |
||
145 |
# other job commands |
|
146 |
complete -j -P '"%' -S '"' fg jobs disown |
|
147 |
||
148 |
# readonly and unset complete with shell variables |
|
149 |
complete -v readonly unset |
|
150 |
||
151 |
# set completes with set options |
|
152 |
complete -A setopt set |
|
153 |
||
154 |
# shopt completes with shopt options |
|
155 |
complete -A shopt shopt |
|
156 |
||
157 |
# helptopics |
|
158 |
complete -A helptopic help |
|
159 |
||
160 |
# unalias completes with aliases |
|
161 |
complete -a unalias |
|
162 |
||
163 |
# bind completes with readline bindings (make this more intelligent) |
|
164 |
complete -A binding bind |
|
165 |
||
166 |
# type and which complete on commands |
|
167 |
complete -c command type which |
|
168 |
||
169 |
# builtin completes on builtins |
|
170 |
complete -b builtin |
|
171 |