Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [iterm2]

iTerm2 is an open source Terminal replacement for OS X

Filter by
Sorted by
Tagged with
1 vote
0 answers
19 views

How to defer iTerm2 unopened tabs from starting up a shell?

I normally keep dozens of tabs open in several windows in iTerm2 on my Mac. But weeks or months can go by where I won't ever use them, I just keep it all organized in a way that each iTerm window ...
ojosilva's user avatar
  • 111
0 votes
0 answers
31 views

How do I make iTerm treat the Control key as both Control and Escape?

I already have my Caps Lock key mapped to Control in Mac System Preferences/Settings > Keyboard. How can I also make the Control key work as the Escape key when it's pressed and released, without ...
gcv's user avatar
  • 101
2 votes
0 answers
79 views

How do I get iTerm2's prompt to make marks when the prompt is Starship?

I've run into a situation where installing Starship breaks the iTerm2 shell integration feature of making each prompt a "mark". The only thing Terminal.app has that iTerm doesn't for me is ...
Evan's user avatar
  • 21
0 votes
0 answers
32 views

Play a sound after every command finishes in iTerm

I would like to play a sound every time iTerm 2 finishes a command. Shell I use is -zsh I.e. when I enter sleep 30 I would like it to play a sound, so I would know that the command has finished All ...
Azi's user avatar
  • 101
0 votes
0 answers
37 views

Tmux (?) or something (some other client?) adds `^@` or whitespace characters

I just wonder, sth adds ^@ or whitespace characters to my Tmux session. Tmux runs on another server, and I'm connected to it via Mosh. What could that be? In one pane, it is lots of of ^@, e.g. ^@^@^@^...
Albert's user avatar
  • 6,681
0 votes
0 answers
86 views

zsh syntax highlighter : Make corresponding parenthesis blink

I'm using the zsh-syntax-highlighting on MacOS (with iTerm2) and wonder whether I can configure it so that, if the cursor is on a parenthesis, the corresponding matching parenthesis on the command ...
user1934428's user avatar
0 votes
0 answers
149 views

Tab completion not working in zsh with custom script to change iTerm profile

