5 ms·
Me too. Nothing beats the "CTRL + SHIFT + G" option (open last output in less); no other terminal has it.
by ivolimmen 2y ago
Me too. Nothing beats the "CTRL + SHIFT + G" option (open last output in less); no other terminal has it.
- akx 2y agoiTerm2: cmd+shift+a = select output of last command. I can then cmd+c, open whatever editor I want (or `pbpaste | less` if I want `less`).
- Tyr42 2y agoTIL, thanks.
- anbotero 2y agoIt always appears greyed out for me, Hotkey Window and default profile as well. Any idea why might it be? Thanks!
- akx 2y agoYou haven't installed the shell integration, likely. https://iterm2.com/documentation-shell-integration.html https://iterm2.com/documentation-shell-integration.html
- klibertp 2y agoI wrote something similar on top of TMUX and zsh. I use zsh hooks to dump the current TMUX pane to a file (/tmp/lastcmd) just before a new prompt is displayed; I also set variables $O1, $O2, ... to respective output lines. It never occurred to me to bind `less /tmp/lastcmd` to a key, though - good idea :) (BTW: the problematic part was to make it fast enough not to be noticeable. The code that dumps the pane contents and searches for the start of the last output is written in Nim, in effect.) It was possible in TMUX because it gives you programmatic access to the pane's content. It's probably possible to do the same with some terminals - urxvt uses Perl as an extension language, for example - but TMUX provides a compatibility layer, which means I don't need to rewrite the whole setup if I change the terminal emulator.
- jemmyw 2y agoI didn't even know about that and I've been using kitty for years
- ossusermivami 2y agotry kitty-scrollback as well https://github.com/mikesmithgh/kitty-scrollback.nvim https://github.com/mikesmithgh/kitty-scrollback.nvim for scrolling back via neovim...