diff --git a/README.md b/README.md index 5cfdf30..a4ca02d 100644 --- a/README.md +++ b/README.md @@ -64,20 +64,35 @@ Command mktree creates a file tree out of `tree` output read from standard input *Usage* ```bash -~ $ tree +~ $ gotree . ├── dir │   └── file.txt └── file.txt 1 directory, 2 files + ~ $ gotree | mktree -o /tmp/mktree + ~ $ gotree /tmp/mktree /tmp/mktree ├── dir │   └── file.txt └── file.txt +1 directory, 2 files +``` +```bash +~ $ gotree > tree.txt + +~ $ mktree -o /tmp/mktree2 tree.txt + +~ $ gotree /tmp/mktree2 +/tmp/mktree2 +├── dir +│   └── file.txt +└── file.txt + 1 directory, 2 files ``` diff --git a/cmd/gotree/main.go b/cmd/gotree/main.go index 6195c64..5cf338a 100644 --- a/cmd/gotree/main.go +++ b/cmd/gotree/main.go @@ -6,16 +6,16 @@ // Usage // // NAME: -// gotree - Go implementation of the Unix tree command +// gotree - Go implementation of the Unix tree command // // USAGE: -// gotree [OPTION]... [DIRECTORY] +// gotree [OPTION]... [DIRECTORY] // // OPTIONS: -// -a All files are listed -// -d List directories only -// -L level Descend only directories deep -// -go width Output as Go literal with specified maximum column width +// -a All files are listed +// -d List directories only +// -L level Descend only directories deep +// -go width Output as Go literal with specified maximum column width // // Example //