package shell import ( "fmt" "strings" "go.jolheiser.com/eget/disk" "go.jolheiser.com/eget/meta" ) func Nu() (string, error) { tmpl := "let-env PATH = ($env.PATH | append '%s')\n" m, err := meta.Read() if err != nil { return "", err } var out strings.Builder out.WriteString("# managed by eget; DO NOT EDIT\n\n") for name := range m.Packages { out.WriteString(fmt.Sprintf(tmpl, disk.Path(name))) } return out.String(), nil }