Permalink
Browse files

Add custom .zsh files.

  • Loading branch information...
sjl committed Jan 9, 2010
1 parent c99b794 commit 4c21ab56f92a7a09b4cc0e9ecb1058d063d41cdb
Showing with 60 additions and 0 deletions.
  1. +5 −0 zsh/example.zsh
  2. +20 −0 zsh/mercurial.zsh
  3. +13 −0 zsh/pip.zsh
  4. +6 −0 zsh/subversion.zsh
  5. +16 −0 zsh/tasks.zsh
View
@@ -0,0 +1,5 @@
+# Add yourself some shortcuts to projects you often work on
+# Example:
+#
+# brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr
+#
View
@@ -0,0 +1,20 @@
+#!/usr/bin/env zsh
+
+alias mq='hg -R $(hg root)/.hg/patches'
+alias tmd='hg tmd | mate'
+
+function pull_everything() {
+ for repo in $( ls -1 ); do
+ if [[ -d $repo && -d $repo/.hg ]]; then
+ echo "Pulling" $repo
+ hg -R $repo pull -u
+ echo
+ fi
+ done
+}
+
+function_bitb() {
+ local P="$(hg paths 2>/dev/null | grep 'bitbucket.org' | head -1)"
+ local URL="$(echo $P | sed -e's|.*\(bitbucket.org.*\)|http://\1|')"
+ [[ -n $URL ]] && open $URL || echo "No BitBucket path found!"
+}
View
@@ -0,0 +1,13 @@
+#!/usr/bin/env zsh
+
+export PIP_VIRTUALENV_BASE=$WORKON_HOME
+
+PIP_BIN="`which pip`"
+alias pip-sys="$PIP_BIN"
+
+pip() {
+ if [ -n "$VIRTUAL_ENV" ]
+ then $PIP_BIN -E "$VIRTUAL_ENV" "$@"
+ else echo "Not currently in a venv -- use pip-sys to work system-wide."
+ fi
+}
View
@@ -0,0 +1,6 @@
+#!/usr/bin/env zsh
+
+# Accomodate the updated version of Subversion
+export DYLD_LIBRARY_PATH="/opt/subversion/lib:$DYLD_LIBRARY_PATH"
+export PYTHONPATH="/opt/subversion/lib/svn-python:$PYTHONPATH"
+export PATH="/opt/subversion/bin:$PATH"
View
@@ -0,0 +1,16 @@
+#!/usr/bin/env zsh
+
+alias t='~/src/t/t.py --task-dir="~/tasks"'
+alias m='~/src/t/t.py --task-dir="~/tasks" --list=music'
+alias g='~/src/t/t.py --task-dir="~/tasks" --list=groceries'
+alias k='~/src/t/t.py --task-dir="~/tasks" --list=books'
+alias p='~/src/t/t.py --task-dir="~/tasks" --list=pack'
+alias b='~/src/t/t.py --list=bugs'
+
+alias pa='~/src/t/t.py --task-dir="~/tasks" --list=pack-archive'
+function packfor() {
+ cp "$HOME/tasks/pack-archive" "$HOME/tasks/pack";
+ touch "$HOME/tasks/.pack.done"
+ hg --cwd ~/tasks add 'pack' '.pack.done';
+ hg -R ~/tasks commit -m 'Starting to pack.'
+}

0 comments on commit 4c21ab5

Please sign in to comment.