Skip to content

Instantly share code, notes, and snippets.

@takezoe
Last active August 19, 2017 07:28
Show Gist options
  • Select an option

  • Save takezoe/d9a9c3c334f22ebafb9c05ec24d148c2 to your computer and use it in GitHub Desktop.

Select an option

Save takezoe/d9a9c3c334f22ebafb9c05ec24d148c2 to your computer and use it in GitHub Desktop.
Auto completion for sbt new using peco
function peco-sbt-new() {
local TEMPLATE=`curl https://github.com/foundweekends/giter8/wiki/giter8-templates -s | grep "\.g8<" | sed -e "s/</ /g" -e "s/>/ /g" | awk '{print $3}' | peco | head -n 1`
if [[ -z "$TEMPLATE" ]]; then
return
fi
sbt new $TEMPLATE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment