Try an electret:
This is a substance with a surplus or shortage of electrons. It's a non-conductor so the charge has no real way of dissipating, but is trapped in the material.
These are real: You can make one yourself if you have access to a very high voltage DC generator. A Van de Graff generator or Whimhurst machine works well.
- Take a largish surface of smooth non-conducting material.
- Tape a square of aluminum foil to the surface, and run anc electrical lead out.
- Spray with a non-stick agent (Pam, fiberglass mold release wax, diesel fuel...)
- Prepare an aluminum pie pan by attaching a lead to it and spraying the bottom with release agent.
- Melt a bunch of polystyrene plastic until moderately runny.
- Attach the lead from the pie-plate and the lead from the foil to the output terminals of the high voltage generator.
The next steps need to happen as fast as possible:
- Pour the molten plastic on the aluminum foil.
- Push the pie pan down firmly squishing out the plastic. Put a lead brick or small steel ingot on it to keep the pressure.
- Turn on the generator.
Relax. Have a beer. You didn't short 50 kV to ground.
- wait for the plastic to cool.
- peel off the pie plate.
- peal the plastic off the surface. Remove the foil if it came too.
You now have an electret. This is the electrical equivalent of a magnet, with a permanent + charge on one face and a - charge on the opposite. You can test it by all the cute things you did with temporary static things. Separate pepper from salt. Play with pith balls.
Ok Get to the point. Where's my variable sword.
Extend this idea: You have seen how the big insulators on power lines have nested glass cones. Do this, writ small:
At the core is a strand of your equivalent of Sinclair Monofilament, or shadow square wire. Very high tensile strength. Suppose this material is 100 nm in diameter.
On it you string 10 micron disks 100 nm in thickness. Each disk is an electret. They are oriented with like faces two disks facing each other. Except that instead of making them with a measly 100 kV van de Graff, you but real charge on them. The charges repel, so each disk tries to keep the wire straight.
Another way would be to do the same thing with disks of room temperature super conductors. Induce a monster current in each one. Adjacent disks have opposing magnetic fields. (Yes, each type of super conductor has a magnetic quench value where it stops being an SC. I don't know the limits of this.)
While it would spring out with ease, eclair and savoir-faire, retracting it into the hilt would require bending it would would take work. Much like a switchblade or stiletto.
Downsides: Electrons leak off of electrets. Room temp super conductors are still magic. I suspect that there would be interesting side effects from having this intensity of magnetic field or electric field in a small space. E.g. Waving the superconductor version near any metal object would set up eddy currents in the object that would slow the swing. I bet the current computer chips would be seriously unhappy about someone waving this around them.