95b6f336d3ba

Add custom .zsh files.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Fri, 08 Jan 2010 21:03:55 -0500
parents c80eab81d6f0
children ab5f77a17eaa
branches/tags (none)
files zsh/example.zsh zsh/mercurial.zsh zsh/pip.zsh zsh/subversion.zsh zsh/tasks.zsh

Changes

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zsh/example.zsh	Fri Jan 08 21:03:55 2010 -0500
@@ -0,0 +1,5 @@
+# Add yourself some shortcuts to projects you often work on
+# Example:
+#
+# brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr
+#
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zsh/mercurial.zsh	Fri Jan 08 21:03:55 2010 -0500
@@ -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!"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zsh/pip.zsh	Fri Jan 08 21:03:55 2010 -0500
@@ -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
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zsh/subversion.zsh	Fri Jan 08 21:03:55 2010 -0500
@@ -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"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/zsh/tasks.zsh	Fri Jan 08 21:03:55 2010 -0500
@@ -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.'
+}