Questions tagged [oh-my-zsh]

oh-my-zsh is an addon to zsh that adds additional functions, autocomplete helpers and themes.

Filter by
Sorted by
Tagged with
52 votes
2 answers
25k views

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

Googling this didn't show up any results. Here's what I mean: I have a binary file named x in my path (not the current folder, but it is in the PATH), and also a folder with the same name in the ...
Gabi Purcaru's user avatar
43 votes
6 answers
128k views

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

I was trying new dev environments including zsh and oh-my-zsh. Now that I have installed oh-my-zsh, it starts by default on my terminals (iTerm2 and terminal) always start with zsh and with the ...
Charlie Parker's user avatar
42 votes
7 answers
16k views

Why do I lose my ZSH history?

Every once in a while I discover my zsh history has been truncated (or maybe lost entirely, difficult to tell), and I have to restore it from backup. For example, today: ls -lh ~/.zsh_history -rw----...
Alexander Ljungberg's user avatar
35 votes
7 answers
87k views

How to display the name of the current Virtualenv?

I'm using virtualenv, virtualenvwrapper, zsh, oh-my-zsh, terminator, on Crunchbang. I'm trying to display the name of the current virtualenv like so workon example (example)... I've tried many ...
Lynob's user avatar
  • 4,164
33 votes
2 answers
26k views

Start zsh with a custom zshrc

I want to be able to start zsh with a custom rc file similar to the command: bash --rc-file /path/to/file If this is not possible, then is it possible to start zsh, run source /path/to/file, then ...
hjkatz's user avatar
  • 433
32 votes
7 answers
41k views

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

I'm using macOS 10.15.2 with iTerm2, zsh 5.7.1 and oh-my-zsh (theme robbyrussell). I noticed that the prompt print is slightly slow respect to the bash one. For example, if I press enter, cursor ...
floatingpurr's user avatar
30 votes
4 answers
20k views

First characters of the command repeated in the display when completing

The first two chars were repeated while I use Tab to do completion. In the screenshot below, cd is repeated. I have tried rxvt-unicdoe, xterm, terminator. All these terminal emulators have this ...
jilen's user avatar
  • 777
28 votes
11 answers
123k views

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

I just tried to install oh-my-zsh. I get the following error when I try to run rvm: zsh: command not found: rvm I also get the following error when I try to open a new tab: /Users/jack/.zshrc:...
keruilin's user avatar
  • 381
26 votes
5 answers
14k views

Clear or disable aliases in zsh

I installed oh-my-zsh to make terminal use a bit easier. One thing that bugs me though is the prolific aliases added by it, like "ga", "gap", "gcmsg", "_", which are harder to remember than the ...
Siyuan Ren's user avatar
  • 1,362
25 votes
1 answer
5k views

how to find file defining an alias

I am having a problem I'm not sure how to get around. Somehwhere on my system, I have an alias defined as such: alias subl=\''/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl'\' I ...
Ali Samii's user avatar
  • 441
23 votes
7 answers
27k views

zsh compinit: insecure directories, run compaudit for list

When I try to login as root, this warning comes up. luvpreet@DHARI-Inspiron-3542:/$ sudo su Password: zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and ...
Luv33preet's user avatar
19 votes
1 answer
3k views

Tab completion of "../" in zsh

In bash, I can use tab-completion to move one directory up and descend down again another path. For example, suppose I'm in $HOME/folder1, and I want to cd to $HOME/folder2. $HOME only has the two ...
andreas-h's user avatar
  • 649
19 votes
1 answer
19k views

What is the key difference between grml zsh config and oh-my-zsh config

Now I'm on the oh-my-zsh, but I'm not sure that it is perfect choice. What is the key difference between grml zsh config (github repo) and oh-my-zsh config? In which case should I prefer grml or oh-my-...
petRUShka's user avatar
  • 1,242
18 votes
7 answers
23k views

Changing cursor style based on mode in both zsh and vim

I use vi-mode in oh-my-zsh with the af-magic theme. I want the cursor style to indicate whether I am in normal mode (block) or insert mode (beam), both in zsh and in vim. This is what I have so far: ...
maddingl's user avatar
  • 584
18 votes
4 answers
4k views

Per-directory history in zsh

I am happily using zsh since a while now, and I am quite satisfied with my history settings, which are: # Write to history immediately setopt inc_append_history # History shared among terminals ...
AkiRoss's user avatar
  • 613
18 votes
1 answer
3k views

How to disable autocorrection for sudo [command] in zsh?

I have zsh and oh-my-zsh with default values and can't figure out how to turn off autocorrection for specific commands, that I often use, such as: sudo mc or sudo gem update. The thing is that I have ....
Alexei Danchenkov's user avatar
17 votes
5 answers
7k views

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

