Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

The grml zsh configuration contains a zsh abbreviation for a command I have never seen before:

#   key   # value                  (#d additional doc string)
#A# start
    # <snipped>
    'G'    '|& grep --color=auto '

I am wondering why the abbreviation G expands to |& and not |. So the question is:

What is the difference between |& and |?

share|improve this question
It can be searched for in man zshall by entering /\|&. The pipe needs to be escaped. – Daniel Beck Oct 19 '12 at 12:04
up vote 3 down vote accepted

|& is short form for 2>&1 | – it redirects both stdout and stderr over the pipe.

share|improve this answer

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.