Skip to content

Instantly share code, notes, and snippets.

@uebayasi
Last active December 19, 2015 22:49
Show Gist options
  • Save uebayasi/6030267 to your computer and use it in GitHub Desktop.
Save uebayasi/6030267 to your computer and use it in GitHub Desktop.
zrc - Run interactive zsh with a specified RC file
#! /bin/sh
set -e
rc=$1
tmpdir=$( mktemp -d /tmp/tmpzdotdir.XXXXXX )
cp "$rc" "${tmpdir}/.zshrc" &&
env ZDOTDIR="${tmpdir}" zsh -d
res=$?
rm -fr "${tmpdir}"
exit $res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment