[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [screen-devel] Terminal VIM run from xargs closes my GNU Screen wind
From: |
Erik Falor |
Subject: |
Re: [screen-devel] Terminal VIM run from xargs closes my GNU Screen window |
Date: |
Wed, 18 Mar 2009 14:09:49 -0600 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
On Wed, Mar 18, 2009 at 02:27:27PM -0500, Ethan Mallove wrote:
> Hello,
>
> The below command causes my Screen window to close:
>
> $ touch a b c && ls -1 a b c | xargs vim
> Vim: Warning: Input is not from a terminal
> [then Screen window closes!]
I would suspect that this has to do with xargs' handling of STDIN with
respect to fork(). It appears to me that xargs closes and reopens
STDIN to a different file descriptor before forking Vim.
Whenver Vim detects that STDIN is not connected to the terminal, it
freaks. I've never gotten Vim to work interactively when on the
receiving end of a pipe. You can pipe it a string of normal mode
commands, as well as :command-line commands, and it will act as though
you typed those at the keyboard interactively.
Now, when I try to reproduce this, (within and without of screen) Vim
nags me about the input's origin, then lets me edit the files
interactively. After I quit Vim, the terminal doesn't echo my
keystrokes back at me, and I have to issue a `reset` to get it back to
normal.
I get identical behavior in and out of screen, so I am not inclined to
blame it on screen.
Incidentally:
Screen version 4.00.03 (FAU) 23-Oct-06
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Mar 17 2009 22:15:45)
Included patches: 1-141
Compiled by address@hidden
Huge version with GTK2 GUI. Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
+menu +mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
+multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl +postscript
+printer +profile +python +quickfix +reltime +rightleft -ruby +scrollbind
+signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
+toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim
+xsmp_interact +xterm_clipboard -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/include/pixman-1 -O2 -fno-strength-reduce -Wall -D_FORTIFY_SOURCE=1
-I/usr/include64 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/lib64/perl5/5.8.8/x86_64-linux/CORE -I/usr/include/python2.5 -pthread
Linking: gcc -L/usr/lib64 -rdynamic -L/usr/local/lib -o vim
-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0
-lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lXt -lncurses
-lgpm -rdynamic -L/usr/local/lib64
/usr/lib64/perl5/5.8.8/x86_64-linux/auto/DynaLoader/DynaLoader.a
-L/usr/lib64/perl5/5.8.8/x86_64-linux/CORE -lperl -lutil -lc
-L/usr/lib/python2.5/config -lpython2.5 -lutil -lm -Xlinker -export-dynamic
--
Erik Falor
Registered Linux User #445632 http://counter.li.org