I think !$ will do similar, at least in bash.
(I'm on a phone and normally rely on muscle memory so it might be the wrong symbols).
(I'm on a phone and normally rely on muscle memory so it might be the wrong symbols).
ls foo.txt !$
ls: ls: No such file or directory
foo.txt