An effort to encapsulate aliases used by the console of current process.
This library provides native bindings for Windows APIs:
const alias = require("alias-win");
alias.get().then(console.log);
Get console aliases for the specified executable.
console.log(await alias.get())
For detailed information, see the documentation of the asynchronous version of this API: alias.get()
.
Set console aliases for the specified executable.
await alias.set({
sudo: "$*",
ll: "ls -l $*",
// Use `null` to unset an alias
bash: null,
});
For detailed information, see the documentation of the asynchronous version of this API: alias.set()
.
The console aliases may be set and unset with the alias
and unalias
commands.
For detailed information, see the documentation of bash