zshrc.d/30-aliases.zrc
author Mikael Berthe <mikael@lilotux.net>
Sat, 14 Jul 2012 19:20:57 +0200
changeset 0 7215ca490221
child 12 a906009be2b1
permissions -rw-r--r--
Re-import repository after cleanup from personal stuff (see description) I've remove too dirty or specific stuff, so that i could put this configuration on a public repo. Here's a copy of the initial Mercurial changelog, FWIW... * (2012-07-14) Mikael Berthe Reorganize all scripts * (2012-07-14) Mikael Berthe Add a "tools" directory * (2012-07-14) Mikael Berthe Don't use ^X^C as a keybinding * (2012-07-14) Mikael Berthe Disable ... completion for now * (2012-07-14) Mikael Berthe Add rehash key binding * (2012-07-14) Mikael Berthe Add n fix a few key bindings * (2012-07-14) Mikael Berthe More cleanup Remove zshrc_compinstall Move personnal stuff to zshrc_local * (2012-07-14) Mikael Berthe New commands: ...* Previous commands .. and ... have been renamed to ,, and ,,, * (2012-07-14) Mikael Berthe Add WATCHFMT, move REPORTTIME to zshenv * (2012-07-14) Mikael Berthe Add REPORTTIME * (2012-07-13) Mikael Berthe Add a few useful functions Ideas borrowed from https://github.com/whiteinge/dotfiles/blob/master/.zshrc * (2012-07-13) Mikael Berthe Move aliases to a new file * (2012-07-13) Mikael Berthe Check for zshrc_local existence * (2012-07-13) Mikael Berthe Cleanup vcsinfo prompt * (2012-07-12) Mikael Berthe Colorize time in default color prompt as well * (2012-07-12) Mikael Berthe Prompt: colorize time * (2012-07-12) Mikael Berthe Add a copy of git-prompt.sh * (2012-07-12) Mikael Berthe Update prompt themes Since we do not display the mode on the first line, let's use this place for the date/time. * (2012-07-12) Mikael Berthe Update prompts / new showmode * (2012-07-12) Mikael Berthe More showmode cleanup, part2 * (2012-07-12) Mikael Berthe Switch showmode to using RPROMPT, part1 * (2012-07-12) Mikael Berthe Prompt: many improvements and fixes * (2012-07-11) Mikael Berthe More prompt code cleanup * (2012-07-11) Mikael Berthe More readable prompt generation * (2012-07-11) Mikael Berthe Dynamic path color * (2012-07-11) Mikael Berthe New prompt based on Zsh' vcs_info module * (2012-07-10) Mikael Berthe Add git info, add a light dev2 prompt * (2012-07-10) Mikael Berthe Dev prompt: Improve Mercurial repository detection * (2012-07-08) Mikael Berthe hg prompt: Change color of unapplied patches * (2012-07-08) Mikael Berthe Change Mercurial prompt format * (2012-07-08) Mikael Berthe Try to improve showmode support. Enable it for 256 color terms. * (2012-07-08) Mikael Berthe Fix interaction between showmode and the new "dev" prompt When showmode is disabled (e.g. in screen), do not display the mode in PS1. * (2012-07-08) Mikael Berthe Add development prompt (HG and minimal git support) Can be set up from the shell command line with "prompt_set_dev". * (2012-07-08) Mikael Berthe Ignore Vim swap files * (2009-12-22) Mikael Berthe Slight update zlog{in,out} * (2009-12-22) Mikael Berthe Add zlogin * (2009-12-22) Mikael Berthe Update hgignore list * (2009-12-22) Mikael Berthe Initial import into Mercurial


###########
# Aliases #
###########

# Ces 3 alias demandent confirmation avant d'ecraser un fichier
alias cp='cp -i'
alias mv='mv -i'
alias rm='rm -i'

alias cd..='cd ..'

# Gestion de l'historique des commandes
alias h=history 23
alias H='history | less'

# Affiche la liste de tous les processus tournant en memoire
alias psx='ps aux | less -S'

# Affiche la liste de tous vos processus
alias psu='ps ux | less -S'

# Divers alias pour lister le contenu d'un repertoire
# la = comme 'ls' avec les fichiers caches en plus
# ll = tout lister, y compris les fichiers caches
# lm = comme 'll' avec une pause en plus
# dir = affichage long
# dirm = comme 'dirm' avec une pause en plus
alias l='command ls $LS_OPTIONS -l'
alias ls='command ls $LS_OPTIONS -F'
alias la='command ls $LS_OPTIONS -aF'
alias ll='command ls $LS_OPTIONS -laF'
function lm() { command ls $LS_OPTIONS -laF $* | less }
alias dir='command ls $LS_OPTIONS -lF'
function dirm() { command ls $LS_OPTIONS -lF $* | less }

# Gestion de la directory stack, lire le man pour en savoir plus
alias d=dirs
alias dv='dirs -v'
#alias pu=pushd
#alias po=popd

if [[ -x /usr/bin/xemacs ]]; then
  alias em='xemacs -nw'
elif [[ -x /usr/bin/emacs ]]; then
  alias em='emacs -nw'
fi
if [[ -x /usr/bin/vim ]]; then
  alias vi=vim
fi

# DNS stuff
alias dmx='dig -t MX +nocmd +nocomment +identify +nostats +noquestion'
alias dhost='dig +nocmd +nocomment +identify +nostats +noquestion'

# :)
alias :q='echo "Ha ha ha :-)"'

# Xterm resizing-fu  (From Joey...)
alias default='echo -e "\033]50;fixed\007"'
alias normal=default
#alias hide='echo -e "\033]50;nil2\007"'
#alias tiny='echo -e "\033]50;5x7\007"'
alias small='echo -e "\033]50;6x10\007"'
alias medium='echo -e "\033]50;7x13\007"'
alias large='echo -e "\033]50;9x15\007"'
alias huge='echo -e "\033]50;10x20\007"'