Hacker News new | ask | show | jobs
by jimhart3000 4545 days ago
For some reason when I try this in iTerm2, it jumps to a different command in my history. No idea what's going on there...
2 comments

Terminal does the same (for me). It's because opt-clicking above the line sends some up arrow keystrokes, which the shell interprets as moving back in history. In iTerm2 nightly builds (which are less stable than the betas) you can disable opt-click to move the cursor in prefs>profiles>pointer.

What's more interesting is the possibility of using the new shell integration features (https://code.google.com/p/iterm2/wiki/ShellIntegration) to turn off this feature just at the shell prompt. I'll open a feature request for that :)

I saw this too... It looks like when you opt-click above the current line, it jumps back in your history by... the same number of lines as your cursor is above the current line? Sort of an unusual feature. Nevertheless, when I'm careful to actually click on the current line, it works as described.