Questions tagged [oh-my-zsh]
oh-my-zsh is an addon to zsh that adds additional functions, autocomplete helpers and themes
187
questions
101
votes
16
answers
80k
views
zsh starts incredibly slowly
ZSH takes about a second and a half from creating a new terminal window to being ready. I'm pretty sure that the culprit is compinit.
I haven't been able to find good documentation on compinit, but ...
59
votes
2
answers
50k
views
oh-my-zsh history completion
I have recently switched to zsh, using robbyrussell's oh-my-zsh. Before that i used bash with a lot of custom stuff and i am only missing one thing because zsh is trying to be 'too smart':
If i type ...
55
votes
3
answers
40k
views
Using wildcards in commands with zsh
Using commands such as rsync and scp with ZSH I've run into trouble. Instead of the (normal) behaviour of giving me all matching files, it won't run and returns:
➜ ~ rsync -azP user@server:~/* ~/
...
45
votes
4
answers
20k
views
Tmux and ZSH custom prompt : bug with window name
I have customized my ZSH prompt with oh-my-zsh to make it more readable and add information about git if I'm in a repository.
Example :
bob@inf [~/docs] %
bob@inf [~/src/nicest] master % (in a git ...
42
votes
5
answers
10k
views
Typing 'git log --oneline' in oh-my-zsh pipes to 'less'
I just switched to Oh My Zsh and I'm using the Avit theme.
When I type git log --oneline my output seems to be piped to less. It does this for whatever theme I use.
When I used bash shell, it never ...
36
votes
4
answers
93k
views
Zsh prompt with current working directory
In bash I have my PROMPT set like so
PS1="$(scutil --get ComputerName) \W\\$ "
Where I only see the computer name and only the name of the current directory that I am in, not the full path and a $ ...
36
votes
5
answers
31k
views
How to change the default shell in Cygwin?
I am trying to change my default shell from bash to zsh in cygwin.
The normal unix command chsh isn't available on cygwin
The etc/passwd file it seems isn't used anymore in existing versions of ...
34
votes
1
answer
3k
views
How stop zsh from eating space before pipe symbol?
When I type a space followed by the pipe symbol '|' on the zsh command line, zsh eats the space, placing the pipe symbol directly up against the prior word. How do I stop it from doing that? I'm not ...
33
votes
2
answers
90k
views
In zsh on mac OS, where is the source of $PATH? I cannot find it in .zshrc
When I run echo $PATH, my output is:
/usr/bin:/bin:/usr/sbin:/sbin
But in my .zshrc, $PATH is commented out:
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/...
25
votes
2
answers
8k
views
What does 'd' do in oh-my-zsh?
I just downloaded oh-my-zsh and found out that 'd' has been taken over by some command I do not know. Does anybody know what the output from this is?
0 ~/Desktop/Dropbox/project_Sites/rails_app/app/...
20
votes
2
answers
9k
views
zsh: keep all command outputs on terminal screen
I'd like to know how can I get zsh to behave like bash regarding this:
I want command outputs to always show up right below these commands in terminal.
For example, when I run the following command ...
19
votes
3
answers
7k
views
How to make Zsh not store failed command
Problem
I'm using oh-my-zsh and Antigen to manage my Zsh.
Sometimes I will accidentally enter a wrong/failed command into Zsh and it is very annoying when the zsh-autosuggestions plugin throws up ...
17
votes
4
answers
24k
views
Change the sudo su shell
Whenever I run sudo su from my normal zsh (which uses the oh-my-zsh framework), I'm forced to use the old Bourne shell (sh) by default (obviously; this is standard behaviour on most *nix-like systems)....
16
votes
1
answer
4k
views
How can I selectively disable zsh's version control integration when my CWD is on a remote filesystem?
I'm running zsh on OSX and on occasion I have to work on a mounted sshfs volume. However, git is REALLY slow over sshfs mounts. My prompt makes use of the vc mode stuff that zsh provides built in, but ...
15
votes
2
answers
13k
views
How I can specify a separate file for my aliases in oh-my-zsh?
I'm preparing a bash script, that will set a bunch of handy shell aliases at once. I'm using a pair of iTerm2 and oh-my-zsh.
I know that I can manually add aliases into ~/.zshrc.
I also know that I ...
14
votes
2
answers
8k
views
How to draw a line between commands in zsh shell
Does anyone know how to draw lines in between the commands in zsh?
Here is an example with MobaXterm:
14
votes
1
answer
9k
views
How to 'source' a shell script using bash from zsh?
I am using zsh and like it very much, but work a lot with Android source which has compilation scripts that require bash to be evaluated correctly. These scripts need to be sourced prior to ...
13
votes
3
answers
2k
views
oh-my-zsh turned on autopushd? How can I turn it off?
It appears that I have autopushd turned on (I know I didn't turn it on) and it is rather annoying because I prefer to pick and choose when to use the directory stack. How can I turn off autopushd?
I ...
11
votes
3
answers
16k
views
make a certain software version the default in ubuntu
I currently have 2 version of php installed on ubuntu 12.04.
one for php 5.3 installed using apt-get
while the other one is installed with xampp with php 5.5
When i execute these commands:
> ...
11
votes
1
answer
11k
views
iTerm 2 ZSH colors/themes not showed correctly
I have a clean installed mac, running OS X 10.11.4.
I have installed iTerm 2, and set it up to use oh-my-zsh.
I'm trying to set up a theme for my iTerm. I am trying to use the avit theme.
It's ...
10
votes
2
answers
5k
views
How to reclaim ^S in zsh?
I've found ^S mapped to be the fwd-search key for zsh (ohmyzsh) but I would like to use it in vim for various mappings as well - it seems like the zsh mapping is preventing me from using it now.
Any ...
10
votes
4
answers
5k
views
Why does updating Oh My Zsh give me an error about rebasing with unstaged changes?
I opened a terminal window and Oh My Zsh wanted to check for updates.
I entered Y for yes and then I got the error message:
Cannot pull with rebase: You have unstaged changes.Please commit or stash ...
9
votes
3
answers
12k
views
Custom iTerm appearance doesn't save after quitting iTerm
I'm new to Mac. Recently, I just installed iTerm2 and I also changed some of its fonts and theme (Oh My Zsh). All the changes worked perfectly but when I close iTerm everything reset to its default ...
9
votes
2
answers
8k
views
Sourcing an alias file in oh my zsh custom/ folder
I am trying to use the aliases defined in my ~/.aliases file in my zsh with oh-my-zsh installation. The documentation suggested that aliases/functions/ etc. should go in .oh-my-zsh/custom/ as files ...
8
votes
3
answers
37k
views
Oh my zsh on windows
I have installed Cygwin on my windows 8.1 Now I want to install ZSH and Oh My ZSH in cygwin.
I have installed ZSH in it by selecting Shells > Zsh in Select screen.
and I found this link to install ...
8
votes
1
answer
12k
views
zsh initial working directory
When I start a new zsh session it always seems to set its working directory to the last-known working directory of any other zsh session running on my system. Is there a way to configure zsh to just ...
7
votes
2
answers
3k
views
What is the difference between .zshrc and .zshrc-e
I've recently switched to using zsh instead of bash and I installed both zsh and oh-my-zsh. while messing with my configuration I noticed that there is a file named ".zshrc-e" in addition to the ...
7
votes
1
answer
5k
views
Change zsh auto titles to hide user and host
Right now, when I open a zsh termite terminal the window title is
user@host: ~
Is there any way to remove the user@host part without entirely disabling auto titles?
If I enable DISABLE_AUTO_TITLE ...
7
votes
1
answer
1k
views
oh-my-zsh history expansion on space or tab but not enter
In zsh with oh-my-zsh you can enter a history expansion command and press either space, tab, or enter, and it will expand out. For example:
ls /path/to/some/directory
cd !$<enter>
would expand ...
7
votes
5
answers
4k
views
OS X 10.11 (El Capitan) Making Zsh Very Slow
I just freshly installed El Capitan on my MacBook Pro. I had trouble earlier with the my terminal being too slow while typing in simple commands. I thought it might have been that I need to format my ...
6
votes
3
answers
3k
views
How to configure zsh with oh-my-zsh to keep git history visible after pressing "q"?
I use zsh with oh-my-zsh on a daily basis but there is a small thing that bothers me. If I use git log or any other similar command then the output occupies full terminal window. After pressing q the ...
6
votes
3
answers
2k
views
Tab completion in zsh makes duplicate characters
when using tab completion in zsh, using ohmyzsh, in a relatively fresh arch install, the first two characters will duplicate themselves and become not deletable.
For instance, I type yay -S terminato ,...
6
votes
2
answers
4k
views
Is it possible to use zsh in windows machines?
Is it possible to use zsh shell in windows along with console 2. If possible how can I install and configure it.
6
votes
2
answers
920
views
Aliases with numerical names
I just installed Oh My ZSH on my Mac. Everything is working great, except I can't define aliases with numerical names.
If I execute
alias 5="cd ~/Projects/Projectname/"
5
I get the following error ...
5
votes
5
answers
10k
views
Zsh super slow inside my Git repo
My Zsh is super slow inside a certain Git repo of mine. When I Google "zsh git slow", I get a bunch of results about Git autocompletion being slow, but autocompletion isn't necessarily my problem; it'...
5
votes
2
answers
3k
views
ZSH PS1 adding spacing when tabbing
I'm having an issue with zsh/oh-my-zsh with my custom PS1 prompt (that I brought across from bash).
When I use the built-in zsh/oh-my-zsh prompt and tab for auto-completion, this works as expected.
...
5
votes
3
answers
17k
views
ZSH completion functions broken
My oh-my-zsh install which has been working for almost a year has just broken. When I open a terminal, I get:
/home/marcel/.oh-my-zsh/lib/theme-and-appearance.zsh:2: colors: function definition file ...
5
votes
5
answers
10k
views
zsh history up-arrow history completion not working
I am not able to get the zsh history keybindings to work the way I'd like. I'd like to be able to type sudo and then use the up arrow to scroll through all history commands with the prefix sudo.
I ...
5
votes
2
answers
2k
views
zsh prompts to correct executable when running bundle exec
why does zsh ask to correct rspec to spec when running bundler?
✗ rspec --version
2.12.2
✗ bundle exec rspec --version
zsh: correct 'rspec' to 'spec' [nyae]? n
2.12.2
system:
ubuntu 12.10
using rvm
...
5
votes
1
answer
10k
views
Migrating from bash to zsh for Mac OS Catalina
As some of you may know, after upgrading to Mac OS Catalina, Apple is prompting users to migrate to zsh as the default shell.
Now, there is a warning that comes up every time bash is opened. It can ...
5
votes
2
answers
2k
views
How to prevent zsh from showing environment variable name instead of current path?
I'm using "oh-my-zsh".
I have an environment variable set to the current path, let's say:
PROJECT=/home/me/projects/client/project
and my zsh prompt looks like this:
me@my-machine:~PROJECT$
...
5
votes
1
answer
10k
views
oh-my-zsh (terminal) how to change prefix & suffix of new prompt window
Installed on my Mac running Yosemite is a few packages to make life in the terminal (iTerm 2) a bit better. I have oh-my-zsh (only plugin I have id antigen for oh-my-zsh) along with oh-my-git ...
4
votes
3
answers
6k
views
iTerm2 zsh oh-my-zsh open tab with same directory
Hi i just installed iTerm2 and tried to open a tab with the same directory as the tab that open it.
I tried Open a new tab in the same directory answer but still can't get the directory working.
It ...
4
votes
1
answer
4k
views
How do I install Oh My Zsh with a custom Zsh install?
So, I've just managed to install zsh on a machine which I have SSH access to (but importantly, no root access to) as per suggestions here. I then proceeded to attempt to install Oh My Zsh, and was ...
4
votes
1
answer
16k
views
How to create a command shortcut in BASH or ZSHRC shells?
I know how to create an alias or a PATH however those are both used to navigate folders.
How would you create a shortcut to say quickly type the following commands every time?
alog = tail -f /var/...
4
votes
3
answers
24k
views
MySQL in OS X Terminal.app -- how to exit mysql command prompt but continue using the Terminal?
I type mysql and enter the mysql command prompt (denoted ~mysql) (I have ohmyzsh installed also). But I can't seem to do anything within it. No commands work. To exit, I type 'exit', and get [Process ...
4
votes
1
answer
9k
views
How do I use sudo with alias in zsh?
Say I have these two in my .zshrc:
alias sudo='nocorrect sudo'
alias boot27='grub-reboot 4 && reboot'
boot27 gives boot27: command not found.
If I change the alias to 'nocorrect sudo ' ...
4
votes
1
answer
5k
views
Terminator and Zsh: ctrl+D not closing session
I've been a Terminator and zsh user for a while with consistent profiles across several machines.
However, on a freshly installed Linux Mint machine, for some reason Ctrl+D (EOT) isn't closing the ...
4
votes
1
answer
4k
views
zsh (or maybe oh-my-zsh) history gets confused with multi-line commands
if I use the up arrow in a zsh session, as you'd expect I get previous commands, from newest to oldest. Now (whether it's zsh or oh-my-zsh doing this I don't know), but if I type the start of a line ...
4
votes
1
answer
1k
views
How to make 'zsh' to stop autocorrect for some words?
I'm using zsh + oh-my-zsh.
How can I make zsh to stop auto-correct for some words?
e.g. When I do make install or sudo apt-get install, it always tries to auto correct install to INSTALL. Can I ...