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
30 views

Partially delete path in zsh (Option + Backspace)

In zsh Option + Backspace deletes the whole path on a prompt. For example: ls /usr/local/bin Option + Backspace returns: ls How can I set the same behavior so that the shortcut deletes just one ...
0
votes
0answers
12 views

.cshrc permission is breaking from User Templates on Catalina

I'm facing a strange issue on Catalina. We used to symlink our master .cshrc file to User Templates from our network mount. It used to go to every user's home directory and uses it. But, ever since ...
1
vote
0answers
37 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-...
1
vote
1answer
21 views

Why is Python version set with PyEnv global not picked up a default one?

I have installed pyenv and used it to install Python 3.8.1 I had Python 3.7.6 installed manually before. I have set 3.8.1 as global and, as this version is now markered with *, it was taken into ...
1
vote
1answer
33 views

No package manager on brand new macOS Catalina

I'm sorry if this is a stupid question, but I've been searching for days with no results. What is the default package manager for macOS Catalina terminal? % brew zsh: command not found: brew I've ...
2
votes
1answer
59 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
1answer
39 views

zsh: Can't set DYLD_LIBRARY_PATH in ~/.zshenv to get ImageMagick working under MacOS Catalina

Goal: Install ImageMagick on my iMac 27" 2017 running Catalina 10.15.3 (install failed under Homebrew). Plenty of RAM & disk space. Second line below doesn't execute, so echo $MAGICK_HOME yields ...
2
votes
2answers
43 views

Using the command-line / Terminal, is it possible to determine if this Mac has Touch ID or not?

I am trying to find a way, using the Terminal/command line, to determine if the Mac I am using has Touch ID or not. So far web searches have not turned up any answers. I would have thought that ...
4
votes
2answers
2k views

zsh: no matches found

It seems I have some zsh misconfiguration. I use youtube-dl regular to download videos. But since a few days, I get this error youtube-dl https://www.youtube.com/watch?v=mkd6JkfI4yk zsh: no matches ...
9
votes
4answers
13k views

How to add permanent environment variable in zsh

I have been scouring the internet, and cannot seem to find a solution to permanently adding an environment variable, specifically when my OS is macOS Mojave (10.14). It seems there are a lot of ...
0
votes
3answers
476 views

Run zsh alias via automator?

I am using zsh with oh-my-zsh in iTerm on macOS. There are some aliases defined in my .zshrc I use often, like this: deploy(){ cd ~/Path/To/My/Project; build ...; rsync ...; } To execute this, I ...
0
votes
1answer
664 views

Go2shell does not work with zsh

I recently switched to zsh from bash, and Go2Shell doesn't work with zsh. When I click the Go2Shell icon from Finder, the iTerm window opened but the directory is the last dir in iTerm instead of the ...
2
votes
1answer
74 views

Resetting /usr/bin

So I was installing python3, pip, and a few other applications through Homebrew when I first got my Mac. I realized I was doing all this in /usr/bin and not /usr/local/bin, and I wanted to just to ...
5
votes
2answers
661 views

How do I switch tabs when using iTerm2 with Z shell

How do I switch tabs when using Z shell on iTerm2? I have already tried all the possible key combinations. Here is an image of my current setup: OS: macOS Mojave 10.14.4 (18E226) iTerm2: Build 3.3....
0
votes
1answer
200 views

Add colours to output of existing CLI commands

I would like to create a function / alias that colorizes the output of another command. Is there a best-practice way to do so? For instance, let's take the alias command, whose output looks something ...
25
votes
3answers
25k views

Change default shell from bash to zsh

I've tried to switch my default shell to zsh, using chsh: chsh -s /bin/zsh and: chsh -s `which zsh` Both commands ended with: Changing shell for adamatan. Password for adamatan: chsh: Operation ...
13
votes
4answers
4k views

Why can't I use zsh?

