Skip to content

fosslife/dym

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DYM

  • Did You Mean?

Introduction

dym is a small tool that checks for incorrectly entered commands and suggest the closest command from the list. Ever typed command like git status as git stats or anything else (i.e with a typo?). git will immediately whine about that typo and will suggest you proper closest command to the input that it supports.

$ git stats
git: 'stats' is not a git command. See 'git --help'.

The most similar command is
        status

Usage

file exports a cjs method called dym right now. ignore the code quality, it's under progress. Just import it like

const dym = require('dym');

and then pass your 'list of commands' and currently entered command like

const closest = dym(["list", "status", "merge"], "marge");

it should return merge

About

Command `X` not found. Did you mean `x` ?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published