I have about 10 php.ini
files on my system, located all over the place, and I wanted to quickly browse through them. I tried this command:
locate php.ini | xargs vi
But vi
warns me Input is not from a terminal
and then the console starts getting really weird - after which I need to press :q!
to quit vi
and then disconnect from the ssh session and reconnect to have the console behave normally again.
I think that I sort of understand what's happening here - basically the command hasn't finished when vi
started so the command maybe hasn't finished and vi
doesn't think that the terminal is in normal mode.
I have no idea how to fix it. I have searched Google and also unix.stackexchange.com with poor luck.
reset
to reset your terminal when it gets screwed up (you don't have to disconnect from ssh session).