A landlord had to undergo an operation on his hand after a bag containing broken whisky bottles was thrown at him.
Bradford Crown Court heard how John Taylor, who runs Marshalls Bar in Hebden Bridge, had told Adam Dempsey to move the bag which had been put on the doorstep.
The bottles were broken as Mr Taylor himself moved the bag, but Dempsey then picked it up and threw it towards Mr Taylor.
Prosecutor Gerald Hendron said as Mr Taylor put his hand up to protect himself he was struck by the bag and suffered a cut to his left hand which severed a tendon.
The 28-year-old, of no fixed abode, pleaded guilty to a charge of unlawful wounding and the court heard he was on bail for other offences at the time of the incident last month.
In May, Dempsey, who has previous convictions dating back to 1997, was seen walking in the street with a knife tucked in his trousers and in August he was abusive towards two women who saw him and his girlfriend performing sex acts and having intercourse near a canal.
Dempsey admitted charges possessing an offensive weapon and outraging public decency and was jailed for a total of 33 months.
Judge John Potter said Dempsey had been trying to sell the bottles of whisky at the pub and had ended up using the bag of broken bottles as a weapon.
He said Mr Taylor had suffered significant injury to his hand which required an operation.