dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit d08a16b725a4f1573de2495c1285db81caa756aa
parent 2930606d4baeb21e2cad6d2cb2ffd90bdd6a30b9
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Sun, 18 Aug 2013 14:05:58 +0200

added directory mark functions

Diffstat:
M.zshrc | 15+++++++++++++++
1 file changed, 15 insertions(+), 0 deletions(-)

diff --git a/.zshrc b/.zshrc @@ -61,5 +61,20 @@ alias ll='ls -lha' alias m='make' alias mc='make clean' +# mark functionality +export MARKPATH=$HOME/.marks +function jump { + cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1" +} +function mark { + mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 +} +function unmark { + rm -i $MARKPATH/$1 +} +function marks { + ls -l $MARKPATH | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo +} + # speech synth command say() { if [[ "${1}" =~ -[a-z]{2} ]]; then local lang=${1#-}; local text="${*#$1}"; else local lang=${LANG%_*}; local text="$*";fi; mplayer "http://translate.google.com/translate_tts?ie=UTF-8&tl=${lang}&q=${text}" &> /dev/null ; }