-
-
Save uebayasi/6030267 to your computer and use it in GitHub Desktop.
zrc - Run interactive zsh with a specified RC file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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