"sudden change or start of the mind without apparent motive," 1660s, from French caprice "whim" (16c.), from Italian capriccio "whim," originally "a shivering," a word of uncertain origin. Some old guesses from 19c. are that it is from capro "goat," with reference to frisking, from Latin capreolus "wild goat," or that the Italian word is connected with capo "head" + riccio "curl, frizzled," literally "hedgehog" (from Latin ericius). The notion in this case would be of the hair standing on end, hence the person shivering in fear.