diff --git a/command/fs.go b/command/fs.go new file mode 100644 index 000000000..3925d044b --- /dev/null +++ b/command/fs.go @@ -0,0 +1,19 @@ +package command + +import "github.com/mitchellh/cli" + +type FSCommand struct { + Meta +} + +func (f *FSCommand) Help() string { + return "This command is accessed by using one of the subcommands below." +} + +func (f *FSCommand) Synopsis() string { + return "Inspect the contents of an allocation directory" +} + +func (f *FSCommand) Run(args []string) int { + return cli.RunResultHelp +} diff --git a/command/fs_cat.go b/command/fs_cat.go index 21f1b7641..e28e92b41 100644 --- a/command/fs_cat.go +++ b/command/fs_cat.go @@ -29,7 +29,7 @@ func (f *FSCatCommand) Help() string { } func (f *FSCatCommand) Synopsis() string { - return "displays a file at a given location" + return "Cat a file in an allocation directory" } func (f *FSCatCommand) Run(args []string) int { diff --git a/command/fs_ls.go b/command/fs_ls.go index 7066d30a2..12d0a9298 100644 --- a/command/fs_ls.go +++ b/command/fs_ls.go @@ -28,7 +28,7 @@ Usage: nomad fs ls } func (f *FSListCommand) Synopsis() string { - return "Lists list of files of an allocation directory" + return "List files in an allocation directory" } func (f *FSListCommand) Run(args []string) int { diff --git a/command/fs_stat.go b/command/fs_stat.go index 5ba345408..91c09a591 100644 --- a/command/fs_stat.go +++ b/command/fs_stat.go @@ -27,7 +27,7 @@ Usage: nomad fs stat } func (f *FSStatCommand) Synopsis() string { - return "Stats an entry in an allocation directory" + return "Stat an entry in an allocation directory" } func (f *FSStatCommand) Run(args []string) int { diff --git a/commands.go b/commands.go index 1b69883c8..3fc6718a3 100644 --- a/commands.go +++ b/commands.go @@ -57,6 +57,11 @@ func Commands(metaPtr *command.Meta) map[string]cli.CommandFactory { Meta: meta, }, nil }, + "fs": func() (cli.Command, error) { + return &command.FSCommand{ + Meta: meta, + }, nil + }, "fs ls": func() (cli.Command, error) { return &command.FSListCommand{ Meta: meta, diff --git a/main.go b/main.go old mode 100755 new mode 100644