Merge branch 'use-rcm'
This commit is contained in:
commit
f1ebca52da
18 changed files with 33 additions and 13 deletions
tag-zsh
53
tag-zsh/aliases
Normal file
53
tag-zsh/aliases
Normal file
|
@ -0,0 +1,53 @@
|
|||
alias ga="git add -p"
|
||||
alias gc="git commit"
|
||||
alias gca="git commit --amend --no-edit --reset-author"
|
||||
alias gcm="git commit -m"
|
||||
alias gl="git log"
|
||||
alias gs="git status"
|
||||
|
||||
alias gh="github"
|
||||
alias nah="git reset --hard && git clean -fd"
|
||||
alias wip="git add . && git commit -m 'wip'"
|
||||
|
||||
alias l="ls -lah"
|
||||
|
||||
# Fast open
|
||||
alias o="open ."
|
||||
|
||||
alias p="phpunit"
|
||||
alias pf="phpunit --filter "
|
||||
alias pstorm="phpstorm"
|
||||
alias st="subl"
|
||||
alias stt="subl ."
|
||||
|
||||
# Quickly go to the Code directory
|
||||
alias web="cd ~/Code"
|
||||
|
||||
alias y=yarn
|
||||
alias ya='yarn add'
|
||||
alias yd="yarn dev"
|
||||
alias yp="yarn prod"
|
||||
alias ys="yarn serve"
|
||||
alias yw="yarn watch"
|
||||
|
||||
# Docksal
|
||||
alias f="fin"
|
||||
|
||||
# Shorter Git commands.
|
||||
alias add='git add'
|
||||
alias amend='git commit --amend'
|
||||
alias clone='git clone'
|
||||
alias commit='git commit'
|
||||
alias pull='git pull'
|
||||
alias push='git push'
|
||||
alias rebase='git rebase'
|
||||
|
||||
alias hosts="sudo vim /etc/hosts"
|
||||
alias sshconfig='vim ~/.ssh/config'
|
||||
alias zshconfig='vim ~/.zshrc'
|
||||
|
||||
# PhpStorm
|
||||
alias pstorm='open -a /Applications/PhpStorm.app "`pwd`"'
|
||||
|
||||
# Sublime Text
|
||||
alias sublime='open -a /Applications/Sublime\ Text.app "`pwd`"'
|
20
tag-zsh/functions
Normal file
20
tag-zsh/functions
Normal file
|
@ -0,0 +1,20 @@
|
|||
shorten() {
|
||||
pushd ~/Code/opdavi.es
|
||||
git pull --rebase
|
||||
npm run shorten $1 $2
|
||||
popd
|
||||
}
|
||||
|
||||
function mkd() {
|
||||
mkdir -p "$@" && cd "$@"
|
||||
}
|
||||
|
||||
function db {
|
||||
if [ "$1" = "refresh" ]; then
|
||||
mysql -uroot -e "drop database $2; create database $2"
|
||||
elif [ "$1" = "create" ]; then
|
||||
mysql -uroot -e "create database $2"
|
||||
elif [ "$1" = "drop" ]; then
|
||||
mysql -uroot -e "drop database $2"
|
||||
fi
|
||||
}
|
2
tag-zsh/zsh_profile.d/navigation.zsh
Normal file
2
tag-zsh/zsh_profile.d/navigation.zsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
setopt auto_cd
|
||||
cdpath=($HOME $HOME/Code $HOME/Code/clients $HOME/Code/os)
|
6
tag-zsh/zsh_profile.d/platformsh.zsh
Normal file
6
tag-zsh/zsh_profile.d/platformsh.zsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Platform.sh CLI configuration.
|
||||
export PATH="$HOME/"'.platformsh/bin':"$PATH"
|
||||
|
||||
if [ -f "$HOME/"'.platformsh/shell-config.rc' ]; then
|
||||
. "$HOME/"'.platformsh/shell-config.rc';
|
||||
fi
|
107
tag-zsh/zshrc
Normal file
107
tag-zsh/zshrc
Normal file
|
@ -0,0 +1,107 @@
|
|||
# If you come from bash you might have to change your $PATH.
|
||||
export PATH=$PATH:bin
|
||||
export PATH=$PATH:node_modules/.bin
|
||||
export PATH=$PATH:vendor/bin
|
||||
export PATH=$PATH:$HOME/.composer/vendor/bin
|
||||
export PATH=$PATH:/usr/local/sbin
|
||||
export PATH=$PATH:"$HOME/.platformsh/bin"
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH=/Users/opdavies/.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="robbyrussell"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion. Case
|
||||
# sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to disable bi-weekly auto-update checks.
|
||||
# DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# export UPDATE_ZSH_DAYS=13
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# 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=(common-aliases composer docker git github npm osx z zsh-autosuggestions zsh-syntax-highlighting)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
# if [[ -n $SSH_CONNECTION ]]; then
|
||||
# export EDITOR='vim'
|
||||
# else
|
||||
# export EDITOR='mvim'
|
||||
# fi
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
alias zshconfig="vim ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
||||
source ~/.aliases
|
||||
source ~/.functions
|
||||
|
||||
if [ -f ~/.aliases-private ]; then
|
||||
source ~/.aliases-private
|
||||
fi
|
||||
|
||||
. /usr/local/etc/profile.d/z.sh
|
||||
|
||||
# Stop zsh from eating space before pipe symbol
|
||||
# https://superuser.com/questions/613685/how-stop-zsh-from-eating-space-before-pipe-symbol
|
||||
ZLE_REMOVE_SUFFIX_CHARS=""
|
||||
|
||||
for zsh_source in $HOME/.zsh_profile.d/*.zsh; do
|
||||
source $zsh_source
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue