That's the `insert-last-word` widget which in `emacs` mode is bound to `Alt+_` and `Alt+.` by default.
So
$ ls ~/Documents/some/dir
$ ls Alt+_/file.txt Alt+_
Or you can use the `$_` special variable, or csh-style history expansion (`!$`) if you prefer.