Questions tagged [zsh]

Zsh or Z Shell is the default Unix shell used by Terminal in macOS since 10.15

Filter by
Sorted by
Tagged with
1
vote
1answer
16 views

Every time I start my terminal, I get “.zshrc:source:18: no such file or directory: /sourceme.sh”?

I've been trying to download some softwares. I've deleted those files, but now, I think my zsh file keeps wanting to source a file that's no longer there. Because of that, I get the following message ...
0
votes
1answer
52 views

why does find / rm tells me it doesn't find a folder after it found it?

I'm trying to remove some folders recursively: find . -name bin -type d -exec rm -r {} \; when I run it, I get an output like this: find: ./Services/BinanceConnector/bin: No such file or directory ...
0
votes
1answer
29 views

Make username@machine bold in Terminal's ZSH shell but not the command's output

How can I make Terminal, using ZSH shell, display username@machine current_folder % in bold? I know it has to do with editing PS1 variable in zshrc file located in /etc folder. I have tried that, I ...
0
votes
2answers
37 views

Command in shell script to minimize particular window of an open app? [duplicate]

How can I include in a (zsh) shell script a command that will minimize one particular window among several windows open in a specified app? I already know how to include a command that opens an app ...
1
vote
2answers
96 views

How can I convert this Bash prompt to zsh?

I have the following configuration for Bash: # Change Prompt # ------------------------------------------------------------ export PS1="...
0
votes
0answers
21 views

Zsh bin will not allow me to access file folders via referencing the folder in terminal

I am currently using macOS Cataliana version 10.15.6, and I am having trouble accessing folders via terminal when I type one of these two commands: ~ (/Users/((user)) ) or /Users/(user)/Library/...
0
votes
0answers
64 views

Cannot find my Miniconda Python installation after switching from bash to zsh

Recently after upgrading to Catalina, the terminal changed from bash to zsh, and I lost my Python installation. My Python was installed with Miniconda, but now I can't find it anymore, I can only see ...
1
vote
2answers
76 views

Why does my zsh program run fine in terminal, but not as an automator app? [duplicate]

I got a mac last week and am trying to learn the basics by coding a few projects I came up with. I've been creating a few apps I can place on the dock that automate simple functions that I use often. ...
6
votes
2answers
638 views

$PATH vs. $path

I can't remember why, but a long time ago, I found that for some reason, I needed to set both of these variables. It caused no problems in bash, but now in zsh, when I put export PATH=~/bin:/opt/...
0
votes
1answer
87 views

zsh: command not found: msfconsole

Installed Metasploit on my macOS Catalina from the rapid7 website - pkg installation. When trying to run the command msfconsole the terminal displays the following error: zsh: command not found: ...
1
vote
1answer
47 views

Any other Terminal / shell based options to strip all ACLs and extended attributes from a folder?

I'm having some trouble deleting some folders that contain nothing and have no processes or kexts utilizing them (lsof | grep path_element). When I try to delete them (as root) I get: root@hostname /#...
2
votes
1answer
183 views

How can I set oh my zsh to be my default shell?

I'm using Hyper as my terminal application and I just installed Oh My Zsh via curl. I'd like it to be my default shell environment but for some reason whenever I restart Hyper I have to run the zsh ...
1
vote
1answer
49 views

how dangerous is it to give zsh full disk access?

I have a shell script that runs a few (Duplicacy) backup commands. It works fine when I manually run the script from terminal (cd to the directory where it is and then ./backup.sh). To make it run ...
2
votes
1answer
73 views

Vim frozen and unresponsive on startup

I am using zsh on macOS. When I type vim, it opens, but it is completely frozen: Anything I press on the keyboard does not display or change the window. In order to exit, I have to terminate the ...
1
vote
5answers
407 views

How to identify the largest files in a directory including in its subdirectories?

