The duo had been hoping to steal a Volvo car parked outside the premises in Queensbury, but when they demanded the keys during break-in the complainant told them his car was “the ****** Astra”.
Bradford Crown Court heard the man had been asleep in bed on the morning of February 24, when he was woken by the sound of smashing glass.
Prosecutor Anthony Moore said the complainant left his bedroom to investigate and was confronted by the two hooded intruders.
The sword, which had a two-foot long blade and was shown to the judge in court, caused a minor cut when convicted burglar Bradley Robertshaw placed it against their victim’s forehead.
Robertshaw, 24, and his 23-year-old accomplice Daniel Rayner eventually stole the Astra keys, tools, cigarettes and some cash before getting into the parked car and driving off.
Within minutes the car was spotted by police officers on patrol and after a pursuit the Astra was abandoned in a cul-de-sac and the two defendants and a third man ran off.
Robertshaw, of Wedgemoor Close, Wyke, was caught nearby and Rayner, of Sunnybank, Queensbury, was also arrested following police inquiries.
The pair both pleaded guilty to aggravated burglary and theft of the car.
Robertshaw, who had previous convictions for house burglary, was jailed for eight years and nine months.
Rayner, who had no previous burglaries on his record, was jailed for seven years and eight months.
Barrister David McGonigal, for Robertshaw, said it was a serious offence but no serious violence had been inflicted on the complainant and it was over relatively quickly.
Rayner’s barrister Emma Downing said he had been drinking and using drugs and he was now genuinely remorseful and deeply ashamed of himself.
She urged the judge to accept that his involvement had been truly out of character.
Judge Colin Burn said he had read a number of references for the defendants, but they didn’t demonstrate that side of their characters on the night in question.
“At 4am you used a paving stone or something like it to smash your way into premises which were obviously occupied,” he told the duo.
“Indeed it is clear that you knew someone was going to be there because you had with you an extremely nasty looking and undoubtably very sharp sword.”
The judge explained that the pair would have faced 11-year jail terms after a trial, but their guilty pleas at different stages of the court process meant they were each entitled to a reduction in their sentences.