Created
April 21, 2011 23:03
-
-
Save TaurusOlson/935676 to your computer and use it in GitHub Desktop.
My zshrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH=$HOME/.zsh | |
# Usage: init_config CONFIG_FILE | |
# Description: Source the configuration file, and create an alias to edit it | |
init_config() { | |
local CONFIG_FILE=$1 | |
if [[ -r $CONFIG_FILE ]] | |
then | |
source $CONFIG_FILE | |
CONFIG_ALIAS=".$(basename $CONFIG_FILE)" | |
alias $CONFIG_ALIAS="vi $CONFIG_FILE" | |
fi | |
} | |
# FUNCTIONS ------------------------------------------------------------------- | |
# fpath=($ZSH/functions $fpath) | |
# LIB ------------------------------------------------------------------------- | |
for config_file ($ZSH/lib/*.zsh) init_config $config_file | |
# PLUGINS --------------------------------------------------------------------- | |
plugin=${plugin:=()} | |
plugins=( brew ) | |
for plugin ($plugins) source $ZSH/plugins/$plugin/$plugin.plugin.zsh | |
# Zsh aliases | |
alias sz='source $HOME/.zshrc' | |
alias .zshrc='vi $HOME/.zshrc' | |
# Bash aliases | |
alias sb='source $HOME/.bashrc' | |
alias .bashrc='vi $HOME/.bashrc' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment