#!/bin/zsh

#
# Oh My Zsh plugin.
#

#
# Exec script and cd to output dir.
#

function eval_dxtools {
  OUT="/tmp/dxtools-command.sh"
  rm -f $OUT

  CMD=${DXTOOLS_COMMAND:=dxtools}
  $CMD --shell-command $OUT $@
  if test -f "$OUT"; then
    source $OUT
  fi;
}

# NOTE: Must be single quote.
alias x='eval_dxtools $@'

# Custom scripts.
export PATH="$PATH:$HOME/.oh-my-zsh/custom/plugins/dxos/bin"
