aboutsummaryrefslogtreecommitdiff
path: root/workout
diff options
context:
space:
mode:
Diffstat (limited to 'workout')
-rwxr-xr-xworkout5
1 files changed, 5 insertions, 0 deletions
diff --git a/workout b/workout
index 78a2bee..d574c49 100755
--- a/workout
+++ b/workout
@@ -15,6 +15,10 @@ fn isnumber{
! ~ `{echo $1 | awk '/^[0-9]+$/'} ''
}
+fn sanitize{
+ echo $1 | sed 's/[ ]#.*//g'
+}
+
fn printexers{
for(i in `{seq 1 $#exercises})
echo $i':' $exercises($i)
@@ -67,6 +71,7 @@ fn setupreps{
while(! isnumber $r){
echo -n how many reps for $exercises($session($i))?' '
r=`{read}
+ r=`{sanitize $r}
}
reps=($reps $r)
}