Vim 输入不是来自终端 [英] Vim Input is not from a terminal

查看:39
本文介绍了Vim 输入不是来自终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

which django-admin.py | vim
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.

解决这个问题最简单的方法是什么?实际上让vim打开/usr/local/bin/django-admin.py"

What is the easiest way to fix this? And actually make vim to open "/usr/local/bin/django-admin.py"

基本上我想在我的个人博客上托管一个自动安装的定制 vim:http://wayneye.com/vim,你可以通过导航到它来看到shell脚本,它只包含以下命令:

Essentially I want to host an auto-install customized vim on my personal blog: http://wayneye.com/vim, you can see the shell script by navigating to it, it just contains the following commands:

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim \
curl -L -o ~/.vimrc https://raw.githubusercontent.com/WayneYe/WayneDevLab/master/wayne.vimrc \
vim +PluginInstall

但是当我做 curl http://wayneye.com/vim |sh,我收到了输入不是来自终端错误",请问我该如何解决?

But when I do curl http://wayneye.com/vim | sh, I got the "input not from terminal error", how can I fix that please?

推荐答案

为了让您从 stdin 中读取,您需要使用 - 明确告诉 VIM 这样做code> 命令行中的参数.

In order for you to read from stdin you need to tell VIM explicitly to do that by using the - parameter at the commandline.

所以在你的情况下,这应该有效:

So in your case, this should work:

which django-admin.py | vim -

但是,当您使用带有文件名的 which 时,您是否希望它显示路径,或者 django-admin.py 是一个存在于小路?在这种情况下,你很好.

Quick question though, when you use which with a filename, do you expect it to show you the path or is django-admin.py an executable that exists in path? In which case, you're fine.

这篇关于Vim 输入不是来自终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