1 2 3 4 5 6 7 8
function prevd-or-backward-word --key-binding if test -z (commandline) prevd else commandline -f backward-word end end