From 7c155a5f9f5a9298febdabd2a15170cd51cc3301 Mon Sep 17 00:00:00 2001 From: mroach Date: Thu, 19 Aug 2021 20:04:52 +0200 Subject: [PATCH] change: rename stat => info stat is very unix neckbeardy. info is a lot easier --- README.md | 6 +++--- cmd/{stat.go => info.go} | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) rename cmd/{stat.go => info.go} (79%) diff --git a/README.md b/README.md index b790ed6..c7dc0f1 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ ROM file headers are parsed to detect information: ## Commands * [ls](#rom64-ls) -* [stat](#rom64-stat) +* [info](#rom64-info) * [convert](#rom64-convert) * [validate](#rom64-validate) @@ -113,14 +113,14 @@ rom64 ls ~/Downloads/n64 -c image_name,file_format_desc,rom_id,region,video_syst +----------------------+--------------+--------+--------+-------+------+-----------+----------------------------------+-----------------------------------------------------------+ ``` -## `rom64 stat` +## `rom64 info` Show information about a single file. Also supports the same output options as `ls` ``` -rom64 stat ~/Downloads/n64/Conker\'s\ Bad\ Fur\ Day\ \(USA\).z64 +rom64 info ~/Downloads/n64/Conker\'s\ Bad\ Fur\ Day\ \(USA\).z64 File: Name: Conker's Bad Fur Day (USA).z64 Size: 64 MB diff --git a/cmd/stat.go b/cmd/info.go similarity index 79% rename from cmd/stat.go rename to cmd/info.go index e792f51..0b528da 100644 --- a/cmd/stat.go +++ b/cmd/info.go @@ -10,8 +10,8 @@ func init() { var outputFormat string var columns []string - var statCmd = &cobra.Command{ - Use: "stat", + var infoCmd = &cobra.Command{ + Use: "info", Aliases: []string{"info"}, Short: "Get ROM file information", Args: cobra.MinimumNArgs(1), @@ -42,8 +42,8 @@ func init() { }, } - statCmd.Flags().StringVarP(&outputFormat, "output", "o", "text", "Output format") - statCmd.Flags().StringSliceVarP(&columns, "columns", "c", make([]string, 0), "Column selection") + infoCmd.Flags().StringVarP(&outputFormat, "output", "o", "text", "Output format") + infoCmd.Flags().StringSliceVarP(&columns, "columns", "c", make([]string, 0), "Column selection") - rootCmd.AddCommand(statCmd) + rootCmd.AddCommand(infoCmd) }