Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just switched to zsh (from tcsh) and have only run into one serious frustration: There are multiple completions for pushpushd and pushln. I’d really like to only have pushd available, since this is really tripping up my muscle memory.

How can I set this up using zsh completion (specifically compsys)?

share|improve this question

migrated from stackoverflow.com May 7 '11 at 15:55

This question came from our site for professional and enthusiast programmers.

up vote 2 down vote accepted

I don't know how to control the completion so precisely, but there is a builtin function called disable, which disables a command itself.

If you add disable pushln to your .zshrc, the pushln builtin will be disabled and no longer be displayed as a candidate.

share|improve this answer
Thanks - that's sufficient for what I was hoping to do! – Chris Hanson Apr 5 '11 at 22:27

Does this solve your issue?

alias push='pushd'
share|improve this answer
No, because that just means there'll be three completions for push rather than two. I want to start typing push (e.g. type either pus or push) and have the only completion be pushd. – Chris Hanson Apr 4 '11 at 23:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.