diff --git a/en/docs/cli/ls.md b/en/docs/cli/ls.md index d15cec58a..a12671256 100644 --- a/en/docs/cli/ls.md +++ b/en/docs/cli/ls.md @@ -12,6 +12,10 @@ layout: guide yarn ls ``` +The `yarn ls` command mimics the expected Unix behavior of listing. In Yarn, the `ls` +command lists all dependencies for the current working directory by referencing all +package manager meta data files, which includes a project's dependencies. + ``` yarn ls vx.x.x ├─ package-1@1.3.3 @@ -19,3 +23,13 @@ yarn ls vx.x.x │ └─ package-3@^2.1.0 └─ package-3@2.7.0 ``` + +##### `yarn ls [--depth]` + +By default, all packages and their dependencies will be displayed. To restrict the depth of the +dependencies, you can add a flag, `--depth`, along with the desired level to the `ls` command. + +``` +yarn ls --depth=0 +``` +Keep in mind, levels are zero-indexd.