alias-win
v1.0.0
Published
An effort to encapsulate aliases used by the console of current process.
Downloads
28
Maintainers
Readme
alias-win
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