Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

iTerm2 - run a command in every new pane

I'm using iTerm2 and oh-my-zsh. Whenever I start a session — a new iTerm2 window — it reads my .zshrc file and runs a few commands — e.g. getting the right Node version from .nvmrc. But when I open a ...
Angelo Dias's user avatar
1 vote
1 answer
54 views

Why I can't change the prompt in VSCode's terminal?

I am trying to change the prompt in my VSCode's terminal. My OS is MacOS Monterey 12.6. I use the zsh and I change the PS1 in .zprofile,such like this. Then I use echo to test.The others can work ...
Luxury's user avatar
  • 11
2 votes
0 answers
92 views

Why is `~/.zlogout` not sourced when non-interactive ZSH shell runs `exit`?

My ~/.zlogout contains the following: echo '~/.zlogout!' Let's run the following script: su user -ls /bin/zsh -c 'echo kaasbier; exit' Nothing is echoed (besides the kaasbier). I am testing this in ...
Silas's user avatar
  • 39
-1 votes
1 answer
775 views

Can't use terminal, I keep getting "zsh: command not found: npm" even after an OS re-install

I don't remember what I had done, but every time I attempt to run a command (npm install -g gulp) in terminal, it returns a zsh: command not found: npm. This is a command I previously had no issue ...
Arnold Palmer's user avatar
0 votes
0 answers
64 views

using scp or echo in zsh with alias parameter print 'No such file or directory'

here zsh on MacOSX. I would like to point out that I have tried several ways, with and without quoting, single or double quoting, with and without brackets, with/out $variables. But I receive ever ...
Stefano Monti's user avatar
1 vote
1 answer
325 views

Default shell zsh but responding bin/bash

I have no idea what I did! I was installing maven and one of the guides had me do something and now I'm stuck in default zsh. I've tried changing my terminal preferences to be /bin/bash, as well as my ...
beepbeepboop's user avatar
0 votes
0 answers
68 views

Unsure what happening with my terminal but I'm getting a weird response

Whenever I run a python file, (vs code) or even open my terminal on mac I get a warning saying. /Users/ABC/.zshrc:1: command not found: “alias /Users/ABC/.zshrc:2: command not found: “alias /Users/ABC/...
Angus_U22's user avatar
0 votes
2 answers
323 views

How can I write my CPU temperature to a file on an Intel Mac?

I'd like to log my Mac CPU temperature to a disk file in the Mac terminal. I've tried: sudo powermetrics --samplers smc | grep -i "CPU die temperature" >> cpu_temps.txt ...and: sudo ...
VikR's user avatar
  • 113
2 votes
1 answer
72 views

What is the text in the frame header of Terminal on startup?

When I start up a Terminal window on macOS, the following text scrolls by in the frame header: I recognize a few of my brew'd packages like pyenv in there, as well as some basic posix packages, but I'...
shea's user avatar
  • 101
0 votes
1 answer
78 views

Strange zsh startup command with "uh oh" spam

I am currently on macOS Sonoma 14.2 (Beta) and have a MacBook Pro 2021 with an M1 Max. I genuinely have no idea where to start on this problem. Whenever I open up a Terminal, I get this weird spammy ...
Htmlly's user avatar
  • 3
0 votes
0 answers
99 views

Propagating zsh window title through tmux, then ssh, to terminal emulator/window manager

My zsh automatically sets my terminal emulator (kitty)'s window title to my current working directory, or whatever program is currently running within it. However, when I ssh to a remote host and run ...
kovas's user avatar
  • 1
0 votes
2 answers
60 views

How do i prevent websites from appearing in autocomplete in terminal?

I am running MacOS if it matters I am new to terminal and work in a lab at my uni, we have a server where we ssh into from our laptops. I am using ZSH as my shell and have no plugins besides git ...
Wex300's user avatar
  • 1
2 votes
1 answer
109 views

Change argument to -y, --yes, --assume-yes

Can anyone help me alter this script to automatically YES? y? I don't need to or want to confirm yes, I just want to pass yes into the shell shortcut. cat << "EOF" >> ~/.zshrc ...
Outer's user avatar
  • 23
0 votes
1 answer
1k views

How to get kube-ps1 working in the Warp terminal on MacOSX?

I'm trying to move from iterm2 to warp, but one thing that I can't get working, which is quite crucial for me, is the kube-ps1 project. What it does is to make the current Kubernetes context visible ...
Johan's user avatar
  • 103
0 votes
1 answer
141 views

ls ignoring extensions when colorizing with LS_COLORS

I'm trying to set LS_COLORS to colorize my ls output, but for some reason it is ignoring any file match patterns. It is correctly coloring executables, directories, etc., but it seems to be ...
mrjake2's user avatar
  • 121
0 votes
0 answers
106 views

