My command line life.
Perl Python Vim script Ruby Shell
Switch branches/tags
Nothing to show
Latest commit ea6145a Sep 4, 2012
Permalink
Failed to load latest commit information.
compleat Compleat attach completion is no longer needed. Feb 11, 2012
config/pianobar Renamed .erb files to .rrc to prevent conflicts. Feb 11, 2012
getmail Renamed .erb files to .rrc to prevent conflicts. Feb 11, 2012
irssi Renamed .erb files to .rrc to prevent conflicts. Feb 11, 2012
mercurial Added Mercurial. Feb 11, 2012
mplayer Added MPlayer. Dec 15, 2011
pip Do not auto install Python eggs to user directory. Feb 19, 2012
vim Moved Vim's backup, swap, and undo directories. Feb 11, 2012
weechat Add tor to WeeChat May 26, 2012
zprezto @ cc7e43b Replace Oh My Zsh with Prezto Sep 3, 2012
.gitignore Added Mercurial. Feb 11, 2012
.gitmodules Replace Oh My Zsh with Prezto Sep 3, 2012
README.md Updated README. Feb 11, 2012
Rakefile Improve backup excludes Mar 24, 2012
ackrc Added ack. Sep 6, 2011
aprc Added Awesome Print. Feb 11, 2012
ctags Added Exuberant Ctags. Dec 15, 2011
dir_colors Initial import. Sep 4, 2011
editrc Initial import. Sep 4, 2011
gemrc Added RubyGems, Ruby Debugger, and ripl. Dec 15, 2011
gitconfig.rrc Update Git and Mercurial merge tools May 26, 2012
gitignore Added Git. Dec 15, 2011
hgignore Added Mercurial. Feb 11, 2012
hgrc Update Git and Mercurial merge tools May 26, 2012
hushlogin Initial import. Sep 4, 2011
inputrc Initial import. Sep 4, 2011
irbrc Added Pry. Feb 11, 2012
nanorc Added nano. Sep 6, 2011
netrc.rrc Renamed .erb files to .rrc to prevent conflicts. Feb 11, 2012
osx Added osx. Feb 11, 2012
pryrc Added Pry. Feb 11, 2012
pylintrc Added pylint. Dec 15, 2011
rdebugrc Added RubyGems, Ruby Debugger, and ripl. Dec 15, 2011
screenrc Removed no longer needed files and added README. Feb 11, 2012
tmux.conf Enable tmux automatic rename and 1-based index May 26, 2012
torrc Add tor May 26, 2012
urlview Added urlview. Sep 6, 2011
vimrc Return the Vim colorscheme to Solarized Sep 3, 2012
zlogin Replace Oh My Zsh with Prezto Sep 3, 2012
zpreztorc Replace Oh My Zsh with Prezto Sep 3, 2012
zshenv Replace Oh My Zsh with Prezto Sep 3, 2012
zshrc Replace Oh My Zsh with Prezto Sep 3, 2012

README.md

Dot Files

These configuration files set up my command line interface.

Environment

Be aware that I use Mac OS X; changes will be necessary for Linux users.

To switch to Zsh, execute:

chsh -s /bin/zsh

I store scripts in ~/.tilde/bin. PATH and MANPATH must be modified in oh-my-zsh/environment.zsh to match your configuration.

Some scripts and programs may have different names or extensions depending on the operating system or package manager. Check aliases in oh-my-zsh/alias.zsh to fix them, if necessary.

oh-my-zsh Theme

sorin.oh-my-zsh theme

The font in the screenshot is Monaco 12 pt—the default fixed-width font on Mac OS X prior to Snow Leopard—which has been replaced by Menlo, based on DejaVu Sans Serif Mono, an inferior font. Change the font to Monaco; otherwise, the indicators described bellow will look terrible.

The colours in the image above are from the IR_BLACK scheme.

Left Prompt

  • oh-my-zsh — The current working directory.
  • git:master — Git branch.
  • ❯ — Type after this.

Right Prompt

  • ❮❮❮ — Vi command mode indicator.
  • ⏎ — Non-zero return.
  • ✚ — Git added.
  • ⬆ - Git ahead.
  • ⬇ - Git behind.
  • ✖ — Git deleted.
  • ✱ — Git modified.
  • ➜ — Git renamed.
  • ✭ - Git stashed.
  • ═ — Git non-merged.
  • ◼ — Git untracked.

Authentication

Some programs require that authentication information is stored in their respective dot files. Instead of managing two separate dot file repositories, one for actual use and another sanitised for sharing, I store authentication information in the Mac OS X Keychain. In this case, the dot files will be generated from files of the same name that end in the .rrc extension, which are Ruby ERB templates.

The .rrc extension, which stands for raw dot file, is used instead of .erb to not conflict with non dot file ERB templates.

The .rrc syntax is <%= Keychain['Entry Name'].account %> and <%= Keychain['Entry Name'].password %> respectively. For example, this is the GitHub API Token snippet from gitconfig.rrc.

[github]
    user = <%= Keychain['GitHub API'].account %>
    token = <%= Keychain['GitHub API'].password %>

The disadvantage of this method is that the dot files cannot be installed via SSH because Mac OS X disallows Keychain access.

Installation

Clone this repository into ~/.dotfiles, change directory into ~/.dotfiles, and execute the rake install task.

git clone git://github.com/sorin-ionescu/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
rake install

Rake will never replace existing files but back them up into ~/.dotfiles_backup. The dot files will be symbolically linked into the home directory. Templates will be rendered in place then symbolically linked. Since the Rakefile is Mac OS X specific, it must be edited for use with key chains on other operating systems. I will welcome patches that add support for additional password managers.

Vim Text Editor

I use MacVim with Vundle, which allows for Vim plugins to be installed self-contained under their own directory in vim/bundle making them easy to install and remove. The Rakefile has tasks for managing Vim bundles. Read the Vundle documentation for further information.

Terminals

iTerm2.app has mouse support. If you favour in continuing to use Terminal.app, which does not have mouse support under Mac OS X 10.7 Lion, there are hacks available to improve it. Install SIMBL then install under ~/Library/Application Support/SIMBL/Plugins the following plugins.