Socket
Socket
Sign inDemoInstall

@oclif/plugin-autocomplete

Package Overview
Dependencies
84
Maintainers
7
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @oclif/plugin-autocomplete

autocomplete plugin for oclif


Version published
Weekly downloads
560K
increased by4.23%
Maintainers
7
Created
Weekly downloads
 

Package description

What is @oclif/plugin-autocomplete?

@oclif/plugin-autocomplete is a plugin for the Oclif CLI framework that provides autocomplete functionality for CLI commands. It helps users by suggesting command completions, options, and arguments as they type, improving the user experience and efficiency.

What are @oclif/plugin-autocomplete's main functionalities?

Enable Autocomplete

This feature enables autocomplete for the CLI application. The code sample demonstrates how to enable autocomplete using the @oclif/plugin-autocomplete package.

const { Command } = require('@oclif/core');
const Autocomplete = require('@oclif/plugin-autocomplete').default;

class MyCommand extends Command {
  async run() {
    this.log('Enabling autocomplete...');
    await Autocomplete.enable();
  }
}

MyCommand.run();

Generate Autocomplete Script

This feature generates the autocomplete script for the CLI application. The code sample shows how to generate and log the autocomplete script using the @oclif/plugin-autocomplete package.

const { Command } = require('@oclif/core');
const Autocomplete = require('@oclif/plugin-autocomplete').default;

class MyCommand extends Command {
  async run() {
    this.log('Generating autocomplete script...');
    const script = await Autocomplete.generate();
    this.log(script);
  }
}

MyCommand.run();

Disable Autocomplete

This feature disables autocomplete for the CLI application. The code sample demonstrates how to disable autocomplete using the @oclif/plugin-autocomplete package.

const { Command } = require('@oclif/core');
const Autocomplete = require('@oclif/plugin-autocomplete').default;

class MyCommand extends Command {
  async run() {
    this.log('Disabling autocomplete...');
    await Autocomplete.disable();
  }
}

MyCommand.run();

Other packages similar to @oclif/plugin-autocomplete

Changelog

Source

1.3.8 (2022-12-18)

Bug Fixes

  • deps: bump @oclif/core from 1.21.0 to 1.22.0 (edc9cd9)

Readme

Source

@oclif/plugin-autocomplete

autocomplete plugin for oclif (bash & zsh)

Version CircleCI Appveyor CI Downloads/week License

Usage

See https://oclif.io/docs/plugins.html

Commands

oclif-example autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ oclif-example autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  display autocomplete installation instructions

EXAMPLES
  $ oclif-example autocomplete

  $ oclif-example autocomplete bash

  $ oclif-example autocomplete zsh

  $ oclif-example autocomplete --refresh-cache

See code: src/commands/autocomplete/index.ts

Keywords

FAQs

Last updated on 18 Dec 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc