From 925751ef4b23420cb639cbc5d30e192b26672314 Mon Sep 17 00:00:00 2001 From: just-hms Date: Sat, 2 Nov 2024 11:19:46 +0100 Subject: [PATCH] add: usage in readme --- README.md | 16 +++++++++++++--- cmd/root.go | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d8f0bbf..54d4bd7 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,19 @@ Dow is a command-line tool designed to move the most recent download to a new lo usage: ```shell -dow -# or -dow destination/path +mv the last downloaded file in the current (or the specified) folder + +Usage: + dow [flags] + +Examples: + dow + dow -v | xargs -rd '\n' code + +Flags: + -h, --help help for dow + -v, --verbose show the name of the moved file + -y, --yes force dow to move the latest file even if it's old ``` ## Install diff --git a/cmd/root.go b/cmd/root.go index 66fedb6..84d9c55 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -81,7 +81,7 @@ var rootCmd = &cobra.Command{ Short: `mv the last downloaded file in the current (or the specified) folder`, Hidden: true, SilenceUsage: false, - Example: " dow\n dow -v | xargs -rd '\n' code", + Example: " dow\n dow -v | xargs -rd '\\n' code", Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { cmd.SilenceUsage = true