diff --git a/cmd/pkg.go b/cmd/pkg.go index ac47f048df2a47fe6e59b0cf6fcfce3f11da42b5..3a7baca813b935d8930105780f919a0263d5cfcc 100644 --- a/cmd/pkg.go +++ b/cmd/pkg.go @@ -133,6 +133,11 @@ channels for official ksonnet libraries. ### Syntax `, Example: ` +# Install an nginx dependency, based on the latest branch. +# In a ksonnet source file, this can be referenced as: +# local nginx = import "incubator/nginx/nginx.libsonnet"; +ks pkg install incubator/nginx + # Install an nginx dependency, based on the 'master' branch. # In a ksonnet source file, this can be referenced as: # local nginx = import "incubator/nginx/nginx.libsonnet"; @@ -246,10 +251,10 @@ var pkgListCmd = &cobra.Command{ } rows := [][]string{ - []string{nameHeader, registryHeader, installedHeader}, + []string{registryHeader, nameHeader, installedHeader}, []string{ - strings.Repeat("=", len(nameHeader)), strings.Repeat("=", len(registryHeader)), + strings.Repeat("=", len(nameHeader)), strings.Repeat("=", len(installedHeader))}, } for name := range app.Registries { @@ -261,9 +266,9 @@ var pkgListCmd = &cobra.Command{ for libName := range reg.Libraries { _, isInstalled := app.Libraries[libName] if isInstalled { - rows = append(rows, []string{libName, name, installed}) + rows = append(rows, []string{name, libName, installed}) } else { - rows = append(rows, []string{libName, name}) + rows = append(rows, []string{name, libName}) } } } diff --git a/docs/cli-reference/ks_pkg_install.md b/docs/cli-reference/ks_pkg_install.md index a674b4aa3575a7b27d027c6d49fc34dbc2af98f2..e885c45406f5250fd307e11fb9967685657cbe1f 100644 --- a/docs/cli-reference/ks_pkg_install.md +++ b/docs/cli-reference/ks_pkg_install.md @@ -31,6 +31,11 @@ ks pkg install <registry>/<library>@<version> ``` +# Install an nginx dependency, based on the latest branch. +# In a ksonnet source file, this can be referenced as: +# local nginx = import "incubator/nginx/nginx.libsonnet"; +ks pkg install incubator/nginx + # Install an nginx dependency, based on the 'master' branch. # In a ksonnet source file, this can be referenced as: # local nginx = import "incubator/nginx/nginx.libsonnet";