Questions tagged [iterm]

iTerm is a third party replacement for the built-in Terminal application.

Filter by
Sorted by
Tagged with
0
votes
1answer
29 views

iTerm2 - zsh - keep history of commands when opening a new pane

with zsh on MacOS Catalina, when I split my current window of iTerm2 by opening a new pane, I would like to be able to keep in this new pane the history of commands of previous pane (which is still ...
0
votes
1answer
21 views

How can I get .zshrc to run in its entirety every time I open zsh

Here is the entirety of my .zshrc. alias ll='ls -l' export HOME='/Users/rcorty/Dropbox' This file is at /Users/myname/.zshrc. When I start iTerm2, I check whether the home directory was reset by ...
0
votes
1answer
15 views

iTerm unresponsive as xcode attempts (and fails) compiling every startup

Very recently, iTerm has become unresponsive for me when I open new instances of it. Whenever I open a new window or tab of iTerm, Xcode seems to be attempting to recompile a slightly older version of ...
0
votes
2answers
34 views

Can't launch Finder window from terminal on Mojave

open isn't behaving as expected on Mojave. Running open /Library/ gives LSOpenURLsWithRole() failed with error -600 for the file /Library. This happens regardless of the opening location. I'm ...
0
votes
0answers
12 views

iTerm2 Supply PWD to coprocess in capture output trigger

How do you supply PWD to a coprocess script? For instance, given the below trigger: When I double click the captured output, it runs the script: ~/rerun_test.sh supplying the filename that was ...
1
vote
0answers
25 views

Select last part of a string in iTerm2 using standard shortcut

Using iTerm2, I am currently typing this command (notice the cursor at the end of addons): If my terminal would be like any other text input I use on my Mac, I could use the shortcut Alt + Shift + ...
0
votes
0answers
6 views

Arrow keys in insert mode in vim

When I'm in insert mode in vim and I use the arrow keys, it sends what seems like a letter and a carriage return. For example, pressing ↑ it sends: A It looks like A\n but I'm not sure exactly what ...
0
votes
0answers
7 views

How to send an arrow key in iTerm2

Is it possible to send an arrow key in iTerm2? I've been able to send almost any other character, by using either an escape character, such as \<C-a> or entering in the character directly, such ...
0
votes
1answer
43 views

How do I do Home and End in iterm2?

Home and End do nothing in iTerm2, nor do ⌘← and ⌘→. However, Ctrl-A and Ctrl-E do work. Can Home and End do this? Preferences->Keys_Key Bindings in iTerm2 do not offer a "Start of Line" or "End ...
1
vote
1answer
39 views

Launch terminal program from macOS app

I use Fork and I'm trying to set up a custom command that will open a file in Vim. I'm not using MacVim, so the command needs to open a terminal, preferably iTerm2. Executing /usr/local/bin/vim doesn'...
0
votes
1answer
26 views

ZSH issue with colorized prompt and double slash, i.e “//” appearing when I am into root

I am faced to a problem of appearing slash / appearing double slash into PS1 when I am located on root / . I explain more precisely, I have in .zshrc : setopt PROMPT_SUBST slash_color () { dirs | ...
1
vote
1answer
90 views

How to make path prompt easier to read by color-coding each `/` (forward slash)?

I would like to get another configuration for the path, more a detail than a real request: Below an example of zsh PROMPT : In order to make reading the path easier, I would like to change ...
2
votes
2answers
43 views

In iTerm2 map the left Command key to the left Control key & map Command+Tab

In iTerm2, can I map the left ⌘ Command key to the left ^ Control key and still map the system ⌘ Command ⇨Tab to still switch to all other windows? I've use three different OS's (Ubuntu, macOS and ...
0
votes
1answer
17 views

Change iTerm2 Profile

How can I change the profile of my current iTerm2 session? If I click Profiles and select one, it opens a new session instead of changing the current one.
1
vote
0answers
33 views

iTerm2 : Adapting zshrc prompt to get the same one than with .bashrc

I switched from bash shell to zsh. After sourcing a main part of my old .bashrc to .zshrc, I am faced a problem concerning the rendering of prompt with zsh (which works with bash) : function ps1 { ...
0
votes
0answers
14 views

Message “anaconda3 Py” in Iterm2 with zsh

I recently installed Anaconda, but in my Terminal (Iterm2), this message appears on the right "anaconda3 Py". I want to remove that message, but obviously without uninstalling anaconda. Maybe the ...
0
votes
1answer
8 views

How to disable profile tab/toolbelt when opening new window in iterm?

I have been facing this problem for a quite while now. Whenever I open new window of iterm, a profile tab/section is automatically opened. Here is a screenshot. It's annoying to close it every time ...
0
votes
1answer
24 views

Iterate over an array of image sizes, and move them to a new folder

So a few years ago a asked this question, on how to find an image of specific dimensions. That script worked (and works) great for me! But now, i want to find not just one (1) dimensions but 10 ...
0
votes
0answers
24 views

Why is iTerm2 pinging faster than Terminal?

I am using ping www.google.com from Terminal and iTerm2. iTerm reports faster responses from Google. Why is that? Is there a more efficient way of understanding how my connection is doing?
0
votes
1answer
37 views

How to create a hotkey for opening a new iTerm2 window?

I typically have multiple terminal sessions across different screens. Since opening the terminal is such a frequent task, I have a hotkey bound to open -b com.googlecode.iterm2 . with Karabiner-...
1
vote
1answer
63 views

iTerm2 error notification ‘Couldn't log to 2020…’

Every time I open a new window iTerm2 says "Couldn't log to …" I restarted my Mac which is on High Sierra but the problem continues. How can I solve this problem?
1
vote
0answers
38 views

how to scroll horizontally right on iterm terminal?

I want to scroll horizontally since my window size doesn't cover all the info I need. What's the shortcut to do this? In the screenshot above, it would be useful to scroll right so I can see the ...
1
vote
1answer
26 views

How can one save iTerm2 hotkey-window settings (size/dimensions, computer monitor/display, and relative display position)?

How can one save iTerm2 hotkey-window settings (size/dimensions, computer monitor/display, and relative display position) so that the said hotkey window re-appears with the same (above) settings? I'm ...
0
votes
1answer
66 views

Why this custom Mac Keyboard Shortcut is not working?

everyone This is probably a very simple question by someone that has just started using custom keyboard shortcuts on Mac. I want to set up a shortcut for opening a terminal window in a given folder ...
0
votes
0answers
22 views

How to configure iTerm2 to not cycle/loop around/overflow while navigating in between split panes?

I want to be able to use the navigation hotkey to move around the split panes without cycling through them. For example, if I'm at the top-left pane, and I navigate left using the hotkey, I should ...
1
vote
0answers
51 views

How to open the Apple URL protocol x-man-page:// in iTerm and not Terminal (default)

Apple has some custom URLs defined and one of them is x-man-page. If you open a particular man page with it, it displays it in a nice yellow window (a provided profile for Terminal) with black text. ...
0
votes
0answers
16 views

How to delay restore of iTerm until after sparse bundle has mounted?

I use a sparse bundle disk image to hold all my git repositories to work around the problem of case sensitivity in different operating systems when working with collaborators c.f. https://...
0
votes
1answer
23 views

iTerm: How to make options (e.g. -r) after filenames work?

How can I make iTerm accept options (e.g. -r) after filenames? For example, I often delete folders and forget the -r option. iTerm will accept rm -r folder but not rm folder -r. Any way to make this ...
1
vote
1answer
1k views

zsh (brew) and oh-my-zsh: Insecure completion-dependent directories detected (as root user)

When I run sudo -s I get those errors: [oh-my-zsh] Insecure completion-dependent directories detected: drwxr-xr-x 19 myusername MYDOMAIN\Domain Users 608 Feb 10 07:08 /Users/myusername/.oh-my-...
0
votes
0answers
10 views

iTerm2 as a slide out gets hidden

I read from here how to setup iTerm2 as a slide out terminal like "guake" console. It is working fine for me except for one thing. When I click outside the opened terminal, the terminal gets hidden. ...
0
votes
0answers
12 views

iTerm move cursor up or down a line (that is very long and wrapped around)

Since option + click in iTerm only supports moving the cursor in the same line, what would be a good way to move the cursor up or down a line (that is very long and wrapped around)?
0
votes
0answers
13 views

Get iTerm notification when remote SSH session command is completed

I'm trying to make iTerm give me a notification whenever a command I run in an SSH session completes. To do this, I set marks whenever I run a command which notifies me whenever the command completes. ...
3
votes
1answer
160 views

How to get fn + left key working on macOS after changing to zsh from bash?

In case it is not clear fn + left key is simply the HOME button. It takes you to beginning of line. This seems to still work when editing a file (in vim) say so I think zsh does something with the ...
1
vote
2answers
59 views

Different colour for new tabs in iTerm2

Is there any way to change tab colour for new tabs in iTerm2 (automatically, random colour)?
0
votes
0answers
29 views

Can I set up a way to load iTerm with or without Full Disk Access on the fly?

I really appreciate Catalina's "Full Disk Access" Privacy right for keeping software I run in iTerm out of things like removable volumes, photos, etc. However, sometimes I do need to use iTerm in ...
1
vote
3answers
248 views

How to find out if iTerm is installed on a mac from within a shell script?

I am writing an automated script that will install iTerm2 if it's not already installed. What's a good way of checking if iTerm2 is already installed?
2
votes
1answer
63 views

How to make display PDF images with mouse hover in iTerm2 after " ls -l '?

On Catalina 10.15.2, Sometimes, in iTerm2 terminal, after a ls -l command, I can visualize some pdf files (a popup window appears suddenly) when my mouse is over the list of PDF filenames. But this ...
0
votes
1answer
35 views

How can I run a command which will not survive terminal close?

I want to send a notification in X seconds to future me, but I don't want to send the notification if I closed the terminal. So let's say I want to send myself a notification in 10 seconds: ...
2
votes
1answer
497 views

How to make auto-complete work for AWS on ZSH?

I installed awscli from brew. The amazon instructions refer to a shell script, aws_zsh_completer.sh that doesn't appear to be included. I do have an /usr/local/bin/aws_completer. How do I make the ...
1
vote
1answer
97 views

iTerm2 does not take the focus with the hotkey window

I have setup a new Mac with iTerm and the hotkey window shortcut (MacOS Catalina). It all works well, except that the hotkey window does not take the focus when it opens. I mean that I can type ...
0
votes
0answers
74 views

Using find in terminal after upgrade to Catalina

After upgrading to Catalina, I am unable to use find command in iterm2. Here is the error: --- ~ » sudo find / -iname mysqld.sock ...
1
vote
2answers
216 views

How can I make iTerm2 hotkey window fill out the whole screen?

I am using MacOS Catalina, and I use iTerm as my terminal. My problem is, that every time iTerm has been closed, and opened again, it only opens in half screen. I know I can drag it down to full ...
3
votes
1answer
111 views

Path into PS1 prompt is broken (\n) on different lines when it is too long

I am using iTerm2 on MacOS Catalina . Here is my PS1 into ~/.bashrc , using a function ps1 : function ps1 { # PROMPT SECTION BLUE='\[\033[0;34m\]' LIGHT_CYAN='\[\033[1;36m\]' ...
3
votes
1answer
274 views

What is the exact difference between 'tty' and a 'console'?

I know the general idea of console, tty as here explains https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con But when run who (using ...
0
votes
0answers
79 views

iTerm2 remap keys to Ctrl-Shift-{Letter}

I'm trying to remap cmd-shift-u to ctrl-shift-u in iTerm2. Following ExistMe's answer here: Remapping keys in iterm2, I have tried these two things: Send Hex Code 0x60103 0x15 (found using the Key ...
0
votes
1answer
118 views

applescript: commands to maximize (green button) an iTerm window

Assuming I am opening an iTerm window with the following AppleScript: tell application "iTerm" set win1 to (create window with default profile) repeat until exists win1 ...
1
vote
1answer
32 views

applescript: Appropriately escape input in script invocation

I have the following snippet in an applescript: tell current session of current tab of current window write text "watch -n1 'kubectl get pods | grep -i" & input' ...
1
vote
1answer
33 views

AppleScript: Failure to create new iTerm2

I have the following AppleScript code in a Run AppleScript action in Automator: on run {input, parameters} set appName to "iTerm" if application appName is not running then tell ...
0
votes
0answers
15 views

Associate automation applescript with hotkey or shortcut or launcher icon [duplicate]

I came across a very handy approach based on applescript to automate some repetitive tasks on iterm. Here is the example script: #!/usr/bin/osascript tell application "iTerm2" tell current ...
0
votes
0answers
97 views

Running but not sourcing `~/.bash_profile` on file-write

I have an odd but no-longer-reproducible issue with iTerm2 and Bash. My default iTerm2 profile uses /usr/local/bin/bash (Bash 5 installed with Brew) with no arguments. I was trying to determine when ...

1
2 3 4 5
9