add filename

This commit is contained in:
Celogeek 2022-01-01 19:26:59 +01:00
parent ade03260e2
commit 308017edb7
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A
2 changed files with 2 additions and 3 deletions

View File

@ -46,8 +46,8 @@ func (c *ImagesTagCommand) Execute(args []string) error {
if err != nil { if err != nil {
return err return err
} }
fmt.Println(img) fmt.Println(img)
t := table.NewWriter() t := table.NewWriter()
t.AppendRows([]table.Row{ t.AppendRows([]table.Row{
{"Name", imgDetails.Name}, {"Name", imgDetails.Name},
@ -61,6 +61,5 @@ func (c *ImagesTagCommand) Execute(args []string) error {
t.SetOutputMirror(os.Stdout) t.SetOutputMirror(os.Stdout)
t.SetStyle(table.StyleLight) t.SetStyle(table.StyleLight)
t.Render() t.Render()
return nil return nil
} }

View File

@ -48,7 +48,7 @@ func (img *ImageDetails) Preview(height int) (string, error) {
buf := bytes.NewBuffer([]byte{}) buf := bytes.NewBuffer([]byte{})
buf.WriteString("\033]1337") buf.WriteString("\033]1337")
buf.WriteString(";File=") buf.WriteString(fmt.Sprintf(";File=%s", img.Filename))
buf.WriteString(";inline=1") buf.WriteString(";inline=1")
buf.WriteString(fmt.Sprintf(";size=%d;", resp.ContentLength)) buf.WriteString(fmt.Sprintf(";size=%d;", resp.ContentLength))
if height > 0 { if height > 0 {