Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add ZSH configuration.

  • Loading branch information...
commit 68039e8a152b55c485147298f365a1e45662ef6e 1 parent 7f3a2cf
@SaberUK authored
Showing with 83 additions and 0 deletions.
  1. +21 −0 zsh/aliases.zsh
  2. +20 −0 zsh/functions.zsh
  3. +31 −0 zsh/variables.zsh
  4. +11 −0 zshrc
View
21 zsh/aliases.zsh
@@ -0,0 +1,21 @@
+# ==============================================================================
+# SaberUK's Dot Files <https://github.com/saberuk/dotfiles/>
+# ==============================================================================
+# Copyright (C) 2012 Peter "SaberUK" Powell <petpow@saberuk.com>
+# ==============================================================================
+
+# LS aliases.
+alias ls='ls -FLh' # Show entry types, follow symlinks, use unit suffixes.
+alias la='ls -A' # Show almost all entries.
+alias ll='ls -Al' # Show almost all entries, use long format.
+alias lr='ls -lR' # Use long format, list recursively.
+alias l='ls' # Shortcut.
+
+# Windows compatibility aliases.
+alias cls='clear'
+alias dir='ls'
+alias start='open'
+
+# Misc aliases
+alias mkdir='mkdir -p' # Create intermediate directories as required.
+alias ssp='ssh -D 12468' # Create a local SOCKS server which tunnels over SSH.
View
20 zsh/functions.zsh
@@ -0,0 +1,20 @@
+# ==============================================================================
+# SaberUK's Dot Files <https://github.com/saberuk/dotfiles/>
+# ==============================================================================
+# Copyright (C) 2012 Peter "SaberUK" Powell <petpow@saberuk.com>
+# ==============================================================================
+
+function command_not_found_handler()
+{
+ # TODO: port command-not-found from debian.
+ echo "zsh: command not found: $argv"
+}
+
+function printenv()
+{
+ if [ -z "$1" ]; then
+ command printenv | sort
+ else
+ command printenv $argv
+ fi
+}
View
31 zsh/variables.zsh
@@ -0,0 +1,31 @@
+# ==============================================================================
+# SaberUK's Dot Files <https://github.com/saberuk/dotfiles/>
+# ==============================================================================
+# Copyright (C) 2012 Peter "SaberUK" Powell <petpow@saberuk.com>
+# ==============================================================================
+
+# Don't keep history.
+unset HISTFILE
+
+# Misc
+export BROWSER='/usr/bin/open'
+export EDITOR='/usr/bin/nano'
+export HOMEBREW='/brew'
+export MANPAGER='/bin/cat'
+export PS1='%n@%m:%~$ '
+
+# Scripts
+if [ -d "$HOME/bin" ]; then
+ export PATH="$HOME/bin:$PATH"
+fi
+
+# Homebrew
+if [ -d "$HOMEBREW/bin" ]; then
+ export PATH="$HOMEBREW/bin:$PATH"
+fi
+
+# RubyGems
+if [ -f "$HOMEBREW/bin/gem" ]; then
+ export GEM_HOME=$HOMEBREW
+ export GEM_PATH=$HOMEBREW
+fi
View
11 zshrc
@@ -0,0 +1,11 @@
+# ==============================================================================
+# SaberUK's Dot Files <https://github.com/saberuk/dotfiles/>
+# ==============================================================================
+# Copyright (C) 2012 Peter "SaberUK" Powell <petpow@saberuk.com>
+# ==============================================================================
+
+# Load ZSH files.
+for file (~/.zsh/*.zsh); do
+ source $file
+done
+
Please sign in to comment.
Something went wrong with that request. Please try again.