I am basically following this (rather dated) gist by Hector Leiva because I want my iTerm color scheme to change when I ssh to specific hosts. I am using ZSH and oh-my-zsh. Everything is working (i.e. ...
Andreas's user avatar
0 votes
1 answer
343 views

Is there a way to get the current window size in iTerm?

I'm trying to create an iTerm action to paste the current window width into the current session. My first attempt just used a python coprocess to run a shell command, but not surprisingly, it always ...
GeneC's user avatar
  • 1
0 votes
0 answers
22 views

iterm2: Any good way to clear a plain-text password from terminal screen without deleting entire scrollback? [duplicate]

I occasionally need to set env vars with passwords or pin numbers or the like, and they appear in my backscroll. No one looks at my terminal or anything, but it would be nice to be able to clear my ...
Locane's user avatar
  • 391
0 votes
0 answers
50 views

column listing misaligned after pane resize in iterm2

So, I use iterm2 (on mac os 11), with multiple panes in one window (e.g. horizontal and vertical splits). Sometimes after resizing either the whole iterm2 window, or just one of the panes within the ...
Bee's user avatar
  • 101
1 vote
0 answers
125 views

Tmux sending wrong keycodes for "ctrl + arrowkey" and "ctrl + shift + arrowkey"

The problem I upgraded to MacOS 13.5 today and immediately noticed this issue. Inside of tmux (running in iterm2) when I perform ctrl + arrow-key or ctrl + shift + arrow-key the wrong keycodes are ...
JDN's user avatar
  • 301
1 vote
1 answer
615 views

How to delete all the color presets in iTerm2?

I imported a bunch of iTerm color presets from a github repo (didn't count, but it is 50+ if I need to take a guess). I know how to delete each of these individual color presets, but is there any way ...
Kiran's user avatar
  • 158
0 votes
0 answers
61 views

How can I get iTerm2 to colour-code remote tmux sessions?

Currently I have a script called et.sh, which ssh's into a server, and integrates with iTerm2's native tmux integration to display the tmux session in native windows; until ssh $1 -t "tmux -CC a -...
Shadowjonathan's user avatar
0 votes
1 answer
386 views

How can I prevent iTerm2 from printing environment information on startup?

I recently started using iTerm2 + Oh My Zsh to see what the hype was all about. While it's cool, I had some issues getting it to work properly. Specifically, it wasn't recognizing standard commands ...
Mike Ciffone's user avatar
0 votes
0 answers
99 views

How do I stop programs from clearing iTerm2's scrollback buffer?

I never under any circumstances want some random program to send an escape code and clear the scrollback buffer in iTerm2. (In the unlikely event that I want the scrollback buffer gone, I'm perfectly ...
Nathan Tuggy's user avatar
0 votes
0 answers
127 views

Auto apply backslash to pasted text in iTerm2, that contains '?' (indicator to the start of query string in URL)

Previously, I could paste a website URL (Ex. https://www.youtube.com/watch?v=VIDEO_ID) after copying from the browser URL section, onto iTerm2 window. It would escape the question mark and equal sign, ...
Kiran's user avatar
  • 158
1 vote
0 answers
136 views

bindkey to Alt + Shift + p has no effect

Capital p with Alt and Shift no longer seem to register as keystroes on my Mac OS with iTerm 2 (or Terminal). Therefore this key has no effect: bindkey -s "^[P" "echo 'I cannot trigger ...
Sridhar Sarnobat's user avatar
0 votes
1 answer
413 views

Terminal continues to open chrome, even though firefox is default browser

I recently updated my default browser from Chrome to Firefox. I am working on a MacBook Pro. If I run a local app(ex: localhost:8000), such as a react app, iTerm2 will open Chrome, instead of Firefox. ...
Jamie's user avatar
  • 101
0 votes
1 answer
58 views

Streaming outputs to another window without running the same commands again on iterm2

First of all, I think every command running consumes some resources. So if I'd like to have another window displaying the same output of the same commands being run on another session without running ...
11100100's user avatar
2 votes
0 answers
776 views

Easiest way to switch NeoVim Control key shortcuts to command key

tl;dr Searching for a way to replace all shortcuts in neovim that use the control key with the command key on Mac -- I just got started in using neovim as my main code editor However I find hitting ...
unnamed-dev's user avatar
0 votes
1 answer
1k views

how to change the main color of iterm2

I was trying to change the main color of iterm2 using the foreground color, but I discovered that it only affects some text but not all text: same goes if I launch mysql on command line, it takes the ...
abbood's user avatar
  • 1,284
0 votes
1 answer
72 views

How do I send the 'setMark' escape code in Windows Terminal or iTerm2?

Windows Terminal now supports setMark which originally came from iTerm2. How do I add a mark (non interactively, ie so I can use this in my $PS1)? The docs have a screenshot of the relevant text ...
mikemaccana's user avatar
1 vote
0 answers
76 views

Applescript cannot find file that exists

Big picture, I am trying to create an applescript that allows me to open files in neovim from Finder. Though I have found several resources for doing this, none work exactly as-is, so I have to do ...
Catyre's user avatar
  • 11
0 votes
1 answer
375 views

How do I move panes in iTerm2 when the pane title bar is disabled?

I find pane title bars visually unnecessary. But they seem to be the only way to move panes around? Is there another way to move them? I'd rather have them disabled.
pixelearth's user avatar
  • 1,004
1 vote
1 answer
1k views

Automatically reconnecting to SSH with iTerm2 and tmux integration

I am SSHing into a remote server with tmux using iTerm's tmux integration as so: ssh $myhost -t "tmux -CC a -t main || tmux -CC new -A -s main" However, when I walk away from my mac for 30 ...
Daniel's user avatar
  • 111
0 votes
0 answers
66 views

Why do my settings in iTerm2's Bash shell not translate into Tmux sessions?

I installed Bash via Homebrew and when I type in which bash I get /opt/homebrew/bin/bash. I also changed the default shell from Z to Bash as well and made custom color configurations. When I create a ...
Sean's user avatar
  • 113
0 votes
1 answer
236 views

MacOS doesn't update custom Services hotkeys (iTerm2 specifically) after editing them in System Preferences

I'm on OSX Ventura 13.1. I've added a hotkey to open iTerm2 in selected folder, but the new hotkey doesn't appear in Finder menu and doesn't work. How do I synchronise what's actually in Finder and ...
Lyosha's user avatar
  • 11
0 votes
0 answers
34 views

tmux windows in iTerm2 keep on snapping to 54x31 characters

I am running iTerm2 v3.4.18, connecting to tmux 3.3a on CentOS 7.9. I regularly open new windows in my session using tmux new-window (usually to run vim in it). Frequently (I think more frequently ...
Marcin K's user avatar
  • 146
3 votes
1 answer
3k views

How do I get mouse scroll in less to work in iTerm2 like it does in Terminal?

On macOS Ventura, on a MacBook Air, with a fresh user account and default settings, in Terminal.app, I can run man less and then use my trackpad to scroll down the manpage -- equivalent to hitting j ...
NReilingh's user avatar
  • 5,775
1 vote
0 answers
154 views

Junk characters shows up when ssh to a server and execute tmux

When I execute tmux on iTerm on MacOS, it works fine. When I execute tmux on WSL on my Windows PC, it works fine. However, when I ssh into my PC from my Macbook, execute WSL and execute tmux, weird ...
SH Chen's user avatar
  • 11
2 votes
4 answers
2k views

How to open a new vscode tab but not a new vscode window when using "code ." in terminal?

As the title says, I input "code ." in my iterm2 terminal to open a folder in my vscode, and want it be opened in my current vscode window(in other words, in a new tab), but not create a new ...
peilin's user avatar
  • 21
1 vote
1 answer
238 views

Is there a way to get zsh to "forget" the casing of a filepath for tab completion?

zsh somehow "learned" imporper casing of a directory which contains code. Now whenever I tab complete, it always uses the invalid case. I'm on OSX so the filesystem is case-insensitive. ...
Chance's user avatar
  • 229
1 vote
0 answers
145 views

Switching to iTerm window does not have cursor active

I have an iTerm2 running on fullscreen mode, but whenever I switch to it either by using ⌘ + tab or by swiping between windows, the cursor is not active and it requires clicking on the window to make ...
Sinstein's user avatar
  • 387
2 votes
1 answer
1k views

Iterm2 fully clear scrollback within ssh

I am sshing into a server from my mac on Iterm2. The commands that I run on the server produce lengthy outputs that I want to clear the scrollback before running each. So, I decided to use clear ...
Bat's user avatar
  • 159
0 votes
1 answer
510 views

Why can't I scroll or use ctrl-a/ctrl-e when using screen?

I use iTerm2 and I realized that when I'm using screen: ssh -t [username]@[domain].edu 'screen -DR' I noticed the following vagaries: I can't use my mouse to scroll up and down in an iTerm2 window I ...
O.rka's user avatar
  • 285
0 votes
2 answers
120 views

How to write Iterm2 Scripts with single quotation marks

I'm trying to write a script in Iterm2 This should set a title on the current Tab await session.async_send_text('export PROMPT_COMMAND='echo -ne "\033]0;TAB TITLE\007"'\n') But I'm getting ...
Dids's user avatar
  • 1
1 vote
0 answers
99 views

Long boot time of a new window in iterm2 on Macbook Pro M1 Pro

I have been using iterm for a few years. I have recently switched to a new macbook M1 Pro and had to reinstall everything. I use zsh with powerlevek10k however when I open a new terminal in iterm it ...
Patryk Petryszen's user avatar
1 vote
0 answers
439 views

change bell sound in iTerm2

I found several answers on how to silence the bell in iTerm2 or add visual alerts to replace it. I do find the audio bell useful, but I'm starting to hate the default sound. I only want to change its ...
Salomanuel's user avatar
0 votes
0 answers
723 views

iterm2 not restoring remote SSH session over VPN

Working with macOS Monterey, I am not sure if I understand the session restore feature of iterm2 I have lot of SSH sessions to remote VMs over VPN. I put the mac to sleep and when I resume, I thought ...
viral_mutant's user avatar
1 vote
1 answer
2k views

How to re-map Iterm2 Ctrl+L and Ctrl+D to Cmd+L and Cmd+D

Migrating from Ubuntu to Mac, my muscle memory is to use Ctrl+L and Ctrl+D to clear screen and exit shell for bash Using iTerm2, I repeatedly press Cmd+L and Cmd+D which either doesn't have any effect ...
viral_mutant's user avatar
1 vote
0 answers
356 views

How to change the font color in the title of iTerm 2?

Does anyone know what option should I put in .zshrc to change the font color in the title of iTerm from grey to white? I spent 24h and still couldn't find the right option because there are a lot of ...
Chris Caro's user avatar
1 vote
1 answer
887 views

Is it possible to set the default iTerm profile using CLI?

I'm trying to write a MacOS provisioning script for iTerm2 which will (1) load in a dynamic profile and (2) set it to use as the default profile. Loading the profile is just a matter of putting it in ...
slifty's user avatar
  • 1,569
0 votes
1 answer
728 views

iTerm2 clear screen should not delete output of running command

When I used command + k the output of the actual running command was not cleared. Now with my new MacBook I don't know how to set this feature again. Has anyone an idea?
Ben Keil's user avatar
  • 101
2 votes
1 answer
880 views

Is it possible to set separate fish color configurations for light and dark system theme?

I use a terminal (Iterm2 Beta) that allows you to set a separate theme for light and dark mode. This is useful for changing the background color of the terminal, and the contrast of the various preset ...
Cypress's user avatar
  • 121
32 votes
2 answers
22k views

How do I disable the beep/bell sound in iTerm2 in macbook?

The shell in macbook makes annoying beep/bell/boop sounds. For the OEM terminal, this answer works on disabling this annoying sounds: https://stackoverflow.com/questions/19166539/i-want-to-disable-...
rrlamichhane's user avatar
3 votes
0 answers
3k views

Why running iTerm2 the first time installs pip3?

When iTerm2 is run for the first time on a Mac, it starts installing pip3. I am trying to understand why. In my case I was on a slow network and the install would have take 3 hours, so I stopped the ...
Naresh's user avatar
  • 209
0 votes
2 answers
729 views

Can't open files in Sublime Text 4 by clicking on paths in iTerm2 after upgrade

I just upgraded Sublime Text 3 to Sublime Text 4. (and love it!) Now, I can no longer click on filepaths in iTerm2 and have them open in Sublime. I didn't notice for a few days, so I didn't ...
David Hempy's user avatar
2 votes
1 answer
1k views

How to map Command key to Control key when using iTerm

I already mapped "Caps Lock" key to "Command" key using System Prefrences of macOS, as I use "Command" key frequently when using most application. When using iTerm2, I ...
aruku7230's user avatar
  • 153
0 votes
1 answer
518 views

With PowerShell set iTerm2 tab title

I'm using PowerShell as my shell with iTerm2 on macOS. I know it's possible on bash and zsh but running the recommended solution doesn't work in powershell, because the ANSI escape doesn't work: PS ~&...
Carl Walsh's user avatar
0 votes
0 answers
645 views

Cannot open new tabs or windows in iTerm2 after upgrading to Bug Sur

After upgrading to Big Sur (11.2), I can no longer open new tabs (Command+T) or windows (Command+N). iTerm2 flickers, but nothing happens. I also cannot split. I can still duplicate an existing tab ...
dimitriy's user avatar
  • 101

1
2 3 4 5
8