Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh weird behaviour (possibly bug?)



Hi,

I often notice that complex shell commands (usually with 5-10 pipes
and plenty of awk/sed) produce no output in zsh, but work fine in
bash. I found a really simple one today.
  ls | sed 's/\<\(.\)\([^ ]*\)/\u\1\L\2/g'
This produces no output in zsh, but does in any bash version. Further
investigation revealed this to be due to my precmd's/postcmd's. So
some more data:
1: precmd () {     print -Pn "\ek%n@%m %~$ \e\\"           }
2: preexec() {     print -Pn "\ek%n@%m %~$ $1\e\\"         }
3: precmd () {     print -Pn "\ek%~\e\\"                   }
4: preexec() {     print -Pn "\ek%~ $1\e\\"                }

If I have only line 4, command doesn't return (I have to manually kill
the window), but plain ls works. If I leave lines 3 and 4, no output.
Leaving either or both lines 1 and 2, it works fine. (I tried these
with nothing else in my .zshrc.)

Is the problem with my precmd/postcmd 3 and 4, or is this a zsh bug?
Sorry if this is sent out to the wrong list, I understood this is
where to file zsh bugs.

Thanks,
~Janos



Messages sorted by: Reverse Date, Date, Thread, Author