Project

aliasing

0.0
No commit activity in last 3 years
No release in over 3 years
Aliasing makes recommendations of potential aliases based on your bash history
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.14

Runtime

>= 0.18.1
 Project Readme

Aliasing

A little test project to get familiar with creating Ruby CLIs using Thor. It exists to facilitate making aliases for commonly used bash commands.

Installation

$ gem install aliasing

Usage

Find most frequently used bash commands

$ aliasing most_frequent {history file} {num entries}

-> num entries defaults to 10

Example

$ aliasing most_frequent ~/.bash_history 15

will return most frequently used commands from the current users .bash_history file

Make an alias

(Right, because its so hard to do by yourself...)

$ aliasing make_alias {alias name} {command} {location = ~/.bash_profile}

-> location defaults to ~/.bash_profile unless otherwise specified

Example

$ aliasing make_alias ll "ls -l"

Aliasing will refuse to create an alias for one that an alias name that already exists.

NB: be sure to use quotes for multi-word commands

Todos (if this project actually had legs)

  • document code
  • write rspecs
  • write cucumber tests for CLI
  • more tools for alias management
    • removing an alias by name
    • making suggestions (eg. "bundle exec rake db:migrate" -> "rmigrate", "ssh -i ~/.ssh/mykey.pem" -> "sshmykey")

Version History

0.0.1 - Added commands to find the most frequently used bash commands and create aliases in a target file.

License

MIT