0.9.2 • Published 5 years ago

nama v0.9.2

Weekly downloads
7
License
GPL-3.0-only
Repository
github
Last release
5 years ago

nama

Namespaced Aliases: organize and easily find aliases using autocomplete & namespacing

npm npm Join the chat at https://gitter.im/namespaced-aliases/community npm.io

About

An open-source command line utility to supercharge your aliases. Features include alias namespacing & tab autocomplete. By having easy access to all of your aliases, you can speed up your development or devOps workflow.

Cloud Sync

Cloud synchronization functionality is now in beta-testing, utilizing nama-sync through the AliaSync service. More information can found at the nama-sync repository.

Compatability

Currently only supports the bash shell. Other shells are going to be tested & implemented in the future.

Installation

Installing using NPM

npm install -g nama
nama-install
source ~/.bashrc

If you run into permissions errors, please run this command:

npm install -g nama --unsafe-perm=true

If that still gives permissions issues, please follow this guide to fixing npm permissions issues. You should not need sudo to install this.

Installing on Ubuntu

sudo apt-get install build-essential
npm install -g nama
nama-install
source ~/.bashrc

If you run into permissions issues, please follow this guide to fixing npm permissions issues. You should not need sudo to install this.

Installing on MacOS

Also, make sure your shell sources ~/.bashrc whenever a new window terminal opens. If you are running MacOS, make sure the following line is in your ~/.bash_profile file:

[ -r ~/.bashrc ] && . ~/.bashrc

You can easily add it by running this command:

echo '[ -r ~/.bashrc ] && . ~/.bashrc' >> ~/.bash_profile

Usage

Name - Namespaced Aliases

List all namespaces

na

Create & deleting namespaces

To create a namespace: na c [namespace-name] or na create [namespace-name]

To delete an existing namespace: na rm [namespace-name] or na delete [namespace-name]

Creating a new alias in a namespace

na c [namespace] [alias] [command] or na create [namespace] [alias] [command]

Running an alias

na [namespace] [alias]

Running an alias in the current console

If you want to run a command like cd that will affect your current console, you must use the nac command. Currently, the mechanism that allows the nac command to work makes the autocomplete situation intermittent.

na c test1 gohome 'cd ~/'
nac test1 gohome

Please file an issue or PR if you find a potential solution to this problem.

Reference

nama - namespaced aliases
       Store, quickly access, and organize
       your aliases. Auto-complete too!

na [-a] [namespace]
     (-a)            Lists all commands for all namespaces
     [namespace]     List commands for the namespace


na c [namespace]
na create [namespace]
     Creates a namespace/folder to organize your aliases
       Example:     na c utils

na c [namespace] [alias] "[command]"<-Enclosed in quotes
na create [namespace] [alias] "[command]"<-Enclosed in quotes
     Creates an alias in a namespace
       Example:     na c utils echo_info "echo 'info'"

na [namespace] [alias]
     Runs your alias
       Example: a utils echo_info

nac [namespace] [alias]
     Runs your alias in the current console
     Lets commands like cd work correctly

     Note: autocomplete work intermittently for commands
     in this mode

na rm [namespace] [alias]
na delete [namespace] [alias]
     Deletes an alias in a namespace

You can also use nama in the place of na for any command above.

Limitations

Protected namespaces

Current, you cannot use the namespace completion due to the mechanics of the autocompletion script.

Change Log

DateVersionChange Description
3/1/20190.9.1More validations, fixed bashrc double line, updated gif
3/1/20190.9.0Added nac command to handle commands like cd, added warning, removed old na alias, added invalid character validations
2/23/20190.8.1Fixed issue with running commands in current shell, Fixed bug with sqlite table init
2/23/20190.8.0Changed a command to na to help prevent unintended errors with other commands
2/19/20190.7.0Integrated with nama-sync
2/8/20190.6.2Changed the way installation works
2/6/20190.6.1Fixed small bug introduced during the merge
2/5/20190.6.0Sped up autocomplete functionality significantly
12/4/20180.5.6Changed the way in which commands were referenced globally
12/4/20180.5.3Fixed dependency issues
11/27/20180.5.1Fixed issue with remove command
11/23/20180.5.0Updated to use the tabtabtab autocompletion library
11/14/20180.4.0Refactor to utilize sqlite
11/11/20180.3.0Added default shortcut, refactor
11/9/20180.2.2Added removal feature, updated installation script
11/8/20180.1.0Initial release
0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago

0.8.1

5 years ago

0.8.0

5 years ago

0.7.0

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

5 years ago

0.5.11

5 years ago

0.5.10

5 years ago

0.5.9

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.3

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago