DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk2 min

How to Enable Angular CLI Autocomplete with `ng completion`

Use `ng completion` to enable Angular CLI command and option suggestions in supported Bash and Zsh environments, or load its script manually.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

ng completion configures shell autocomplete for Angular CLI: once enabled, press Tab while entering ng commands to see suggested commands and options. Angular CLI can offer to configure it the first time you use the CLI (v14 and later); if you declined, run ng completion yourself. The documented shells are Bash and Zsh on macOS and Linux, and Bash or Zsh in Git Bash or Windows Subsystem for Linux on Windows.

What ng completion does

The command sets up your shell to load Angular CLI autocomplete. Suggestions can help complete commands and options; when an argument has multiple possible values, the shell can show available choices and their documentation. Angular’s autocomplete guide describes the setup and supported environments.

As an Amazon Associate I earn from qualifying purchases.

The CLI may prompt to enable autocomplete the first time it is used in Angular CLI v14 or later. If you dismissed or declined that prompt, run ng completion later.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose an installation method

Automatic setup

Run ng completion. Angular’s setup appends the completion configuration to your current shell’s existing configuration file, or creates one if necessary. This is the most convenient route, but it lets the CLI make that configuration-file change for you.

The change does not take effect in a terminal session that was already running. Restart the terminal, or load the completion script in the current session using the command below.

Manual setup

To choose where the setup is loaded, add this line to the startup configuration for your shell:

source <(ng completion script)

Alternatively, run that command directly in the current terminal session to enable completion there without restarting. The ng completion script reference describes this command as generating a real-time type-ahead completion script for Bash and Zsh.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Supported shells and platforms

  • macOS and Linux: Bash and Zsh.
  • Windows: Bash or Zsh through Git Bash or Windows Subsystem for Linux (WSL).

Angular’s documented support does not establish compatibility with every Windows shell. The configuration command depends on the shell environment, so use one of the documented Bash or Zsh setups.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix “ng: command not found”

Autocomplete setup invokes Angular CLI, so the shell must be able to locate and execute ng. Check that Angular CLI is installed and that its executable is available on your PATH. Angular’s guide suggests a global npm installation when the command is missing:

npm install -g @angular/cli

Angular CLI is published as @angular/cli and provides the ng binary. See the Angular CLI overview for more information about the CLI.

If completion still does not appear

  • Confirm you are using Bash or Zsh in a documented environment.
  • After automatic setup, restart the terminal or run source <(ng completion script) in the current session.
  • If the source command also cannot find ng, resolve the installation or PATH issue before trying completion again.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.