@@ -19,7 +19,6 @@ import {safeStdinRead, temporaryMD} from '../../utils'
1919
2020export default class CreateCommand extends HackMDCommand {
2121 static description = 'Create a note'
22-
2322 static examples = [
2423 "notes create --content='# A new note' --readPermission=owner --writePermission=owner --commentPermission=disabled" ,
2524
@@ -30,15 +29,14 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q
3029 'Or you can pipe content via Unix pipeline:' ,
3130 'cat README.md | hackmd-cli notes create' ,
3231 ]
33-
3432 static flags = {
35- help : Flags . help ( { char : 'h' } ) ,
36- title : noteTitle ,
33+ commentPermission,
3734 content : noteContent ,
35+ editor,
36+ help : Flags . help ( { char : 'h' } ) ,
3837 readPermission : notePermission ,
38+ title : noteTitle ,
3939 writePermission : notePermission ,
40- commentPermission,
41- editor,
4240 ...ux . table . flags ( ) ,
4341 }
4442
@@ -47,11 +45,11 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q
4745 const pipeString = safeStdinRead ( )
4846
4947 const options : CreateNoteOptions = {
50- title : flags . title ,
48+ commentPermission : flags . commentPermission as CommentPermissionType ,
5149 content : pipeString || flags . content ,
5250 readPermission : flags . readPermission as NotePermissionRole ,
51+ title : flags . title ,
5352 writePermission : flags . writePermission as NotePermissionRole ,
54- commentPermission : flags . commentPermission as CommentPermissionType ,
5553 }
5654
5755 if ( flags . editor ) {
@@ -75,13 +73,13 @@ raUuSTetT5uQbqQfLnz9lA A new note gvfz2UB5THiKABQJQnLs6Q
7573 id : {
7674 header : 'ID' ,
7775 } ,
76+ teamPath : {
77+ header : 'Team path' ,
78+ } ,
7879 title : { } ,
7980 userPath : {
8081 header : 'User path' ,
8182 } ,
82- teamPath : {
83- header : 'Team path' ,
84- } ,
8583 } ,
8684 {
8785 printLine : this . log . bind ( this ) ,
0 commit comments