Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

oh-my-zsh overrides default Meta-. behavior #497

Closed
akahn opened this Issue · 12 comments

10 participants

@akahn

In bash and zsh Meta-. ("meta-dot") inserts arguments from previous commands into the current command line. It's kind of like !$, but more interactive because it cycles through older arguments as you continue pressing the keybinding.

In oh-my-zsh, this same key combination does the equivalent of cd ... Is it intentional that oh-my-zsh overrides this built-in shell feature?

Here is the place in the code that sets this binding: https://github.com/robbyrussell/oh-my-zsh/blob/master/lib/key-bindings.zsh#L6

@praseodym

I'm quite bothered by this. Many shells implement this feature, so it works everywhere and I'm quite used to that.

@gwjo

Looking at the history this seems like a day 1 behavior, I guess @robbyrussell would need to answer if this is intentional or not.

That said, the insert-last-word widget (that does implements this) is also bound to ESC-_ ("escape-underscore") in emacs mode, so you could use that as an alternative. Or you could always set the keybinding back to the way you like it with

bindkey '\e.' insert-last-word
@akahn

I've patched this over on https://github.com/akahn/oh-my-zsh/compare/fix-alt-dot. Pinging @robbyrussell again so he can weigh in on the fate of this behavior.

@reinh

+1

@reinh

Also, #1019 is a duplicate :)

@matschaffer

+1, although this stuff ultimately led me to roll my own zsh config.

@reorx

+1, this feature nearly stop me using zsh

@andrewtch

+1, the default behaiviour is much more handy.

@ckrailo

+1 (mostly for the clobber pull request)

@fanweixiao

+1, just like @Reorx, this feature nearly stop me using zsh

@matschaffer
@robbyrussell

Believe this is now resolved! update away folks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.