I'm trying to view the contents of files in /var/lib/php5/sessions, directory in which I have no permissions to do ls, so I have to use sudo ls to see all those files with long names, I would like to make tab completion work when I type sudo vi longfilename.I have tried starting vi and execute :e or :edit but it doesn't work either, when I press tab all that it shows is ^I.I don't want to use the mouse to copy and paste that long name to execute vi, that's a workaround I don't like.
vi tab completion not working
autocomplete;vi;permission denied