Oftentimes when leaving work, or the last time I see someone before I go on a trip, someone will say "drive safe!" or something similar. On one hand, this feels more or less like well-wishing to me (e.g. "I hope you have a safe drive.") so my instinct is to respond with "Thanks!". However, grammatically, it feels more like a request or command (e.g. "When you drive, please do so safely."). If I interpret it that way I'm more inclined to say something like "Will do!".
I've replied both ways in both situations and sometimes feel like my response wasn't what the person was expecting. But since it's often said at the end of the conversation there isn't much of a chance to address it without probably being even more awkward. I'm probably just reading to much into subtleties, but some people have said it pretty seriously (particularly people roughly my parents age) which may be a part of why I'm over-thinking it.
So, which of these responses feels more natural? Is it possible some people (e.g. parents) mean it as a request to be responsible, while others mean it more as a pleasantry?