3

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

~  echo "%k%M"
debs-e420"%k%M
~  date +%k:%M
debs-e42010:24

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

$ date +%k:%M
10:25
$ echo "%k%M"
%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.

3
  • Did you try another version? I'm using zsh 5.0.0, and it reacts the same way bash does.
    – Dennis
    Commented Nov 20, 2012 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
    Commented Nov 20, 2012 at 16:30
  • 1
    Ah, OK. You should mention that in your question.
    – Dennis
    Commented Nov 20, 2012 at 16:34

1 Answer 1

4

Preface your command with noglob

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .