11 [ "`type -t ls`" = alias ] && unalias ls
12 [ "`type -t ll`" = alias ] && unalias ll
13 [ "`type -t mc`" = alias ] && unalias mc
15 back() { cd - ${1:+"$@"}; }
16 clo() { clear; logout; }
17 eval 'functions() { typeset -f ${1:+"$@"}; }'
20 complete -A command -o default builtin cgmem_nice command dbus-launch exec \
21 nice nohup pidof pidOf KillAll pgrep pkill psg pswg su sudo time \
22 whence whereis which xargs
23 if [ -z "$BASH_COMPLETION_COMPAT_DIR" ]; then
24 complete -A command -o default man
26 complete -A hostname dig host nslookup nc netcat nmap p ping ping6 socat \
28 tcptraceroute tcptraceroute6 tracert tracert6 traceroute traceroute6 \
29 whois wget wget-m wget-wrapper ww
30 complete -A hostname -o default distribute ftp lftp r rsync \
31 s scp ssh smbclient tcpdump tshark wireshark
32 complete -A job bg fg j jobs wait
33 complete -A variable unset
35 if [ -d "$HOME/lib/config" ]; then
36 complete -W "`cd \"$HOME/lib/config\" && echo *`" include
38 complete -W "`echo $BROWSER | sed 's/:/ /g'`" start-browser
42 back() { cd - ${1:+"$@"}; }
43 clo() { clear; exit; }
48 clo() { clear; exit; }
53 # clear history, clear screen and logout
54 #chlo() { cd; unset HISTFILE; rm -f .*history*; clo; }
57 #Pwd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)\/\(.*\)\/\(.*\)/...\/\2\/\3\/\4/"; }
58 #PWd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)/...\/\2/"; }
61 psg() { ps auxw | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; }
62 pswg() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; }
65 pidOf() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\|pidOf\|KillAll\)' | awk '{print $2}'; }
72 kill "$1" `pidOf "$2"`
78 X() { startx >> .Xserver.log 2>&1; cyr; }
84 if [ -f "./$cfg" -a -r "./$cfg" ]; then
85 echo "Reading config file \`$cfg'" 1>&2
87 elif [ -f "$HOME/lib/config/$cfg" -a -r "$HOME/lib/config/$cfg" ]; then
88 echo "Reading config file \`$HOME/lib/config/$cfg'" 1>&2
89 . "$HOME/lib/config/$cfg"
91 echo "Cannot find config file \`$cfg'" 1>&2
97 if [ -n "$SLOWTERM" ]; then
102 screen*) # screen, screen.rxvt
103 if [ "$TERM" = screen.rxvt ]; then
117 /usr/local/share/mc/bin/mc-wrapper.sh \
118 /usr/local/libexec/mc/mc-wrapper.sh \
119 /usr/share/mc/bin/mc-wrapper.sh; do
120 if [ -r $wrapper ]; then
121 . $wrapper $MC_SLOW $MC_XTERM "$@"
128 if [ $MC_FOUND = NO ]; then
129 for mc in /usr/local/bin/mc /usr/bin/mc; do
131 MC_TMP_DIR="${TMPDIR-/tmp}/mc-$USER"
132 if [ ! -d MC_TMP_DIR="${TMPDIR-/tmp}/mc-$USER" ]; then
133 MC_TMP_DIR="${TMPDIR-/tmp}"
135 MC_PWD_FILE="$MC_TMP_DIR/mc.pwd.$$"
136 mc_type="`mc_type.py $mc`"
137 if [ "$mc_type" = old ]; then
138 $mc -P $MC_SLOW $MC_XTERM "$@" > "$MC_PWD_FILE"
141 elif [ "$mc_type" = new ]; then
142 $mc -P "$MC_PWD_FILE" $MC_SLOW $MC_XTERM "$@"
148 cd "`cat \"$MC_PWD_FILE\"`" && /bin/rm "$MC_PWD_FILE"
154 if [ $MC_FOUND = NO ]; then
155 echo "Cannot find mc-wrapper.sh or mc" >&2
159 [ -n "$MC_SAVE_TERM" ] && TERM="$MC_SAVE_TERM"
160 unset MC_FOUND MC_PWD_FILE MC_SAVE_TERM MC_SLOW MC_TMP_DIR MC_XTERM