How to spawn a perfectly silent daemon in ZSH which would last only for the session?

This question is quite similar to this one, although it's a bit more constrained. I would like to start a background job, but: I don't want any [1] 769021 to be printed. I don't want only this ...
radrow's user avatar
  • 143
0 votes
1 answer
440 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
102 views

How do Linux terminal programs set up the environment for the shell program

I am writing a terminal emulator in Rust. The source is here. It forks itself and the child process (eventually) becomes the shell program which it reads output from and passes input to. On macOS, ...
deeBo's user avatar
  • 143
1 vote
0 answers
361 views

What is the difference between different options for 'ls' colored output in zsh?

I want to display colored output for the 'ls' command in the terminal for my MAC but I do not understand the differences between some of the methods. On some articles and reddit posts I saw people ...
Ravi C's user avatar
  • 11
3 votes
1 answer
1k views

Ctrl-C not working on MacOS/Zsh

I have a similar problem to Ctrl-C Not working in zsh But it is not the stty setting or the key-bindings. It definitely happened in one terminal, while on others it works. I get: from stty: eol2 = <...
thilo's user avatar
  • 191
1 vote
0 answers
382 views

Speed Up Zsh Loading Time in tmux

Like many users, I'm experiencing slow load up times with my shell on macOS. I've seen many questions about this topic, and I'm using a suggested workaround, which is setting the terminal emulator (...
buldog9800's user avatar
0 votes
1 answer
65 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
3 votes
0 answers
227 views

Not able to set lang to CN in zsh macOS, but locale is good. The word “total” is still shown in English

~/.zshrc: export LANG="zh_CN.UTF-8" export LANGUAGE="zh_CN.UTF-8" export LC_COLLATE="zh_CN.UTF-8" export LC_CTYPE="zh_CN.UTF-8" export LC_MESSAGES="zh_CN....
渐入佳境groove's user avatar
2 votes
2 answers
536 views

How to handle triple-nested quotes in Zsh? [duplicate]

I've been setting an alias that running Apple Script on Terminal. As below: alias playda="osascript -e 'tell application "QuickTime Player" activate set thisFile to open POSIX ...
11100100's user avatar
0 votes
1 answer
215 views

Randomly lost ZSH prompt settings

Yesterday I suddenly lost all my ZSH settings more specifically the prompt and how the themes as they are applied. I've tried the following so far: As suggested in the ZSH FAQs, I tried exec zsh but ...
potatoheadgear's user avatar
0 votes
1 answer
4k views

Oh My ZSH - Show home path instead of tilde

My terminal now shows name@host:~/path/to/some/file I want to change ~ to /users/name/path/to/some/file The .zshrc file doesn't have PS1 and even though I tried adding one with $PWD (setting PS1 to \u@...
user1772075's user avatar
0 votes
2 answers
528 views

