Sha256: a94433f6035cb3b91d6396bd23846d5036720cb85f27de6e1235d7d5d29c3341

Contents?: true

Size: 1.31 KB

Versions: 1

Compression:

Stored size: 1.31 KB

Contents

# = Functions
#
# New commands that were a bit complicated for simple aliases, or otherwise didn't
# work in the alias world. All kinds of functionality here.

# Installs the "OSX For Hackers" shellscript, which plays with some of the OS X defaults to give you
# a faster and more enjoyable experience, albeit with a little less minimalism going on.
#
# WARNING: THIS WILL AFFECT YOUR OSX ENVIRONMENT. PLEASE READ THE FOLLOWING URL BEFORE CONTINUING:
# => https://github.com/mathiasbynens/dotfiles/blob/master/.osx
function osx_for_hackers() {
  source $DOTS/tools/osx.zsh
}

# Search the process list for a specific expression using grep.
function proc() {
  ps -A | grep $1
}

# Load the README.md file into mvim as well as the current directory, as defined by the
# functionality of the macvim_drawer plugin. Requires macvim_drawer to be installed, 
# regular MacVim will break with this function.
function e() {
  if [[ $EDITOR == 'mvim']] && [[ $DRAWER == true ]]; then
    if [[ -f "./README.md" ]]; then
      mvim README.md
    elif [[ -f "./README.rdoc" ]]; then
      mvim README.rdoc
    else
      mvim
    fi
  else
    $EDITOR
  fi
}

# Set the title of the iTerm window.
function set_title() {
  print -Pn "\033];$1\007";
}

# Find out what an exit code means.
function exit_code() {
  cat /usr/include/sysexits.h | grep "$1"
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zsh_dots-0.5.1 lib/dots/functions.zsh