I have a directory with a lot of files and subdirectories. I know there are a small number of large files contained somewhere within. What is a quick/easy way to identify one or more large files in a ...
0
votes
1answer
35 views

Launchd/Launchctl - pre and post scripting

Is there any way with ld/lctrl to execute pre/post commands similar to systemd's ExecStartPre/ ExecStopPost?
1
vote
2answers
52 views

grep ^\. not working as expected in Mac terminal

if I run the following command in my mac terminal: ls -al | grep ^\. or ls -al | grep '^\.' or ls -al | grep "^\." I get no results back even though there are several files in my home ...
2
votes
2answers
191 views

MacOS Catalina terminal tab doesn't remember its own previous commands

I upgraded from El Capitan to Catalina recently; when I click ↑ in any terminal tab it used to toggle previous commands executed within that specific tab only, but now it will show commands for all ...
1
vote
1answer
134 views

zsh can't see and doesn't load the ~/.zshrc startup file

After upgrading to Catalina and encountering the zsh upgrade reminder when launching Terminal, I've decided to switch to zsh. The default interactive shell is now zsh. To update your account to use ...
0
votes
1answer
297 views

zsh-autosuggestions: How to install zpty module?

I love zsh-autosuggestions and found in the README: completion: Chooses a suggestion based on what tab-completion would suggest. (requires zpty module) With a web search I din't find out what zpty ...
2
votes
1answer
117 views

Best Practice for User Shell Scripts location and/or PATH

I am interested in knowing if there is a best practice for placing/storing custom shell (Bash/Zsh) scripts and it's related PATH location. I know folks have their favorite places - I usually dumped ...
0
votes
1answer
46 views

MacOs Terminal zsh - cannot use ansi

