diff --git a/pkg/cmd/gist/view/view.go b/pkg/cmd/gist/view/view.go index f789c5b04..9eb906cde 100644 --- a/pkg/cmd/gist/view/view.go +++ b/pkg/cmd/gist/view/view.go @@ -136,6 +136,16 @@ func viewRun(opts *ViewOptions) error { defer opts.IO.StopPager() render := func(gf *shared.GistFile) error { + if gf.Truncated { + fullContent, err := shared.GetRawGistFile(client, gf.RawURL) + + if err != nil { + return err + } + + gf.Content = fullContent + } + if shared.IsBinaryContents([]byte(gf.Content)) { if len(gist.Files) == 1 || opts.Filename != "" { return fmt.Errorf("error: file is binary")