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'

bag's People

Contributors

stavshamir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

guilbill nvalfre

bag's Issues

Doesn't work on windows+git bash

When running on git bash, you get a FileNotFoundException:

Exception in thread "main" java.io.FileNotFoundException: \d\Temp\bag\aliases (The system cannot find the path specified)

The application.properties has been correctly created with forward slashes alias-user-file=/d/Temp/bag/aliases but this doesn't appear to get translated over correctly when reading the properties file.

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.