4 ms·
The "^[." (esc-.) keybinding. In zsh it maps to insert-last-word which allows you to do this: echo hi > /tmp/blah.txt ls -l <esc-.> There's a bunch of
by philjackson 15y ago
The "^[." (esc-.) keybinding. In zsh it maps to insert-last-word which allows you to do this:
echo hi > /tmp/blah.txt
ls -l <esc-.>
There's a bunch of complementary commands to go with it too.
- sjs 15y agoIs this only in zsh? I've been recommending this and not marking it explicitly as a zsh thing. alt-. works too. In the shell ESC <foo> is the same as alt-<foo>. The difference being that with alt-<foo> you hold alt and press <foo>, then release them both. with ESC <foo> you press escape, release, and then press and release <foo>.
- philjackson 15y agoIt's bash too.