I've used these before, and particularly like shell-expand-line for editing my path.
Put this into ~/.inputrc and arrange to re-read it (say, by starting a new shell).
$if BashNow you get this behavior from the shell (which is giving you command-line editing throug readline(3) ).
$ PATH=$PATHI can get a lot of his tricks to work, but I can't bind "yank-last-arg" in vi mode. Works fine in emacs mode (Meta-.), but I'm a vi guy. I'm doing something wrong, but I don't know what.
# now type control-x
# and the path is there, ready for editing