Get yourself one of these, its a cable luber (looooober). I found this sucker at a local motorcycle shop for $11. All you do is remove your housing from your derailleur, slide the cable so it’s not sticking out. Place the luber onto the end of the housing, tighten it down.
Then insert the red straw of your favorite aerosol lube, and fire away! The rubber grommet creates a seal and forces the lube into the housing. After applying the lube, reverse the process and reinstall your cable/housing and go for a ride. Nothing feels better than a smooth shifter!