niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » shell
VIM no controlling terminal
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
Sashi
*nix forums addict


Joined: 14 Jun 2005
Posts: 95

PostPosted: Wed Jul 12, 2006 6:42 pm    Post subject: VIM no controlling terminal Reply with quote

All, I'm grepping for a string and want to open all the matching files
using vim. This is what I used:
$ grep -l pat_str *.c | xargs vim
and I got the message: "VIM: no controlling terminal".
Whys is this and can I fix this behavior to do what I want?
TIA,
Sashi
Back to top
Stachu 'Dozzie' K.
*nix forums Guru Wannabe


Joined: 30 Mar 2005
Posts: 250

PostPosted: Wed Jul 12, 2006 6:52 pm    Post subject: Re: VIM no controlling terminal Reply with quote

On 12.07.2006, Sashi <smalladi@gmail.com> wrote:
Quote:
All, I'm grepping for a string and want to open all the matching files
using vim. This is what I used:
$ grep -l pat_str *.c | xargs vim
and I got the message: "VIM: no controlling terminal".
Whys is this and can I fix this behavior to do what I want?

vim `grep -l pat_str *.c`

--
Szukasz dobrego shella? mail | http://marcinhlybin.com/shell/
Stanislaw Klekot
Back to top
Sashi
*nix forums addict


Joined: 14 Jun 2005
Posts: 95

PostPosted: Wed Jul 12, 2006 7:37 pm    Post subject: Re: VIM no controlling terminal Reply with quote

Stachu 'Dozzie' K. wrote:
Quote:
On 12.07.2006, Sashi <smalladi@gmail.com> wrote:
All, I'm grepping for a string and want to open all the matching files
using vim. This is what I used:
$ grep -l pat_str *.c | xargs vim
and I got the message: "VIM: no controlling terminal".
Whys is this and can I fix this behavior to do what I want?

vim `grep -l pat_str *.c`

--
Szukasz dobrego shella? mail | http://marcinhlybin.com/shell/
Stanislaw Klekot
Thanks!

But do you know why my attempt failed?
Sashi
Back to top
Chris Mattern
*nix forums Guru Wannabe


Joined: 13 Mar 2005
Posts: 122

PostPosted: Wed Jul 12, 2006 9:40 pm    Post subject: Re: VIM no controlling terminal Reply with quote

Sashi wrote:
Quote:
Stachu 'Dozzie' K. wrote:

On 12.07.2006, Sashi <smalladi@gmail.com> wrote:

All, I'm grepping for a string and want to open all the matching files
using vim. This is what I used:
$ grep -l pat_str *.c | xargs vim
and I got the message: "VIM: no controlling terminal".
Whys is this and can I fix this behavior to do what I want?

vim `grep -l pat_str *.c`

--
Szukasz dobrego shella? mail | http://marcinhlybin.com/shell/
Stanislaw Klekot

Thanks!
But do you know why my attempt failed?
Sashi

Programs can tell when they've been put in a pipeline.

Vim (and vi) don't like that, because in that kind
of non-interactive environment, they don't get the
kind of full-screen control they need (hence,
"No controlling terminal"). By rephrasing
the command so that vim is invoked normally
with the shell generating its command
line before invoking it, everything's kosher.


CHris Mattern
Back to top
Barry Margolin
*nix forums Guru


Joined: 24 Feb 2005
Posts: 323

PostPosted: Thu Jul 13, 2006 12:58 am    Post subject: Re: VIM no controlling terminal Reply with quote

In article <1152733043.756598.222730@b28g2000cwb.googlegroups.com>,
"Sashi" <smalladi@gmail.com> wrote:

Quote:
Stachu 'Dozzie' K. wrote:
On 12.07.2006, Sashi <smalladi@gmail.com> wrote:
All, I'm grepping for a string and want to open all the matching files
using vim. This is what I used:
$ grep -l pat_str *.c | xargs vim
and I got the message: "VIM: no controlling terminal".
Whys is this and can I fix this behavior to do what I want?

vim `grep -l pat_str *.c`

--
Szukasz dobrego shella? mail | http://marcinhlybin.com/shell/
Stanislaw Klekot
Thanks!
But do you know why my attempt failed?

Because vim expects its standard input to be a terminal. When you put
it in a pipeline, standard input is the pipe, not the terminal.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Back to top
Sashi
*nix forums addict


Joined: 14 Jun 2005
Posts: 95

PostPosted: Thu Jul 13, 2006 3:16 pm    Post subject: Re: VIM no controlling terminal Reply with quote

Barry Margolin wrote:
Quote:
In article <1152733043.756598.222730@b28g2000cwb.googlegroups.com>,
"Sashi" <smalladi@gmail.com> wrote:

Stachu 'Dozzie' K. wrote:
On 12.07.2006, Sashi <smalladi@gmail.com> wrote:
All, I'm grepping for a string and want to open all the matching files
using vim. This is what I used:
$ grep -l pat_str *.c | xargs vim
and I got the message: "VIM: no controlling terminal".
Whys is this and can I fix this behavior to do what I want?

vim `grep -l pat_str *.c`

--
Szukasz dobrego shella? mail | http://marcinhlybin.com/shell/
Stanislaw Klekot
Thanks!
But do you know why my attempt failed?

Because vim expects its standard input to be a terminal. When you put
it in a pipeline, standard input is the pipe, not the terminal.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Thanks, all!

Sashi
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Sun Nov 23, 2008 11:12 am | All times are GMT
navigation Forum index » Programming » shell
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts gnuplot: set terminal pdf mathieu.malaterre@gmail.c Debian 2 Wed Jul 19, 2006 10:20 pm
No new posts OS X Terminal.app and Aptitude Ian Brandt Debian 11 Tue Jul 11, 2006 12:00 am
No new posts Controlling Incomming Mails from Internet Yashodeep Dhumne Qmail 3 Wed Jul 05, 2006 6:29 am
No new posts Controlling Windows Media Player from Python Jeffrey Barish python 4 Mon Jul 03, 2006 3:38 pm
No new posts How to perform search in gnome terminal? Rodolfo Medina Debian 7 Sat Jul 01, 2006 3:40 pm

Bad Credit Debt Consolidation | Loans | Proxy | Bad Credit Loan | Free Ringtones
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1681s ][ Queries: 16 (0.0845s) ][ GZIP on - Debug on ]