chubin / cheat.sheets

cheat.sh cheat sheets repository
MIT License
591 stars 210 forks source link

Add bash shortcut for second last argument #171

Closed spaceone closed 2 years ago

terminalforlife commented 2 years ago

Interesting. I just tried doing that, but aside from seeing (arg: -1) and that number changing depending on the number I enter, nothing seemed to happen. Maybe it's just my BASH configuration or version (4.4). I've used Esc + . for years though, as I find it more comfortable and easier to type than Alt + ., probably due to years of Vim. Lol

chubin commented 2 years ago

I believe, Alt + . and Esc . is basically the same, but it is more precise to write Meta (or M) instead of Alt, because Alt is not always mapped to Meta, it depends on your keyboard layout, but quite often it is. And Esc is always simulating Meta. That's why they have the same effect, but the canonical form for these key combinations is Meta-. or M-.