zsh-users
 help / color / mirror / code / Atom feed
* zsh echoing every statement
@ 2013-04-30 21:07 James Jong
  2013-05-01  7:38 ` f gr
  0 siblings, 1 reply; 7+ messages in thread
From: James Jong @ 2013-04-30 21:07 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

I have an odd problem with zsh when switching between shells:

Option 1:
---------------
I start a Zsh shell, I then switch to tcsh with /bin/tcsh
and I then switch back to zsh with /bin/zsh

everything works well, e.g.
$ls
./  ../ file1 file1 file3


But, if I do:

Option 2:
---------------
I start a Zsh shell, I switch to tcsh with:
exec env -i HOME=/home/james TERM=xterm-256color DISPLAY=localhost:12.0
/bin/tcsh

and then back to zsh with /bin/zsh, then when I enter my subsequent
commands, the shell echoes the command and then the result,

e.g.

$ ls
2;ls --color=yes -aF1;ls./ ../ file1 file2 file3

In other words, zsh shows 2;COMMAND 1; and then the output without line
breaks, which is of course very different from what I was getting with
Option 1.

What can I do to diagnose the problem? Any pointers would be greatly
appreciated

Thanks,

James

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zsh echoing every statement
  2013-04-30 21:07 zsh echoing every statement James Jong
@ 2013-05-01  7:38 ` f gr
  2013-05-01  9:36   ` Frank Terbeck
  0 siblings, 1 reply; 7+ messages in thread
From: f gr @ 2013-05-01  7:38 UTC (permalink / raw)
  To: zsh-users

Excerpt from James Jong's message
of 2013-04-30T17:07-0400:

[...]
> $ ls
> 2;ls --color=yes -aF1;ls./ ../ file1 file2 file3
> 
> In other words, zsh shows 2;COMMAND 1; and then the output without
> line breaks, which is of course very different from what I was
> getting with Option 1.
> 
> What can I do to diagnose the problem? Any pointers would be greatly
> appreciated

I use grml's zsh setup. I get the output like you: if I run the
system by runlevel 1 (or 3) and type the command ls, zsh shows the
following:
;root@hostname: ls [without any line breaks]

As a normal user the same. The curious thing is that when I run the
shell by a terminal emulator (in my case xfce4-terminal) the output
is OK.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zsh echoing every statement
  2013-05-01  7:38 ` f gr
@ 2013-05-01  9:36   ` Frank Terbeck
  2013-05-01 11:01     ` f gr
  0 siblings, 1 reply; 7+ messages in thread
From: Frank Terbeck @ 2013-05-01  9:36 UTC (permalink / raw)
  To: f gr; +Cc: zsh-users

f. gr wrote:
> Excerpt from James Jong's message
> of 2013-04-30T17:07-0400:
> [...]
>> $ ls
>> 2;ls --color=yes -aF1;ls./ ../ file1 file2 file3
>> 
>> In other words, zsh shows 2;COMMAND 1; and then the output without
>> line breaks, which is of course very different from what I was
>> getting with Option 1.
>> 
>> What can I do to diagnose the problem? Any pointers would be greatly
>> appreciated
>
> I use grml's zsh setup. I get the output like you: if I run the
> system by runlevel 1 (or 3) and type the command ls, zsh shows the
> following:
> ;root@hostname: ls [without any line breaks]

Sounds like broken preexec()/precmd() hooks to set terminal titles. If
you didn't write those yourself, I'd suggest you report it to the person
who did.

You can try this to check:

  % unfunction preexec
  % unfunction precmd
  % unset preexec_functions
  % unset precmd_functions

After that, any hook functions should be disabled I think.

> As a normal user the same. The curious thing is that when I run the
> shell by a terminal emulator (in my case xfce4-terminal) the output
> is OK.

I happen to know the grml-setup a fair bit, and I think its title hooks
are fairly solid. If you mess with $TERM however and make the setup
think it is running in a terminal that would support terminal title
setting, although it's actually a terminal that doesn't, then things
like this can happen as well.

If you still think it's a bug, visit the grml folks on IRC:

  #grml on the freenode network

...and tell them, or report a bug via their bug tracking system:

  http://bts.grml.org/grml/


