From 329dac4b50be88ab61f47b3a763613c6a2ab55b9 Mon Sep 17 00:00:00 2001 From: Rafal Jeczalik Date: Sun, 10 Aug 2014 18:08:08 +0200 Subject: [PATCH] Update README.md --- README.md | 17 ++++++++++++++++- cmd/gotree/main.go | 12 ++++++------ 2 files changed, 22 insertions(+), 7 deletions(-) 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 //