2012-05-18 13:09:58 +04:00
|
|
|
#!/bin/zsh
|
|
|
|
# vim: set filetype=zsh
|
|
|
|
|
|
|
|
# list dir operations
|
|
|
|
alias ls='ls --classify --color --human-readable --group-directories-first'
|
|
|
|
alias la='ls -a'
|
|
|
|
alias ll='ls -l'
|
|
|
|
alias l='ll'
|
|
|
|
alias lh='ls -h'
|
|
|
|
alias lla='ls -la'
|
|
|
|
alias llh='ls -lh'
|
|
|
|
alias llah='ls -lah'
|
|
|
|
alias llha='llah'
|
|
|
|
alias fls="fls -rd"
|
|
|
|
|
|
|
|
# file operations
|
2012-08-01 17:12:00 +04:00
|
|
|
alias cp='nocorrect cp --verbose --preserve=all'
|
2012-05-18 13:09:58 +04:00
|
|
|
alias mv='nocorrect mv --verbose'
|
|
|
|
alias rm='nocorrect rm -v'
|
|
|
|
alias ln='ln -vi'
|
|
|
|
alias chmod='chmod -v'
|
|
|
|
alias chown='chown -v'
|
|
|
|
alias chgrp='chgrp -v'
|
|
|
|
alias mkdir='mkdir -v'
|
|
|
|
alias rmdir='rmdir -v'
|
|
|
|
|
|
|
|
# fs statistics
|
|
|
|
alias df='df -hT'
|
|
|
|
alias dfm='df -mT'
|
2012-06-06 14:53:12 +04:00
|
|
|
alias fs='du -shcx (|.)* | sort -h'
|
2012-05-18 13:09:58 +04:00
|
|
|
alias du='du --human-readable --total'
|
|
|
|
|
|
|
|
# process operations
|
|
|
|
alias nohup='nohup > /dev/null $1'
|
|
|
|
alias k='killall'
|
|
|
|
which sudo &>/dev/null && alias sk='sudo killall'
|
|
|
|
|
|
|
|
# autofixing
|
|
|
|
alias cd..='cd ..'
|
|
|
|
alias cd~='cd ~'
|
|
|
|
alias cd-='cd -'
|
|
|
|
|
|
|
|
alias v='vim'
|
|
|
|
which sudo &>/dev/null && alias sv='sudo vim'
|
|
|
|
|
|
|
|
alias grep='grep --color=always'
|
|
|
|
|
|
|
|
which grc &>/dev/null && {
|
|
|
|
alias grc='grc --colour=auto'
|
|
|
|
alias ping='grc ping'
|
|
|
|
alias last='grc last'
|
|
|
|
alias netstat='grc netstat'
|
|
|
|
alias traceroute='grc traceroute'
|
|
|
|
alias make='grc make'
|
|
|
|
alias gcc='grc gcc'
|
|
|
|
alias configure='grc ./configure'
|
|
|
|
alias configure='grc configure'
|
|
|
|
alias netstat='grc netstat'
|
|
|
|
alias ping='grc ping'
|
|
|
|
alias cat="grc cat"
|
|
|
|
alias tail="grc tail"
|
|
|
|
alias head="grc head"
|
|
|
|
}
|
|
|
|
|
|
|
|
alias killall="killall --interactive --verbose"
|
|
|
|
|
|
|
|
alias free="free -t -m"
|
|
|
|
|
|
|
|
which git &>/dev/null && alias git="nocorrect git"
|
|
|
|
which hg &>/dev/null && alias hg="nocorrect hg"
|
|
|
|
|
|
|
|
which scrot &>/dev/null && alias scrot="scrot --border --count --quality 75 $HOME'/screenshots/%d-%b-%y_%H-%M-%S_\$wx\$h.png' --exec 'du -h \$f'"
|
|
|
|
|
|
|
|
which sudo &>/dev/null && alias su='sudo su -'
|
|
|
|
which hd &>/dev/null && alias hd='hexdump -C'
|
|
|
|
which sudo &>/dev/null && alias krnlconfig="sudo make MENUCONFIG_MODE=single_menu MENUCONFIG_COLOR=mono menuconfig"
|
|
|
|
which valgrind &>/dev/null && alias valgrind='valgrind --tool=callgrind'
|
2013-03-13 15:41:08 +04:00
|
|
|
which cgdb &>/dev/null && alias cgdb='LANG=ru_RU.koi8-r TERM=screen cgdb'
|
2012-05-18 13:09:58 +04:00
|
|
|
which rsync &>/dev/null && alias cpb='rsync --progress -h' \
|
|
|
|
&& alias cpbs='rsync --progress -h -rax --delete-excluded'
|
|
|
|
which alsamixer &>/dev/null && alias alsamixer='alsamixer -g' && alias equilizer='alsamixer -D equal'
|
|
|
|
[ -x /usr/libexec/mc/mc-wrapper.sh ] && alias mc='. /usr/libexec/mc/mc-wrapper.sh -x'
|
|
|
|
which network.sh &>/dev/null && alias net='network.sh'
|
|
|
|
which colordiff &>/dev/null && alias diff='colordiff'
|
2013-01-10 13:47:30 +04:00
|
|
|
alias make="make -j$((`getconf _NPROCESSORS_ONLN`+1))"
|
|
|
|
which colormake &>/dev/null && alias make="colormake -j$((`getconf _NPROCESSORS_ONLN`+1))"
|
2012-05-18 13:09:58 +04:00
|
|
|
which colorgcc &>/dev/null && {
|
|
|
|
alias c++='/usr/lib/colorgcc/bin/c++'
|
|
|
|
alias cc='/usr/lib/colorgcc/bin/cc'
|
|
|
|
alias g++='/usr/lib/colorgcc/bin/g++'
|
|
|
|
alias gcc='/usr/lib/colorgcc/bin/gcc'
|
|
|
|
}
|
|
|
|
which astyle &>/dev/null && {
|
|
|
|
alias astyle-glib='astyle --style=gnu --indent=spaces=2 --max-instatement-indent=80 \
|
|
|
|
--indent-preprocessor --indent-col1-comments --break-blocks=all \
|
|
|
|
--pad-oper --pad-header --break-closing-brackets --add-brackets'
|
|
|
|
}
|
2012-05-27 15:21:34 +04:00
|
|
|
which network-profile.sh &>/dev/null && alias net=network-profile.sh
|
2013-02-26 11:17:51 +04:00
|
|
|
which iconv &>/dev/null && alias cp1251toUTF8='iconv -f cp1251 -t utf8'
|
2013-02-27 23:22:46 +04:00
|
|
|
|
|
|
|
which eix &>/dev/null && alias eix='TERM=screen eix'
|