Craig Watson met Bryan Frizzell outside a chip shop in East Calder, West Lothian.
As Watson – who seemed drunk – walked to his car, Mr Frizzell wound down the driver’s window to speak to him.
Livingston Sheriff Court heard that Watson pulled a kitchen knife from his waistband.
Lisa McCloy, prosecuting, said he then brandished it at his friend, who had his 19-year-old son and a teenage girl in the car.
The incident lasted about 20 seconds before Mr Frizzell drove off.
Ms McCloy said Watson, 39, was captured on CCTV walking back to the chip shop. She said: “His sister spoke to him and said ‘give me the knife’. She put it in her car and, in the end, he went away.”
Mr Frizzell reported the incident and Watson was arrested at his Linlithgow home. A knife, which witnesses identified as the one he brandished, was recovered from his kitchen.
Sentence on Watson, who had never been in trouble before the incident on June 18, was deferred for reports.