Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/victormln/alias

Manage all your shell alias easily
https://github.com/victormln/alias

alias aliases manage-alias

Last synced: about 2 months ago
JSON representation

Manage all your shell alias easily

Awesome Lists containing this project

README

        

If you don't know what an alias is, I recommend that you use them. What is an alias?
___

# Malias

![](images/malias_list.gif)

[![Build Status](https://travis-ci.org/victormln/alias.svg?branch=master)](https://travis-ci.org/victormln/alias)
[![Open issues](https://img.shields.io/github/issues/victormln/alias)](https://github.com/victormln/alias/issues)
![Last version](https://img.shields.io/github/v/tag/victormln/alias)
[![License](https://img.shields.io/github/license/victormln/alias)](https://github.com/victormln/alias/blob/master/LICENSE)

Malias is a shell script that lets you add, edit, delete and more to manage your aliases on linux/mac. It's compatible with bash and zshrc (or either use your own file).

Example to show your current aliases:
`malias -l`

- [Installation](#installation)
- [Uninstalling](#uninstalling)
- [Configuration](#configuration)
- [Usage](#usage)
- [Updating](#updating)
- [Contributing](#contributing)

## Installation

```shell
git clone https://github.com/victormln/alias.git ~/.alias
~/.alias/install.sh
source ~/.bashrc # or source ~/.zshrc
```

The install script adds the following line to your .bashrc or .zshrc:

`alias malias="~/.alias/alias.sh"`

## Uninstalling

To uninstall you can use in your console:
`uninstall_malias`
**NOTE:** If you want to totally uninstall the script, delete the folder:
~/.alias

The uninstall script removes the following line from your `.bashrc` or
`.zshrc`:

`alias malias="~/.alias/alias.sh"`

## Configuration

You can configure a lot of parameters. For example, don't search for automatic updates, change the language or change the directory of the file that contains your aliases. To change all these parameters you can open the file conf/user.conf.

## Usage

For example, if you want to add an alias, you can execute:
`malias -a your_alias`

All available arguments:

|Argument |Abbreviation|Meaning |Use|
| ------------- | ---- | ---------------------------------------- |----------|
|`--help` |`-h` | Show available commands |`malias --help` |
|`list` or `view` or `show` |`-l` | Show the aliases you have |`malias -l` |
|`add` |`-a` | Add an alias (or more than one) |`malias -a test1` |
|`edit` |`-e` | Edit an alias (or more than one) |`malias -e test1` |
|`delete` |`-d` | Delete an alias (or more than one) |`malias -d test1 test2` |
|`copy` |`-cp` | Copy an alias (or more than one). You can copy an alias that already exists. |`malias -cp alias_origen alias_nuevo alias_nuevo2` |
|`--conf` | | Open the file with all the configurations. By default the file is opened with "vi", you can change it in the opened file. |`malias --conf` |.
|`--clear` | | Remove from the file that contains the aliases, those that are empty and empty lines |`malias --clear` |
|`--import` | | Import alises from specific file. |`malias --import directory/fileName.txt` |
|`install` | | Install an aliases from the directory "alias". |`malias install name_of_file` |
|`--restore` | | Restore a backup file with all your aliases before executing any action. |`malias --restore` |
|`--update` | | Search for available updates. |`malias --update` |
| |`-v` | Shows the version of the script. |`malias -v` |

## Updating

You can update this script with the option --update:

`malias --update`

If this options does not work:
```shell
cd ~/.alias
git pull origin master
```

## Contributing

If you have some improvements to this script, feel free to make a pull request.