alias-win

1.0.0 • Public • Published

alias-win

NPM version AppVeyor Codecov David

An effort to encapsulate aliases used by the console of current process.

This library provides native bindings for Windows APIs:

Usage

const alias = require("alias-win");
alias.get().then(console.log);

API

alias.get([exeName])

Get console aliases for the specified executable.

console.log(await alias.get())

alias.getSync([exeName])

For detailed information, see the documentation of the asynchronous version of this API: alias.get().

alias.set(aliases, [exeName])

Set console aliases for the specified executable.

await alias.set({
  sudo: "$*",
  ll: "ls -l $*",
 
  // Use `null` to unset an alias
  bash: null,
});

alias.setSync(aliases, [exeName])

For detailed information, see the documentation of the asynchronous version of this API: alias.set().

CLI

The console aliases may be set and unset with the alias and unalias commands. For detailed information, see the documentation of bash

Related

Dependencies (3)

Dev Dependencies (18)

Package Sidebar

Install

npm i alias-win

Weekly Downloads

7

Version

1.0.0

License

MIT

Unpacked Size

201 kB

Total Files

52

Last publish

Collaborators

  • gucong