In recent months, I find that if I copy the URL in Chrome and then Shift-Insert in the urxvt, the pasted URL is escaped. For example, the original URL is: http://example.com/?a=c the pasted content ...
宇宙人's user avatar
  • 279
17 votes
3 answers
2k views

How to fix tab completion so it doesn't hide entries?

I'm using oh-my-zsh on Mac OS X with homebrew'ed zsh 4.3.12. I stumbled recently on a weird problem. In scripts/not-used I have several .R files: breakdowns.R eventloop.R ...
Nikola Knezevic's user avatar
14 votes
4 answers
12k views

Using zsh autocompletion for alias

I have created a few aliases for git in zsh. For example: gch = git checkout, grb = git rebase --committer-date-is-author-date and some more complex useful zsh functions for git commands. But how can ...
Patrick Artounian's user avatar
14 votes
1 answer
3k views

Change Zsh theme in Android Studio

I've recently jumped ship to zsh and I'm using the Oh my Zsh! theme blinks. It looks very nice in the OSX Terminal, but it looks very bad in Android Studio's terminal. So my question is is there a ...
Sheharyar's user avatar
  • 453
13 votes
2 answers
2k views

`time echo` got no output

I'm using Mac, and I'm trying to time the command execution. If I do time echo it doesn't have any output But If I do time ls it does give me the output of time function Any idea why that ...
songyy's user avatar
  • 273
12 votes
1 answer
2k views

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

Context zsh shell, oh-my-zsh framework, no special zsh's configuration (same problem with or without zsh-completions): see .zshrc at the end. Trouble If a directory contains: a makefile with ...
Denis Bitouzé's user avatar
12 votes
2 answers
17k views

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

Is it possible to trigger fzf history search automatically in zsh shell? In this video, the user clicks Ctrl+r to start the history search and then starts typing. Is it possible to start the history ...
kvs's user avatar
  • 121
12 votes
3 answers
2k views

Completion of words on the screen as in VIM (Bash or Tmux)

How can I configure Bash, Zsh or Tmux to complete the last matching identifier on the screen? Consider this common scenario: $ git fetch remote: Counting objects: 16, done. remote: Compressing ...
dotancohen's user avatar
  • 15.8k
11 votes
4 answers
12k views

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

