0

Here is the scenario. Let's say I am in a directory ("Downloads")

enter image description here

Now I type rm -rf and press the tab key for the list of files to show up. So I get:

enter image description here

I press tab again (three times) and select file1

enter image description here

Notice that the cursor is just after last character of file1. Now I type * after it. What I get is this:

enter image description here

oh-my-zsh automatically inserts an extra space between file1 and *. This is disastrous because it will delete all files and folders in this directory. I have lost a bunch of files multiple times because of this behavior of oh-my-zsh. This does not exist in the default zsh shell. How can I fix this problem?

simo54
  • 218
  • 5
  • 16
vicky
  • 93
  • 1
  • 6
  • 1
    If there's a bug in oh-my-zsh you need to report it to the maintainers. – jonrsharpe May 29 '22 at 16:32
  • 1
    Playing around with this, I was able to get the default `zsh` behavior by commenting out the line `zstyle ':completion:*:*:*:*:*' menu select` in `~/.oh-my-zsh/lib/completion.zsh`. I have no idea what that option does - if you figure it out, please post an answer here. [This answer](https://stackoverflow.com/a/24359779/) has some information on how to make changes to `omz` that will survive any future updates. – Gairfowl May 29 '22 at 18:06
  • FYI this belongs on SuperUser, not Stack Overflow (it's general computing, not programming-related). Also, it's really important to include properly-formatted text, not images of text. See [Please do not upload images of code/data/errors when asking a question.](//meta.stackoverflow.com/q/285551) for reasons why this is important. – David Makogon May 31 '22 at 01:40
  • @DavidMakogon Oops! Sorry. I will be careful next time. – vicky Jun 01 '22 at 07:21

0 Answers0