Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [zsh]

Zsh or Z Shell is a Unix shell

25
votes
3answers
20k 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 ...
22
votes
1answer
70k 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?
11
votes
4answers
10k 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 ...
10
votes
1answer
36k 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 ...
10
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
659 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
14k 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
32k 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
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
886 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
4k 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
694 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
2answers
11k 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 ...
4
votes
3answers
1k 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
635 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
535 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
1answer
111 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
903 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
988 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
270 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

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
2answers
460 views

Zsh vs Bash shell in Terminal

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
172 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
498 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
285 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
668 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
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
704 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
95 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
839 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 ...
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
1answer
24 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
31 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
1answer
141 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
582 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 ...
1
vote
1answer
451 views

Error with Oh My ZSH themes, ZSH_THEME="random

I get the following message after installing Oh My ZSH and changing ZSH_THEME="robbyrussel" to ZSH_THEME="random" in .zshrc. Users/me/.oh-my-zsh/oh-my-zsh.sh:source:110: no such file or directory:...
1
vote
1answer
1k views

iTerm2 does not show username, machine name, time

On my new mac machine, I could not do autocomplete for Git when I hit Tab. So I thought to modify the terminal and found certain things on this link. I may have messed when I installed iTerm2, Oh-My-...
1
vote
2answers
5k views

Powerline patched font not working on Terminal.app

I am on Mac OS X 10.10.2 (14C2513). I am using Inconsolata patched font from here. But I also tried to patch the font myself. The result is the following: I am able to see the glyphs but zsh (see the ...
1
vote
1answer
1k views

Terminal git:master after oh-my-zshell installation

I just installed oh-my-zshell. And my terminal looks like the image now. What is git master there? I installed oh-my-zshell on other macs, the look is not like that. I am on the root here BTW. Can ...
1
vote
1answer
431 views

How do I disable the “theme loaded” message in zsh

Im using zsh as my default shell and loving it. I have random themes enabled, and whenever I load a theme it displays a message on my terminal. How do I disable this message? Im talking about [oh-...
1
vote
1answer
49 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 ...
1
vote
1answer
28 views

zsh array from variable does not work

I using macos 10.14.2 (18C54) with zsh (latest version I couldn't find any versioning with zsh). If I create an array from a string it works. But If i use a variable containing the string split does ...
1
vote
1answer
223 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 ...