Regards, Frank


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zsh echoing every statement
  2013-05-01  9:36   ` Frank Terbeck
@ 2013-05-01 11:01     ` f gr
  2013-05-01 17:15       ` James Jong
  0 siblings, 1 reply; 7+ messages in thread
From: f gr @ 2013-05-01 11:01 UTC (permalink / raw)
  To: zsh-users

From Frank Terbeck's message of 2013-05-01T11:36+0200:

> f. gr wrote:
> > Excerpt from James Jong's message
> > of 2013-04-30T17:07-0400:
> > [...]
> >> $ ls
> >> 2;ls --color=yes -aF1;ls./ ../ file1 file2 file3
> >> 
> >> In other words, zsh shows 2;COMMAND 1; and then the output
> >> without line breaks, which is of course very different from what
> >> I was getting with Option 1.
> >> 
> >> What can I do to diagnose the problem? Any pointers would be
> >> greatly appreciated
> >
> > I use grml's zsh setup. I get the output like you: if I run the
> > system by runlevel 1 (or 3) and type the command ls, zsh shows the
> > following:
> > ;root@hostname: ls [without any line breaks]
> 
> Sounds like broken preexec()/precmd() hooks to set terminal titles.
> If you didn't write those yourself, I'd suggest you report it to
> the person who did.
> 
> You can try this to check:
> 
>   % unfunction preexec
>   % unfunction precmd
>   % unset preexec_functions
>   % unset precmd_functions

the first two commands got:
"
unfunction: no such hash table element: preexec
unfunction: no such hash table element: precmd
"

> > As a normal user the same. The curious thing is that when I run
> > the shell by a terminal emulator (in my case xfce4-terminal) the
> > output is OK.
> 
> I happen to know the grml-setup a fair bit, and I think its title
> hooks are fairly solid. If you mess with $TERM however and make the
> setup think it is running in a terminal that would support terminal
> title setting, although it's actually a terminal that doesn't, then
> things like this can happen as well.
> 
> If you still think it's a bug, visit the grml folks on IRC:
> 
>   #grml on the freenode network
> 
> ...and tell them, or report a bug via their bug tracking system:
> 
>   http://bts.grml.org/grml/

I'll ask grml team.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zsh echoing every statement
  2013-05-01 11:01     ` f gr
@ 2013-05-01 17:15       ` James Jong
  2013-05-01 21:42         ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: James Jong @ 2013-05-01 17:15 UTC (permalink / raw)
  To: f gr; +Cc: zsh-users

[-- Attachment #1: Type: text/plain, Size: 2426 bytes --]

Actually, you are right. If I run the shell in a real terminal emulator
(e.g. gnome-terminal), the output is always OK. The problem only appears
when I run my shells on M-x term (or multi-term) in Emacs.

The odd thing is that, as I reported on the email starting this thread, the
problem with the output only happens when I *switch* shells, and only with
Option (2), and not with Option (1) (see my original email).

James



On Wed, May 1, 2013 at 7:01 AM, f gr <frgroccia@gmail.com> wrote:

> From Frank Terbeck's message of 2013-05-01T11:36+0200:
>
> > f. gr wrote:
> > > Excerpt from James Jong's message
> > > of 2013-04-30T17:07-0400:
> > > [...]
> > >> $ ls
> > >> 2;ls --color=yes -aF1;ls./ ../ file1 file2 file3
> > >>
> > >> In other words, zsh shows 2;COMMAND 1; and then the output
> > >> without line breaks, which is of course very different from what
> > >> I was getting with Option 1.
> > >>
> > >> What can I do to diagnose the problem? Any pointers would be
> > >> greatly appreciated
> > >
> > > I use grml's zsh setup. I get the output like you: if I run the
> > > system by runlevel 1 (or 3) and type the command ls, zsh shows the
> > > following:
> > > ;root@hostname: ls [without any line breaks]
> >
> > Sounds like broken preexec()/precmd() hooks to set terminal titles.
> > If you didn't write those yourself, I'd suggest you report it to
> > the person who did.
> >
> > You can try this to check:
> >
> >   % unfunction preexec
> >   % unfunction precmd
> >   % unset preexec_functions
> >   % unset precmd_functions
>
> the first two commands got:
> "
> unfunction: no such hash table element: preexec
> unfunction: no such hash table element: precmd
> "
>
> > > As a normal user the same. The curious thing is that when I run
> > > the shell by a terminal emulator (in my case xfce4-terminal) the
> > > output is OK.
> >
> > I happen to know the grml-setup a fair bit, and I think its title
> > hooks are fairly solid. If you mess with $TERM however and make the
> > setup think it is running in a terminal that would support terminal
> > title setting, although it's actually a terminal that doesn't, then
> > things like this can happen as well.
> >
> > If you still think it's a bug, visit the grml folks on IRC:
> >
> >   #grml on the freenode network
> >
> > ...and tell them, or report a bug via their bug tracking system:
> >
> >   http://bts.grml.org/grml/
>
> I'll ask grml team.
>
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zsh echoing every statement
  2013-05-01 17:15       ` James Jong
@ 2013-05-01 21:42         ` Bart Schaefer
  2013-05-02  0:03           ` James Jong
  0 siblings, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2013-05-01 21:42 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

Something exporting a value for the PROMPT variable or one of its
relatives, perhaps?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: zsh echoing every statement
  2013-05-01 21:42         ` Bart Schaefer
@ 2013-05-02  0:03           ` James Jong
  0 siblings, 0 replies; 7+ messages in thread
From: James Jong @ 2013-05-02  0:03 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Thanks Bart. Why would that be a difference between Option 1 and 2 in my
first email?

James


On Wed, May 1, 2013 at 5:42 PM, Bart Schaefer <schaefer@brasslantern.com>wrote:

> Something exporting a value for the PROMPT variable or one of its
> relatives, perhaps?
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-05-02  0:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-30 21:07 zsh echoing every statement James Jong
2013-05-01  7:38 ` f gr
2013-05-01  9:36   ` Frank Terbeck
2013-05-01 11:01     ` f gr
2013-05-01 17:15       ` James Jong
2013-05-01 21:42         ` Bart Schaefer
2013-05-02  0:03           ` James Jong

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).