GithubHelp home page GithubHelp logo

greyblake / alis Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 112 KB

Tool to create more flexible aliases.

Home Page: https://github.com/greyblake/alis

License: GNU General Public License v2.0

Ruby 100.00%

alis's Introduction

Alis

by Sergey Potapov (aka Blake)

Why?

In some cases alias UNIX tool can not satisfy us. For example how would make gem install use --no-rdoc and --no-ri options by default? That is why I create Alis. Alis is more flexible tool to create aliases.

Installation

Install alis ruby gem:

gem install alis

And then do:

alis install

Usage

To get help run

alis --help

You can create, remove and list aliases with appropriate commands.

To make gem install use --no-rdoc and --no-ri options just do:

alis set --alias 'gem install' --tail '--no-rdoc --no-ri'

To list you aliases do:

alis list

And the output must be something like this:

ALIAS           EXECUTE         TAIL             
gem install     gem install     --no-ri --no-rdoc

ALIAS is what you type (alias name) to execute command.

EXECUTE is what will be really executed. (if it's not specified it is the same as ALIAS)

TAIL is additional options or arguments which will be added to tail of command you typed.

This means when you run gem install gem_name next time really will be executed gem install gem_name --no-rdoc --no-ri

How does it work?

When you run alis install it creates $HOME/.alis directory and modifies your .bashrc file to include $HOME/.alis/bin to PATH variable.

When you create a new alias Alis creates executable file in $HOME/.alis/bin which handles aliases and runs original command.

To locate original command you can use alis which:

which gem
/home/john_doe/.alis/bin/gem
alis which gem
/usr/bin/gem

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

alis's People

Contributors

greyblake avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.