my .bash_profile is setting up my prompt like this parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\u@\h \W\[\033[32m\]\$(...
0
votes
0answers
26 views

MacOS Catalina - iTerm2 - Strange message when rebooting the MacBook pro

When I reboot my Macbook pro and after logging, I have a strange message on a iTerm2 terminal window that appears and that doesn't give the hand : /Applications/iTerm.app/Contents/MacOS/image_decoder; ...
0
votes
1answer
33 views

Ditto command and wildcard on Catalina?

I've learnt a bit about ditto and tried this: mkdir testingdir ditto myfile.css testingdir which seemed to work. How could I ditto one file , e.g. myfile.css to several folders within testingdir, e....
0
votes
1answer
507 views

macOS Big Sur and bash

In Catalina, Apple made ZSH the default shell, however, macOS retained the (now deprecated) Bash. Despite my attempts to unearth something related to this, I couldn't find out whether Big Sur will ...
1
vote
0answers
53 views

Why is Apple changing the default shell to zsh? [duplicate]

As bash is so broadly available, it provides a good compatibility layer for users that come from other Posix systems to use macOS. Why the move to zsh as the default shell, and why the extensive ...
0
votes
0answers
14 views

Terminal shows “active process” as “-zsh ▸ -zsh”

I have configured Terminal.app to show the "active process" in the tab title. When I open a new Terminal tab, it shows the corresponding field as "-zsh ▸ -zsh" rather than just "zsh" by default: My ...
1
vote
0answers
8 views

Change directory in Terminal if working folder moved to Trash (in interactive shell)?

So occasionally I will be working in zsh, in an interactive shell, and will shift to the Finder (or Path Finder) and while there will throw the folder, that is the current working directory in the ...
1
vote
1answer
86 views

MacOS mdfind/mdutil issue and updatedb command : how to index all the files on my /Volume (root /)

A simple question : on Linux, updatedb command which is launched a second time seems not to reindex all the hard disk. On MacOS Catalina (or maybe for previous), it seems that the command sudo /usr/...
2
votes
1answer
20 views

Tab key on ZSH terminal in Catalina keeps running “bundle exec jekyll serve”

I don't have jekyll installed on my system ➜ ~ Could not locate Gemfile or .bundle/ directory ➜ ~ which jekyll jekyll not found ➜ ~ which ruby /usr/bin/ruby ➜ ~ ➜ ~ which bundle zsh: correct '...
1
vote
0answers
29 views

How to omit file extension from zsh autocomplete?

I'm new to zsh in Catalina. In .zshrc, I currently have setopt CORRECT setopt CORRECT_ALL When I run a java program from the command line, I want only: % java ProgramName If I type java Pro ...
1
vote
0answers
27 views

How can I get emacs to see ZSH's environment variables when I open it from /Applications [duplicate]

When I launch emacs from ZSH, it works as desired. Specifically, it sees that my HOME directory is /Users/myname/Dropbox, so it looks for .emacs.d there. Unfortunately, when double-click the emacs ...
1
vote
1answer
167 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
30 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
19 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 ...
1
vote
0answers
24 views

Will I break anything by changing HOME to /Users/flname/Dropbox

I have two computers and I want to just turn them on and have the same experience on both. I think the best way to do this is to have my preferences files in my Dropbox. Problem is, my applications ...
0
votes
0answers
29 views

Why do my environment variables keep getting wiped out in Mac OS Catalina?

I am currently using MacOS Catalina, and every time my computer boots up from having shut down the environment variables get wiped out. I literally have to manually run export FOO=bar each time my ...
0
votes
1answer
91 views

Catalina's zsh and its .zshrc file

I am trying hard to wrap my head around zsh "upgrade" from bash in macOS Catalina. Most of the things are great, actually. However, I cannot figure out why I am experiencing difficulties, like ...
0
votes
1answer
31 views

How to save text to speech as a voice recording?

say "Hello World" is pretty neato, but it requires the terminal to stay open. Is there a nice way to save the recording from what a "say" would output as a file?
0
votes
1answer
30 views

How to change the size of the icons that appear in the Terminal.app

After updating to MacOS Catalina 10.15.4 the icons that appear in my Terminal.app have become extremely small. As you can see in the picture, there is a big gap between the arrow -> that is ...
1
vote
1answer
348 views

Verifying zsh version on macOS Catalina upon brew install

The default zsh version located at /bin/zsh is 5.7.1 (x86_64-apple-darwin19.0). I brew installed a new version, added /usr/local/bin/zsh to /etc/shells, and issued chsh -s /usr/local/bin/zsh to ...
0
votes
1answer
95 views

How can I construct my grep command on zsh to return a specific value?

I am trying to use the command line to extract a specific value from a web page. The page is from the VS Code marketplace: https://marketplace.visualstudio.com/items?itemName=HCLTechnologies....
0
votes
2answers
95 views

ZSH prompt issue : commands shifted to the right on one hundred space characters when doing completions, i.e using TAB key

From this post, Get Function Into PS1 (Zsh)? , it seems to be possible to execute a function inside a ZSH prompt`. Here how to use a function into PROMPT : setopt PROMPT_SUBST slash_color () { dirs |...
0
votes
1answer
31 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
113 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 ...
5
votes
1answer
2k views

ZSH: .zprofile, .zshrc, .zlogin - What goes where?

Now that I've upgraded to Catalina and I am using the new ZSH shell, I've noticed that ~/.bash_profile has been replaced with ~/.zprofile and since installing iTerm2 shell integration, it added a ~/....
1
vote
0answers
37 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
21 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 ...
1
vote
0answers
66 views

Why do I have a folder with a question mark on my terminal title bar?

I've been trying to solve this for a few weeks now and the only thread I could find with this issue is this old thread which did not solve my issue. I've checked .bash_profile, .bashrc, .zshrc, ....
7
votes
3answers
1k views

Did the shell ( terminal ) change in Catalina?

My login script is behaving oddly since I moved to Catalina. Particularly this line: # set cursor to display path and command count PS1="<: \w | \! :> " Now my cursor actually has a \w and a \...