Another short one but very useful trick in my moving from Linux to Mac series.
One of my most used shortcuts in the terminal is
Alt + ., which I adapted from my
bash workflow to my
when I started using zsh. It basically inserts the last word from the previous command. This turns out to be very handy
and I use it multiple times a day.
There is no out of the box way to accomplish this on Mac, unless you use
The first step is opening up iTerm preferences and navigate to the keybindings section.
Once in the keybindings section:
- In the dialogue select any Keyboard Shortcut you want. I used
Cmd + ..
Send Escape Sequence.
Saveand we’re done!
The next step is configuring zsh keybindings to process the
And viola, now the keybindings work. This process works
mutatis mundis for other keybindings that you want to import
from your workflow in bash/zsh from linux.