Skip to main content
53 votes
Accepted

zsh compinit: insecure directories, run compaudit for list

You can list those insecure folders by: compaudit The root cause of "insecure" is these folders are group writable. There's a one line solution to fix that: compaudit | xargs chmod g-w Please see ...
Bruce Sun's user avatar
  • 646
40 votes
Accepted

oh-my-zsh's prompt is slow: how to fix this

I don't know what oh-my-zsh puts in the prompt by default. Maybe it tries to identify the version control status, that's a very popular prompt component which might be time-consuming. To see what's ...
Gilles 'SO- stop being evil''s user avatar
31 votes

Why do I lose my ZSH history?

ZSH History file can be truncated/lost/cleaned for multiple reasons those can be: Corruption of the zsh history file (because of a power-cut/system-fail while a shell is opened, in this case fsck ...
intika's user avatar
  • 14.6k
29 votes

How to disable "auto cd" in zsh with oh-my-zsh

This worked for me: unsetopt autocd
Eyal Levin's user avatar
26 votes
Accepted

`time echo` got no output

In zsh, the time keyword has no effect on builtins (or other similar shell-internal constructs). From this mailing list post: Additional note: The time builtin applied to any construct that is ...
muru's user avatar
  • 73.9k
25 votes

After installing oh-my-zsh: ... /.zshrc:source:34: no such file or directory ... /.oh-my-zsh/oh-my-zsh.sh

Installing zsh doesn't install Oh My Zsh, which might explain if you don't have an oh-my-zsh.sh file at all (this was the case for me). You can install Oh My Zsh by running sh -c "$(curl -fsSL ...
David Pasztor's user avatar
22 votes
Accepted

Changing cursor style based on mode in both zsh and vim

I think it's better to use precmd() instead of preexec(): # .zshrc _fix_cursor() { echo -ne '\e[5 q' } precmd_functions+=(_fix_cursor) This way: you don't have to change .vimrc cursor is fixed ...
Pawel Wiejacha's user avatar
20 votes

oh-my-zsh's prompt is slow: how to fix this

Checking if git dir is dirty seems to be causing the delay. To speed up shell response, disable checking if dir is dirty by running in your terminal : git config --add oh-my-zsh.hide-dirty 1 Remember ...
Sunny Patel's user avatar
19 votes

First characters of the command repeated in the display when completing

I had the same problem and found my solution here: https://github.com/robbyrussell/oh-my-zsh/issues/5157#issuecomment-226031519. Simply put the following into your ~/.zshrc. export LC_CTYPE=en_US.UTF-...
xh3b4sd's user avatar
  • 291
18 votes

How do you "disable" oh-my-zsh (and zsh) without uninstalling it?

chsh -s /bin/bash To manually set a new default shell, do chsh -s /my/ new/shell, eg chsh -s /bin/bash. Then simply reopen your shells.
Honghui Li's user avatar
17 votes

oh-my-zsh's prompt is slow: how to fix this

I had the same issue with it, and it was also the git_prompt_info which causes the shell to slow down. Be aware, that some oh-my-zsh themes use the git plugin sort of "hard coded" in their ...
pkoo's user avatar
  • 171
17 votes
Accepted

How to overwrite aliases in my shell (Oh My Zsh)?

The alias command overrides a previous alias by the same name. So generally, if you want your aliases to override the ones defined by a zsh framework, put them at the end of your .zshrc. The same goes ...
Gilles 'SO- stop being evil''s user avatar
16 votes
Accepted

How to auto-update custom plugins in Oh My Zsh?

Oh My Zsh upgrades are handled by the $ZSH/tools/upgrade.sh script. To update any custom plugins (assuming those are Git clones), you can add these lines to the end of the script before the exit ...
Eugene Yarmash's user avatar
16 votes
Accepted

Prevent completion of files for 'make' command in zsh shell

You can ask zsh to only display targets tag for the make command completion with zstyle ':completion:*:*:make:*' tag-order 'targets' Add above code somewhere after the line autoload -U compinit &...
jimmij's user avatar
  • 47.6k
15 votes

How do you "disable" oh-my-zsh (and zsh) without uninstalling it?

As it's a bit hidden in @Gilles answer the quick way to load zsh without any config e.g. .zshrc .zshenv etc zsh -f This is useful when you want to test if anything in your config is preventing some ...
zzapper's user avatar
  • 1,150
15 votes

Why do I lose my ZSH history?

I don't think any zsh option is going to save your precious .zsh_history. My .zsh_history has been randomly truncated over the years, and I still don't know why. I've tried every option I could find ...
Eric Duminil's user avatar
12 votes
Accepted

Zsh icons broke in urxvt

First of all, there is a significant difference between the terminals types rxvt and unicode-rxvt (often abbreviated to urxvt). You have indicated that the terminal you are using is "URXVT Version 9....
J G Miller's user avatar
12 votes

Changing cursor style based on mode in both zsh and vim

This works perfectly for me, it's taken from here: https://gist.github.com/LukeSmithxyz/e62f26e55ea8b0ed41a65912fbebbe52 # vi mode bindkey -v export KEYTIMEOUT=1 # Change cursor shape for different ...
Cornelius Roemer's user avatar
11 votes

paste url into terminal(urxvt, zsh) failed, some characters get escaped

This is a Z Shell module known as "url-quote-magic" in action. It is trying to ensure that you end up with what you intended even though you completely ignored shell metacharacters and quoting. It ...
JdeBP's user avatar
  • 69.5k
11 votes
Accepted

Remove colors from zsh tab-completion

With pure zsh: zstyle ':completion:*' list-colors Conversely, to use the same colors as the ls command: eval "$(dircolors)" zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} This should work ...
Gilles 'SO- stop being evil''s user avatar
11 votes
Accepted

How to get asterisk '*' in zsh to have same behaviour as bash?

ls * would have the same effect in bash. No matter what the shell is, what happens is that the shell first expands the wildcards, and then passes the result of the expansion to the command. For ...
Gilles 'SO- stop being evil''s user avatar
10 votes
Accepted

What ZSH theme does Kali use?

Kali Linux does not use a separate theme file for its zsh customizations. So you cannot download the Kali Linux zsh theme, drop it in themes/, and set ZSH_THEME to its name as you usually can in Oh My ...
Roman Riabenko's user avatar
9 votes

zsh fails at path completition when command is vim

This works for me : rm $ZSH_COMPDUMP && exec zsh
James Kokou Gaglo's user avatar
9 votes

How to change theme with zsh

Thanks to @John P above in the comments as it's really his answer but for those wanting a way to change zsh theme "on the fly" without editing and re-sourcing the config, simply define this ...
Hari Honor's user avatar
9 votes
Accepted

Zsh: hash directory completion

You had the options auto_cd and cdable_vars turned on. With auto_cd, if you type a directory as a command name, the cd command is implied. With cdable_vars, if a directory doesn't exist, or a command ...
Gilles 'SO- stop being evil''s user avatar
9 votes
Accepted

Files in $ZSH_CUSTOM not loaded by oh-my-zsh

Files you create in $ZSH_CUSTOM need to have a file extension of .zsh, according to the documentation: oh-my-zsh's internals are defined in its lib directory. To change them, just create a file ...
Wieland's user avatar
  • 6,569
9 votes
Accepted

How do I add colored-manpages plugin to my zsh profile (using oh-my-zsh)?

Just add the plugin to the plugins definition in .zshrc: plugins=(last-working-dir colored-man-pages) Then start a new shell and you'll see the plugin activated.
Stephen Kitt's user avatar
9 votes

How to auto-trigger history search in zsh using fzf (fuzzy finder)?

This is described in the original GitHub repository. In case you are using homebrew you'll just need to type $(brew --prefix)/opt/fzf/install and configure it the way you like. The script will create ...
plattenschieber's user avatar
9 votes

How to properly make custom zsh completions "just work"?

TL,DR: In normal operations, just drop the file into the appropriate directory. While testing, you need to remove the cache file (.zcompdump by default, but users can put it in a different location, ...
Gilles 'SO- stop being evil''s user avatar

Only top scored, non community-wiki answers of a minimum length are eligible