gphalkes / tilde

The Tilde text editor
395 stars 21 forks source link

Compatible file opening with nano #115

Open pothos opened 9 months ago

pothos commented 9 months ago

When tilde is the default editor, sudo systemctl edit MYSERVICE fails because the +LINENUMBER hint is wrongly interpreted as filename.

To be compatible, it should support +LINE[,COL] as nano. In addition it would also be good to support - as shortcut for stdin:

Usage: nano [OPTIONS] [[+LINE[,COLUMN]] FILE]...

To place the cursor on a specific line of a file, put the line number with
a '+' before the filename.  The column number can be added after a comma.
When a filename is '-', nano reads data from standard input.