I am working through video 8 in the course and at the end when trying to run the completed script the DeleteHistory continues to give me the error "Error: Invalid flag '-shape" I'm not sure why it is doing this. The rest of the script runs fine. I'm attaching the script I put together while following the video. Please tell me if it is something I did wrong.
Below is my code:

//Joint Curve

//Create Curves
string $cv01[] = `circle -c 0 0 0 -nr 0 1 0 -sw 360 -r 1 -d 3 -ut 0 -tol 0 -s 8 -ch 1`;
string $cv02[] = `circle -c 0 0 0 -nr 0 1 0 -sw 360 -r 1 -d 3 -ut 0 -tol 0 -s 8 -ch 1`;
string $cv03[] = `circle -c 0 0 0 -nr 0 1 0 -sw 360 -r 1 -d 3 -ut 0 -tol 0 -s 8 -ch 1`;

//rotate curves to look like a joint
rotate -r -os 90 0 0 $cv02[0];
rotate -r -os 0 90 0 $cv03[0];

//freeze rotated curves
select $cv02[0]; select -add $cv03[0];
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;

//parent the shapes of curves 2 and 3 to curve 1
string $selCrv2[0] = `listRelatives -shape $cv02[0]`;
string $selCrv3[0] = `listRelatives -shape $cv03[0]`;
parent -r -shape $selCrv2[0] $cv01[0];

//delete the transform nodes of curves 2 and 3
select $cv02[0]; select -add $cv03[0]; doDelete;

//rename the joint curve
string $rnmCrv = `rename $cv01[0] "jntcrv"`;
//delete history of joint curve
select $rnmCrv; DeleteHistory;