Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ -f /Users/${USER}/.fzf.zsh ] && source /Users/${USER}/.fzf.zsh
- [ -f $(brew --prefix)/etc/profile.d/autojump.sh ] && . $(brew --prefix)/etc/profile.d/autojump.sh
- export ZSH="/Users/${USER}/.oh-my-zsh/"
- export PATH="${HOME}/bin:${PATH}"
- HISTSIZE=100000
- SAVEHIST=100000
- source $ZSH/oh-my-zsh.sh
- source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
- plugins=(zsh-autosuggestions)
- alias src='source ~/.zshrc'
- alias bashrc='sublime ~/.zshrc'
- alias karabiner='sublime ~/.config/karabiner.edn'
- alias cf='den env exec -T php-fpm n98-magerun c:f'
- alias sup='den env exec -T php-fpm bin/magento setup:upgrade --keep-generated'
- alias db='den env exec -T php-fpm n98-magerun db:cons'
- alias gs='git status'
- alias gp='git pull'
- export NVM_DIR="$HOME/.nvm"
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
- [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
- parse_git_branch() {
- git_status="$(git status 2> /dev/null)"
- pattern="On branch ([^[:space:]]*)"
- if [[ ${git_status} =~ ${pattern} ]]; then
- branch=${match[1]}
- branch_cut=${branch:0:29}
- if (( ${#branch} > ${#branch_cut} )); then
- echo "[${branch_cut}…]"
- else
- echo "[${branch}]"
- fi
- fi
- }
- setopt PROMPT_SUBST
- PROMPT='%{%F{red}%}%9c%{%F{none}%}%{%F{green}%} $(parse_git_branch) %{%F{none}%} $ '
- fzfg ()
- {
- setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null;
- rg -n '' $@ | sed -e 's/:/+/' -e 's/:/\t/' -e 's/+/:/' -e 's/\\/\//g' | fzf | cut -f 1 | cut -d ':' -f 1 | xargs sublime
- }
- fzfd ()
- {
- fd -t d . | fzf | pbcopy
- }
- gf ()
- {
- git branch | grep -i $1
- }
- gcb ()
- {
- git checkout -b $1
- }
- gcp ()
- {
- git cherry-pick $1
- }
- ff ()
- {
- find . -name "*$1*";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement