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