Different experimental studies have reported anomalous diffusion in brain tissues and notably this anomalous diffusion is expressed through fractional derivatives. Axons are important to understand neurodegenerative diseases such as multiple sclerosis, Alzheimer's disease, and Parkinson's disease. Indeed, abnormal accumulation of proteins and organelles in axons is a hallmark of these diseases. The diffusion in the axons can become anomalous as a result of this abnormality. In this case the voltage propagation in axons is affected. Another hallmark of different neurodegenerative diseases is given by discrete swellings along the axon. In order to model the voltage propagation in axons with anomalous diffusion and swellings, in this paper we propose a fractional cable equation for a general geometry. This generalized equation depends on fractional parameters and geometric quantities such as the curvature and torsion of the cable. For a cable with a constant radius we show that the voltage decreases when the fractional effect increases. In cables with swellings we find that when the fractional effect or the swelling radius increases, the voltage decreases. Similar behavior is obtained when the number of swellings and the fractional effect increase. Moreover, we find that when the radius swelling (or the number of swellings) and the fractional effect increase at the same time, the voltage dramatically decreases.