after reading Entering text in the terminal is complicated i was motivated to figure out a problem that has long vexed me: how do i edit a long command in my editor instead of in an interactive shell? for the last ~15 years i've just been writing stuff into a files and running them, and having those files laying around feels like finding cigarette butts on the beach.