How can I open a file whose name starts with "-"?
Solution 1:
In cases where command -- -file
does not work - since not every program uses the same option parsing routines, command ./-file
works everywhere.
Solution 2:
Place --
just before file name. In Unix it indicates the end of options for command.
To be more concrete, use: vim -- -file
.