Skip to content

Instantly share code, notes, and snippets.

@Velrok
Created August 6, 2014 14:03
Show Gist options
  • Save Velrok/f6d9432705740e4f4c82 to your computer and use it in GitHub Desktop.
Save Velrok/f6d9432705740e4f4c82 to your computer and use it in GitHub Desktop.
run 'lein repl' on entering a leiningen project folder without a running repl #zsh
# run lein repl if no repl was allready started for this project
function chpwd {
if [[ -e "$(pwd)/project.clj" ]] && [[ ! -e "$(pwd)/.nrepl-port" ]]
then
echo "Detected clojure project but no .nrepl-port -> running: lein repl."
lein repl &
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment