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

For example, i need to call echo or date command:

~  echo "%k%M"
~  date +%k:%M

But if I run it in bash I'll get what I need:

$ date +%k:%M
$ echo "%k%M"

So, how to prevent unwanted string expansion in zsh?

I'm using zsh 4.3.17 and latest oh-my-zsh. Also, if I run zsh without oh-my-zsh, it works as expected.

share|improve this question
Did you try another version? I'm using zsh 5.0.0, and it reacts the same way bash does. – Dennis Nov 20 '12 at 16:09
@Dennis Actually, I'm new in zsh, and I'm not sure it's a zsh issue or oh-my-zsh. Because if I run zsh without oh-my-zsh I do not see any such issues. – qehgt Nov 20 '12 at 16:30
Ah, OK. You should mention that in your question. – Dennis Nov 20 '12 at 16:34

Preface your command with noglob

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.