Full movie description "Nash Bridges One Flew Over the Cuda's Nest":

While trying apprehend a suspect who is impersonating characters from Sherlock Holmes novels Nash and Joe encounter a mentally ill man who is also the trail of the suspect, and he believes that he himself is Dr. Watson.