[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: piping files to vim command line, results in dead screen

From: Joe Zbiciak
Subject: Re: piping files to vim command line, results in dead screen
Date: Wed, 11 Aug 2004 15:15:00 -0700 (PDT)

Zenaan, All,

I found it, and it's not really a screen issue, but more
likely a shell and/or VIM related issue.  VIM does this

 * If reading stdin results in an error, continue 
 * reading stderr.
 * This helps when using "foo | xargs vim".
if (!did_read_something  &&
    !isatty(read_cmd_fd) && 
    read_cmd_fd == 0)
    int m = cur_tmode;

    /* We probably set the wrong file descriptor 
     * to raw mode.  Switch back to cooked mode, 
     * use another descriptor and set the mode to
     * what it was. */
#ifdef HAVE_DUP
    /* Use stderr for stdin, also works for 
     * shell commands. */
    /* read from stderr instead of stdin */
    read_cmd_fd = 2;    

Cute, huh?  Well, it appears the *shell* (bash) gets
confused when VIM exits, at least on my RedHat 7.3 box.
In my case, it appears bash's readline just hangs.  I'll
grasp at straws and suggest it might be

The AIX and Solaris boxen also get a little weird, but
they're fixed with an "stty sane."

Mystery "solved?"



--- Zenaan Harkness <address@hidden> wrote:

> On Thu, 2004-08-12 at 05:08, Adam Monsen wrote:
> > On Wed, 11 Aug 2004 17:05:37 +1000, Zenaan Harkness
> <address@hidden> wrote:
> > > When I pipe multiple files to vi, via xargs (with a
> find, may be a cut,
> > > etc), eg:
> > > 
> > > find blah|grep blahh|cut dodah|xargs vi -o
> > 
> > Point of clarification: does this work as you'd expect
> in
> > xterm/gnome-terminal/konsole/virtual terminal when
> screen *isn't*
> > running? It doesn't for me.
> Vim comes up nicely with a buch of files for me to edit,
> which I do.
> Then when I exit the last file, the terminal hangs. This
> happens both in
> and outside of screen.
> _______________________________________________
> screen-users mailing list
> address@hidden

We sell Spatulas, and that's all!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]