0

This one's silly. I saved my vim session with :Obsess -S Session.vim instead of :Obsess Session.vim, so now I have a -S/ Session.vim file in my project and can't open it with vim as the following is thrown

$ vim \-S\ Session.vim 
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 23 2020 22:02:57)
Garbage after option argument: "-S Session.vim"

Attempting to mv or cp the session file results in similar errors

$ mv \-S\ Session.vim Session.vim  
mv: missing destination file operand after 'Session.vim'
Try 'mv --help' for more information.
$ mv '"-S Session.vim"' Session.vim 
mv: cannot stat '"-S Session.vim"': No such file or directory
$ cp \-S\ Session.vim Session.vim                                                                                                                                                                                 
cp: missing destination file operand after 'Session.vim'                                                                                                                                                                                      
Try 'cp --help' for more information.  
arshbot
  • 153
  • 1
    If the filename actually is -S Session.vim, then mv './-S Session.vim' Session.vim or mv -- '-S Session.vim' Session.vim – muru Jun 04 '20 at 16:56

0 Answers0