From 04ab71457a4224136cf53fbaf4c8fadc7185a54b Mon Sep 17 00:00:00 2001 From: horpto <__Singleton__@hackerdom.ru> Date: Thu, 23 Jul 2020 14:54:12 +0300 Subject: [PATCH] Add shorthand for --tail option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I chose -n shorthand as it's similar with linux `tail` command. Signed-off-by: Александр Менщиков <__Singleton__@hackerdom.ru> --- cli/command/container/logs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/container/logs.go b/cli/command/container/logs.go index 8dabbfad6b..a67e2ee91d 100644 --- a/cli/command/container/logs.go +++ b/cli/command/container/logs.go @@ -43,7 +43,7 @@ func NewLogsCommand(dockerCli command.Cli) *cobra.Command { flags.SetAnnotation("until", "version", []string{"1.35"}) flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps") flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs") - flags.StringVar(&opts.tail, "tail", "all", "Number of lines to show from the end of the logs") + flags.StringVarP(&opts.tail, "tail", "n", "all", "Number of lines to show from the end of the logs") return cmd }