I think you'd need to have space in WORDCHARS
and as there doesn't seem to be a way to define rules around their use, I'm not sure there's a way to make that work. Maybe there's a way to define a custom Emacs macro that the command line can reference. If there is a way to do either of these it's beyond my familiarity and I'd happily defer to someone in the know.
Not the answer you were looking for
This isn't a direct answer to the question as posed but it is something you could do along the lines you describe, using built features (caveats to follow):
Change the line editor method to vi
set -o vi
Then you could try to remember to type this little beauty:
Esc2dF"x
or Esc2dF'x according to the quotes in use.
It doesn't really roll off the fingers, but you can at least press . to repeat if you want.
Caveats
It's just searching backwards twice for an instance of the given quote and deleting everything that's in the way (with no appreciation of syntax, context etc). Given this was your command line, and your cursor was lying at the end:
echo "foo bar" baz
You would end up with
echo<space>
Or if you started with
echo "foo bar" baz "boz
You would end up with the equally not-quite-what-I-wanted
echo "foo bar
You'd need to be in vi
mode before you started typing, so you'd have to set it in your profile or some such.
Having vi
as your editor at the command line is something of a paradigm shift and will probably be a fight against muscle memory -- and that really doesn't seem like much fun.
So...
I'd probably stick with smashing CtrlW a few times myself.
If you accidentally overdo it, there's always undo Ctrl_.