How to copy output from a zsh terminal using vi movements(or if that's not possible any other way)?

Currently I am using vi motions in zsh and it is incredible. I work on terminal a lot and it is annoying to switch back to move to copy an output. Is there a way to use vi motions or anything else to ...
Fclass's user avatar
  • 1
3 votes
0 answers
1k views

Tips on how to speed up ZSH shell start up time

can someone help me understand why my Zsh start up is so slow. My Zsh takes up to six 6 seconds to start up so I added zmodload zsh/zprof and zprof to my .zshrc to see what takes the most time. The ...
miiguell's user avatar
1 vote
1 answer
1k views

how to solve that zsh terminal cannot find any command?

I guess I made some mistake when I set environment path setting in zsrhc file. After that I cannot use any command in terminal even basic command like ls, pwd, cal, man, git ...... only able to use cd,...
Uranus_ly's user avatar
0 votes
1 answer
29 views

Combining commands and launching in a second terminal

On macOS, I'm trying to run three commands (two in one terminal, and a second to launch in a new terminal after the first two complete). This is what I'm currently using: grunt devUsingStagingData &...
Will K.'s user avatar
0 votes
0 answers
333 views

Alias not exported from .zprofile to folder location that exists

In my .zprofile, I have a bunch of aliases that follow the same pattern: export remotedir="$HOME/remote" export localdir="$HOME/local" etc. They all work, except for one, which ...
user345435's user avatar
1 vote
0 answers
105 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
2 votes
4 answers
9k views

How can I achieve the look of the Kali terminal in Ubuntu?

I have been using kali Linux for Years but recently have switched over to Ubuntu for my daily driver I really miss the Look and feel of Kali Linux Terminal but want to stick with Ubuntu as my daily ...
kalistamp's user avatar
1 vote
0 answers
2k views

Terminal commands (which, dirname, curl, and more) are all being killed by Zsh and don’t work in macOS on an M1-based Mac

I've recently-ish updated from an Intel-based Mac to an M1-based Mac and I was also switching off a beta 12.x OS to regular 12.x macOS. I have no idea what is going on but it seems like my shell ...
gadu's user avatar
  • 111
2 votes
1 answer
3k views

zshell says command not found in MacOS

I'm using MacOS Monterey 12.4. When I open zsh I get immediately /etc/zshrc:7: command not found: locale /etc/zshrc_Apple_Terminal:104: command not found: mkdir I understand that my terminal ...
Alberto Carraro's user avatar
0 votes
0 answers
443 views

zsh does not start as login shell

Running Debian I have set zsh as my login shell in /etc/passwd and zsh is among the permitted shells. $ cat /etc/shells # /etc/shells: valid login shells /bin/sh /bin/bash /usr/bin/bash /bin/rbash /...
RREE's user avatar
  • 1
0 votes
1 answer
716 views

why getting the message "/Users/<My User Name>/.zshrc:1: command not found: plug" even after removing zplug?

I get this message although I have removed zplug from the system. I have removed it from brew and removed all.zshrc related configurations with source .zshrc. I even get that message after each ...
Watheq Alshowaiter's user avatar
1 vote
1 answer
623 views

Can you underline directories in zsh with ls?

I would like to underline directories when I do ls. Is this possible in a default Mac terminal and zsh? Or do I need something like iTerm2 + ohmyzsh. From what I found LSCOLORS doesn't support ...
Bn.F76's user avatar
  • 134
0 votes
1 answer
1k views

zsh on M1 Pro Mac taking 20 seconds to load

I have a M1 Pro Macbook pro and I installed zsh on this machine. However, when I start a terminal session, it takes over 20 seconds to load the session. This is really frustrating and I have not been ...
Akshay Sood's user avatar
1 vote
1 answer
249 views

zsh alias for running the most recent matching history item

I'd like to create an alias in zsh that runs my last terminal command beginning with node. I can run that command with !?node, but I can't create an alias with alias N='!?node'. How can I make this ...
Raffi's user avatar
  • 163
0 votes
0 answers
87 views

How can I change terminals command line color?

I found that this terminal is so beautiful. But I don't know how to configure it. In this video, you can see that the command and argument are in different colors like this . I'm developing on macOS ...
BogdanXin's user avatar
0 votes
0 answers
233 views

Make Terminal Remember last visited folder after closing it on MacOS

I am a beginner with the terminal and I don't know to fix this. I'm working on some projects that are placed in drastically different paths. Because I'm very messy it happens that I close the terminal ...
Andrea's user avatar
  • 1
3 votes
2 answers
4k views

How to use zsh in flatpak vscode

I have Visual Studio Code installed in flatpak, I run it with: flatpak run --command=sh com.visualstudio.code I want to change the shell to zsh, but I can't find how to, I tried multiple thing in my ...
Hamza Ince's user avatar
5 votes
3 answers
9k views

"Command not found: complete" message appears every time I open the terminal

I was setting up my development environment on Ubuntu 20.04 following a video on Youtube and after running the command $ echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc Every time I ...
Gustavo Farofa's user avatar
1 vote
1 answer
508 views

special characters not rendering well in zsh

I'm running rxvt-unicode, with zsh + ohmyzsh. I just installed firacode, verified font name with fc-cache and set URxvt*font: xft:FiraCode in ~/.Xresources, and ran xrdb ~/.Xresources. Then I ...
Daniel Crisp's user avatar
2 votes
1 answer
2k views

Is there a way to reach iCloud's Pages folder via the Terminal?

You can get to iCloud drive from the Terminal using cd ~/Library/Mobile\ Documents/com~apple~CloudDocs/, but that doesn't show you all the same folders you see when you click the iCloud Drive link in ...
jamesnotjim's user avatar
0 votes
2 answers
794 views

Printing the KeyMap pressed in zsh/bash

Is there a way for zsh/bash to print out the keymap of the next received keystroke ? I would press a key combination on my keyboard, and it would print, say keymap : ^A
nicolas's user avatar
  • 457
0 votes
0 answers
12 views

Wildcard (*) is not matching files in another user's folders in zsh on macOS [duplicate]

Logged in as user 1, I am trying to delete all files in a folder belong to user 2, using * as a wildcard. I know there is a file in the folder. % sudo ls /Users/Guest/Documents .localized file % ...
Tom's user avatar
  • 1
1 vote
1 answer
195 views

DTerm (macOS one-stroke quick terminal) > Issues with $PATH in ZSH

I’ve been using DTerm for a long time as a fast and convenient way to get to a “path aware” terminal prompt in macOS - but since upgrading to BigSur/ZSH, the $PATH in DTerm and Terminal.app/iTerm ...
JJarava's user avatar
  • 433
1 vote
0 answers
361 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
2 3 4 5