which django-admin.py | vim
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: Finished.
What is the easiest way to fix this? And actually make vim to open "/usr/local/bin/django-admin.py
"
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
But when I do curl http://wayneye.com/vim | sh, I got the "input not from terminal error", how can I fix that please?
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 -
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.
You can try the following:
% vim "$(which django-admin.py)"
It should work, as long as django-admin.py
is actually found by which
command and it is not aliased.
A very simple way to do this:
vim `which django-admin.py`
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With