Created
April 20, 2014 13:45
-
-
Save jhrr/11114501 to your computer and use it in GitHub Desktop.
Courtesy of Brian McKenna a zsh script to show the sandbox status of the current directory in our shell -- http://dev.stephendiehl.com/hask/
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
# a zsh script to show the sandbox status of the current directory in our shell. | |
function cabal_sandbox_info() { | |
cabal_files=(*.cabal(N)) | |
if [ $#cabal_files -gt 0 ]; then | |
if [ -f cabal.sandbox.config ]; then | |
echo "%{$fg[green]%}sandboxed%{$reset_color%}" | |
else | |
echo "%{$fg[red]%}not sandboxed%{$reset_color%}" | |
fi | |
fi | |
} | |
RPROMPT="\$(cabal_sandbox_info) $RPROMPT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment