npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aliaser-bash

v1.0.1

Published

An alias management / directory navigation tool. Tested on MacOS and Ubuntu using Bash and Zsh.

Downloads

20

Readme

shellcheck

aliaser

An alias management / directory navigation tool.

Installation

Aliaser is a single bash function, so you can clone / download this repo and source the file directly:

$ git clone https://github.com/unforswearing/aliaser.git .
$ cd aliaser
$ source aliaser

Or using npm:

$ npm install -g aliaser-bash

For persistent use you may source aliaser from your .bashrc, .bash_profile or other config. For more information, see the "Usage" section below.

Usage

When aliaser is run for the first time it will create a .aliaser directory that contains the alias text file. Use aliaser open to view the this file in your default .txt file editor. You may also use aliaser edit to edit this file in your terminal.

Add source ~/.aliaser/aliaser.txt to your bash_profile before creating your first alias. Aliases created via aliaser are available immediately.

Typing aliaser help produces the following help text:

aliaser <option> [alias name]

options:
  -h|help         display this help message
  -o|open         open the alias file with the default gui editor (e.g. TextEdit)
  -l|list         list aliases saved in alias file
  -e|edit         edit alias file in $EDITOR
  -r|rm           remove alias from alias file
  -d|dir          create an alias from the current directory (alias name is basename)
  -n|name         create an alias from the current directory with a user defined name
  -s|search       search alias file and execute selection
  -a|searchall    search all aliases system wide and execute selection
  -c|command      create an alias from the previous command with a user defined name

examples:
  aliaser rm "aliasname"      remove alias named "aliasname" from alias file
  aliaser -n "favoritedir"    add an alias for the current directory named
                              "favoritedir" to alias file

be sure to source the alias file in your .bashrc or .bash_profile

After sourcing aliaser, you can navigate to a directory and make some aliases:

$ cd ~/scripts
$ aliaser -d myscripts

Or create an alias for the previously executed command:

# execute a command command
$ b=1 && \
> while [ $b -le 2 ]; do
>   tput flash; sleep .02;
>   b=$((b + 1));
> done

# create alias for previously executed command
$ aliaser -c "flash_terminal"

aliaser will use fzf if it is installed and in your $PATH. Otherwise, aliaser will default to listbox which is embedded in the aliaser script.