Questions tagged [zsh]

Zsh or Z Shell is a Unix shell

Filter by
Sorted by
Tagged with
46
votes
3answers
5k 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 ...
25
votes
3answers
21k 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 ...
23
votes
1answer
74k views

How to uninstall zsh

I'm new to Mac. A friend installed all kinds of additional software including zsh which I would like to uninstall. So how can I uninstall zsh?
19
votes
1answer
19k 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. ...
12
votes
4answers
11k 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 ...
12
votes
1answer
41k views

How do I configure my Terminal app with bash and iTerm2 with zshell and oh my zsh?

The Terminal app uses bash by default. And I don't want to change it. However I want to configure iTerm2 with zshell and oh my zsh. and I don't want bash on it. The instructions I checked online, make ...
11
votes
2answers
2k views

ZSH paste from the clipboard a command takes a few second to be write in the terminal

When I copy from the clipboard a long string command in my iTerm, the terminal freeze for seconds. for example, if I copy the following test and I paste in my iTerm console: echo 'test test test ...
10
votes
1answer
700 views

Issues with Unicode symbols in some applications running in Terminal.app and iTerm2

Darwin DeoGloria 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Fresh user account. Terminal.app and iTerm2 with UTF-8 set. Accented ...
8
votes
4answers
15k views

chsh doesn't change $SHELL

I'm having some difficulties in changing the value of $SHELL in OSX's iTerm app. iTerm is starting in /bin/zsh, but the value of $SHELL doesn't seem to change. What I've done: Changed "command" as /...
7
votes
2answers
33k views

zsh themes loaded but not working

I set theme in .zshrc file: ZSH_THEME="random" And when open new tab, it shows that new theme is loaded: [oh-my-zsh] Random theme '/Users/maks/.oh-my-zsh/themes/gozilla.zsh-theme' loaded... mac ...
6
votes
2answers
12k views

How do I add a directory to PATH when using `zsh` in Sierra

