Giter Site home page Giter Site logo

bag's Introduction

bag - Bash Alias Generator

This tool suggests aliases based on non-aliased frequently used commands, and provides a painless way to apply them.

Build

  1. Run:
$ ./gradlew fatJar
  1. Create a home directory for the application
  2. Into the home directory, copy the files install.sh, build/libs/bag-1.0-SNAPSHOT.jar and build/resources/main/alias.sh
  3. From the home directory, run:
$ source install.sh

-OR- Download from here and install:

  1. Unzip
  2. From the unzipped directory, run:
$ source install.sh

Usage:

bag [-c <index> [-a <alternative alias name>]]
 -a,--alternative <alias name>   create an alias with an alternative name
 -c,--create <index>             create an alias with the suggested name
 -h,--help                       print usage
 -l,--print-all                  print a list of all suggested aliases
 -p                              print a list of suggested aliases

The new aliases become available after restarting the shell.

Examples:

  1. Printing a list of suggested aliases
$ bag -p
SUGGESTED	COMMAND		TIMES USED
(1) fab		foo -a -b -c	42
(2) bde		bar -d -e -f	5
  1. Creating a suggested alias
$ bag -c 1
New alias was created: alias fab='foo -a -b -c'
  1. Creating a suggested alias with an alternative name
$ bag -c 2 -a bam
New alias was created: alias bam='bar -d -e -f'

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.