-#!/bin/sh
+#!/bin/bash
#
# example:
# ./leap-fix.sh 3667
[ $issue -gt 0 ] || exit 1
# quick'n dirty
-subject=`wget -q https://leap.se/code/issues/${issue}.json -O -| json_pp | grep '"subject"' | cut -d '"' -f 4 | sed 's/[][!@#\$%^&*() :]/_/g' | cut -c -30`
+subject=`wget -q https://leap.se/code/issues/${issue}.json -O -| json_pp | grep '"subject"' | cut -d '"' -f 4 | sed "s/[][!@\'#\$\/%^&,\*() :]/_/g" | cut -c -30`
[ $subject ] || exit 1
-feature="${issue}_$subject"
-echo "Starting feature branch \"$feature\""
-echo
-echo "Proceed ? press enter"
-read enter
+feature_default="${issue}_$subject"
+#echo "Starting feature branch \"$feature\""
+read -e -p "Enter feature branch name:" -i "$feature_default" feature
git flow feature start $feature