Joined January 2014

Rob Speed

Nowhere in particular

Posted to iTerm2 + Tmux + Cmd-K over 1 year ago

I use this to prevent things from getting wonky when I reflexively hit cmd-k when in a program that doesn't share the its buffer with tmux:

bind k if-shell -F "#{alternate_on}" "#" "send-keys -R; clear-history; send-keys C-l"

It wraps the screen-clearing command with a check to see if you're currently in alternate screen mode, and does nothing if you are.

30 Karma
0 Total ProTip Views
Interests & Skills