editor: add "new <filename>" to command line as option

FossilOrigin-Name: 515e25b3cd9937a3c7e4e1185b0d32ba9f5797fbd2686ac05908f9ef7d0c23c6
This commit is contained in:
crc 2017-11-17 21:01:51 +00:00
parent 44285bc81b
commit b8f7dd4d62

View file

@ -33,6 +33,9 @@ Get the name of the file to edit. If no file is provided, exit.
~~~
sys:argc n:zero? [ #0 unix:exit ] if
#0 sys:argv s:keep !SourceFile
@SourceFile 'new s:eq?
[ #1 sys:argv s:keep !SourceFile
@SourceFile file:A file:open file:close ] if
~~~
This is just a shortcut to make writing strings to the current file