+command "open": Open as[1] file[2] in mode; see 'open --help'.
[captive.git] / src / client / cmdline / main.c
index 0459c3f..1d3a9b3 100644 (file)
@@ -44,6 +44,9 @@
 #include "cmd_mkdir.h"
 #include "cmd_rmdir.h"
 #include "cmd_commit.h"
+#include "cmd_open.h"
+#include "cmd_create.h"
+#include "cmd_close.h"
 #include "cmd_quit.h"
 #include "cmd_help.h"
 
@@ -70,21 +73,24 @@ static const struct poptOption popt_table[]={
 
 const struct cmdline_command cmdline_command_table[]={
                /* First entry is the default if no command name was specified. */
-               { "shell" ,N_("Interactive commands shell.")                        ,cmd_shell_table ,cmd_shell ,0,0 },
-               { "cd"    ,N_("Print or change current guest-os directory[1].")     ,cmd_cd_table    ,cmd_cd    ,0,1 },
-               { "lcd"   ,N_("Print or change current host-os  directory[1].")     ,cmd_lcd_table   ,cmd_lcd   ,0,1 },
-               { "ls"    ,N_("Directory[1] listing.")                              ,cmd_ls_table    ,cmd_ls    ,0,1 },
-               { "get"   ,N_("Copy guest-os file[1] to host-os (opt. file[2]).")   ,cmd_get_table   ,cmd_get   ,1,2 },
-               { "put"   ,N_("Copy host-os file[1] to guest-os (opt. file[2]).")   ,cmd_put_table   ,cmd_put   ,1,2 },
-               { "info"  ,N_("Query information about guest-os item[1].")          ,cmd_info_table  ,cmd_info  ,1,1 },
-               { "volume",N_("Query information about guest-os volume.")           ,cmd_volume_table,cmd_volume,0,0 },
-               { "rm"    ,N_("Remove guest-os file[1].")                           ,cmd_rm_table    ,cmd_rm    ,1,1 },
-               { "mv"    ,N_("Move (rename) guest-os item[1] to guest-os item[2]."),cmd_mv_table    ,cmd_mv    ,2,2 },
-               { "mkdir" ,N_("Create guest-os directory[1].")                      ,cmd_mkdir_table ,cmd_mkdir ,1,1 },
-               { "rmdir" ,N_("Remove guest-os directory[1].")                      ,cmd_rmdir_table ,cmd_rmdir ,1,1 },
-               { "commit",N_("Write any pending changes and remount the volume.")  ,cmd_commit_table,cmd_commit,0,0 },
-               { "quit"  ,N_("Quit this program.")                                 ,cmd_quit_table  ,cmd_quit  ,0,0 },
-               { "help"  ,N_("Show this list of commands or help for command[1].") ,cmd_help_table  ,cmd_help  ,0,1 },
+               { "shell" ,N_("Interactive commands shell.")                                ,cmd_shell_table ,cmd_shell ,0,0 },
+               { "cd"    ,N_("Print or change current guest-os directory[1].")             ,cmd_cd_table    ,cmd_cd    ,0,1 },
+               { "lcd"   ,N_("Print or change current host-os  directory[1].")             ,cmd_lcd_table   ,cmd_lcd   ,0,1 },
+               { "ls"    ,N_("Directory[1] listing.")                                      ,cmd_ls_table    ,cmd_ls    ,0,1 },
+               { "get"   ,N_("Copy guest-os file[1] to host-os (opt. file[2]).")           ,cmd_get_table   ,cmd_get   ,1,2 },
+               { "put"   ,N_("Copy host-os file[1] to guest-os (opt. file[2]).")           ,cmd_put_table   ,cmd_put   ,1,2 },
+               { "info"  ,N_("Query information about guest-os item[1].")                  ,cmd_info_table  ,cmd_info  ,1,1 },
+               { "volume",N_("Query information about guest-os volume.")                   ,cmd_volume_table,cmd_volume,0,0 },
+               { "rm"    ,N_("Remove guest-os file[1].")                                   ,cmd_rm_table    ,cmd_rm    ,1,1 },
+               { "mv"    ,N_("Move (rename) guest-os item[1] to guest-os item[2].")        ,cmd_mv_table    ,cmd_mv    ,2,2 },
+               { "mkdir" ,N_("Create guest-os directory[1].")                              ,cmd_mkdir_table ,cmd_mkdir ,1,1 },
+               { "rmdir" ,N_("Remove guest-os directory[1].")                              ,cmd_rmdir_table ,cmd_rmdir ,1,1 },
+               { "commit",N_("Write any pending changes and remount the volume.")          ,cmd_commit_table,cmd_commit,0,0 },
+               { "open"  ,N_("Open as[1] file[2] in mode; see 'open --help'")              ,cmd_open_table  ,cmd_open  ,2,2 },
+               { "create",N_("Create as[1] file[2] in mode with perm; see 'create --help'"),cmd_create_table,cmd_create,2,2 },
+               { "close" ,N_("Close handle[1]")                                            ,cmd_close_table ,cmd_close ,1,1 },
+               { "quit"  ,N_("Quit this program.")                                         ,cmd_quit_table  ,cmd_quit  ,0,0 },
+               { "help"  ,N_("Show this list of commands or help for command[1].")         ,cmd_help_table  ,cmd_help  ,0,1 },
                { NULL },       /* G_N_ELEMENTS() not usable as sizeof() is not visible for 'extern' */
                };