I've installed Oh My Zsh with a few custom plugins, such as zsh-autosuggestions. Now while Oh My Zsh supports automatic updates, this doesn't apply to custom plugins (installed to the custom/ ...
Eugene Yarmash's user avatar
11 votes
1 answer
18k views

zsh HISTFILE - still read from ~/.zsh_history

I set my $HISTFILE env var to something custom, and my zsh is indeed writing to the new histfile. But when using up-arrow or other history-searching capabilities, it still reads from ~/.zsh_history. ...
lajarre's user avatar
  • 165
11 votes
2 answers
1k views

zsh tab complete . to ./

Not a duplicate: I'm not looking for a way to complete directory names or execute scripts from a fixed directory. The issue I'm trying to solve is to get completion for the current directory without ...
zapl's user avatar
  • 113
10 votes
2 answers
44k views

How to change theme with zsh

I am using this configuration on my mac(unix) to customize my shell. I am using zsh instead of bash and there are too many things along with zsh. This .dotfile configuration contains vim, zsh, git, ...
abhimanyuaryan's user avatar
9 votes
3 answers
5k views

sudo: nocorrect: command not found

I am using zsh and oh-my-zsh on Arch Linux. I am not able to make directory using mkdir edward@ArchLinux ~ $ sudo mkdir -p /samba/raspberry [sudo] password for edward: sudo: nocorrect: command ...
Alex Jones's user avatar
  • 6,353
9 votes
2 answers
9k views

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

I have recently switched from bash to zsh and now when I type ls * It does not simply list all files in this directory, but shows a tree of two levels. Also rm -rf somepath/* fails with the ...
morja's user avatar
  • 193
9 votes
1 answer
1k views

Why does CTRL+U clear everything with zsh, not only the text before cursor, as expected

I've installed zsh and oh-my-zsh on my Mac terminal, then CTRL+U cut everything I input, no matter where the cursor is. If it's a common case, how can I set the CTRL+U to the original behavior?
chrisyue's user avatar
  • 205
9 votes
1 answer
5k views

Why is zsh (oh-my-zsh) completing directories that don't exist?

UPDATE 3 I've worked out that these annoying autocomplete options are actually usernames. I.e. they exist in /etc/passwd I have users such as _kadmin_admin and _kadmin_changepw and many others ...
asgeo1's user avatar
  • 195
8 votes
7 answers
6k views

How to run windows executables from terminal without the explicitly specifying the .exe extension?

As the title says most of the question, how can we run windows executables without specifying the explicit .exe suffix at the end. For example reducing the call like explorer.exe . to explorer ., or ...
Animesh Sahu's user avatar
8 votes
1 answer
5k views

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

I would like to alias my ls command, but there is a previously defined alias for it which I believe gets invoked first before my definition! I am using .zshrc to define my alias, and here is what I ...
Farhad's user avatar
  • 83
8 votes
1 answer
11k views

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

Please forgive me if I'm doing something stupid here, the documentation is huge and searching didn't turn up anything yet. I'm trying to create shell completions for my custom script called fab. For ...
gronostaj's user avatar
  • 688
8 votes
1 answer
13k views

How to increase history in oh-my-zsh?

I just installed oh-my-zsh for the first time. I just want to know how can I modify the number of past commands that are remembered in history? Where can I set this setting?
a06e's user avatar
  • 1,707
7 votes
3 answers
4k views

zsh fails at path completition when command is vim

When I try to autocomplete files (with vim as argument 0): vim ~/.conf <TAB> It shows: _arguments:450: _vim_files: function definition file not found _arguments:450: _vim_files: function ...
user avatar
7 votes
2 answers
18k views

What ZSH theme does Kali use?

Could someone please give me the name of the default ZSH theme that Kali uses? Also, if you could please provide a link to it.
qualk's user avatar
  • 73
7 votes
1 answer
5k views

Why does TMux fail to initialize oh-my-zsh correctly?

Whenever I open a new TMux session, I'm greeted with this: /home/foo/.oh-my-zsh/oh-my-zsh.sh:3: command not found: env env_default:1: command not found: env env_default:1: command not found: grep ...
testname123's user avatar
7 votes
1 answer
3k views

oh-my-zsh style completion for directory/file paths without oh my zsh

I had oh-my-zsh installed for a while, and I could type a full path using only one letter, then press tab to case-insensitively autocomplete the whole thing. For example, if I had a file at ~/...
Josh Sherick's user avatar
6 votes
2 answers
10k views

Zsh icons broke in urxvt

so I am currently using manjaro linux and I am using urxvt as my terminal which I love so before all this starts switching the terminal is not an option, sorry if I am being rude. I installed zsh to ...
KnownAsDon's user avatar
6 votes
1 answer
7k views

Remove colors from zsh tab-completion

I don't want to see colors in the suggestions of zsh tab-completion. They make the reading harder for me. How can I do that? Here is my .zshrc: # _ # _______| |__ # |_ / __| _ \ # / ...
3N4N's user avatar
  • 857
6 votes
3 answers
4k views

How can I get zsh's completion working in the middle of the filename?

This works Normally, zsh's tab completion works well. $ touch foo-1-bar foo-2-bar $ touch f<Tab> $ touch foo--bar ^ cursor here Pressing Tab again brings up a menu from which I ...
Sparhawk's user avatar
  • 19.9k
6 votes
1 answer
2k views

Zsh: hash directory completion

I have configured some directories alias via hash -d hashname=/path/to/directory command. Completion for that aliases works for a long time like this: % hashn<TAB> # becomes hashname, pressing &...
Artur Eshenbrener's user avatar
6 votes
4 answers
15k views

Changing directory color with zsh + Prezto

I am using Prezto + zsh as my shell. I would like to change the color of directories when I ls my directory. For instance, here is what I currently have: Obviously, this is no fun, as I'm hardly ...
Cole Bittel's user avatar
6 votes
4 answers
3k views

How to append / extend zshell completions?

I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance). This could easily archived by the following code: ...
Martin's user avatar
  • 215
6 votes
1 answer
12k views

How to export an environment variable from .sh file in zsh? [duplicate]

I have the following shell script TEST=/foopath export TEST It is in a file called test.sh and on which I ran chmod +x test.sh When I run ./test.sh I expect that I can then execute echo $TEST and ...
ams's user avatar
  • 1,358
6 votes
2 answers
2k views

Preventing zsh from using aliases in CWD (prompt)

I have the following personalized theme activated with oh-my-zsh (latest version of zsh and oh-my-zsh): local return_code="%(?..%{$fg[red]%}%? %{$reset_color%})" local user_host='%{$terminfo[bold]$...
Amelio Vazquez-Reina's user avatar
6 votes
1 answer
611 views

How to manually add the commands to autosuggestion plugin of zsh?

zsh has a great feature of autosuggestion (through a plugin) which remembers as one type in the terminal and then helps out during next instance of typing the same command. I have around 1000 lines ...
Praveen Kumar-M's user avatar
6 votes
1 answer
2k views

custom zsh autocomplete

I'd like to write a zsh completion for pytest. Where do I Start? I'm using oh-my-zsh. in .zshrc: fpath=($HOME/.mycompletions $fpath) autoload -U compinit && compinit -u in $HOME/....
mike's user avatar
  • 181

1
2 3 4 5 6