This commit is contained in:
Kevin Cotugno 2017-09-28 10:22:57 -07:00
parent ba8600d427
commit 32caf9903d
2 changed files with 56 additions and 39 deletions

55
profile Normal file
View File

@ -0,0 +1,55 @@
export DEVPATH=$HOME/dev
if [[ -n "$(echo $SHELL | grep zsh)" ]]; then
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="jispwoso"
plugins=(git)
source $ZSH/oh-my-zsh.sh
fi
if [[ -d "$HOME/.rvm" ]]; then
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
fi
if [[ -d "$DEVPATH/android/android-sdk" ]]; then
export ANDROID_SDK=$HOME/dev/android/android-sdk
fi
if [[ -d "$DEVPATH/android/android-ndk" ]]; then
export ANDROID_NDK=$HOME/dev/android/android-ndk
fi
which go &> /dev/null
if (( !$? )); then
export GOPATH=$DEVPATH/go
fi
function passgen () {
local len=$1
local lower=$2
echo $len | grep -q '^[0-9]+$'
if (( ! $? )); then
len=32
fi
if [[ "$lower" = "true" ]]; then
local tr1="[:upper:]"
local tr2="[:lower:]"
fi
cat /dev/urandom | base64 | head -c $len | tr -d "\n" | \
tr "$tr1" "$tr2" && echo
}
export EDITOR='nvim'
alias l="ls -lah"
alias ll="ls -lh"
alias la="ls -lah"
source $HOME/.ssh-sentinel.sh

40
zshrc
View File

@ -1,39 +1 @@
# Path to your oh-my-zsh installation. source $HOME/.profile
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="jispwoso"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nvim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
export ANDROID_SDK=$HOME/dev/android/android-sdk
export ANDROID_NDK=$HOME/dev/android/android-ndk-r13b
export GOPATH=$HOME/dev/go
alias l="ls -la"
alias ll="ls -l"
alias la="ls -la"
alias zshconfig="$EDITOR ~/.zshrc"
alias ohmyzsh="$EDITOR ~/.oh-my-zsh"