Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

sirech/shell

Repository files navigation

Shell config

This project provides a set of defaults, configuration files and extensions for shell work.

There is an installation script, install.sh, but keep in mind that this is only for remote machines, only for bash, and skips some steps in the setup.

BASH

See bashrc/README.markdown.

ZSH

See zshrc/README.markdown.

Configuration files

See rc/README.markdown.

Extra scripts

There are some executables in the scripts folder. The easiest way to make them available is to link this folder to ~/bin, with something like:

ln -s ~/shell/scripts ~/bin

SSH

See ssh/README.markdown.

GIT

See git/README.markdown.

Utilities

ACK

Very useful.

  • Mac OS X: brew install ack

  • Linux: apt-get install ack-grep

The configuration file is automatically loaded.

AG

A replacement for ack.

  • Mac OS X: brew install the_silver_searcher

  • Linux: apt-get install silversearcher-ag

For older versions of Ubuntu, check https://github.com/ggreer/the_silver_searcher#Installation

Ruby

RVM

Best option for ruby hacking. To install it, follow these steps exactly.

  1. Download rvm by typing bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

  2. Load it with . ~/.rvm/scripts/rvm (best put in the user configuration).

  3. Add completion with ln -s ~/.rvm/scripts/completion ~/shell/bash/completion/rvm

  4. Reload config

To install ruby itself, follow this exactly. This applies for version 1.9.2:

  1. Install zlib, openssl, and readline with rvm package install lib, where lib is each of these libraries. Mac OS X might give some compilation error, but it doesn't seem to matter.

  2. Install ruby with rvm install 1.9.2 --with-openssl-dir=$rvm_path/usr --with-zlib-dir=$rvm_path/usr --with-readline-dir=$rvm_path/usr.

  3. Mark the version with rvm --default use 1.9.2.

(To test if this worked, gem install bundler. More info ).

It might happen that readline does not work. If irb gives a weird error, follow the instructions in this Stack Overflow post.)

rbenv & ruby-build

An alternative to rvm, follow these steps:

  1. Install readline:

    • Linux: sudo apt-get install libreadline-dev

    • Mac OS X: brew install readline && brew link readline

  2. Install zlib:

    • Linux: sudo apt-get install libssl-dev zlib1g-dev
  3. rbenv: Go to https://github.com/sstephenson/rbenv , follow the installation steps. Keep in mind that most of the path setting is already taken care of by the zsh configuration.

  4. ruby-build: Go to https://github.com/sstephenson/ruby-build , follow the instructions to install it as a rbenv plugin.

  5. rbenv-update: Useful plugin. Clone the repo git://github.com/rkh/rbenv-update.git in ~/.rbenv/plugins.

Note that if you want to use irb, you have to install a ruby version with readline support. Do it like this:

CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-p194

For Mac OS X:

CONFIGURE_OPTS="--with-readline-dir=/usr/local" rbenv install 1.9.3-p194

irb

Follow the instructions in irbrc/README.textile.

MongoDB Shell

Follow the instructions in mongorc/README.md.

emacsclient

To use emacsclient properly, don't use the version that ships with the OS. Link the good one with sudo ln -s /Applications/Emacs.app/Contents/MacOS/bin/emacsclient /usr/local/bin/emacsclient.

Standard error in red

Clone the repository with git clone git://github.com/sickill/stderred.git and follow the instructions in https://github.com/sickill/stderred

Remote machine

To install some basic utilities and links for a remote machine that will be accessed via ssh, do this on the machine:

bash < <(curl -s https://raw.github.com/sirech/shell/master/scripts/prepare-remote-machine)

About

Shell Config Files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published