In macOS Sierra 10.12.x, what is the modern way to add a directory to the PATH environment variable that can work across shells or specifically work with zsh shell (I switched from the default bash to ...
6
votes
0answers
2k views

rbenv not overriding default Ruby version

I used the thoughtbot laptop script to setup a new Macbook Air (OSX 10.10.5), but when I navigate within a Rails project that contains a .ruby-version file, running commands such as rails s returns an ...
5
votes
2answers
890 views

Cut in CLI doesn't work as expected - returns full lines every time

I'm running MacOS Mojave and I'm trying to get a list of owners of files in given path. I'm trying to do it like this but it doesn't work. $ ls -l /usr | cut -f3 total 0 drwxr-xr-x 971 root wheel ...
4
votes
2answers
5k 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?
4
votes
2answers
4k views

Uninstalled zsh, terminal gone weird

I uninstalled zsh pretty soon after I installed it as I realised I had got used to the normal Terminal. The uninstall went successfully and I restarted Terminal, but now it displays my computer-name (...
4
votes
2answers
767 views

Customise iTerm sudo password prompt

Recently iTerm started showing an emoji key instead of the sexy key symbol at password prompts. It now shows this: But I don't like the ugly emoji there. I want to see (this is what it looks like ...
4
votes
3answers
2k views

Generic exit function for iTerm2

I've recently begun to use iTerm2 instead of the macOS Terminal application and I'm really happy with it. I'm very used to use to exit command to close the instance that currently has focus. With ...
3
votes
4answers
5k views

Is there a way to list all available commands in terminal

Is there a way to list all available commands in terminal? I know linux has compgen -c is there an equivalent command for OS X? Update: The actual issue was that I was using zsh instead of bash. So ...
3
votes
2answers
688 views

Dragging and dropping a file onto a Terminal window doesn’t escape the path under zsh 5.2

Under OS X you can drag and drop a file from the Finder (or anywhere else) onto a Terminal window and the file’s path will be inserted as if you had typed it in. Recently, filenames with spaces have ...
3
votes
2answers
544 views

Removing the builtin command-line utilities from PATH, zsh

Okay, so I'm a Linux power user, that is I feel most at home when I have access to the command-line, and I'm very much used to using GNU coreutils, so now that I've installed GNU coreutils on Mac OS X ...
3
votes
2answers
661 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.
3
votes
1answer
401 views

Update zsh on macOS Mojave

On my MacBook Pro with macOS Mojave, my version of zsh is 5.3. zsh --version zsh 5.3 (x86_64-apple-darwin18.0) That version is a few years out-of-date, according to this. That page shows version ...
3
votes
1answer
938 views

how to get ls to list files in case-insensitive order?

How do I get the ls shell command to list my files in: case-insensitive order with the directories at the top? The reason I ask is: I want Aquamacs Emacs dired to list my files and directories this ...
3
votes
3answers
1k views

iTerm ZSH - Missing Right Prompt

I'm using oh-my-zsh and iTerm2. I've also enabled the zsh-vim-mode plugin from oh-my-zsh. One of the annoyances I've encountered is my right prompt (RPS1 & RPROMPT) doesn't seem to show up. I'd ...
3
votes
1answer
273 views

Within Terminal, `date` command outputs a curious prefix where it should'n

I am using a Mac Mini running Lion (10.7.5) and zsh 4.3.12 (i386-apple-darwin11.0.1) with oh-my-zsh installed. In the Terminal.app I retrieve the UNIX timestamp using the following command date +%s ...
3
votes
1answer
3k views

change terminal language os x

I have a Mountain Lion macbook and it's default locale is english, it's keyboard is english (US) as well. I need to change the language that the terminal replies to Swedish. For example, Instead of ...
3
votes
1answer
2k views

How can I run a command that requires user input through oh-my-zsh alias?

I'm trying to add Reminder.app items through the command line by invoking an alias. I use the Automator workflow solution from this question: How can I add reminders via the command line?, which ...
2
votes
2answers
2k views

How to recover from “chown -R $USER /usr/”?

I ran a 'chown' on everything under /usr to a non root user. Meant to run it for /usr/local/ Now I get the error below on opening terminal login(89809,0x7fff7bac5960) malloc: *** error for object ...
2
votes
1answer
1k views

Scrolling doesn't work in Terminal for commands like less

I used to be able to scroll using the trackpad through git diff or man pages which both use less when the output doesn't fit on screen. Today I restarted my computer and that behaviour is gone and I ...
2
votes
1answer
1k views

LSOpenURLsWithRole() failed with error 10810 in iTerm2 running tmux on Yosemite

[~%]open ~/Pictures/upload.png LSOpenURLsWithRole() failed with error -10810 for the file /Users/bryanhunt/Pictures/upload.png. Before this update I used to be able to open images, PDFs, etc. from ...
2
votes
3answers
3k 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 ...
2
votes
1answer
286 views

How do you change colour scheme between *panes* inside iTerm2 + oh-my-zsh?

I have seen a lot of solutions that allow changing of tab colour upon remote accessing into a server (see for example: https://gist.github.com/wadey/1140259 and many more). What I want is to change ...
2
votes
1answer
186 views

Repeated Oh My Zsh brew plugin warnings

I keep seeing this warning every time I open an new shell on one of my machines: Oh My Zsh brew plugin: With the advent of their 1.0 release, Homebrew has decided to bundle the zsh completion ...
2
votes
1answer
574 views

ZSH terminal displaying characters and cursor in the wrong place

When my command is long and I move the cursor through it, it jumps randomly to different places and start writing in any location of the command. I'm using OS X El Capitan (10.11.6) and have ...
2
votes
1answer
17k views

How can I get zsh to show the current path in the prompt?

I am not able to see path of my current directory or even username in terminal while using zsh. I was able to see it until few days back. Now it just shows blank. I tried uninstalling oh-my-zsh but it ...
2
votes
1answer
301 views

Terminal backslash input repeated in output

I'm using zsh on a MacBook Pro, OS X 10.10. When I type in certain commands, such as this one: cat myfile | awk -F $'\t' '{print $8, $9}' | sort | uniq -c | sort -k1,1n | awk '{if ($1 > 50) sum += ...
2
votes
1answer
699 views

iTerm2 runs my .zshrc twice

When starting a terminal in iTerm 2, my .zshrc is executed twice. Possibly has something to do with the "last login" printed at the top of terminal by iTerm? Anyone know how to fix this? Example ...
2
votes
1answer
40 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 ...
2
votes
1answer
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 ...
2
votes
1answer
788 views

Powerline Theme in OSX terminal have a strange color

I configure the powerline theme on OSX like zsh vim and emacs But it has a strange colour in the ">" character How can I make the the ">" character colour match with the powerline bar
2
votes
0answers
74 views

“l/” in shell creates a whitespace

Whenever I type l/ in terminal on OS X (Mavericks), it replaces it with a blank space. I can't seem to find any relevant problems or fixes on Google and I have no idea why this happens. For example, ...
1
vote
2answers
98 views

How can I debug a series of piped commands in zsh?

The command ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6 is not giving any result. Can any one help. I got this command from an article that maintains (I ...
1
vote
1answer
2k views

Unknown error message in Terminal

When I open the Terminal I keep getting this message, which I suppose is some error: /Users/sinisasasic/.zshrc:export:48: not valid in this context: Support/GoodSync:/usr/bin:/bin:/usr/sbin:/...
1
vote
2answers
2k views

How do I copy text from vi?

I installed zsh, and I'm using vi. I want to copy a line from vi to somewhere else. How may I do this?
1
vote
2answers
95 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
39 views

LSCOLORS and CLICOLOR active by default and unset

Running zsh out of the box ls -G produced a colored list with the default colored values. But when I echo, both $LSCOLORS and $CLICOLOR, I receive an empty response. Reviewing printenv or set also do ...
1
vote
1answer
70 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....
1
vote
2answers
107 views

ZSH started printed env on startup

I started XTerm today and for some reason ZSH is printing what looks like env when my shell starts up. I am just wondering if there is a way to track down what is doing this so I can disable it. Below ...
1
vote
1answer
164 views

Write a function in zshrc that can take a parameter and can handle flags

I usually need a chrome page opened to localhost:3000 when I am developing. So, I just run the following cmd: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app=http://localhost:3000 ...
1
vote
1answer
639 views

exporting LSCOLORS in .zshrc not working as expected

In my .zshrc file I am loading my color scheme using the below command: export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced But when I load my terminal I get another color scheme. I am not sure ...