Gunblades or pistol swords are exactly what you're thinking they are: a combination os a sword and a gun. And before you think "hey, a rifle with bayonete is the same thing", well, it isn't. It differs from a rifle with a bayonet because the gunblade is designed primarily for use as a sword, and the firearm component is typically considered a secondary weapon, an addition to the blade, rather than the sword being a secondary addition to the pistol. Oh, and it's important to say that the two components of these weapons typically cannot be separated, unlike most bayonet-fixed rifles, for example.
When I first saw it, I thought it was from a steampunk movie or something, but turns out they're real! According to historians, some flintlock pistols of the 17th and 18th centuries were constructed as gun-swords, with the barrel of the pistol attached to the side of the blade of a shortsword or dagger. A shell guard protected the firing mechanism when it was used as a sword. These were commonly used by French and German hunters to kill wounded wild boar. It also appeared in other countries such as India, where they were called Katar, a thrusting dagger with two built-in pistols that could be fired by squeezing the bars of the handgrip together.
Sadly, though, pistol swords were not widely used and became uncommon relatively quickly, due to their expense and because instead of getting two weapons in one, one got a heavy pistol and a heavy, off-balance sword. So much for my awesome zombie killing weapon.