O
O
Oleg2016-01-31 08:26:36
vim
Oleg, 2016-01-31 08:26:36

Why does Vim say "Vim: Warning: Input is not from a terminal"?

I run the command:
$ find -type f | xargs endsp | xargs vim
endssp simply prints the file name if it is text and contains trailing spaces.
Vim complains: "Vim: Warning: Input is not from a terminal". Works normally. But after exiting Vim, mintty does not respond to any keys. Sometimes Ctrl+D saves.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
jcmvbkbc, 2016-01-31
@hobo-mts

because vim is run as part of the pipe. if you need to edit files according to the list, you can do this: vim `find -type f | xargs endssp`

S
SilentFl, 2016-02-01
@SilentFl

I like it better through pipes:
find -type f | xargs endsp | vim -

O
Oleg, 2016-02-01
@hobo-mts

This command
will open a list of files with trailing spaces, not the files themselves.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question