Questions tagged [iterm2]
iTerm2 is an open source Terminal replacement for OS X
361
questions
0
votes
0
answers
299
views
Why would iTerm2 need to record the computer's screen?
I finally installed iTerm2 on my Mac to improve my efficiency working in the terminal. Right out of the box it's been great. I got a popup saying "iTerm would like to record this computer's ...
2
votes
2
answers
6k
views
"No such file or directory: ~/.oh-my-zsh/oh-my-zsh.sh" even though file exists
I was trying to transfer my terminal setup (iTerm2, zsh, oh-my-zsh, omz themes) from an old MacBook to a new one.
.zshrc real file is in Dropbox shared between the two laptops, and in each laptop ...
1
vote
1
answer
2k
views
iTerm2 + oh-my-bash: iTerm2 shell-integration not working
I cannot get iTerm2's shell integration work with oh-my-bash. I already tried the suggestions in the existing posts but without luck. My configuration looks as follow:
iTerm2 profile
General -> ...
9
votes
2
answers
3k
views
Garbage characters are printed on mouse scrolling on iTerm2
Sometimes whenever I use my mouse to scroll on iTerm2 the scrolling does not work, instead printing a lot of garbage characters on the screen.
This happens very inconsistently. Sometimes it happens ...
10
votes
0
answers
8k
views
Why is iTerm2 is super slow on macOS BigSur?
I am super bummed out: My iTerm2 commands that were previously fast before Big Sur now crawl. Worse, when opening a new terminal it can take up to 50 seconds for the shell prompt to return.
What is ...
1
vote
1
answer
927
views
'Make text smaller' actually reduce the size of the window with terminal or iterm2 in mac, instead of the font size
If I am in full screen mode the shortcut cmd+ and cmd- increase or reduce the size of the text, as it should. Otherwise the shortcuts just reduce or increase the size of entire window, they don't ...
1
vote
1
answer
99
views
iTerm terminal emulation is weird
Recently, I switched to iTerm because a lot of people recommends it, but it behaves quite weirdly. It does not automatically enter "alternate screen mode" if less/man/similar commands are ...
0
votes
1
answer
6k
views
How to uninstall iTerm form the mac?
How can I uninstall iTerm from my Mac? I searched a lot on the Internet but I didn't find any helpful Informations.
I want to mention too that I installed iTerm without using Homebrew.
0
votes
1
answer
1k
views
"Could not resolve host: github.com" error when trying to run "git pull" in iTerm2
I ran into this error when trying to pull the latest contents of a repository in iTerm2. Removing the origin and re-adding it did not resolve the issue. However, restarting iTerm2 completely resolved ...
1
vote
1
answer
5k
views
How to change default shell in iTerm2 via command line?
How to change iTerm2 shell via CLI?
I want to change the user's iTerm2 preferences.
I've taken a snapshot of iTerm2's preferences:
defaults read com.googlecode.iTerm2 > iTerm2.original.defaults
...
0
votes
1
answer
636
views
How to bind Command-b to move back by a word in iTerm/ZSH?
I just installed iTerm and have ZSH because I have Catalina.
I used to have Bash and Catalina instead, and an iTerm installation on a different laptop that I have gradually configured over the years.
...
1
vote
2
answers
2k
views
How to configure zsh to clear history on exit?
This used to be the default behavior on iTerm2 before I upgraded to macOS Calalina.
1
vote
1
answer
156
views
Is there any way to enable a backup of the current directory to take place when an rm command is issued?
I know how dangerous rm can be, and I'm unfortunately not a very responsible person at all. I know that I need to learn, but while I'm in the process, I need some help.
Is there any way to create a ...
2
votes
1
answer
504
views
iterm2 different directory for sourcing zshrc
I started playing around with shell scripting and set up zsh via iTerm2 on my MacBook. I set a zsh directory in .config so to organise my .zshrc and .zshenv config files, but when I launch iTerm2 it ...
1
vote
0
answers
151
views
iTerm now showing cursor when pressing Shift + arrow key
As you can see in this picture, iTerm is adding a kind of overlay cursor (plus this paper icon) above the terminal windows when I press Shift + any arrow key. It seems to be a text selection tool or ...
1
vote
1
answer
3k
views
My Bash or zsh or terminal not working anymore
I know this is probably a simple fix.
But I had my terminal set up perfectly, using a bash profile as default. Then i installed iTerm and now nothing works.
I cant even run the ls command when in a ...
2
votes
0
answers
549
views
Git autocomplete not working on macOS Mojave 10.14.5
I've tried everything I've found on the internet but nothing seems to work. Things I've tried:
Instruction in the git book for bash environments
This medium post
Tried with brew install bash-...
0
votes
0
answers
3k
views
Anaconda on machine but conda command not found
I haven't used Anaconda in a while, I typed conda info into iTerm2 to read this error:
zsh: command not found: conda
I have copied the relevant .bashrc file information into the .zshrc file and still ...
1
vote
1
answer
1k
views
How to map a keyboard shortcut to CTRL+R in iTerm 2?
I am trying to map the Command + Shift + Z shortcut to what vim uses for redo, CTRL + R:
What is the proper code I should enter in? It seems that \c is not the correct code, but I cannot find it on ...
1
vote
1
answer
39
views
Finish command from history
A couple of years ago I enabled "finish text" command on iTerm2 + ZSH. For example, if I had "git commit" in my command history in a new command window if I typed "gi" "t history" would be viewable ...
46
votes
5
answers
28k
views
Pasting 'required text' into terminal emulator results in '^[[200~required text~'
I have noticed that when pasting into a terminal emulator, both on macOS (using Terminal.app or iTerm2.app) or in Linux (using urxvt) sometimes I get extra characters.
The characters are always the ...
1
vote
0
answers
136
views
Mac Terminal or iTerm: Copy the current command (not including prompt)?
I am using Terminal or iTerm (iTerm2). Let's say I've typed in a command but haven't hit enter yet. Or maybe I used the up arrow to navigate through my command history. How do I copy the current ...
5
votes
2
answers
3k
views
Create SIGINT (Signal Interrupt) Shortcut for iTerm2
How can I create a shortcut to send a signal interrupt in iTerm2?
Ctrl+c is the default, but I would like to have Command+. (dot/period) send a break signal as it currently does in Terminal.
0
votes
1
answer
221
views
Is it possible to use choose-tree mode with iTerm's tmux integration?
I've discovered that iTerm is able to natively integrate with Tmux nicely, even over ssh. However I currently cannot find a way to use the choose-tree mode, which nicely displays all the available ...
1
vote
2
answers
3k
views
How can I move the vim cursor with the mouse wheel in iTerm2?
This currently works as I want it to in the regular Mac Terminal, but not in iTerm2. Currently, using the mouse wheel shows my terminal and moves vim down.
To be clear, I don’t want to scroll the ...
7
votes
2
answers
5k
views
Change tab character width in iTerm2
The tab character in iTerm2 seems to be rendered as 8 spaces by default. Is there any way to change this to, say, 2 or 4? I didn't find anything in the iTerm2 preferences or documentation.
0
votes
1
answer
507
views
how can one put a shadow around an iterm2 window
In iterm2 Build 3.3.2 under defaults, if several windows are open, their
boundaries are difficult to distinguish visually. All windows are uniformly the same color. There is no shading around the ...
0
votes
1
answer
444
views
Weird terminal bug(?) - have to control+c after every command
I'm having a weird issue with both terminal and iterm, where when I cd into a specific directory (and every subfolder), I have to control+c to 'exit' after every command that I run, and only then can ...
0
votes
1
answer
719
views
iterm2: I maximize a pane and alt+tab to something else and when I return the pane is restored to its previous size
I am using iterm2 with tmux integration and I have two problems.
I frequently have multiple panes in a single tab with one of the panes maximized. If I alt+tab out to, say, my browser, then when I ...
1
vote
0
answers
3k
views
How do I turn the dollar sign onto a new line in terminal?
In a terminal window I want to be able to enter commands on the next line
Instead of:
Something-MacBook-Pro-2:~ someone$ <command>
I want:
Something-MacBook-Pro-2:~ someone
$ <command>...
4
votes
1
answer
2k
views
Change background color of tmux pane depending on remote hostname
If I ssh into a remote server from tmux in a single pane, is it possible to change the background color of the pane based on the server name?
Let's say all my prod servers start with prod_XYZ and a ...
2
votes
1
answer
562
views
Change Tmux background colour of zoomed pane
I'm using iTerm2 and Tmux.
I would like to change the background colour of a Tmux pane but only when zoomed. I know there is a window_is_zoomed flag and I am wondering if I can us this in a if-shell ...
4
votes
1
answer
3k
views
How to disable screen flashing on error while using iTerm2?
Using Mac OS Mojave, iTerm2 build 3.2.9, I noticed that when I backspaced on an empty command line, the whole screen flashes white briefly. How can this be disabled?
I checked Preferences > ...
1
vote
1
answer
2k
views
How to delete commands from iTerm2's command history (Cmd+Shift+;)
I like the iTerm2's Command History feature, Cmd+Shift+;, to quickly find a command from the history.
But there are some commands that I want to remove from the list, I already run command like sed -...
2
votes
1
answer
3k
views
How can I change the line height in iTerm2?
I've tried looking through iTerm2's text preferences, but I don't see a way to change line height.
How can I add more space between lines in iTerm2 for Mac?
1
vote
1
answer
152
views
VIM startup symbols in status
I am trying to move to VIM as my main text editor, already spent a lot of time setting everything and reading about VIM.
Now everything is pretty much ok, except one thing that bothers me all the ...
2
votes
0
answers
660
views
Configure key to turn off mouse reporting in iTerm2
Currently, mouse reporting is disabled using the option key. Is there a way to configure this to shift key i.e. I hold down shift to select text instead of option. I don't want to permanently remap ...
0
votes
1
answer
190
views
zsh / oh my zsh rendering and running a slightly mistaken command
I've searched for this, but I haven't found a match. Even though I think it has to do with completion errors (of which there a few posts), my Zsh has a different and undesired outcome.
When I go 'up' ...
1
vote
1
answer
255
views
how can I center the view horizontally in vim while still wrapping at 100 characters?
here is what it would ideally look like: before
after
I tried DistractFree but even ignoring the errors I get, it doesn't center and adds '|' columns etc.
I tried this gist too but it results in a ...
12
votes
1
answer
11k
views
Iterm2 : how to display status bar
In the Iterm2 online docs:
Go to Preferences > Profiles > Session. Turn on Status bar enabled.
but I don't find this setting in the preference pane:
Preferences screenshot
Obviously the version ...
1
vote
0
answers
509
views
Occasional issues switching between Chrome and iTerm2 on macOS Mojave
I'm running an up-to-date macOS Mojave system. I'm using iTerm2 (Build 3.2.8) in full-screen mode, and I'm also running some other application in full-screen mode on other desktops.
Occasionally, ...
2
votes
1
answer
1k
views
Iterm2: ^[[A, ^[[B Appearing on python3 interpreter
I am using macOS Mojave and Iterm2: 3.2.7beta4. This is an issue I am seeing with python3 interpreter. When I type the arrow keys to move the cursor or to run the last command, I see
^[[A, (with up ...
2
votes
1
answer
2k
views
My iTerm font seems to dark for me
My iTerm font seems to dark for me. Any idea to change the brightness?
22
votes
2
answers
12k
views
Enter key prints ^M in certain situations in iTerm
I am using iTerm2 on a Macbook Pro running MacOS Mojave.
In certain situations, such as when doing a git add -p, pressing return ends up printing ^M instead of performing the action.
Stage this hunk ...
0
votes
0
answers
647
views
Bring launched processes to foreground in OSX?
I recently installed the suite of qemu utilities (using brew if that matters) on OSX Mojave. QEMU is working as expected, though it does not have focus when launched from the terminal (iTerm, ...
4
votes
1
answer
5k
views
On macos, LC_CTYPE set to wrong value - where to change for iTerm2?
On my system, the locale variable LC_CTYPE is set to an illegal value, which causes issues on Linux systems. It's set to:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"...
1
vote
1
answer
375
views
Homebrew + PHP + iTerm
I just recently switched over to iTerm instead of the default Mac terminal. Everything works well except php. For some reason, even though both iTerm and Terminal are using the same zsh shell, iTerm ...
1
vote
0
answers
320
views
iterm2 colors not changing in when changing ANSI Colors
When I change the ANSI colors in prefereces> profiles> colors >ANSI colors, the colors do not actually change in iterm. They change if I open tmux in iterm2 but not in the actually in iterm. Why is ...
1
vote
0
answers
229
views
Synchronize color scheme between Mac and Linux
I use iTerm2 in Mac, and frequently access Linux machines through ssh. I find that the color schemes (e.g. the colors in the output of ls, grep, emacs, vim) are always slightly different between Mac ...
3
votes
1
answer
3k
views
iterm2 imgcat not working at remote
I'm using iterm2 on a mac and ssh-ing into a remote RedHat host. When I try viewing an image in the terminal using imgcat, I just get a placeholder icon.
I have no idea why it's failing. Any ...