Vim exec command in command line, and Vim: Warning: Input is not from a terminal -
vi.sh
vim -c "set ft=unix" -c "x" $1 main.sh
sh vi.sh file1 sh vi.sh file2 if exec sh vi.sh file1 or sh main.sh, there no warning.
but if exec cat main.sh | sh, give:vim: warning: input not terminal.
what difference? how can dismiss warning message when run cat main.sh | sh?
in ~/bin/r
[ $# -eq 0 ] && set -- -; vim -r "$@" in .vimrc:
au stdinreadpost * set buftype=nofile
Comments
Post a Comment