Code Monkey home page Code Monkey logo

bash-it-cookbook's Introduction

bash-it Build Status Cookbook Version License

Takes your shell from Bland to Grand!

Installs Bash it which is an easy way to make your bash shell awesome

Bash it Booby Theme (Dark)

Requirements

  • apt cookbook
  • yum cookbook
  • git cookbook

Attributes

The node['bash-it']['instance_default'] attributes are parsed out as defaults for the bash_it_instance resource

The node['bash-it']['repository'] and node['bash-it']['revision'] attributes are used to specify the git repo and revision to clone down bash-it from. It defaults to the official bash-it repo

The node['bash-it']['users'] attribute is an array of usernames that should have bash-it installed accoring to the instance defaults. FYI: I will probably deprecate this in the future

See attributes/default.rb for more details

Recipes

bash-it::default

  • Apt & Yum Recipes
  • Install Git
  • Configure Bash it for users specified in node['bash-it']['users']

This recipe is not nessesary so long as git is installed before using the bash_it_instance LWRP

bash-it::global

This recipe will install a global version of bash-it for all users on the system. I don't like this approach personally because it is not flexible and a shell should be configurable to a user's own preferances when possible

In any event, to use this recipe you just need to include bash-it::global

Note: You might need the bash-it::default recipe to install dependencies as well

This recipe will use the node['bash-it']['instance_default'] keys to determine plugins, aliases, ect.

Resources

bash_it_instance

To install Bash it for a user you simply put bash_it_instance <username> in your recipe. This is best placed in your users cookbook if you have one.

Default attributes for the bash_it_instance are stored as node attributes in the node['bash-it']['instance_default'] hash so that you can easily override the defaults

Examples

# Install Bash it for eddie's user

bash_it_instance 'edhurtig'

# Install Bash it for the root user

bash_it_instance 'root' do
  home '/root'
end

# Instance with a different theme

bash_it_instance 'edhurtig' do
  theme 'candy'
end

# the full set of options

bash_it_instance 'edhurtig' do
    home '/home/edhurtig-custom' # A custom home dir
    theme 'dulice' # Any Bash it theme
    git '[email protected]' # Custom Git Server
    scm_check true # Whether to check for SCM continuously
    plugins %w( base history ruby  ) # An array of plugins that should be active
    aliases %w( git rails tmux ) # An array of aliases that should be active
    completions %w( git ssh tmux test-kitchen ) # An array of completions that should be active
end

Usage

Include this recipe in a wrapper cookbook:

depends 'bash-it', '~> 1.0'
# Install bash it globally using the node['bash-it']['instance_default'] attributes
include_recipe 'bash-it::global'

# Install an instance of bash-it for a specific user using the defaults
bash_it_instance 'edhurtig'

TODO

See the Issues

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests with kitchen test, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Author:: Eddie Hurtig ([email protected])

bash-it-cookbook's People

Contributors

edhurtig avatar

Stargazers

Tom Hensel avatar

Watchers

James Cloos avatar  avatar

bash-it-cookbook's Issues

Node attributes are read only

I think I screwed something up in the enable_disable function in the bash_it_instance resource provider because my users cookbook is erring out with complaints regarding that node attributes are read only. I believe I am passing in a node object as new_names instead of an array of strings.

Install Bash-it globally

There should be a way to install bash it using the global bashrc for the system. This should probably be implemented as a bash-it::global recipe which leverages bash_it_instance with some extra attributes overridden

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.