Created
May 4, 2016 14:03
-
-
Save jastuccio/8a0c165830572b04933d27400e39b47e to your computer and use it in GitHub Desktop.
DRAFT .zshrc file
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
# | |
# Executes commands at the start of an interactive session. | |
# | |
# Authors: | |
# Sorin Ionescu <[email protected]> | |
# | |
######################################################################################### | |
# Customize to your needs... # | |
######################################################################################### | |
#print path | |
alias mypath="print -l $path" | |
# linesearch options | |
bindkey "${terminfo[kcuu1]}" up-line-or-search | |
bindkey "${terminfo[kcud1]}" down-line-or-search | |
DISABLE_CORRECTION="true" | |
# sublime text terminal alias | |
alias "st -n -w"="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n -w" | |
alias "st"="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" | |
# bundle exec | |
alias "bxc"="bundle exec cap" | |
# composer | |
alias "csr"="composer" | |
# Docker | |
alias "dk"="docker" | |
alias "dkup"="bash --login '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'" | |
alias "dkc"="docker-compose" | |
alias "dki"="docker images" | |
alias "dkm"="docker-machine" | |
# Shades | |
alias "osh"="open /Library/PreferencePanes/Shades\ Preferences.prefPane/Contents/Resources/Shades.app/" | |
alias "ksh"="killall Shades" | |
defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=com.sublimetext.3;}' | |
# learn you node alias' | |
alias "lyn"="learnyounode" | |
alias "lynv"="learnyounode verify" | |
# Source Prezto. | |
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then | |
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" | |
fi | |
# Add Composer to PATH | |
export PATH="$PATH:~/.composer/vendor/bin" | |
# Add node to path | |
#export PATH="$PATH:/usr/local/bin/node" | |
# add WordPress Coding Standards (PHP Code Sniffer) to path | |
export PATH="$PATH:/Users/joe/.composer/wpcs" | |
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# | |
# Usage: | |
# tab Opens the current directory in a new tab | |
# tab [PATH] Open PATH in a new tab | |
# tab [CMD] Open a new tab and execute CMD | |
# tab [PATH] [CMD] ... You can prob'ly guess | |
# Only for teh Mac users | |
[ `uname -s` != "Darwin" ] && return | |
function tab () { | |
local cmd="" | |
local cdto="$PWD" | |
local args="$@" | |
if [ -d "$1" ]; then | |
cdto=`cd "$1"; pwd` | |
args="${@:2}" | |
fi | |
if [ -n "$args" ]; then | |
cmd="; $args" | |
fi | |
osascript &>/dev/null <<EOF | |
tell application "iTerm" | |
tell current terminal | |
launch session "Default Session" | |
tell the last session | |
write text "cd \"$cdto\"$cmd" | |
end tell | |
end tell | |
end tell | |
EOF | |
} | |
############################################## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment