Improve ZSH completions

Closed
SR
3y ago
+359-535

Refactoring the code and adding improvements

Autocomplete for --define flag

  • Reads the environment variables and autocomplete them in json format
  • Autocomplete the environment variable
    process.env.NODE_ENV

define completion

Autocomplete for --load flag

Auto complete file extensions with valid loaders

load completion

Fixed bug when autocompleting recent packages

Previously, when adding multiple packages in the same command, the autocomplete did not work well.

bun add react vite esbuild nanoid

Before:
recent packages completion before

After:
Segmentation in

  • recent
  • popular

recent packages completion after

Autocomplete for remove command

Segmentation in

  • Dependencies
  • Dev Dependencies
  • Optional Dependencies
  • Peer Dependencies

remove package completion

Segmentation for the run command

Segmentation in

  • files
  • binaries
  • scripts

run completion