So I upgraded to Catalina. Actually it's more like a fresh install, I only copied across the few files I wanted to keep. The shell is now helpfully telling me: The default interactive shell is now ...
1
vote
1answer
315 views

How to set “default” .bash_profile when opening Terminal on Catalina

I'm running Catalina, 10.15.2, which uses the new zsh shell as a default. I've created my own .bash_profile file in my home directory and I'm able to initialize this .bash_profile by typing: source ....
2
votes
1answer
67 views

How do I set the working directory as the tab title in Terminal for Mac?

One of my Macs is running Mac OS Mojave and so for parity with my Catalina machine I switched the shell to zsh. Not sure exactly when but at some point I noticed the current working directory was ...
5
votes
3answers
481 views

Now that MacOS Catalina has moved to zsh, can I upgrade bash 3.2.57 with 5.0.3?

I understand apple's move from bash to zsh, though I'd really rather that they hadn't made the change. I've tried zsh, and decided that I'd prefer to remain with bash. So, since MacOS Catalina isn't ...
2
votes
1answer
133 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 ...
0
votes
0answers
197 views

How to change zsh prompt which now shows probably MAC address?

I have been try to change the prompt on my terminal and the prompt that shows up looks like a MAC address. This is what it looks like: Last login: Mon Dec 16 20:41:33 on ttys000 ...
0
votes
2answers
79 views

Hide name of the user and computer name from terminal window title

Before Catalina it was possible to hide username and computer name from terminal window title: Yet now despite any combination of configuration I'm unable to hide those items from window title:
1
vote
0answers
90 views

After switch to zsh history not saved

I am running Mojave have changed default shell from bash to zsh. I notice history is not saved between sessions. Following recommendations in What are the practical differences between Bash and Zsh? ...
0
votes
0answers
12 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 ...
7
votes
4answers
821 views

How to prepend a character to start of each line in 250,000+ line file using a script?

I have text file with 250,000 lines - and I need to append the same single character at the start of each line. I have tried to use various multiline /column edit plugins in Atom and Sublime but they ...
1
vote
1answer
232 views

Can't use zsh shell in Catalina

When I opened Terminal after installing Catalina, this appeared: The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please ...
129
votes
4answers
32k views

What are the practical differences between Bash and Zsh?

With the news that Catalina will default to Zsh instead of Bash, I'm finding lots of results telling me about the switch, and that it may cause problems with shell scripts, but I'm not familiar enough ...
1
vote
2answers
294 views

How does zsh find commands?

Unless I switch back to bash, I now have to spell out the full path for scripts I have written. How does zsh find commands? Things in /bin, /use/bin, etc. still work, but things in ~/bin are “not ...
0
votes
1answer
57 views

SOCKS proxy environment variable ignored by command line applications

I have a SOCKS proxy that is accessible at 192.168.0.17:1080 in my local network. I redirected my internet traffic to it in my Wifi System Preferences. This works fine, GUI applications use it. ...
4
votes
3answers
7k views

ZSH - missing git icons

Hi I've just installed ZSH and it looks awesome but git icons are still missing and I don't know what I miss. What I should do?
1
vote
1answer
331 views

I switched to Catalina and enabled ZSH now my home/end key do not work in terminal

I switched to ZSH from BASH as per the upgrade in Catalina and all is well except my home/end keys no longer work. This can be really annoying trying to move my cursor over super far to the left ...
2
votes
3answers
692 views

macOS Catalina still uses bash as the default shell

I'm on the latest public beta of macOS Catalina and it's supposed to use zsh as the default shell and it even shows that it is pointing to zsh in the users settings but whenever I open a new terminal ...
2
votes
1answer
189 views

Which version of ZSH is installed in macOS Catalina?

I am required to write a script on Linux while still supporting macOS. I am using ZSH. macOS Catalina has ZSH enabled by default, but the feature I am building has a version dependency on the ZSH ...
2
votes
1answer
44 views

Effects of changing shell

Recently Apple changed the default shell to zsh from bash. In the past I made significant changes to my .bashrc file. How should I incorporate those changes into the zsh terminal?
2
votes
1answer
83 views

MacOS terminal Hangs on `login`

On my macbook, I've found that sometimes it gets into a state where it cannot open up a new terminal - a blank terminal window just appears, and it hangs. Rebooting solves this, but it seems to ...
3
votes
0answers
111 views

Show menu bar icons in Catalina defaults command not working

In Catalina, allowed ZSH full disk access in preferences and ran defaults write com.apple.systemuiserver menuExtras -array "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" "/System/...
3
votes
1answer
781 views

Easiest way to migrate aliases from bash to zsh

I want to start using zsh as recommended by Apple for Mac OS Catalina. How do I migrate my aliases that I have defined in the ~/.bash_profile to the new shell?
2
votes
0answers
35 views

Why doesn't Spotlight look inside shell scripts?

I have a bunch of shell scripts (all plain text files) in /usr/local/scripts If I do fgrep -il '@todo' * there are 14 files which match. If I do mdfind -onlyin /usr/local/scripts '@TODO' there are ...
14
votes
4answers
12k views

How to get rid of “You have new mail.” in zsh

I'm using zsh with prezto as my shell with iTerm as terminal app. I always get the message "You have new mail" when opening a new prompt. I don't have any new mail in Mac Mail and I don't run a mail ...
1
vote
1answer
30 views

Command line issues

I'm trying to execute two commands in a single line: pkill "something" && runsomething when executing each command separately, both work. When executed together with "&&", only the ...
2
votes
1answer
107 views

MacOS zsh alias pwd is incorrect

I recently switched to MacOS and some aliases in ZSH which were working on a linux system is giving me headaches in MacOS. To be specific, pwd variable inside alias is using the same directory where ...
3
votes
2answers
90 views

Why is the width of `~` different than `➜` on iTerm2 when using zsh with spaceship-prompt?

Using iTerm2. Installed zsh, spaceship-prompt and FiraCode. Why is the width of ~ different than ➜?
1
vote
1answer
89 views

Problem with snippets in Zsh

I recently changed my shell from bash to zsh. I have lots of snippets (Alfred, Dash...) for terminal use that ends with a line break. With bash that snippets works fine, I meant, paste the command and ...
23
votes
1answer
27k views

Bash or Zsh, what's the difference, why use one or the other? [duplicate]

So, the question pretty much says it all. I'm on Snow Leopard, and I do a lot of web development, particularly in Rails 3 which makes heavy use of the console. I've seen some notable bloggers etc. ...
3
votes
2answers
1k views

Zsh vs Bash shell in Terminal [duplicate]

Are there any advantages to using zsh vs bash shell in Terminal app? Also, can you use zsh from the terminal? My understanding of zsh is skewed.
2
votes
1answer
119 views

How to find the PID(s) of a hung app in macOS from the shell (Terminal)?

Within Activity Monitor.app it's easy to visually identify a hung app by seeing its name in red text: How can such hung app statuses be identified from the shell (Terminal.app) and the PID(s) of ...
1
vote
2answers
618 views

Why does rm in zsh abort?

I have a number of files: > $ ls FleurInputSchema.xsd inp.xml out usage.json fort.77 juDFT_times.json out.xml and I would like to delete some of ...
1
vote
1answer
137 views

macOS Terminal.app can't split with Command + D

I installed zsh. When I press Command + D in iTerm2, it could split normally. But when I return to using Terminal.app, I use bash or zsh, it can't split with Command + D, it changed like the ...
4
votes
0answers
110 views

Separate zsh histories after restart (iTerm2)

I am running iTerm2 (v 3.2.9) and zsh (v 5.7.1). I normally have 3-4 iTerm tabs opened at the same time and each tab has its own history thanks to the following settings in my .zshrc file SAVEHIST=...