From 0277cedc8acae3e892d654750d8bc1940c1560d4 Mon Sep 17 00:00:00 2001 From: Armon Dadgar Date: Wed, 17 Jun 2015 18:33:15 -0700 Subject: [PATCH] cmomand/read: strip path prefix if necessary. Fixes #343 --- command/read.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/command/read.go b/command/read.go index 8f94bcba8f..85d23b73e3 100644 --- a/command/read.go +++ b/command/read.go @@ -27,7 +27,11 @@ func (c *ReadCommand) Run(args []string) int { flags.Usage() return 1 } + path := args[0] + if path[0] == '/' { + path = path[1:] + } client, err := c.Client() if err != nil { @@ -98,7 +102,7 @@ Read Options: -format=table The format for output. By default it is a whitespace- delimited table. This can also be json. - -field=field If included, the raw value of the specified field + -field=field If included, the raw value of the specified field will be output raw to stdout. `