From a7cbde674b4eab23ea8b566c7c96f08f0353f220 Mon Sep 17 00:00:00 2001 From: advanderveer Date: Thu, 5 Mar 2020 11:03:13 +0100 Subject: [PATCH] fix(cmd/list): show username with no datasets to list --- cmd/list.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/list.go b/cmd/list.go index b359b0f95..8e376fcfd 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -128,10 +128,15 @@ func (o *ListOptions) Run() (err error) { } if len(infos) == 0 { + pn := fmt.Sprintf("%s has", o.Peername) + if o.Peername == "" { + pn = "you have" + } + if o.Term == "" { - printInfo(o.Out, "%s has no datasets", o.Peername) + printInfo(o.Out, "%s no datasets", pn) } else { - printInfo(o.Out, "%s has no datasets that match \"%s\"", o.Peername, o.Term) + printInfo(o.Out, "%s no datasets that match \"%s\"", pn, o.Term) } return }