@lttr/shell-aliases
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Zsh aliases

Retrieve and parse zsh aliases from the environment or from a file.

This package is written for deno and compiled for node using dnt.

Usage (for deno)

import { evaluatedAliases, aliasesFromFile } from "https://deno.land/x/shell_aliases/mod.ts";

const aliases = await evaluatedAliases();
// or
const aliases = await aliasesFromFile(pathToAliasesFile);

// aliases will be an array like:
// [
//   {
//     key: "..",
//     value: "cd .."
//   },
//   {
//     key: "ll",
//     value: "ls -l"
//   }
// ]

Usage (for node)

import { evaluatedAliases } from "@lttr/shell-aliases";
const aliases = await evaluatedAliases();

Testing

deno task test

First: Deno x publishing

This package is automatically published when new tag with version is pushed to the Github repository.

git describe --tags # get last tag
git tag <version>
git push --tags

Second: NPM publishing

There is a build script that uses dnt and compiles a npm package.

deno run -A _build.ts <version>
cd npm
npm publish --access public
deno task clean

Readme

Keywords

none

Package Sidebar

Install

npm i @lttr/shell-aliases

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

15.7 kB

Total Files

16

Last publish

Collaborators

  • lttr