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

1
vote
0answers
20 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
17 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 ...
0
votes
3answers
187 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 ...
1
vote
0answers
8 views

How to bind Option-Delete to backward-delete-word in zsh vi mode in tmux and alacritty terminal

I use alacritty and currently, I have these key binding key_bindings: # (macOS only) - { key: N, mods: Command, action: SpawnNewInstance } - { key: F, mods: Command, ...
0
votes
0answers
48 views

Find commande doesn't list existing file

Ok so! I search the file latexindent. The command typpe latexindent given me latexindent is /Library/TeX/texbin/latexindent. I execute find /Library/TeX/texbin/ -name "*latexindent*" but I don't have ...
0
votes
0answers
19 views

keyboard shortcuts not working in the terminal anymore

When I try exit programs in the terminal using cmd + c nothing happens. Furthermore when I am using tmux no key commands work either. For example, if I try to split the screen using cmd b + % all that ...
4
votes
1answer
70 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 ...
0
votes
0answers
20 views

Rename .app and using the new name with open -a

I want to change the name of Visual Studio Code to vscode for using the command open -a vscode. Any idea how?
0
votes
2answers
126 views

After uninstalling Oh-My-Zsh, my terminal is messed up

This is not a duplicate question. I've already looked at the answers for Uninstalled zsh, terminal gone weird, and although I changed the settings, it still defaults back to zsh title, with a ...
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 ...
5
votes
2answers
884 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 ...
0
votes
1answer
96 views

Randomize MAC Address Using Platypus [duplicate]

I am running the following script in Platypus but the MAC address does not change: #!/bin/zsh IF=en7 mac=`ifconfig $IF | awk '/ether/{print $2}'` echo "$IF mac before change=$mac" randmac=`openssl ...
1
vote
1answer
193 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
2answers
408 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.
1
vote
1answer
69 views

macOS terminal: quick way to edit command options after bash/zsh autocomplete

The issue I use autocomplete from history a lot whether that's with up-arrow or typing the first few letters and completing the whole command including all arguments (options and others) with right-...
0
votes
0answers
73 views

Terminal and iTerm appear to be partially opening in zsh

I recently installed Julia on my iMac running High Sierra. Julia seems to want to run in the Z-shell whereas I normally use bash. I haven't run Julia today but my Term2 windows are screwed up since ...
1
vote
1answer
749 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 ...
0
votes
2answers
84 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 ...
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 ...
0
votes
1answer
77 views

What am I doing that causes zsh to silently change to vi mode?

I'm a software developer, and as such I frequently use Terminal.app. I've been using it for years. At some point in the last week or two, I started encountering this problem somewhat frequently; I've ...
0
votes
0answers
1k views

Pasting long string in terminal (iTerm) is very slow [duplicate]

I use iTerm (default settings) + oh-my-zsh on my macOS. To setup my mac i used dotfiles from mathiasbynens/dotfiles which i'm happy with but the only issue i can't figure out how to fix is, when i ...
1
vote
1answer
3k views

How can I change my font and coloring in Oh My Zsh to match a theme I want

I'm using Oh My Zsh and I was using the "Agnoster" theme for a while, but now I want to switch to "Amuse". So I went into my ~/.zshrc file and changed the theme config line to ZSH_THEME=amuse This ...
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 ...
0
votes
1answer
68 views

What is the path to the global directory for binary files in MacOS?

What is the path to the global directory (for example: /usr/local/bin etc.) for binary files in macOS? The problem is that I can run the command from another user. With this command I want to start ...
4
votes
2answers
677 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 ...
2
votes
1answer
169 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 ...
0
votes
1answer
171 views

Hotkeys don't work in zsh when $TERM is set to screen-256color

As per various other discussions I bound opt+<- to 0x1b 0x62and opt+-> to 0x1b 0x66. This works great in zsh, but not in tmux. In tmux opt+<- does jump backwords per word, but also seems to do ...
0
votes
1answer
258 views

Terminal/ZSH Problems & Permission problems

I downloaded something out of the Internet and executed it, which might could have malware. After that I deleted all of that and i opened my Terminal and it gave me this error: /Users/flawn/.zshrc:.:...
1
vote
1answer
73 views

Homebrew install package which then won't run

I've installed homebrew and used it successfully for installing and using packages before. But when I installed a packaged called "shpotify" that can be used to control spotify from the command line, ...
0
votes
3answers
485 views

How to caffeinate a function on CLI?

Mac's caffeinate tool accepts the name of a utility: caffeinate sleep 1, for instance. Is there any way for it to accept a function as well? For example: function mysleep { sleep 2 } caffeinate ...
0
votes
2answers
299 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 ...
1
vote
1answer
2k views

changing user prompt terminal

I am new to using macs. I was using the bash shell, but recently tried switching to using iTerm2 and zsh. Originally, it looked the way I wanted, but something changed and reformatted my shell. ...
4
votes
2answers
10k 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 ...
1
vote
1answer
135 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 ...
2
votes
1answer
484 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 ...
1
vote
1answer
568 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
442 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:...
3
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 ...
1
vote
1answer
14k 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 ...
1
vote
1answer
771 views

tmux always modify my zsh PATH

I'd like to use tmux inside my iTerm2. and I have the following in my ~/.tmux.conf file. set-option -g default-shell /bin/zsh set-option -g default-command "/bin/zsh -c 'which reattach-to-user-...
3
votes
1answer
681 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
0
votes
0answers
491 views

Go2shell don't work with zsh

I recently switched to zsh from bash, and Go2Shell don'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 ...
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 ...
0
votes
1answer
714 views

iterm2 tab and window titles remove current process information

I've found tons of places that describe how to get the window title and tab titles to reflect the current directory (relative to my home directory). Here is what is in my .zshrc: precmd() { # sets ...
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?
0
votes
1answer
512 views

Weird null characters ^@ output on iTerm 2 / zsh when a command is running

When I m using iTerm 2 (with zsh), and a command is running at the prompt, every minute or so ^@ (NULL character) got displayed on the terminal. Below is an example, using socat, but other commands ...
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-...
0
votes
1answer
193 views

autocomplete in zsh after `npm run tdd` command

I'm using OS X 10.10.3, I have installed zsh. And every time when I want to run a specific test I configured in package.json to execute npm run tdd followed by the test file. In linux systems if I ...
3
votes
2answers
618 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 ...
0
votes
1answer
64 views

How to get local directory names into terminal window titles?

The title of my terminal window is: Terminal -- bash -- 130x39 This is how I see them listed in Terminal->Window and it is very hard to know which one is which. When I use multiple terminals, the ...