X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=planime;h=004aa2a8155f5d6cde966bc6aebcf3c987e45205;hb=90aff0d0e0e041b357afb15be9a22608b4f68ab2;hp=b23a2d9707201b8e99c99ee3358944a92e4af914;hpb=2d68de164d5d5138aa77f47176dca629efe90a6e;p=utils.git diff --git a/planime b/planime index b23a2d9..004aa2a 100755 --- a/planime +++ b/planime @@ -95,7 +95,9 @@ if [ "$nextep" = y -a -r nextep ]; then exit 1 fi fi -file="$(findfile "$base - " "$ep" "$qual")" +if [ -z "$file" ]; then + file="$(findfile "$base - " "$ep" "$qual")" +fi if [ -z "$file" -o ! -r "$file" ]; then echo "planime: no matching file found" >&2 @@ -137,10 +139,10 @@ if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi "${cmdline[@]}" "$file" if [ "$nextep" = y ]; then - echo "0. Save and continue" + echo "0. Save and continue (or Space)" echo "1. Continue without saving" - echo "2. Save and exit" - echo "3. Exit without saving" + echo "2. Save and exit (or Enter)" + echo "3. Exit without saving (or any key)" IFS= read -sn1 c save=n cont=n @@ -157,9 +159,12 @@ if [ "$nextep" = y ]; then ;; esac if [ "$save" = y ]; then - echo "$(($ep + 1))" >nextep + let ep++ + echo "$ep" >nextep fi if [ "$cont" = y ]; then exec "${origargs[@]}" + else + echo "nextep is $ep" fi fi