zsh auto-complete event designator

Posted by simont on Super User See other posts from Super User or by simont
Published on 2012-02-19T03:44:16Z Indexed on 2012/04/06 23:33 UTC
Read the original article Hit count: 300

Filed under:
|

(See my previous question for additional context).

I'm migrating to zsh from bash, and using oh-my-zsh. When my zsh history looks something like the following:


git status
git add -A
git commit

I want to be able to re-run git add -A. To do that, I could use !?git add, which should:

!?str[?] Refer to the most recent command containing str. The trailing ‘?’ is necessary if this reference is to be followed by a modifier or followed by any text that is not to be considered part of str.

The link for zsh event designators is here.

Unfortunately, I can't do this - as I'm typing !?git add, as I hit the ' ', it auto-completes the command to the most recent command matching git (ie, it auto-completes with git commit). I can't use the event designator properly because of this auto-completion as I hit the space.

I assume this is an oh-my-zsh feature. I have no idea where to look, though - greping for 'complet' in the oh-my-zsh source doesn't get me anywhere.

My question: how do I turn off this feature? Or, if that's not something that's known, where should I be looking - if I was going to implement this auto-complete when whitespace is entered, where would be a logical place to do so in the oh-my-zsh framework?

© Super User or respective owner

Related posts about zsh

Related posts about oh-my-zsh

  • What does 'd' do in oh-my-zsh?

    as seen on Super User - Search for 'Super User'
    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/views/static_pages 1 ~/Desktop/Dropbox/project_Sites/rails_app/app/views 2 ~/Desktop/Dropbox/project_Sites/rails_app 3… >>> More

  • Git autocomplete stopped working in Oh My ZSH

    as seen on Super User - Search for 'Super User'
    Help! My git autocomplete stopped working in Oh My ZSH. It was working, but now it is now. I'm not sure what changed, so I'm hoping someone can help me track down the problem. I've tried uninstalling and reinstalling but no luck, Which plugins would you like to load? (plugins can be found in… >>> More

  • zsh auto-complete event designator

    as seen on Super User - Search for 'Super User'
    (See my previous question for additional context). I'm migrating to zsh from bash, and using oh-my-zsh. When my zsh history looks something like the following: git status git add -A git commit I want to be able to re-run git add -A. To do that, I could use !?git add, which should: !?str[… >>> More

  • switching users in byobu session

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I launched a byobu session (tmux) and then tried to switch to a user called kommander "su - kommander", it immediately prompted me with: [Oh My Zsh] Would you like to check for updates? Type Y to update oh-my-zsh: Now I usually press "n" and everything is fine, but within the byobu session, when… >>> More

  • Zsh super slow inside my Git repo

    as seen on Super User - Search for 'Super User'
    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's everything. I tried removing all plugins and that, strangely, didn't do anything at all when I… >>> More