editor: add "new <filename>" to command line as option
FossilOrigin-Name: 515e25b3cd9937a3c7e4e1185b0d32ba9f5797fbd2686ac05908f9ef7d0c23c6
This commit is contained in:
parent
44285bc81b
commit
b8f7dd4d62
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue