[
  {
    "path": ".gitignore",
    "content": "/cache\n/backup\n/vim/bundle\n/config\n/modules\n*.zwc\n*.log\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"modules/rbenv\"]\n\tpath = modules/rbenv\n\turl = https://github.com/sheerun/rbenv.git\n[submodule \"modules/antigen\"]\n\tpath = modules/antigen\n\turl = https://github.com/zsh-users/antigen.git\n[submodule \"modules/vimrc\"]\n\tpath = modules/vimrc\n\turl = https://github.com/sheerun/vimrc.git\n[submodule \"zsh/sheerun-home\"]\n\tpath = zsh/sheerun-home\n\turl = https://github.com/sheerun/home\n[submodule \"zsh/zsh-completions\"]\n\tpath = zsh/zsh-completions\n\turl = https://github.com/zsh-users/zsh-completions\n[submodule \"zsh/zsh-syntax-highlighting\"]\n\tpath = zsh/zsh-syntax-highlighting\n\turl = https://github.com/zsh-users/zsh-syntax-highlighting\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: cpp\n\nbefore_script:\n  - 'sudo apt-get install zsh'\n\nscript: bin/dotfiles install\n"
  },
  {
    "path": "README.md",
    "content": "# My lovely dotfiles [![Build Status](https://secure.travis-ci.org/sheerun/dotfiles.png?branch=master)](http://travis-ci.org/sheerun/dotfiles)\n\n## Installation\n\nThese dotfiles are meant to be used with zsh.\n\nPlease fork this repository and configure it for yourself:\n\n```\ngit clone https://github.com/sheerun/dotfiles.git ~/.dotfiles\n~/.dotfiles/bin/dotfiles install\n```\n\nThe `dotfiles install` command is going to:\n\n* backup changed dotfiles\n* symlink new ones\n* show info what were installed\n* remove broken symlinks\n\nYou can also use `bin/setup-darwin` for initial environment setup on OSX.\n\n## License\n\nThis repository is MIT-licensed. You are awesome.\n"
  },
  {
    "path": "allowed_signers",
    "content": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMtoahqj/uLntDiJicWzGGHhyxMy7yrrRmZdFdIhqJrw sheerun@sher.pl\n"
  },
  {
    "path": "bashrc",
    "content": "exec zsh \"$@\"\n"
  },
  {
    "path": "bin/antigen.zsh",
    "content": "######################################################################\n# This file was autogenerated by `make`. Do not edit it directly!\n######################################################################\n# Antigen: A simple plugin manager for zsh\n # Authors: Shrikant Sharat Kandula\n #          and Contributors <https://github.com/zsh-users/antigen/contributors>\n # Homepage: http://antigen.sharats.me\n # License: MIT License <mitl.sharats.me>\nzmodload zsh/parameter\nautoload -U is-at-least\n\n# While boot.zsh is part of the ext/cache functionallity it may be disabled\n# with ANTIGEN_CACHE flag, and it's always compiled with antigen.zsh\nif [[ $ANTIGEN_CACHE != false ]]; then\n  ANTIGEN_CACHE=\"${ANTIGEN_CACHE:-${ADOTDIR:-$HOME/.antigen}/init.zsh}\"\n  ANTIGEN_RSRC=\"${ANTIGEN_RSRC:-${ADOTDIR:-$HOME/.antigen}/.resources}\"\n\n  # It may not be necessary to check ANTIGEN_AUTO_CONFIG.\n  if [[ $ANTIGEN_AUTO_CONFIG != false && -f $ANTIGEN_RSRC ]]; then\n    # Check the list of files for configuration changes (uses -nt comp)\n    ANTIGEN_CHECK_FILES=$(cat $ANTIGEN_RSRC 2> /dev/null)\n    ANTIGEN_CHECK_FILES=(${(@f)ANTIGEN_CHECK_FILES})\n\n    for config in $ANTIGEN_CHECK_FILES; do\n      if [[ \"$config\" -nt \"$config.zwc\" ]]; then\n        # Flag configuration file as newer\n        { zcompile \"$config\" } &!\n        # Kill cache file in order to force full loading (see a few lines below)\n        [[ -f \"$ANTIGEN_CACHE\" ]] && rm -f \"$ANTIGEN_CACHE\"\n      fi\n    done\n  fi\n\n  # If there is a cache file do load from it\n  if [[ -f $ANTIGEN_CACHE && ! $_ANTIGEN_CACHE_LOADED == true ]]; then\n    # Wrap antigen in order to defer cache source until `antigen-apply`\n    antigen() {\n      if [[ $1 == \"apply\" ]]; then\n        source \"$ANTIGEN_CACHE\"\n      # Handle `antigen-init` command properly\n      elif [[ $1 == \"init\" ]]; then\n        source \"$2\"\n      fi\n    }\n    # Do not continue loading antigen as cache bundle takes care of it.\n    return 0\n  fi\nfi\n[[ -z \"$_ANTIGEN_INSTALL_DIR\" ]] && _ANTIGEN_INSTALL_DIR=${0:A:h}\n\n# Each line in this string has the following entries separated by a space\n# character.\n# <repo-url>, <plugin-location>, <bundle-type>, <has-local-clone>\n[[ $_ANTIGEN_CACHE_LOADED != true ]] && typeset -aU _ANTIGEN_BUNDLE_RECORD\n\n# Do not load anything if git is not available.\nif (( ! $+commands[git] )); then\n    echo 'Antigen: Please install git to use Antigen.' >&2\n    return 1\nfi\n\n# Used to defer compinit/compdef\ntypeset -a __deferred_compdefs\ncompdef () { __deferred_compdefs=($__deferred_compdefs \"$*\") }\n\n# A syntax sugar to avoid the `-` when calling antigen commands. With this\n# function, you can write `antigen-bundle` as `antigen bundle` and so on.\nantigen () {\n  local cmd=\"$1\"\n  if [[ -z \"$cmd\" ]]; then\n    antigen-help >&2\n    return 1\n  fi\n  shift\n\n  if (( $+functions[antigen-$cmd] )); then\n      \"antigen-$cmd\" \"$@\"\n      return $?\n  else\n      echo \"Antigen: Unknown command: $cmd\" >&2\n      return 1\n  fi\n}\n# Returns the bundle's git revision\n#\n# Usage\n#   -antigen-bundle-rev bundle-name [is_local_clone]\n#\n# Returns\n#   Bundle rev-parse output (branch name or short ref name)\n-antigen-bundle-rev () {\n  local bundle=$1\n  local is_local_clone=$2\n\n  local bundle_path=$bundle\n  # Get bunde path inside $ADOTDIR if bundle was effectively cloned\n  if [[ \"$is_local_clone\" == \"true\" ]]; then\n    bundle_path=$(-antigen-get-clone-dir $bundle)\n  fi\n\n  local ref\n  ref=$(git --git-dir=\"$bundle_path/.git\" rev-parse --abbrev-ref '@' 2>/dev/null)\n\n  # Avoid 'HEAD' when in detached mode\n  if [[ $ref == \"HEAD\" ]]; then\n    ref=$(git --git-dir=\"$bundle_path/.git\" describe --tags --exact-match 2>/dev/null \\\n\t    || git --git-dir=\"$bundle_path/.git\" rev-parse --short '@' 2>/dev/null || \"-\")\n  fi\n  echo $ref\n}\n# Usage:\n#   -antigen-bundle-short-name \"https://github.com/user/repo.git[|*]\" \"[branch/name]\"\n# Returns:\n#   user/repo@branch/name\n-antigen-bundle-short-name () {\n  local bundle_name=\"${1%|*}\"\n  local bundle_branch=\"$2\"\n  local match mbegin mend MATCH MBEGIN MEND\n\n  [[ \"$bundle_name\" =~ '.*/(.*/.*).*$' ]] && bundle_name=$match[1]\n  bundle_name=\"${bundle_name%.git*}\"\n\n  if [[ -n $bundle_branch ]]; then\n    bundle_name=\"$bundle_name@$bundle_branch\"\n  fi\n\n  echo $bundle_name\n}\n# Echo the bundle specs as in the record. The first line is not echoed since it\n# is a blank line.\n-antigen-echo-record () {\n  echo ${(j:\\n:)_ANTIGEN_BUNDLE_RECORD}\n}\n# Filters _ANTIGEN_BUNDLE_RECORD for $1\n#\n# Usage\n#   -antigen-find-bundle example/bundle\n#\n# Returns\n#   String if bundle is found\n-antigen-find-bundle () {\n  echo $(-antigen-find-record $1 | cut -d' ' -f1)\n}\n\n# Filters _ANTIGEN_BUNDLE_RECORD for $1\n#\n# Usage\n#   -antigen-find-record example/bundle\n#\n# Returns\n#   String if record is found\n-antigen-find-record () {\n  local bundle=$1\n  \n  if [[ $# -eq 0 ]]; then\n    return 1\n  fi\n\n  local record=${bundle/\\|/\\\\\\|}\n  echo \"${_ANTIGEN_BUNDLE_RECORD[(r)*$record*]}\"\n}\n# Returns bundle names from _ANTIGEN_BUNDLE_RECORD\n#\n# Usage\n#   -antigen-get-bundles [--short|--simple|--long]\n#\n# Returns\n#   List of bundles installed\n-antigen-get-bundles () {\n  local mode revision url bundle_name bundle_entry loc no_local_clone\n  local record bundle make_local_clone\n  mode=${1:-\"--short\"}\n\n  for record in $_ANTIGEN_BUNDLE_RECORD; do\n    bundle=(${(@s/ /)record})\n    url=$bundle[1]\n    loc=$bundle[2]\n    make_local_clone=$bundle[4]\n\n    bundle_name=$(-antigen-bundle-short-name $url)\n\n    case \"$mode\" in\n        --short)\n          # Only check revision for bundle with a requested branch\n          if [[ $url == *\\|* ]]; then\n            revision=$(-antigen-bundle-rev $url $make_local_clone)\n          else\n            revision=\"master\"\n          fi\n\n          if [[ $loc != '/' ]]; then\n            bundle_name=\"$bundle_name ~ $loc\"\n          fi\n          echo \"$bundle_name @ $revision\"\n        ;;\n        --simple)\n          echo \"$bundle_name\"\n        ;;\n        --long)\n          echo \"$record\"\n        ;;\n     esac\n  done\n}\n# Usage:\n#  -antigen-get-clone-dir \"https://github.com/zsh-users/zsh-syntax-highlighting.git[|feature/branch]\"\n# Returns:\n#  $ANTIGEN_BUNDLES/zsh-users/zsh-syntax-highlighting[-feature-branch]\n-antigen-get-clone-dir () {\n  local bundle=\"$1\"\n  local url=\"${bundle%|*}\"\n  local branch match mbegin mend MATCH MBEGIN MEND\n  [[ \"$bundle\" =~ \"\\|\" ]] && branch=\"${bundle#*|}\"\n\n  # Takes a repo url and mangles it, giving the path that this url will be\n  # cloned to. Doesn't actually clone anything.\n  local clone_dir=\"$ANTIGEN_BUNDLES\"\n\n  url=$(-antigen-bundle-short-name $url)\n\n  # Suffix with branch/tag name\n  [[ -n \"$branch\" ]] && url=\"$url-${branch//\\//-}\"\n  url=${url//\\*/x}\n\n  echo \"$clone_dir/$url\"\n}\n# Returns bundles flagged as make_local_clone\n#\n# Usage\n#    -antigen-cloned-bundles\n#\n# Returns\n#    Bundle metadata\n-antigen-get-cloned-bundles() {\n  -antigen-echo-record |\n      awk '$4 == \"true\" {print $1}' |\n      sort -u\n}\n# Returns a list of themes from a default library (omz)\n#\n# Usage\n#   -antigen-get-themes\n#\n# Returns\n#   List of themes by name\n-antigen-get-themes () {\n  local library='robbyrussell/oh-my-zsh'\n  local bundle=$(-antigen-find-bundle $library)\n\n  if [[ -n \"$bundle\" ]]; then\n    local dir=$(-antigen-get-clone-dir $ANTIGEN_DEFAULT_REPO_URL)\n    echo $(ls $dir/themes/ | eval \"$_ANTIGEN_GREP_COMMAND '.zsh-theme$'\" | sed 's/.zsh-theme//')\n  fi\n\n  return 0\n}\n\n# This function check ZSH_EVAL_CONTEXT to determine if running in interactive shell. \n#\n# Usage\n#   -antigen-interactive-mode\n#\n# Returns\n#   Either true or false depending if we are running in interactive mode\n-antigen-interactive-mode () {\n  WARN \"-antigen-interactive-mode: $ZSH_EVAL_CONTEXT \\$_ANTIGEN_INTERACTIVE = $_ANTIGEN_INTERACTIVE\"\n  if [[ $_ANTIGEN_INTERACTIVE != \"\" ]]; then\n    [[ $_ANTIGEN_INTERACTIVE == true ]];\n    return\n  fi\n\n  [[ \"$ZSH_EVAL_CONTEXT\" == toplevel* || \"$ZSH_EVAL_CONTEXT\" == cmdarg* ]];\n}\n# Parses and retrieves a remote branch given a branch name.\n#\n# If the branch name contains '*' it will retrieve remote branches\n# and try to match against tags and heads, returning the latest matching.\n#\n# Usage\n#     -antigen-parse-branch https://github.com/user/repo.git x.y.z\n#\n# Returns\n#     Branch name\n-antigen-parse-branch () {\n  local url=\"$1\" branch=\"$2\" branches\n  \n  local match mbegin mend MATCH MBEGIN MEND\n\n  if [[ \"$branch\" =~ '\\*' ]]; then\n    branches=$(git ls-remote --tags -q \"$url\" \"$branch\"|cut -d'/' -f3|sort -n|tail -1)\n    # There is no --refs flag in git 1.8 and below, this way we\n    # emulate this flag -- also git 1.8 ref order is undefined.\n    branch=${${branches#*/*/}%^*} # Why you are like this?\n  fi\n\n  echo $branch\n}\n-antigen-update-repos () {\n  local repo bundle url target\n  local log=/tmp/antigen-v2-migrate.log\n\n  echo \"It seems you have bundles cloned with Antigen v1.x.\"\n  echo \"We'll try to convert directory structure to v2.\"\n  echo\n\n  echo -n \"Moving bundles to '\\$ADOTDIR/bundles'... \"\n\n  # Migrate old repos -> bundles\n  local errors=0\n  for repo in $ADOTDIR/repos/*; do\n    bundle=${repo/$ADOTDIR\\/repos\\//}\n    bundle=${bundle//-SLASH-/\\/}\n    bundle=${bundle//-COLON-/\\:}\n    bundle=${bundle//-STAR-/\\*}\n    url=${bundle//-PIPE-/\\|}\n    target=$(-antigen-get-clone-dir $url)\n    mkdir -p \"${target:A:h}\"\n    echo \" ---> ${repo/$ADOTDIR\\/} -> ${target/$ADOTDIR\\/}\" | tee > $log\n    mv \"$repo\" \"$target\" &> $log\n    if [[ $? != 0 ]]; then\n      echo \"Failed to migrate '$repo'!.\"\n      errors+=1\n    fi\n  done\n\n  if [[ $errors == 0 ]]; then\n    echo \"Done.\"\n  else\n    echo \"An error ocurred!\"\n  fi\n  echo\n\n  if [[ \"$(ls -A $ADOTDIR/repos | wc -l | xargs)\" == 0 ]]; then\n    echo \"You can safely remove \\$ADOTDIR/repos.\"\n  else\n    echo \"Some bundles couldn't be migrated. See \\$ADOTDIR/repos.\"\n  fi\n\n  echo\n  if [[ $errors == 0 ]]; then\n    echo \"Bundles migrated successfuly.\"\n    rm $log\n  else\n    echo \"Some errors occured. Review migration log in '$log'.\"\n  fi\n  antigen-reset\n}\n# Ensure that a clone exists for the given repo url and branch. If the first\n# argument is `update` and if a clone already exists for the given repo\n# and branch, it is pull-ed, i.e., updated.\n#\n# This function expects three arguments in order:\n# - 'url=<url>'\n# - 'update=true|false'\n# - 'verbose=true|false'\n#\n# Returns true|false Whether cloning/pulling was succesful\n-antigen-ensure-repo () {\n  # Argument defaults. Previously using ${1:?\"missing url argument\"} format\n  # but it seems to mess up with cram\n  if (( $# < 1 )); then\n    echo \"Antigen: Missing url argument.\"\n    return 1\n  fi\n\n  # The url. No sane default for this, so just empty.\n  local url=$1\n  # Check if we have to update.\n  local update=${2:-false}\n  # Verbose output.\n  local verbose=${3:-false}\n\n  shift $#\n\n  # Get the clone's directory as per the given repo url and branch.\n  local clone_dir=$(-antigen-get-clone-dir $url)\n  if [[ -d \"$clone_dir\" && $update == false ]]; then\n    return true\n  fi\n\n  # A temporary function wrapping the `git` command with repeated arguments.\n  --plugin-git () {\n    (\\cd -q \"$clone_dir\" && eval ${ANTIGEN_CLONE_ENV} git --git-dir=\"$clone_dir/.git\" --no-pager \"$@\" &>>! $ANTIGEN_LOG)\n  }\n\n  local success=false\n\n  # If its a specific branch that we want, checkout that branch.\n  local branch=\"master\" # TODO FIX THIS\n  if [[ $url == *\\|* ]]; then\n    branch=\"$(-antigen-parse-branch ${url%|*} ${url#*|})\"\n  fi\n\n  if [[ ! -d $clone_dir ]]; then\n    eval ${ANTIGEN_CLONE_ENV} git clone ${=ANTIGEN_CLONE_OPTS} --branch \"$branch\" -- \"${url%|*}\" \"$clone_dir\" &>> $ANTIGEN_LOG\n    success=$?\n  elif $update; then\n    # Save current revision.\n    local old_rev=\"$(--plugin-git rev-parse HEAD)\"\n    # Pull changes if update requested.\n    --plugin-git checkout \"$branch\"\n    --plugin-git pull origin \"$branch\"\n    success=$?\n\n    # Update submodules.\n    --plugin-git submodule update ${=ANTIGEN_SUBMODULE_OPTS}\n    # Get the new revision.\n    local new_rev=\"$(--plugin-git rev-parse HEAD)\"\n  fi\n\n  if [[ -n $old_rev && $old_rev != $new_rev ]]; then\n    echo Updated from $old_rev[0,7] to $new_rev[0,7].\n    if $verbose; then\n      --plugin-git log --oneline --reverse --no-merges --stat '@{1}..'\n    fi\n  fi\n\n  # Remove the temporary git wrapper function.\n  unfunction -- --plugin-git\n\n  return $success\n}\n# Helper function: Same as `$1=$2`, but will only happen if the name\n# specified by `$1` is not already set.\n-antigen-set-default () {\n  local arg_name=\"$1\"\n  local arg_value=\"$2\"\n  eval \"test -z \\\"\\$$arg_name\\\" && typeset -g $arg_name='$arg_value'\"\n}\n\n-antigen-env-setup () {\n  typeset -gU fpath path\n\n  # Pre-startup initializations.\n  -antigen-set-default ANTIGEN_OMZ_REPO_URL \\\n    https://github.com/robbyrussell/oh-my-zsh.git\n  -antigen-set-default ANTIGEN_PREZTO_REPO_URL \\\n    https://github.com/sorin-ionescu/prezto.git\n  -antigen-set-default ANTIGEN_DEFAULT_REPO_URL $ANTIGEN_OMZ_REPO_URL\n\n  # Default Antigen directory.\n  -antigen-set-default ADOTDIR $HOME/.antigen\n  [[ ! -d $ADOTDIR ]] && mkdir -p $ADOTDIR\n\n  # Defaults bundles directory.\n  -antigen-set-default ANTIGEN_BUNDLES $ADOTDIR/bundles\n\n  # If there is no bundles directory, create it.\n  if [[ ! -d $ANTIGEN_BUNDLES ]]; then\n    mkdir -p $ANTIGEN_BUNDLES\n    # Check for v1 repos directory, transform it to v2 format.\n    [[ -d $ADOTDIR/repos ]] && -antigen-update-repos\n  fi\n\n  -antigen-set-default ANTIGEN_COMPDUMP \"${ADOTDIR:-$HOME}/.zcompdump\"\n  -antigen-set-default ANTIGEN_COMPINIT_OPTS \"-i\"\n  -antigen-set-default ANTIGEN_LOG /dev/null\n\n  # CLONE_OPTS uses ${=CLONE_OPTS} expansion so don't use spaces\n  # for arguments that can be passed as `--key=value`.\n  -antigen-set-default ANTIGEN_CLONE_ENV \"GIT_TERMINAL_PROMPT=0\"\n  -antigen-set-default ANTIGEN_CLONE_OPTS \"--single-branch --recursive --depth=1\"\n  -antigen-set-default ANTIGEN_SUBMODULE_OPTS \"--recursive --depth=1\"\n\n  # Complain when a bundle is already installed.\n  -antigen-set-default _ANTIGEN_WARN_DUPLICATES true\n\n  # Compatibility with oh-my-zsh themes.\n  -antigen-set-default _ANTIGEN_THEME_COMPAT true\n\n  -antigen-set-default _ANTIGEN_GREP_COMMAND 'GREP_OPTIONS= command grep '\n\n  # Add default built-in extensions to load at start up\n  -antigen-set-default _ANTIGEN_BUILTIN_EXTENSIONS 'lock parallel defer cache'\n  \n  # Set up configured theme\n  -antigen-set-default _ANTIGEN_THEME ''\n\n  # Setup antigen's own completion.\n  if -antigen-interactive-mode; then\n    TRACE \"Gonna create compdump file @ env-setup\" COMPDUMP\n    autoload -Uz compinit\n    compinit $ANTIGEN_COMPINIT_OPTS -d \"$ANTIGEN_COMPDUMP\"\n    compdef _antigen antigen\n  else\n    (( $+functions[antigen-ext-init] )) && antigen-ext-init\n  fi\n}\n# Load a given bundle by sourcing it.\n#\n# The function also modifies fpath to add the bundle path.\n#\n# Usage\n#   -antigen-load \"bundle-url\" [\"location\"] [\"make_local_clone\"] [\"btype\"]\n#\n# Returns\n#   Integer. 0 if success 1 if an error ocurred.\n-antigen-load () {\n  local bundle list\n  typeset -A bundle; bundle=($@)\n\n  typeset -Ua list; list=()\n  local location=\"${bundle[dir]}/${bundle[loc]}\"\n\n  # Prioritize location when given.\n  if [[ -f \"${location}\" ]]; then\n    list=(${location})\n  else\n    # Directory locations must be suffixed with slash\n    location=\"$location/\"\n\n    # Prioritize theme with antigen-theme\n    if [[ ${bundle[btype]} == \"theme\" ]]; then\n      list=(${location}*.zsh-theme(N[1]))\n    fi\n\n    # Common frameworks\n    if [[ $#list == 0 ]]; then\n      # dot-plugin, init and functions support (omz, prezto)\n      # Support prezto function loading. See https://github.com/zsh-users/antigen/pull/428\n      list=(${location}*.plugin.zsh(N[1]) ${location}init.zsh(N[1]) ${location}/functions(N[1]))\n    fi\n\n    # Default to zsh and sh\n    if [[ $#list == 0 ]]; then\n      list=(${location}*.zsh(N) ${location}*.sh(N))\n    fi\n  fi\n\n  -antigen-load-env ${(kv)bundle}\n\n  # If there is any sourceable try to load it\n  if ! -antigen-load-source \"${list[@]}\" && [[ ! -d ${location} ]]; then\n    return 1\n  fi\n\n  return 0\n}\n\n-antigen-load-env () {\n  typeset -A bundle; bundle=($@)\n  local location=${bundle[dir]}/${bundle[loc]}\n\n  # Load to path if there is no sourceable\n  if [[ -d ${location} ]]; then\n    PATH=\"$PATH:${location:A}\"\n    fpath+=(\"${location:A}\")\n    return\n  fi\n\n  PATH=\"$PATH:${location:A:h}\"\n  fpath+=(\"${location:A:h}\")\n}\n\n-antigen-load-source () {\n  typeset -a list\n  list=($@)\n  local src match mbegin mend MATCH MBEGIN MEND\n\n  # Return error when we're given an empty list\n  if [[ $#list == 0 ]]; then\n    return 1\n  fi\n  \n  # Using a for rather than `source $list` as we need to check for zsh-themes\n  # In order to create antigen-compat file. This is only needed for interactive-mode\n  # theme switching, for static loading (cache) there is no need.\n  for src in $list; do\n    if [[ $_ANTIGEN_THEME_COMPAT == true  && -f \"$src\" && \"$src\" == *.zsh-theme* ]]; then\n      local compat=\"${src:A}.antigen-compat\"\n      echo \"# Generated by Antigen. Do not edit!\" >! \"$compat\"\n      cat $src | sed -Ee '/\\{$/,/^\\}/!{\n             s/^local //\n         }' >>! \"$compat\"\n      src=\"$compat\"\n    fi\n\n    if ! source \"$src\" 2>/dev/null; then\n      return 1\n    fi\n  done\n}\n# Usage:\n#   -antigen-parse-args output_assoc_arr <args...>\n-antigen-parse-args () {\n  local argkey key value index=0 args\n  local match mbegin mend MATCH MBEGIN MEND\n\n  local var=$1\n  shift\n\n  # Bundle spec arguments' default values.\n  #setopt XTRACE VERBOSE\n  builtin typeset -A args\n  args[url]=\"$ANTIGEN_DEFAULT_REPO_URL\"\n  #unsetopt XTRACE VERBOSE\n  args[loc]=/\n  args[make_local_clone]=true\n  args[btype]=plugin\n  #args[branch]= # commented out as it may cause assoc array kv mismatch\n\n  while [[ $# -gt 0 ]]; do\n    argkey=\"${1%\\=*}\"\n    key=\"${argkey//--/}\"\n    value=\"${1#*=}\"\n\n    case \"$argkey\" in\n      --url|--loc|--branch|--btype)\n        if [[ \"$value\" == \"$argkey\" ]]; then\n          printf \"Required argument for '%s' not provided.\\n\" $key >&2\n        else\n          args[$key]=\"$value\"\n        fi\n      ;;\n      --no-local-clone)\n        args[make_local_clone]=false\n      ;;\n      --*)\n        printf \"Unknown argument '%s'.\\n\" $key >&2\n      ;;\n      *)\n        value=$key\n        case $index in\n          0)\n            key=url\n            local domain=\"\"\n            local url_path=$value\n            # Full url with protocol or ssh github url (github.com:org/repo)\n            if [[ \"$value\" =~ \"://\" || \"$value\" =~ \":\" ]]; then\n              if [[ \"$value\" =~ [@.][^/:]+[:]?[0-9]*[:/]?(.*)@?$ ]]; then\n                url_path=$match[1]\n                domain=${value/$url_path/}\n              fi\n            fi\n\n            if [[ \"$url_path\" =~ '@' ]]; then\n              args[branch]=\"${url_path#*@}\"\n              value=\"$domain${url_path%@*}\"\n            else\n              value=\"$domain$url_path\"\n            fi\n          ;;\n          1) key=loc ;;\n        esac\n        let index+=1\n        args[$key]=\"$value\"\n      ;;\n    esac\n\n    shift\n  done\n  \n  # Check if url is just the plugin name. Super short syntax.\n  if [[ \"${args[url]}\" != */* ]]; then\n    case \"$ANTIGEN_DEFAULT_REPO_URL\" in\n      \"$ANTIGEN_OMZ_REPO_URL\")\n        args[loc]=\"plugins/${args[url]}\"\n      ;;\n      \"$ANTIGEN_PREZTO_REPO_URL\")\n        args[loc]=\"modules/${args[url]}\"\n      ;;\n      *)\n        args[loc]=\"${args[url]}\"\n      ;;\n    esac\n    args[url]=\"$ANTIGEN_DEFAULT_REPO_URL\"\n  fi\n\n  # Resolve the url.\n  # Expand short github url syntax: `username/reponame`.\n  local url=\"${args[url]}\"\n  if [[ $url != git://* &&\n          $url != https://* &&\n          $url != http://* &&\n          $url != ssh://* &&\n          $url != /* &&\n          $url != *github.com:*/*\n          ]]; then\n    url=\"https://github.com/${url%.git}.git\"\n  fi\n  args[url]=\"$url\"\n\n  # Ignore local clone if url given is not a git directory\n  if [[ ${args[url]} == /* && ! -d ${args[url]}/.git ]]; then\n    args[make_local_clone]=false\n  fi\n\n  # Add the branch information to the url if we need to create a local clone.\n  # Format url in bundle-metadata format: url[|branch]\n  if [[ ! -z \"${args[branch]}\" && ${args[make_local_clone]} == true ]]; then\n    args[url]=\"${args[url]}|${args[branch]}\"\n  fi\n\n  # Add the theme extension to `loc`, if this is a theme, but only\n  # if it's especified, ie, --loc=theme-name, in case when it's not\n  # specified antige-load-list will look for *.zsh-theme files\n  if [[ ${args[btype]} == \"theme\" &&\n      ${args[loc]} != \"/\" && ${args[loc]} != *.zsh-theme ]]; then\n      args[loc]=\"${args[loc]}.zsh-theme\"\n  fi\n\n  local name=\"${args[url]%|*}\"\n  local branch=\"${args[branch]}\"\n\n  # Extract bundle name.\n  if [[ \"$name\" =~ '.*/(.*/.*).*$' ]]; then\n    name=\"${match[1]}\"\n  fi\n  name=\"${name%.git*}\"\n\n  # Format bundle name with optional branch.\n  if [[ -n \"${branch}\" ]]; then\n    args[name]=\"${name}@${branch}\"\n  else\n    args[name]=\"${name}\"\n  fi\n\n  # Format bundle path.\n  if [[ ${args[make_local_clone]} == true ]]; then\n    local bpath=\"$name\"\n    # Suffix with branch/tag name\n    if [[ -n \"$branch\" ]]; then\n      # bpath is in the form of repo/name@version => repo/name-version\n      # Replace / with - in bundle branch.\n      local bbranch=${branch//\\//-}\n      # If branch/tag is semver-like do replace * by x.\n      bbranch=${bbranch//\\*/x}\n      bpath=\"${name}-${bbranch}\"\n    fi\n\n    bpath=\"$ANTIGEN_BUNDLES/$bpath\"\n    args[dir]=\"${(qq)bpath}\"\n  else\n    # if it's local then path is just the \"url\" argument, loc remains the same\n    args[dir]=${args[url]}\n  fi\n  \n  # Escape url and branch (may contain semver-like and pipe characters)\n  args[url]=\"${(qq)args[url]}\"\n  if [[ -n \"${args[branch]}\" ]]; then\n    args[branch]=\"${(qq)args[branch]}\"\n  fi\n  \n  # Escape bundle name (may contain semver-like characters)\n  args[name]=\"${(qq)args[name]}\"\n\n  eval \"${var}=(${(kv)args})\"\n\n  return 0\n}\n# Updates revert-info data with git hash.\n#\n# This does process only cloned bundles.\n#\n# Usage\n#    -antigen-revert-info\n#\n# Returns\n#    Nothing. Generates/updates $ADOTDIR/revert-info.\n-antigen-revert-info() {\n  local url\n  # Update your bundles, i.e., `git pull` in all the plugin repos.\n  date >! $ADOTDIR/revert-info\n\n  -antigen-get-cloned-bundles | while read url; do\n    local clone_dir=\"$(-antigen-get-clone-dir \"$url\")\"\n    if [[ -d \"$clone_dir\" ]]; then\n      (echo -n \"$clone_dir:\"\n        \\cd -q \"$clone_dir\"\n        git rev-parse HEAD) >> $ADOTDIR/revert-info\n    fi\n  done\n}\n-antigen-use-oh-my-zsh () {\n  typeset -g ZSH ZSH_CACHE_DIR\n  ANTIGEN_DEFAULT_REPO_URL=$ANTIGEN_OMZ_REPO_URL\n  if [[ -z \"$ZSH\" ]]; then\n    ZSH=\"$(-antigen-get-clone-dir \"$ANTIGEN_DEFAULT_REPO_URL\")\"\n  fi\n  if [[ -z \"$ZSH_CACHE_DIR\" ]]; then\n    ZSH_CACHE_DIR=\"$ZSH/cache/\"\n  fi\n  antigen-bundle --loc=lib\n}\n-antigen-use-prezto () {\n  ANTIGEN_DEFAULT_REPO_URL=$ANTIGEN_PREZTO_REPO_URL\n  antigen-bundle \"$ANTIGEN_PREZTO_REPO_URL\"\n}\n# Initialize completion\nantigen-apply () {\n  LOG \"Called antigen-apply\"\n\n  # Load the compinit module. This will readefine the `compdef` function to\n  # the one that actually initializes completions.\n  TRACE \"Gonna create compdump file @ apply\" COMPDUMP\n  autoload -Uz compinit\n  compinit $ANTIGEN_COMPINIT_OPTS -d \"$ANTIGEN_COMPDUMP\"\n\n  # Apply all `compinit`s that have been deferred.\n  local cdef\n  for cdef in \"${__deferred_compdefs[@]}\"; do\n    compdef \"$cdef\"\n  done\n\n  { zcompile \"$ANTIGEN_COMPDUMP\" } &!\n\n  unset __deferred_compdefs\n}\n# Syntaxes\n#   antigen-bundle <url> [<loc>=/]\n# Keyword only arguments:\n#   branch - The branch of the repo to use for this bundle.\nantigen-bundle () {\n  TRACE \"Called antigen-bundle with $@\" BUNDLE\n  if [[ -z \"$1\" ]]; then\n    printf \"Antigen: Must provide a bundle url or name.\\n\" >&2\n    return 1\n  fi\n\n  builtin typeset -A bundle; -antigen-parse-args 'bundle' ${=@}\n  if [[ -z ${bundle[btype]} ]]; then\n    bundle[btype]=bundle\n  fi\n\n  local record=\"${bundle[url]} ${bundle[loc]} ${bundle[btype]} ${bundle[make_local_clone]}\"\n  if [[ $_ANTIGEN_WARN_DUPLICATES == true && ! ${_ANTIGEN_BUNDLE_RECORD[(I)$record]} == 0 ]]; then\n    printf \"Seems %s is already installed!\\n\" ${bundle[name]}\n    return 1\n  fi\n \n  # Clone bundle if we haven't done do already.\n  if [[ ! -d \"${bundle[dir]}\" ]]; then\n    if ! -antigen-bundle-install ${(kv)bundle}; then\n      return 1\n    fi\n  fi\n\n  # Load the plugin.\n  if ! -antigen-load ${(kv)bundle}; then\n    TRACE \"-antigen-load failed to load ${bundle[name]}\" BUNDLE\n    printf \"Antigen: Failed to load %s.\\n\" ${bundle[btype]} >&2\n    return 1\n  fi\n  \n  # Only add it to the record if it could be installed and loaded.\n  _ANTIGEN_BUNDLE_RECORD+=(\"$record\")\n}\n\n#\n# Usage:\n#   -antigen-bundle-install <record>\n# Returns:\n#   1 if it fails to install bundle\n-antigen-bundle-install () {\n  typeset -A bundle; bundle=($@)\n\n  # Ensure a clone exists for this repo, if needed.\n  # Get the clone's directory as per the given repo url and branch.\n  local bpath=\"${bundle[dir]}\"\n  # Clone if it doesn't already exist.\n  local start=$(date +'%s')\n\n  printf \"Installing %s... \" \"${bundle[name]}\"\n\n  if ! -antigen-ensure-repo \"${bundle[url]}\"; then\n    # Return immediately if there is an error cloning\n    TRACE \"-antigen-bundle-instal failed to clone ${bundle[url]}\" BUNDLE\n    printf \"Error! Activate logging and try again.\\n\" >&2\n    return 1\n  fi\n\n  local took=$(( $(date +'%s') - $start ))\n  printf \"Done. Took %ds.\\n\" $took\n}\nantigen-bundles () {\n  # Bulk add many bundles at one go. Empty lines and lines starting with a `#`\n  # are ignored. Everything else is given to `antigen-bundle` as is, no\n  # quoting rules applied.\n  local line\n  setopt localoptions no_extended_glob # See https://github.com/zsh-users/antigen/issues/456\n  eval \"$_ANTIGEN_GREP_COMMAND '^[[:space:]]*[^[:space:]#]'\" | while read line; do\n    antigen-bundle ${=line%#*}\n  done\n}\n# Cleanup unused repositories.\nantigen-cleanup () {\n  local force=false\n  if [[ $1 == --force ]]; then\n    force=true\n  fi\n\n  if [[ ! -d \"$ANTIGEN_BUNDLES\" || -z \"$(\\ls -A \"$ANTIGEN_BUNDLES\")\" ]]; then\n    echo \"You don't have any bundles.\"\n    return 0\n  fi\n\n  # Find directores in ANTIGEN_BUNDLES, that are not in the bundles record.\n  typeset -a unused_clones clones\n\n  local url record clone\n  for record in $(-antigen-get-cloned-bundles); do\n    url=${record% /*}\n    clones+=(\"$(-antigen-get-clone-dir $url)\")\n  done\n\n  for clone in $ANTIGEN_BUNDLES/*/*(/); do\n    if [[ $clones[(I)$clone] == 0 ]]; then\n      unused_clones+=($clone)\n    fi\n  done\n\n  if [[ -z $unused_clones ]]; then\n    echo \"You don't have any unidentified bundles.\"\n    return 0\n  fi\n\n  echo 'You have clones for the following repos, but are not used.'\n  echo \"\\n${(j:\\n:)unused_clones}\"\n\n  if $force || (echo -n '\\nDelete them all? [y/N] '; read -q); then\n    echo\n    echo\n    for clone in $unused_clones; do\n      echo -n \"Deleting clone \\\"$clone\\\"...\"\n      \\rm -rf \"$clone\"\n\n      echo ' done.'\n    done\n  else\n    echo\n    echo \"Nothing deleted.\"\n  fi\n}\nantigen-help () {\n  antigen-version\n\n  cat <<EOF\n\nAntigen is a plugin management system for zsh. It makes it easy to grab awesome\nshell scripts and utilities, put up on Github.\n\nUsage: antigen <command> [args]\n\nCommands:\n  apply        Must be called in the zshrc after all calls to 'antigen bundle'.\n  bundle       Install and load a plugin.\n  cache-gen    Generate Antigen's cache with currently loaded bundles.\n  cleanup      Remove clones of repos not used by any loaded plugins.\n  init         Use caching to quickly load bundles.\n  list         List currently loaded plugins.\n  purge        Remove a bundle from the filesystem.\n  reset        Clean the generated cache.\n  restore      Restore plugin state from a snapshot file.\n  revert       Revert plugins to their state prior to the last time 'antigen\n               update' was run.\n  selfupdate   Update antigen.\n  snapshot     Create a snapshot of all active plugin repos and save it to a\n               snapshot file.\n  update       Update plugins.\n  use          Load a supported zsh pre-packaged framework.\n\nFor further details and complete documentation, visit the project's page at\n'http://antigen.sharats.me'.\nEOF\n}\n# Antigen command to load antigen configuration\n#\n# This method is slighlty more performing than using various antigen-* methods.\n#\n# Usage\n#   Referencing an antigen configuration file:\n#\n#       antigen-init \"/path/to/antigenrc\"\n#\n#   or using HEREDOCS:\n#\n#       antigen-init <<EOBUNDLES\n#           antigen use oh-my-zsh\n#\n#           antigen bundle zsh/bundle\n#           antigen bundle zsh/example\n#\n#           antigen theme zsh/theme\n#\n#           antigen apply\n#       EOBUNDLES\n#\n# Returns\n#   Nothing\nantigen-init () {\n  local src=\"$1\" line\n\n  # If we're given an argument it should be a path to a file\n  if [[ -n \"$src\" ]]; then\n    if [[ -f \"$src\" ]]; then\n      source \"$src\"\n      return\n    else\n      printf \"Antigen: invalid argument provided.\\n\" >&2\n      return 1\n    fi\n  fi\n\n  # Otherwise we expect it to be a heredoc\n  eval \"$_ANTIGEN_GREP_COMMAND '^[[:space:]]*[^[:space:]#]'\" | while read -r line; do\n    eval $line\n  done\n}\n# List instaled bundles either in long (record), short or simple format.\n#\n# Usage\n#    antigen-list [--short|--long|--simple]\n#\n# Returns\n#    List of bundles\nantigen-list () {\n  local format=$1\n\n  # List all currently installed bundles.\n  if [[ -z $_ANTIGEN_BUNDLE_RECORD ]]; then\n    echo \"You don't have any bundles.\" >&2\n    return 1\n  fi\n\n  -antigen-get-bundles $format\n}\n# Remove a bundle from filesystem\n#\n# Usage\n#   antigen-purge example/bundle [--force]\n#\n# Returns\n#   Nothing. Removes bundle from filesystem.\nantigen-purge () {\n  local bundle=$1\n  local force=$2\n\n  if [[ $# -eq 0  ]]; then\n    echo \"Antigen: Missing argument.\" >&2\n    return 1\n  fi\n\n  if -antigen-purge-bundle $bundle $force; then\n    antigen-reset\n  else\n    return $?\n  fi\n\n  return 0\n}\n\n# Remove a bundle from filesystem\n#\n# Usage\n#   antigen-purge example/bundle [--force]\n#\n# Returns\n#   Nothing. Removes bundle from filesystem.\n-antigen-purge-bundle () {\n  local bundle=$1\n  local force=$2\n  local clone_dir=\"\"\n\n  local record=\"\"\n  local url=\"\"\n  local make_local_clone=\"\"\n\n  if [[ $# -eq 0  ]]; then\n    echo \"Antigen: Missing argument.\" >&2\n    return 1\n  fi\n\n  # local keyword doesn't work on zsh <= 5.0.0\n  record=$(-antigen-find-record $bundle)\n\n  if [[ ! -n \"$record\" ]]; then\n    echo \"Bundle not found in record. Try 'antigen bundle $bundle' first.\" >&2\n    return 1\n  fi\n\n  url=\"$(echo \"$record\" | cut -d' ' -f1)\"\n  make_local_clone=$(echo \"$record\" | cut -d' ' -f4)\n\n  if [[ $make_local_clone == \"false\" ]]; then\n    echo \"Bundle has no local clone. Will not be removed.\" >&2\n    return 1\n  fi\n\n  clone_dir=$(-antigen-get-clone-dir \"$url\")\n  if [[ $force == \"--force\" ]] || read -q \"?Remove '$clone_dir'? (y/n) \"; then\n    # Need empty line after read -q\n    [[ ! -n $force ]] && echo \"\" || echo \"Removing '$clone_dir'.\";\n    rm -rf \"$clone_dir\"\n    return $?\n  fi\n\n  return 1\n}\n# Removes cache payload and metadata if available\n#\n# Usage\n#   antigen-reset\n#\n# Returns\n#   Nothing\nantigen-reset () {\n  [[ -f \"$ANTIGEN_CACHE\" ]] && rm -f \"$ANTIGEN_CACHE\" \"$ANTIGEN_CACHE.zwc\" 1> /dev/null\n  [[ -f \"$ANTIGEN_RSRC\" ]] && rm -f \"$ANTIGEN_RSRC\" 1> /dev/null\n  [[ -f \"$ANTIGEN_COMPDUMP\" ]] && rm -f \"$ANTIGEN_COMPDUMP\" \"$ANTIGEN_COMPDUMP.zwc\" 1> /dev/null\n  [[ -f \"$ANTIGEN_LOCK\" ]] && rm -f \"$ANTIGEN_LOCK\" 1> /dev/null\n  echo 'Done. Please open a new shell to see the changes.'\n}\nantigen-restore () {\n  local line\n  if [[ $# == 0 ]]; then\n    echo 'Please provide a snapshot file to restore from.' >&2\n    return 1\n  fi\n\n  local snapshot_file=\"$1\"\n\n  # TODO: Before doing anything with the snapshot file, verify its checksum.\n  # If it fails, notify this to the user and confirm if restore should\n  # proceed.\n\n  echo -n \"Restoring from $snapshot_file...\"\n\n  sed -n '1!p' \"$snapshot_file\" |\n    while read line; do\n      local version_hash=\"${line%% *}\"\n      local url=\"${line##* }\"\n      local clone_dir=\"$(-antigen-get-clone-dir \"$url\")\"\n\n      if [[ ! -d $clone_dir ]]; then\n          git clone \"$url\" \"$clone_dir\" &> /dev/null\n      fi\n\n      (\\cd -q \"$clone_dir\" && git checkout $version_hash) &> /dev/null\n    done\n\n  echo ' done.'\n  echo 'Please open a new shell to get the restored changes.'\n}\n# Reads $ADORDIR/revert-info and restores bundles' revision\nantigen-revert () {\n  local line\n  if [[ -f $ADOTDIR/revert-info ]]; then\n    cat $ADOTDIR/revert-info | sed -n '1!p' | while read line; do\n      local dir=\"$(echo \"$line\" | cut -d: -f1)\"\n      git --git-dir=\"$dir/.git\" --work-tree=\"$dir\" \\\n        checkout \"$(echo \"$line\" | cut -d: -f2)\" 2> /dev/null\n    done\n\n    echo \"Reverted to state before running -update on $(\n            cat $ADOTDIR/revert-info | sed -n '1p').\"\n\n  else\n    echo 'No revert information available. Cannot revert.' >&2\n    return 1\n  fi\n}\n# Update (with `git pull`) antigen itself.\n# TODO: Once update is finished, show a summary of the new commits, as a kind of\n# \"what's new\" message.\nantigen-selfupdate () {\n  (\\cd -q $_ANTIGEN_INSTALL_DIR\n   if [[ ! ( -d .git || -f .git ) ]]; then\n     echo \"Your copy of antigen doesn't appear to be a git clone. \" \\\n       \"The 'selfupdate' command cannot work in this case.\"\n     return 1\n   fi\n   local head=\"$(git rev-parse --abbrev-ref HEAD)\"\n   if [[ $head == \"HEAD\" ]]; then\n     # If current head is detached HEAD, checkout to master branch.\n     git checkout master\n   fi\n   git pull\n\n   # TODO Should be transparently hooked by zcache\n   antigen-reset &>> /dev/null\n  )\n}\nantigen-snapshot () {\n  local snapshot_file=\"${1:-antigen-shapshot}\"\n  local urls url dir version_hash snapshot_content\n  local -a bundles\n\n  # The snapshot content lines are pairs of repo-url and git version hash, in\n  # the form:\n  #   <version-hash> <repo-url>\n  urls=$(-antigen-echo-record | awk '$4 == \"true\" {print $1}' | sort -u)\n  for url in ${(f)urls}; do\n    dir=\"$(-antigen-get-clone-dir \"$url\")\"\n    version_hash=\"$(\\cd -q \"$dir\" && git rev-parse HEAD)\"\n    bundles+=(\"$version_hash $url\");\n  done\n  snapshot_content=${(j:\\n:)bundles}\n\n  {\n    # The first line in the snapshot file is for metadata, in the form:\n    #   key='value'; key='value'; key='value';\n    # Where `key`s are valid shell variable names.\n\n    # Snapshot version. Has no relation to antigen version. If the snapshot\n    # file format changes, this number can be incremented.\n    echo -n \"version='1';\"\n\n    # Snapshot creation date+time.\n    echo -n \" created_on='$(date)';\"\n\n    # Add a checksum with the md5 checksum of all the snapshot lines.\n    chksum() { (md5sum; test $? = 127 && md5) 2>/dev/null | cut -d' ' -f1 }\n    local checksum=\"$(echo \"$snapshot_content\" | chksum)\"\n    unset -f chksum;\n    echo -n \" checksum='${checksum%% *}';\"\n\n    # A newline after the metadata and then the snapshot lines.\n    echo \"\\n$snapshot_content\"\n\n  } > \"$snapshot_file\"\n}\n# Loads a given theme.\n#\n# Shares the same syntax as antigen-bundle command.\n#\n# Usage\n#   antigen-theme [path] [zsh/theme[.zsh-theme]]\n#\n# Returns\n#   0 if everything was succesfully\nantigen-theme () {\n  local name=$1 result=0 record=$1\n\n  # Verify arguments are passed properly.\n  if [[ -z \"$name\" ]]; then\n    printf \"Antigen: Must provide a theme url or name.\\n\" >&2\n    return 1\n  fi\n\n  # Generate record name based off path and name for themes loaded from local paths,\n  # this also supports themes loaded from the same repository.\n  if [[ $name = */* ]]; then\n     record=\"$1 ${2:-/}\"\n  fi\n\n  local match mbegin mend MATCH MBEGIN MEND\n\n  # Verify theme hasn't been loaded previously.\n  if [[ \"$_ANTIGEN_THEME\" == \"$record\" ]]; then\n    printf \"Antigen: Theme \\\"%s\\\" is already active.\\n\" $name >&2\n    return 1\n  fi\n\n  # Remove currently active hooks, this may leave the prompt broken if the\n  # new theme is not found/can not be loaded. We should have a way to test if\n  # a theme/bundle can be loaded/exists.\n  #-antigen-theme-reset-hooks\n\n  if [[ \"$1\" != */* && \"$1\" != --* ]]; then\n    # The first argument is just a name of the plugin, to be picked up from\n    # the default repo.\n    antigen-bundle --loc=themes/$name --btype=theme\n\n  else\n    antigen-bundle \"$@\" --btype=theme\n\n  fi\n  result=$?\n\n  # Do remove theme record if we're successful at loading this one.\n  if [[ $result == 0 ]]; then\n    # Remove theme from record if there was one registered.\n    if [[ \"$_ANTIGEN_THEME\" != \"\" && $_ANTIGEN_BUNDLE_RECORD[(I)*$_ANTIGEN_THEME*] > 0 ]]; then\n      _ANTIGEN_BUNDLE_RECORD[$_ANTIGEN_BUNDLE_RECORD[(I)*$_ANTIGEN_THEME*]]=()\n    fi\n    \n    # Set new theme as active.\n    _ANTIGEN_THEME=$record\n  fi\n\n  return $result\n}\n\n-antigen-theme-reset-hooks () {\n  # This is only needed on interactive mode\n  autoload -U add-zsh-hook is-at-least\n  local hook\n\n  # Clear out prompts\n  PROMPT=\"\"\n  if [[ -n $RPROMPT ]]; then\n    RPROMPT=\"\"\n  fi\n\n  for hook in chpwd precmd preexec periodic; do\n    add-zsh-hook -D \"${hook}\" \"prompt_*\"\n    # common in omz themes\n    add-zsh-hook -D \"${hook}\" \"*_${hook}\"\n    add-zsh-hook -d \"${hook}\" \"vcs_info\"\n  done\n}\n# Updates the bundles or a single bundle.\n#\n# Usage\n#    antigen-update [example/bundle]\n#\n# Returns\n#    Nothing. Performs a `git pull`.\nantigen-update () {\n  local bundle=$1 url\n\n  # Clear log\n  :> $ANTIGEN_LOG\n\n  # Update revert-info data\n  -antigen-revert-info\n\n  # If no argument is given we update all bundles\n  if [[ $# -eq 0  ]]; then\n    # Here we're ignoring all non cloned bundles (ie, --no-local-clone)\n    -antigen-get-cloned-bundles | while read url; do\n      -antigen-update-bundle $url\n    done\n    # TODO next minor version\n    # antigen-reset\n  else\n    if -antigen-update-bundle $bundle; then\n      # TODO next minor version\n      # antigen-reset\n    else\n      return $?\n    fi\n  fi\n}\n\n# Updates a bundle performing a `git pull`.\n#\n# Usage\n#    -antigen-update-bundle example/bundle\n#\n# Returns\n#    Nothing. Performs a `git pull`.\n-antigen-update-bundle () {\n  local bundle=\"$1\"\n  local record=\"\"\n  local url=\"\"\n  local make_local_clone=\"\"\n  local start=$(date +'%s')\n    \n  if [[ $# -eq 0 ]]; then\n    printf \"Antigen: Missing argument.\\n\" >&2\n    return 1\n  fi\n\n  record=$(-antigen-find-record $bundle)\n  if [[ ! -n \"$record\" ]]; then\n    printf \"Bundle not found in record. Try 'antigen bundle %s' first.\\n\" $bundle >&2\n    return 1\n  fi\n\n  url=\"$(echo \"$record\" | cut -d' ' -f1)\"\n  make_local_clone=$(echo \"$record\" | cut -d' ' -f4)\n  \n  local branch=\"master\"\n  if [[ $url == *\\|* ]]; then\n    branch=\"$(-antigen-parse-branch ${url%|*} ${url#*|})\"\n  fi\n\n  printf \"Updating %s... \" $(-antigen-bundle-short-name \"$url\" \"$branch\")\n  \n  if [[ $make_local_clone == \"false\" ]]; then\n    printf \"Bundle has no local clone. Will not be updated.\\n\" >&2\n    return 1\n  fi\n\n  # update=true verbose=false\n  if ! -antigen-ensure-repo \"$url\" true false; then\n    printf \"Error! Activate logging and try again.\\n\" >&2\n    return 1\n  fi\n  \n  local took=$(( $(date +'%s') - $start ))\n  printf \"Done. Took %ds.\\n\" $took\n}\nantigen-use () {\n  if [[ $1 == oh-my-zsh ]]; then\n    -antigen-use-oh-my-zsh\n  elif [[ $1 == prezto ]]; then\n    -antigen-use-prezto\n  elif [[ $1 != \"\" ]]; then\n    ANTIGEN_DEFAULT_REPO_URL=$1\n    antigen-bundle $@\n  else\n    echo 'Usage: antigen-use <library-name|url>' >&2\n    echo 'Where <library-name> is any one of the following:' >&2\n    echo ' * oh-my-zsh' >&2\n    echo ' * prezto' >&2\n    echo '<url> is the full url.' >&2\n    return 1\n  fi\n}\nantigen-version () {\n  local extensions\n\n  printf \"Antigen %s (%s)\\nRevision date: %s\\n\" \"develop\" \"d1dd78b\" \"2018-01-15 14:37:21 -0300\"\n\n  # Show extension information if any is available\n  if (( $+functions[antigen-ext] )); then\n    typeset -a extensions; extensions=($(antigen-ext-list))\n    if [[ $#extensions -gt 0 ]]; then\n      printf \"Extensions loaded: %s\\n\" ${(j:, :)extensions}\n    fi\n  fi\n}\ntypeset -Ag _ANTIGEN_HOOKS; _ANTIGEN_HOOKS=()\ntypeset -Ag _ANTIGEN_HOOKS_META; _ANTIGEN_HOOKS_META=()\ntypeset -g _ANTIGEN_HOOK_PREFIX=\"-antigen-hook-\"\ntypeset -g _ANTIGEN_EXTENSIONS; _ANTIGEN_EXTENSIONS=()\n\n# -antigen-add-hook antigen-apply antigen-apply-hook replace\n#   - Replaces hooked function with hook, do not call hooked function\n#   - Return -1 to stop calling further hooks\n# -antigen-add-hook antigen-apply antigen-apply-hook pre (pre-call)\n#   - By default it will call hooked function\n# -antigen-add-hook antigen-pply antigen-apply-hook post (post-call)\n#   - Calls antigen-apply and then calls hook function\n# Usage:\n#  -antigen-add-hook antigen-apply antigen-apply-hook [\"replace\"|\"pre\"|\"post\"] [\"once\"|\"repeat\"]\nantigen-add-hook () {\n  local target=\"$1\" hook=\"$2\" type=\"$3\" mode=\"${4:-repeat}\"\n  \n  if (( ! $+functions[$target] )); then\n    printf \"Antigen: Function %s doesn't exist.\\n\" $target\n    return 1\n  fi\n\n  if (( ! $+functions[$hook] )); then\n    printf \"Antigen: Function %s doesn't exist.\\n\" $hook\n    return 1\n  fi\n\n  if [[ \"${_ANTIGEN_HOOKS[$target]}\" == \"\" ]]; then\n    _ANTIGEN_HOOKS[$target]=\"${hook}\"\n  else\n    _ANTIGEN_HOOKS[$target]=\"${_ANTIGEN_HOOKS[$target]}:${hook}\"\n  fi\n\n  _ANTIGEN_HOOKS_META[$hook]=\"target $target type $type mode $mode called 0\"\n  \n  # Do shadow for this function if there is none already\n  local hook_function=\"${_ANTIGEN_HOOK_PREFIX}$target\"\n  if (( ! $+functions[$hook_function] )); then\n    # Preserve hooked function\n    eval \"function ${_ANTIGEN_HOOK_PREFIX}$(functions -- $target)\"\n\n    # Create hook, call hook-handler to further process hook functions\n    eval \"function $target () {\n      noglob -antigen-hook-handler $target \\$@\n      return \\$?\n    }\"\n  fi\n  \n  return 0\n}\n\n# Private function to handle multiple hooks in a central point.\n-antigen-hook-handler () {\n  local target=\"$1\" args hook called\n  local hooks meta\n  shift\n  typeset -a args; args=(${@})\n\n  typeset -a pre_hooks replace_hooks post_hooks;\n  typeset -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]})\n  \n  typeset -A meta;\n  for hook in $hooks; do\n    meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]})\n    if [[ ${meta[mode]} == \"once\" && ${meta[called]} == 1 ]]; then\n      WARN \"Ignoring hook due to mode ${meta[mode]}: $hook\"\n      continue\n    fi\n\n    let called=${meta[called]}+1\n    meta[called]=$called\n    _ANTIGEN_HOOKS_META[$hook]=\"${(kv)meta}\"\n    WARN \"Updated meta: \"${(kv)meta}\n\n    case \"${meta[type]}\" in\n      \"pre\")\n      pre_hooks+=($hook)\n      ;;\n      \"replace\")\n      replace_hooks+=($hook)\n      ;;\n      \"post\")\n      post_hooks+=($hook)\n      ;;\n    esac\n  done\n\n  WARN \"Processing hooks: ${hooks}\"\n\n  for hook in $pre_hooks; do\n    WARN \"Pre hook:\" $hook $args\n    noglob $hook $args\n    [[ $? == -1 ]] && WARN \"$hook shortcircuited\" && return $ret\n  done\n\n  # A replace hook will return inmediately\n  local replace_hook=0 ret=0\n  for hook in $replace_hooks; do\n    replace_hook=1\n    # Should not be needed if `antigen-remove-hook` removed unneeded hooks.\n    if (( $+functions[$hook] )); then\n      WARN \"Replace hook:\" $hook $args\n      noglob $hook $args\n      [[ $? == -1 ]] && WARN \"$hook shortcircuited\" && return $ret\n    fi\n  done\n  \n  if [[ $replace_hook == 0 ]]; then\n    WARN \"${_ANTIGEN_HOOK_PREFIX}$target $args\"\n    noglob ${_ANTIGEN_HOOK_PREFIX}$target $args\n    ret=$?\n  else\n    WARN \"Replaced hooked function.\"\n  fi\n\n  for hook in $post_hooks; do\n    WARN \"Post hook:\" $hook $args\n    noglob $hook $args\n    [[ $? == -1 ]] && WARN \"$hook shortcircuited\" && return $ret\n  done\n  \n  LOG \"Return from hook ${target} with ${ret}\"\n\n  return $ret\n}\n\n# Usage:\n#  -antigen-remove-hook antigen-apply-hook\nantigen-remove-hook () {\n  local hook=\"$1\"\n  typeset -A meta; meta=(${(s: :)_ANTIGEN_HOOKS_META[$hook]})\n  local target=\"${meta[target]}\"\n  local -a hooks; hooks=(${(s|:|)_ANTIGEN_HOOKS[$target]})\n\n  # Remove registered hook\n  if [[ $#hooks > 0 ]]; then\n    hooks[$hooks[(I)$hook]]=()\n  fi\n  _ANTIGEN_HOOKS[${target}]=\"${(j|:|)hooks}\"\n  \n  if [[ $#hooks == 0 ]]; then\n    # Destroy base hook\n    eval \"function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)\"\n    if (( $+functions[${_ANTIGEN_HOOK_PREFIX}$target] )); then\n      unfunction -- \"${_ANTIGEN_HOOK_PREFIX}$target\"\n    fi\n  fi\n\n  unfunction -- $hook 2> /dev/null\n}\n\n# Remove all defined hooks.\n-antigen-reset-hooks () {\n  local target\n\n  for target in ${(k)_ANTIGEN_HOOKS}; do\n    # Release all hooked functions\n    eval \"function $(functions -- ${_ANTIGEN_HOOK_PREFIX}$target | sed s/${_ANTIGEN_HOOK_PREFIX}//)\"\n    unfunction -- \"${_ANTIGEN_HOOK_PREFIX}$target\" 2> /dev/null\n  done\n  \n  _ANTIGEN_HOOKS=()\n  _ANTIGEN_HOOKS_META=()\n  _ANTIGEN_EXTENSIONS=()\n}\n\n# Initializes an extension\n# Usage:\n#  antigen-ext ext-name\nantigen-ext () {\n  local ext=$1\n  local func=\"-antigen-$ext-init\"\n  if (( $+functions[$func] && $_ANTIGEN_EXTENSIONS[(I)$ext] == 0 )); then\n    eval $func\n    local ret=$?\n    WARN \"$func return code was $ret\"\n    if (( $ret == 0 )); then \n      LOG \"LOADED EXTENSION $ext\" EXT\n      -antigen-$ext-execute && _ANTIGEN_EXTENSIONS+=($ext)\n    else\n      WARN \"IGNORING EXTENSION $func\" EXT\n      return 1\n    fi\n    \n  else\n    printf \"Antigen: No extension defined or already loaded: %s\\n\" $func >&2\n    return 1\n  fi\n}\n\n# List installed extensions\n# Usage:\n#   antigen ext-list\nantigen-ext-list () {\n  echo $_ANTIGEN_EXTENSIONS\n}\n\n# Initializes built-in extensions\n# Usage:\n#   antigen-ext-init\nantigen-ext-init () {\n  # Initialize extensions. unless in interactive mode.\n  local ext\n  for ext in ${(s/ /)_ANTIGEN_BUILTIN_EXTENSIONS}; do\n    # Check if extension is loaded before intializing it\n    (( $+functions[-antigen-$ext-init] )) && antigen-ext $ext\n  done\n}\n# Initialize defer lib\n-antigen-defer-init () {\n  typeset -ga _DEFERRED_BUNDLE; _DEFERRED_BUNDLE=()\n  if -antigen-interactive-mode; then\n    return 1\n  fi\n}\n\n-antigen-defer-execute () {\n  # Hooks antigen-bundle in order to defer its execution.\n  antigen-bundle-defer () {\n    _DEFERRED_BUNDLE+=(\"${(j: :)${@}}\")\n    return -1 # Stop right there\n  }\n  antigen-add-hook antigen-bundle antigen-bundle-defer replace\n  \n  # Hooks antigen-apply in order to release hooked functions\n  antigen-apply-defer () {\n    WARN \"Defer pre-apply\" DEFER PRE-APPLY\n    antigen-remove-hook antigen-bundle-defer\n\n    # Process all deferred bundles.\n    local bundle\n    for bundle in ${_DEFERRED_BUNDLE[@]}; do\n      LOG \"Processing deferred bundle: ${bundle}\" DEFER\n      antigen-bundle $bundle\n    done\n\n    unset _DEFERRED_BUNDLE\n  }\n  antigen-add-hook antigen-apply antigen-apply-defer pre once\n}\n# Initialize lock lib\n-antigen-lock-init () {\n  # Default lock path.\n  -antigen-set-default ANTIGEN_LOCK $ADOTDIR/.lock\n  typeset -g _ANTIGEN_LOCK_PROCESS=false\n  \n  # Use env variable to determine if we should load this extension\n  -antigen-set-default ANTIGEN_MUTEX true\n  # Set ANTIGEN_MUTEX to false to avoid loading this extension\n  if [[ $ANTIGEN_MUTEX == true ]]; then\n    return 0;\n  fi\n  \n  # Do not use mutex\n  return 1;\n}\n\n-antigen-lock-execute () {\n  # Hook antigen command in order to check/create a lock file.\n  # This hook is only run once then releases itself.\n  antigen-lock () {\n    LOG \"antigen-lock called\"\n    # If there is a lock set up then we won't process anything.\n    if [[ -f $ANTIGEN_LOCK ]]; then\n      # Set up flag do the message is not repeated for each antigen-* command\n      [[ $_ANTIGEN_LOCK_PROCESS == false ]] && printf \"Antigen: Another process in running.\\n\"\n      _ANTIGEN_LOCK_PROCESS=true\n      # Do not further process hooks. For this hook to properly work it\n      # should be registered first.\n      return -1\n    fi\n\n    WARN \"Creating antigen-lock file at $ANTIGEN_LOCK\"\n    touch $ANTIGEN_LOCK\n  }\n  antigen-add-hook antigen antigen-lock pre once\n\n  # Hook antigen-apply in order to release .lock file.\n  antigen-apply-lock () {\n    WARN \"Freeing antigen-lock file at $ANTIGEN_LOCK\"\n    unset _ANTIGEN_LOCK_PROCESS\n    rm -f $ANTIGEN_LOCK &> /dev/null\n  }\n  antigen-add-hook antigen-apply antigen-apply-lock post once\n}\n# Initialize parallel lib\n-antigen-parallel-init () {\n  WARN \"Init parallel extension\" PARALLEL\n  typeset -ga _PARALLEL_BUNDLE; _PARALLEL_BUNDLE=()\n  if -antigen-interactive-mode; then\n    return 1\n  fi\n}\n\n-antigen-parallel-execute() {\n  WARN \"Exec parallel extension\" PARALLEL\n  # Install bundles in parallel\n  antigen-bundle-parallel-execute () {\n    WARN \"Parallel antigen-bundle-parallel-execute\" PARALLEL\n    typeset -a pids; pids=()\n    local args pid\n\n    WARN \"Gonna install in parallel ${#_PARALLEL_BUNDLE} bundles.\" PARALLEL\n    # Do ensure-repo in parallel\n    WARN \"${_PARALLEL_BUNDLE}\" PARALLEL\n    typeset -Ua repositories # Used to keep track of cloned repositories to avoid\n                             # trying to clone it multiple times.\n    for args in ${_PARALLEL_BUNDLE}; do\n      typeset -A bundle; -antigen-parse-args 'bundle' ${=args}\n\n      if [[ ! -d ${bundle[dir]} && $repositories[(I)${bundle[url]}] == 0 ]]; then\n        WARN \"Install in parallel ${bundle[name]}.\" PARALLEL\n        echo \"Installing ${bundle[name]}!...\"\n        # $bundle[url]'s format is \"url|branch\" as to create \"$ANTIGEN_BUNDLES/bundle/name-branch\",\n        # this way you may require multiple branches from the same repository.\n        -antigen-ensure-repo \"${bundle[url]}\" > /dev/null &!\n        pids+=($!)\n      else\n        WARN \"Bundle ${bundle[name]} already cloned locally.\" PARALLEL\n      fi\n      \n      repositories+=(${bundle[url]})\n    done\n\n    # Wait for all background processes to end\n    while [[ $#pids > 0 ]]; do\n      for pid in $pids; do\n        # `ps` may diplay an error message such \"Signal 18 (CONT) caught by ps\n        # (procps-ng version 3.3.9).\", see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732410\n        if [[ $(ps -o pid= -p $pid 2>/dev/null) == \"\" ]]; then\n          pids[$pids[(I)$pid]]=()\n        fi\n      done\n      sleep .5\n    done\n\n    builtin local bundle &> /dev/null\n    for bundle in ${_PARALLEL_BUNDLE[@]}; do\n      antigen-bundle $bundle\n    done\n    \n\n    WARN \"Parallel install done\" PARALLEL\n  }\n\n  # Hooks antigen-apply in order to release hooked functions\n  antigen-apply-parallel () {\n    WARN \"Parallel pre-apply\" PARALLEL PRE-APPLY\n    #antigen-remove-hook antigen-pre-apply-parallel\n    # Hooks antigen-bundle in order to parallel its execution.\n    antigen-bundle-parallel () {\n      TRACE \"antigen-bundle-parallel: $@\" PARALLEL\n      _PARALLEL_BUNDLE+=(\"${(j: :)${@}}\")\n    }\n    antigen-add-hook antigen-bundle antigen-bundle-parallel replace\n  }\n  antigen-add-hook antigen-apply antigen-apply-parallel pre once\n  \n  antigen-apply-parallel-execute () {\n      WARN \"Parallel replace-apply\" PARALLEL REPLACE-APPLY\n      antigen-remove-hook antigen-bundle-parallel\n      # Process all parallel bundles.\n      antigen-bundle-parallel-execute\n\n      unset _PARALLEL_BUNDLE\n      antigen-remove-hook antigen-apply-parallel-execute\n      antigen-apply\n  }\n  antigen-add-hook antigen-apply antigen-apply-parallel-execute replace once\n}\ntypeset -ga _ZCACHE_BUNDLE_SOURCE _ZCACHE_CAPTURE_BUNDLE\ntypeset -g _ZCACHE_CAPTURE_PREFIX\n\n# Generates cache from listed bundles.\n#\n# Iterates over _ANTIGEN_BUNDLE_RECORD and join all needed sources into one,\n# if this is done through -antigen-load-list.\n# Result is stored in ANTIGEN_CACHE.\n#\n# _ANTIGEN_BUNDLE_RECORD and fpath is stored in cache.\n#\n# Usage\n#   -zcache-generate-cache\n#\n# Returns\n#   Nothing. Generates ANTIGEN_CACHE\n-antigen-cache-generate () {\n  local -aU _fpath _PATH _sources\n  local record\n\n  LOG \"Gonna generate cache for $_ZCACHE_BUNDLE_SOURCE\"\n  for record in $_ZCACHE_BUNDLE_SOURCE; do\n    record=${record:A}\n    # LOG \"Caching $record\"\n    if [[ -f $record ]]; then\n      # Adding $'\\n' as a suffix as j:\\n: doesn't work inside a heredoc.\n      if [[ $_ANTIGEN_THEME_COMPAT == true && \"$record\" == *.zsh-theme* ]]; then\n        local compat=\"${record:A}.antigen-compat\"\n        echo \"# Generated by Antigen. Do not edit!\" >! \"$compat\"\n        cat $record | sed -Ee '/\\{$/,/^\\}/!{\n             s/^local //\n         }' >>! \"$compat\"\n        record=\"$compat\"\n      fi\n      _sources+=(\"source '${record}';\"$'\\n')\n    elif [[ -d $record ]]; then\n      _PATH+=(\"${record}\")\n      _fpath+=(\"${record}\")\n    fi\n  done\n\ncat > $ANTIGEN_CACHE <<EOC\n#-- START ZCACHE GENERATED FILE\n#-- GENERATED: $(date)\n#-- ANTIGEN develop\n$(functions -- _antigen)\nantigen () {\n  local MATCH MBEGIN MEND\n  [[ \"\\$ZSH_EVAL_CONTEXT\" =~ \"toplevel:*\" || \"\\$ZSH_EVAL_CONTEXT\" =~ \"cmdarg:*\" ]] && source \"$_ANTIGEN_INSTALL_DIR/antigen.zsh\" && eval antigen \\$@;\n  return 0;\n}\ntypeset -gaU fpath path\nfpath+=(${_fpath[@]}) path+=(${_PATH[@]})\n_antigen_compinit () {\n  autoload -Uz compinit; compinit $ANTIGEN_COMPINIT_OPTS -d \"$ANTIGEN_COMPDUMP\"; compdef _antigen antigen\n  add-zsh-hook -D precmd _antigen_compinit\n}\nautoload -Uz add-zsh-hook; add-zsh-hook precmd _antigen_compinit\ncompdef () {}\n\nif [[ -n \"$ZSH\" ]]; then\n  ZSH=\"$ZSH\"; ZSH_CACHE_DIR=\"$ZSH_CACHE_DIR\"\nfi\n#--- BUNDLES BEGIN\n${(j::)_sources}\n#--- BUNDLES END\ntypeset -gaU _ANTIGEN_BUNDLE_RECORD; _ANTIGEN_BUNDLE_RECORD=($(print ${(qq)_ANTIGEN_BUNDLE_RECORD}))\ntypeset -g _ANTIGEN_CACHE_LOADED; _ANTIGEN_CACHE_LOADED=true\ntypeset -ga _ZCACHE_BUNDLE_SOURCE; _ZCACHE_BUNDLE_SOURCE=($(print ${(qq)_ZCACHE_BUNDLE_SOURCE}))\ntypeset -g _ANTIGEN_CACHE_VERSION; _ANTIGEN_CACHE_VERSION='develop'\ntypeset -g _ANTIGEN_THEME; _ANTIGEN_THEME='$_ANTIGEN_THEME'\n\n#-- END ZCACHE GENERATED FILE\nEOC\n\n  { zcompile \"$ANTIGEN_CACHE\" } &!\n\n  # Compile config files, if any\n  LOG \"CHECK_FILES $ANTIGEN_CHECK_FILES\"\n  [[ $ANTIGEN_AUTO_CONFIG == true && -n $ANTIGEN_CHECK_FILES ]] && {\n    echo ${(j:\\n:)ANTIGEN_CHECK_FILES} >! \"$ANTIGEN_RSRC\"\n    for rsrc in $ANTIGEN_CHECK_FILES; do\n      zcompile $rsrc\n    done\n  } &!\n\n  return true\n}\n\n# Initializes caching mechanism.\n#\n# Hooks `antigen-bundle` and `antigen-apply` in order to defer bundle install\n# and load. All bundles are loaded from generated cache rather than dynamically\n# as these are bundled.\n#\n# Usage\n#  -antigen-cache-init\n# Returns\n#  Nothing\n-antigen-cache-init () {\n  if -antigen-interactive-mode; then\n    return 1\n  fi\n\n  _ZCACHE_CAPTURE_PREFIX=${_ZCACHE_CAPTURE_PREFIX:-\"--zcache-\"}\n  _ZCACHE_BUNDLE_SOURCE=(); _ZCACHE_CAPTURE_BUNDLE=()\n\n  # Cache auto config files to check for changes (.zshrc, .antigenrc etc)\n  -antigen-set-default ANTIGEN_AUTO_CONFIG true\n  \n  # Default cache path.\n  -antigen-set-default ANTIGEN_CACHE $ADOTDIR/init.zsh\n  -antigen-set-default ANTIGEN_RSRC $ADOTDIR/.resources\n  if [[ $ANTIGEN_CACHE == false ]]; then\n    return 1\n  fi\n  \n  return 0\n}\n\n-antigen-cache-execute () {\n  # Main function. Deferred antigen-apply.\n  antigen-apply-cached () {\n    # TRACE \"APPLYING CACHE\" EXT\n    # Auto determine check_files\n    # There always should be 5 steps from original source as the correct way is to use\n    # `antigen` wrapper not `antigen-apply` directly and it's called by an extension.\n    LOG \"TRACE: ${funcfiletrace}\"\n    if [[ $ANTIGEN_AUTO_CONFIG == true && $#ANTIGEN_CHECK_FILES -eq 0 ]]; then\n      # Check common configuration file does exist.\n      if [[ -f ${ZDOTDIR:-$HOME}/.zshrc ]]; then\n        ANTIGEN_CHECK_FILES+=(${ZDOTDIR:-$HOME}/.zshrc)\n      fi\n      # TODO Fix: Fuzzy match shoud be replaced by a sane way to determine it.\n      if [[ $#funcfiletrace -ge 6 ]]; then\n        ANTIGEN_CHECK_FILES+=(\"${${funcfiletrace[6]%:*}##* }\")\n      fi\n    fi\n\n    # Generate and compile cache\n    -antigen-cache-generate\n    [[ -f \"$ANTIGEN_CACHE\" ]] && source \"$ANTIGEN_CACHE\";\n\n    # Commented out in order to have a working `cache-gen` command\n    #unset _ZCACHE_BUNDLE_SOURCE\n    unset _ZCACHE_CAPTURE_BUNDLE _ZCACHE_CAPTURE_FUNCTIONS\n\n    # Release all hooked functions\n    antigen-remove-hook -antigen-load-env-cached\n    antigen-remove-hook -antigen-load-source-cached\n    antigen-remove-hook antigen-bundle-cached\n  }\n  \n  antigen-add-hook antigen-apply antigen-apply-cached post once\n  \n  # Defer antigen-bundle.\n  antigen-bundle-cached () {\n    # Return an error is not bundle name/url is passed or a heredoc is misused,\n    # see https://github.com/zsh-users/antigen/issues/602\n    if [[ $# -eq 0 ]]; then\n      printf \"Antigen: Must provide a bundle url or name.\\n\" >&2\n      return 1\n    fi\n    _ZCACHE_CAPTURE_BUNDLE+=(\"${(j: :)${@}}\")\n  }\n  antigen-add-hook antigen-bundle antigen-bundle-cached pre\n  \n  # Defer loading.\n  -antigen-load-env-cached () {\n    local bundle\n    typeset -A bundle; bundle=($@)\n    local location=${bundle[dir]}/${bundle[loc]}\n    \n    # Load to path if there is no sourceable\n    if [[ ${bundle[loc]} == \"/\" ]]; then\n      _ZCACHE_BUNDLE_SOURCE+=(\"${location}\")\n      return\n    fi\n\n    _ZCACHE_BUNDLE_SOURCE+=(\"${location}\")\n  }\n  antigen-add-hook -antigen-load-env -antigen-load-env-cached replace\n  \n  # Defer sourcing.\n  -antigen-load-source-cached () {\n    _ZCACHE_BUNDLE_SOURCE+=($@)\n  }\n  antigen-add-hook -antigen-load-source -antigen-load-source-cached replace\n  \n  return 0\n}\n\n# Generate static-cache file at $ANTIGEN_CACHE using currently loaded\n# bundles from $_ANTIGEN_BUNDLE_RECORD\n#\n# Usage\n#   antigen-cache-gen\n#\n# Returns\n#   Nothing\nantigen-cache-gen () {\n  -antigen-cache-generate\n}\n#compdef _antigen\n# Setup antigen's autocompletion\n_antigen () {\n  local -a _1st_arguments\n  _1st_arguments=(\n    'apply:Load all bundle completions'\n    'bundle:Install and load the given plugin'\n    'bundles:Bulk define bundles'\n    'cleanup:Clean up the clones of repos which are not used by any bundles currently loaded'\n    'cache-gen:Generate cache'\n    'init:Load Antigen configuration from file'\n    'list:List out the currently loaded bundles'\n    'purge:Remove a cloned bundle from filesystem'\n    'reset:Clears cache'\n    'restore:Restore the bundles state as specified in the snapshot'\n    'revert:Revert the state of all bundles to how they were before the last antigen update'\n    'selfupdate:Update antigen itself'\n    'snapshot:Create a snapshot of all the active clones'\n    'theme:Switch the prompt theme'\n    'update:Update all bundles'\n    'use:Load any (supported) zsh pre-packaged framework'\n  );\n\n  _1st_arguments+=(\n    'help:Show this message'\n    'version:Display Antigen version'\n  )\n\n  __bundle() {\n    _arguments \\\n      '--loc[Path to the location <path-to/location>]' \\\n      '--url[Path to the repository <github-account/repository>]' \\\n      '--branch[Git branch name]' \\\n      '--no-local-clone[Do not create a clone]'\n  }\n  __list() {\n    _arguments \\\n      '--simple[Show only bundle name]' \\\n      '--short[Show only bundle name and branch]' \\\n      '--long[Show bundle records]'\n  }\n\n\n  __cleanup() {\n    _arguments \\\n      '--force[Do not ask for confirmation]'\n  }\n\n  _arguments '*:: :->command'\n\n  if (( CURRENT == 1 )); then\n    _describe -t commands \"antigen command\" _1st_arguments\n    return\n  fi\n\n  local -a _command_args\n  case \"$words[1]\" in\n    bundle)\n      __bundle\n      ;;\n    use)\n      compadd \"$@\" \"oh-my-zsh\" \"prezto\"\n      ;;\n    cleanup)\n      __cleanup\n      ;;\n    (update|purge)\n      compadd $(type -f \\-antigen-get-bundles &> /dev/null || antigen &> /dev/null; -antigen-get-bundles --simple 2> /dev/null)\n      ;;\n    theme)\n      compadd $(type -f \\-antigen-get-themes &> /dev/null || antigen &> /dev/null; -antigen-get-themes 2> /dev/null)\n      ;;\n    list)\n      __list\n    ;;\n  esac\n}\nzmodload zsh/datetime\nANTIGEN_DEBUG_LOG=${ANTIGEN_DEBUG_LOG:-${ADOTDIR:-$HOME/.antigen}/debug.log}\nLOG () {\n  local PREFIX=\"[LOG][${EPOCHREALTIME}]\"\n  echo \"${PREFIX} ${funcfiletrace[1]}\\n${PREFIX} $@\" >> $ANTIGEN_DEBUG_LOG\n}\n\nERR () {\n  local PREFIX=\"[ERR][${EPOCHREALTIME}]\"\n  echo \"${PREFIX} ${funcfiletrace[1]}\\n${PREFIX} $@\" >> $ANTIGEN_DEBUG_LOG\n}\n\nWARN () {\n  local PREFIX=\"[WRN][${EPOCHREALTIME}]\"\n  echo \"${PREFIX} ${funcfiletrace[1]}\\n${PREFIX} $@\" >> $ANTIGEN_DEBUG_LOG\n}\n\nTRACE () {\n  local PREFIX=\"[TRA][${EPOCHREALTIME}]\"\n  echo \"${PREFIX} ${funcfiletrace[1]}\\n${PREFIX} $@\\n${PREFIX} ${(j:\\n:)funcstack}\" >> $ANTIGEN_DEBUG_LOG\n}\n-antigen-env-setup\n"
  },
  {
    "path": "bin/backup",
    "content": "#!/bin/bash\n\n\nVOLUME=\"/Volumes/MacBackup\"\n\nfunction backup() {\n\tborg create \\\n\t\t--list \\\n\t\t--filter AME \\\n\t\t--stats \\\n\t\t--progress \\\n\t\t--show-rc \\\n\t\t--compression lz4 \\\n\t\t--exclude-caches \\\n\t\t--exclude-from=$HOME/.config/backup/excludes.txt \\\n\t\t--one-file-system \\\n\t\t\"$VOLUME::'{hostname}-{now}'\" \\\n\t\t/\n\n\tbackup_exit=$?\n\n\tborg prune                          \\\n\t\t\t--list                          \\\n\t\t\t--prefix '{hostname}-'          \\\n\t\t\t--show-rc                       \\\n\t\t\t--keep-last     1               \\\n\t\t\t--keep-daily    7               \\\n\t\t\t--keep-weekly   4               \\\n\t\t\t--keep-monthly  6               \\\n\t\t\t\"$VOLUME\"\n\n\tprune_exit=$?\n\n\t# use highest exit code as global exit code\n\tglobal_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit ))\n\n\tif [ ${global_exit} -eq 0 ]; then\n\t\t\techo \"Backup and Prune finished successfully\"\n\telif [ ${global_exit} -eq 1 ]; then\n\t\t\techo \"Backup and/or Prune finished with warnings\"\n\telse\n\t\t\techo \"Backup and/or Prune finished with errors\"\n\tfi\n\n\texit ${global_exit}\n}\n\nbackup\n"
  },
  {
    "path": "bin/dotfiles",
    "content": "#!/usr/bin/env zsh\nset -E\n\ne_header()   { echo -e \"\\n\\033[1m$@\\033[0m\"; }\ne_success()  { echo -e \" \\033[1;32m✔\\033[0m  $@\"; }\ne_error()    { echo -e \" \\033[1;31m✖\\033[0m  $@\"; }\ne_arrow()    { echo -e \" \\033[1;33m➜\\033[0m  $@\"; }\n\nDOTHOME=\"$(dirname \"$(cd \"$(dirname \"$0\")\" && pwd -P)\")\"\n\nBACKDIR=\"$DOTHOME/backup/dotfiles/$(date \"+%Y_%m_%d-%H_%M_%S\")/\"\n\ninstall() {\n  link_dotfiles\n  print_messages\n}\n\nlink_dotfiles() {\n  e_header \"Linking files into home directory...\"\n\n  cd \"$HOME\"\n  for file in $DOTHOME/[a-z]*; do\n    local base=\"$(basename $file)\"\n    local dest=\"$HOME/.$base\"\n\n    # Skip if link is the same.\n    if test \"$file\" -ef \"$dest\"; then\n      e_success \"$base\"\n      continue\n    fi\n\n    # Back up file if it exists.\n    if [[ -e \"$dest\" ]]; then\n      e_arrow \"Backing up $HOME/$base.\"\n      inform_about_backup=1\n      mkdir -p \"$BACKDIR\"\n      mv \"$dest\" \"$BACKDIR\"\n    fi\n\n    if [[ -L \"$dest\" ]]; then\n      rm \"$dest\"\n    fi\n\n    ln -sf \"${file#$HOME/}\" \".$base\"\n    e_success \"$base\"\n  done\n\n  e_header \"Removing broken symlinks from home directory...\"\n  find ~ -type l -maxdepth 1 | while read file; do\n    if [ ! -e \"$file\" ]; then\n      local base=\"$(basename $file)\"\n      e_success \"$file\"\n      rm \"$file\"\n    fi\n  done\n}\n\nprint_messages() {\n  if [[ $inform_about_backup == 1 ]]; then\n    echo \"\\nBackups were moved to $BACKDIR\\n\"\n  fi\n\n  if [[ $first_run == 1 ]]; then\n    echo \"\\nInstallation complete! You can relogin now.\"\n  else\n    echo # it's visually better ;)\n  fi\n}\n\nif [[ $1 == \"install\" ]]; then\n  (install)\nelif [[ $1 == \"edit\" ]]; then\n  $EDITOR ~/.dotfiles\nelif [[ $1 == \"view\" ]]; then\n  cd ~/.dotfiles\nelse\n  echo \"Usage: dotfiles [install|edit|view]\"\nfi\n"
  },
  {
    "path": "bin/proxy",
    "content": "# Script for automatic setup of SOCKS proxy through SSH connection.\n# It automatically teardowns SOCKS configuration before stopping.\n# It's supposed to work on Mac OS X 10.6+\n#\n# Author: Adam Stankiewicz (@sheerun)\n#\n\n[[ -n \"$1\" ]] || { echo \"Usage: proxy user@example.com\"; exit 1; }\n\n# get service GUID and NAME (like Wi-Fi) to set SOCKS proxy\n\nSERVICE_GUID=`printf \"open\\nget State:/Network/Global/IPv4\\nd.show\" | \\\nscutil | grep \"PrimaryService\" | awk '{print $3}'`\n\nSERVICE_NAME=`printf \"open\\nget Setup:/Network/Service/$SERVICE_GUID\\nd.show\" |\\\nscutil | grep \"UserDefinedName\" | awk -F': ' '{print $2}'`\n\n# command to disble socks proxy after at the end\nfinally() { sudo networksetup -setsocksfirewallproxystate \"$SERVICE_NAME\" off; }\n\n# enable socks proxy in system configuration\nsudo networksetup -setsocksfirewallproxy \"$SERVICE_NAME\" 127.0.0.1 1080 &&\n  ssh $1 -N -D 1080\n\ntrap finally INT\n\nfinally\n"
  },
  {
    "path": "bin/python-vimspector",
    "content": "#!/bin/bash\n\nexec python \"$@\"\n\n"
  },
  {
    "path": "bin/setup-darwin",
    "content": "#!/usr/bin/env bash\n\nif [[ \"$(uname)\" != \"Darwin\" ]]; then\n  echo \"Cannot run on platform other than OSX\"\n  exit 1\nfi\n\nset -e\n\nresolve_link() {\n  $(type -p greadlink readlink | head -1) \"$1\"\n}\n\nabs_dirname() {\n  local cwd=\"$(pwd)\"\n  local path=\"$1\"\n\n  while [ -n \"$path\" ]; do\n    cd \"${path%/*}\"\n    local name=\"${path##*/}\"\n    path=\"$(resolve_link \"$name\" || true)\"\n  done\n\n  pwd\n  cd \"$cwd\"\n}\n\nDEFAULT_SHELL=`which zsh`\nHOST_NAME=\"$USER.dev\"\nBONJOUR_NAME=\"$USER-mac\"\n\nsudo -v\n\nCURRENT_SHELL=\"$(dscl . -read /Users/$USER UserShell | cut -d \" \" -f 2)\"\nif test \"$CURRENT_SHELL\" != $DEFAULT_SHELL; then\n  echo \"Changing default shell to $DEFAULT_SHELL...\"\n  sudo chsh -s \"$DEFAULT_SHELL\" \"$USER\"\nfi\n\nif test \"$(sudo scutil --get ComputerName)\" != \"$HOST_NAME\"; then\n  echo \"Setting computer name to $HOST_NAME...\"\n  sudo scutil --set ComputerName \"$HOST_NAME\"\n  sudo scutil --set HostName \"$HOST_NAME\"\nfi\n\nif test \"$(sudo scutil --get LocalHostName)\" != \"$BONJOUR_NAME\"; then\n  echo \"Setting bonjour host name to $BONJOUR_NAME...\"\n  sudo scutil --set LocalHostName \"$BONJOUR_NAME\"\nfi\n\necho Expand save panel by default\ndefaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true\n\necho Expand print panel by default\ndefaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true\n\necho Automatically quit printer app once the print jobs complete\ndefaults write com.apple.print.PrintingPrefs \"Quit When Finished\" -bool true\n\necho Disable the “Are you sure you want to open this application?” dialog\ndefaults write com.apple.LaunchServices LSQuarantine -bool false\n\necho Trackpad: enable tap to click for this user and for the login screen\ndefaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true\ndefaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1\ndefaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1\n\necho Enable full keyboard access for all controls\ndefaults write NSGlobalDomain AppleKeyboardUIMode -int 3\n\necho Use scroll gesture with the Ctrl modifier key to zoom\necho Follow the keyboard focus while zoomed in\n\necho Locale settings\ndefaults write NSGlobalDomain AppleLanguages -array \"en\" \"pl\"\ndefaults write NSGlobalDomain AppleLocale -string \"en_GB@currency=PLN\"\ndefaults write NSGlobalDomain AppleMeasurementUnits -string \"Centimeters\"\ndefaults write NSGlobalDomain AppleMetricUnits -bool true\n\necho Disable shadow in screenshots\ndefaults write com.apple.screencapture disable-shadow -bool true\n\necho Finder: show all filename extensions\ndefaults write NSGlobalDomain AppleShowAllExtensions -bool true\n\necho Finder: show status bar\ndefaults write com.apple.finder ShowStatusBar -bool true\n\necho Finder: show path bar\ndefaults write com.apple.finder ShowPathBar -bool true\n\necho Display full POSIX path as Finder window title\ndefaults write com.apple.finder _FXShowPosixPathInTitle -bool true\n\necho When performing a search, search the current folder by default\ndefaults write com.apple.finder FXDefaultSearchScope -string \"SCcf\"\n\necho Disable the warning when changing a file extension\ndefaults write com.apple.finder FXEnableExtensionChangeWarning -bool false\n\necho Avoid creating .DS_Store files on network volumes\ndefaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true\n\necho Disable disk image verification\ndefaults write com.apple.frameworks.diskimages skip-verify -bool true\ndefaults write com.apple.frameworks.diskimages skip-verify-locked -bool true\ndefaults write com.apple.frameworks.diskimages skip-verify-remote -bool true\n\necho Automatically open a new Finder window when a volume is mounted\ndefaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true\ndefaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true\ndefaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true\n\necho Use list view in all Finder windows by default\necho Four-letter codes for the other view modes: icnv, clmv, Flwv\ndefaults write com.apple.finder FXPreferredViewStyle -string \"Nlsv\"\n\necho Disable the warning before emptying the Trash\ndefaults write com.apple.finder WarnOnEmptyTrash -bool false\n\necho Show the ~/Library folder\nchflags nohidden ~/Library\n\necho Put Dock on the left\ndefaults write com.apple.dock orientation -string left\n\necho Minimize to app icon\ndefaults write com.apple.dock minimize-to-application -bool true\n\necho Restarting Finder\nkillall Finder\n\n# Homebrew\nif !(which brew > /dev/null); then\n  echo 'Installing brew...'\n  ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\nfi\n\necho Installing applications...\n\nautostart_hidden() {\n  osascript -e \"tell application \\\"System Events\\\" to make login item at end with properties {path:\\\"/Applications/$1.app\\\", hidden:true}\"\n}\n\nrun_app() {\n  if test \"$(osascript -e \"tell application \\\"System Events\\\" to (name of processes) contains \\\"$1\\\"\")\" = \"false\"; then\n    open -a \"$1\"\n  fi\n}\n\nclear_dock() {\n  defaults write com.apple.dock persistent-apps -array ''\n}\n\npermament_dock() {\n  defaults write com.apple.dock persistent-apps -array-add \"<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>$1</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>\"\n}\n\nallow_control() {\n  APP_ID=\"$(osascript -e \"id of app \\\"$1\\\"\")\"\n\n  if [[ -n \"$APP_ID\" ]]; then\n    sudo sqlite3 /Library/Application\\ Support/com.apple.TCC/TCC.db \"INSERT or REPLACE INTO access values ('kTCCServiceAccessibility', '$APP_ID', 0, 1, 0, NULL);\"\n  fi\n}\n\necho \"Switching option and command keys...\"\nosascript -e 'tell application \"System Preferences\"\n    reveal anchor \"keyboardTab\" of pane \"com.apple.preference.keyboard\"\nend tell\ntell application \"System Events\" to tell window 1 of process \"System Preferences\"\n    click button 1 of tab group 1\n    tell sheet 1\n        click pop up button 1\n        click menu item 3 of menu 1 of pop up button 1\n\n        click pop up button 2\n        click menu item 4 of menu 1 of pop up button 2\n\n        click button \"OK\"\n    end tell\nend tell\ntell application \"System Events\"\n    tell application \"System Preferences\"\n        reveal anchor \"keyboardTab\" of pane \"com.apple.preference.keyboard\"\n    end tell\n    set theCheckbox to checkbox 1 of tab group 1 of window 1 of application process \"System Preferences\"\n    tell theCheckbox\n        if not (its value as boolean) then click theCheckbox\n    end tell\nend tell\nquit application \"System Preferences\"'\n\n# Disable dashboard to free F12 shortcut\ndefaults write com.apple.dashboard mcx-disabled -boolean true\n\nclear_dock\n\npermament_dock \"/Applications/App Store.app\"\n"
  },
  {
    "path": "gitconfig",
    "content": "[user]\n\tname = Adam Stankiewicz\n\temail = sheerun@sher.pl\n\tsigningKey = \"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMtoahqj/uLntDiJicWzGGHhyxMy7yrrRmZdFdIhqJrw sheerun@sher.pl\"\n\n#[commit]\n\t#gpgsign = true\n\n#[tag]\n\t#gpgsign = true\n\n#[gpg]\n\t#format = ssh\n\n[gpg \"ssh\"]\n\tallowedSignersFile = /Users/sheerun/.ssh/allowed_signers\n\n[core]\n\twhitespace = warn,space-before-tab,trailing-space\n\texcludesfile = ~/.gitignore\n\tpager = less -x3,2\n\n[alias]\n\tst = status -sb\n\tci = commit\n\tbr = branch -vv\n\tco = checkout\n\tlg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit\n\tcp = cherry-pick\n\tstash-staged = \"!bash -c \\\"git stash --keep-index; git stash push -m \\\"staged\\\" --keep-index; git stash pop stash@{1}\\\"\"\n\tmove-staged = \"!bash -c \\\"git stash-staged;git commit -m \\\"temp\\\"; git stash; git reset --hard HEAD^; git stash pop\\\"\"\n\n[color]\n\tui = true\n\n[push]\n\tdefault = current\n\tfollowTags = true\n\n[rerere]\n\tenabled = true\n\n[url \"git@github.com:\"]\n\tpushInsteadOf = \"git://github.com/\"\n\tpushInsteadOf = \"https://github.com/\"\n\n[url \"ssh://git@heroku.com/\"]\n\tinsteadOf = https://git.heroku.com/\n\n[pull]\n\trebase = false\n\n[init]\n\tdefaultBranch = master\n[filter \"lfs\"]\n\tprocess = git-lfs filter-process\n\trequired = true\n\tclean = git-lfs clean -- %f\n\tsmudge = git-lfs smudge -- %f\n"
  },
  {
    "path": "gitignore",
    "content": "# The global .gitignore\r\n# https://github.com/sheerun/the-global-gitignore\r\n\r\n.bzr/\r\n.bzrignore\r\n# Project-level settings\r\n/.tgitconfig\r\n.hg/\r\n.hgignore\r\n.hgsigs\r\n.hgsub\r\n.hgsubstate\r\n.hgtags\r\n# LibreOffice locks\r\n.~lock.*#\r\n.vscode/*\r\n!.vscode/settings.json\r\n!.vscode/tasks.json\r\n!.vscode/launch.json\r\n!.vscode/extensions.json\r\n*.code-workspace\r\n\r\n# Local History for Visual Studio Code\r\n.history/\r\n*.app\r\n.snapshots/*\r\n# Calabash / Cucumber\r\nrerun/\r\nreports/\r\nscreenshots/\r\nscreenshot*.png\r\ntest-servers/\r\n\r\n# bundler\r\n.bundle\r\nvendor\r\n# Lazarus compiler-generated binaries (safe to delete)\r\n*.exe\r\n*.dll\r\n*.so\r\n*.dylib\r\n*.lrs\r\n*.res\r\n*.compiled\r\n*.dbg\r\n*.ppu\r\n*.o\r\n*.or\r\n*.a\r\n\r\n# Lazarus autogenerated files (duplicated info)\r\n*.rst\r\n*.rsj\r\n*.lrt\r\n\r\n# Lazarus local files (user-specific info)\r\n*.lps\r\n\r\n# Lazarus backups and unit output folders.\r\n# These can be changed by user in Lazarus/project options.\r\nbackup/\r\n*.bak\r\nlib/\r\n\r\n# Application bundle for Mac OS\r\n*.app/\r\n# General\r\n.DS_Store\r\n.AppleDouble\r\n.LSOverride\r\n\r\n# Icon must end with two \\r\r\nIcon\r\n\r\n\r\n# Thumbnails\r\n._*\r\n\r\n# Files that might appear in the root of a volume\r\n.DocumentRevisions-V100\r\n.fseventsd\r\n.Spotlight-V100\r\n.TemporaryItems\r\n.Trashes\r\n.VolumeIcon.icns\r\n.com.apple.timemachine.donotpresent\r\n\r\n# Directories potentially created on remote AFP share\r\n.AppleDB\r\n.AppleDesktop\r\nNetwork Trash Folder\r\nTemporary Items\r\n.apdisk\r\n# General CodeKit files to ignore\r\nconfig.codekit\r\nconfig.codekit3\r\n/min\r\n# Private key\r\n*.ppk\r\n# The compilation directory\r\nEIFGENs\r\n# Simple Build Tool\r\n# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control\r\n\r\ndist/*\r\ntarget/\r\nlib_managed/\r\nsrc_managed/\r\nproject/boot/\r\nproject/plugins/project/\r\n.history\r\n.cache\r\n.lib/\r\n# Bricx Command Center IDE\r\n# http://bricxcc.sourceforge.net\r\n*.bak\r\n*.sym\r\n.ninja_deps\r\n.ninja_log\r\n*.kdev4\r\n.kdev4/\r\n.redcar\r\n*.orig\r\n*.rej\r\n# .gitignore file for git projects containing Stata files\r\n# Commercial statistical software: http://www.stata.com\r\n\r\n# Stata dataset and output files\r\n*.dta\r\n*.gph\r\n*.log\r\n*.smcl\r\n*.stpr\r\n*.stsem\r\n\r\n# Graphic export files from Stata\r\n# Stata command graph export: http://www.stata.com/manuals14/g-2graphexport.pdf\r\n#\r\n# You may add graphic export files to your .gitignore. However you should be\r\n# aware that this will exclude all image files from this main directory\r\n# and subdirectories.\r\n# *.ps\r\n# *.eps\r\n# *.wmf\r\n# *.emf\r\n# *.pdf\r\n# *.png\r\n# *.tif\r\n# SlickEdit workspace and project files are ignored by default because\r\n# typically they are considered to be developer-specific and not part of a\r\n# project.\r\n*.vpw\r\n*.vpj\r\n\r\n# SlickEdit workspace history and tag files always contain user-specific\r\n# data so they should not be stored in a repository.\r\n*.vpwhistu\r\n*.vpwhist\r\n*.vtg\r\n# Ignore LyX backup and autosave files\r\n# http://www.lyx.org/\r\n*.lyx~\r\n*.lyx#\r\n# ignore ModelSim generated files and directories (temp files and so on)\r\n[_@]*\r\n\r\n# ignore compilation output of ModelSim\r\n*.mti\r\n*.dat\r\n*.dbs\r\n*.psm\r\n*.bak\r\n*.cmp\r\n*.jpg\r\n*.html\r\n*.bsf\r\n\r\n# ignore simulation output of ModelSim\r\nwlf*\r\n*.wlf\r\n*.vstf\r\n*.ucdb\r\ncov*/\r\ntranscript*\r\nsc_dpiheader.h\r\nvsim.dbg\r\n# Local configuration folder and symbol database\r\n/.anjuta/\r\n/.anjuta_sym_db.db\r\n/CVS/*\r\n**/CVS/*\r\n.cvsignore\r\n*/.cvsignore\r\n# Ignore tags created by etags, ctags, gtags (GNU global) and cscope\r\nTAGS\r\n.TAGS\r\n!TAGS/\r\ntags\r\n.tags\r\n!tags/\r\ngtags.files\r\nGTAGS\r\nGRTAGS\r\nGPATH\r\nGSYMS\r\ncscope.files\r\ncscope.out\r\ncscope.in.out\r\ncscope.po.out\r\n\r\n**/IntegrationServer/datastore/\r\n**/IntegrationServer/db/\r\n**/IntegrationServer/DocumentStore/\r\n**/IntegrationServer/lib/\r\n**/IntegrationServer/logs/\r\n**/IntegrationServer/replicate/\r\n**/IntegrationServer/sdk/\r\n**/IntegrationServer/support/\r\n**/IntegrationServer/update/\r\n**/IntegrationServer/userFtpRoot/\r\n**/IntegrationServer/web/\r\n**/IntegrationServer/WmRepository4/\r\n**/IntegrationServer/XAStore/\r\n**/IntegrationServer/packages/Wm*/\r\n*~\r\n\r\n# temporary files which can be created if a process still has a handle open of a deleted file\r\n.fuse_hidden*\r\n\r\n# KDE directory preferences\r\n.directory\r\n\r\n# Linux trash folder which might appear on any partition or disk\r\n.Trash-*\r\n\r\n# .nfs files are created when an open file is removed but is still being accessed\r\n.nfs*\r\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider\r\n# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839\r\n\r\n# User-specific stuff\r\n.idea/**/workspace.xml\r\n.idea/**/tasks.xml\r\n.idea/**/usage.statistics.xml\r\n.idea/**/dictionaries\r\n.idea/**/shelf\r\n\r\n# AWS User-specific\r\n.idea/**/aws.xml\r\n\r\n# Generated files\r\n.idea/**/contentModel.xml\r\n\r\n# Sensitive or high-churn files\r\n.idea/**/dataSources/\r\n.idea/**/dataSources.ids\r\n.idea/**/dataSources.local.xml\r\n.idea/**/sqlDataSources.xml\r\n.idea/**/dynamic.xml\r\n.idea/**/uiDesigner.xml\r\n.idea/**/dbnavigator.xml\r\n\r\n# Gradle\r\n.idea/**/gradle.xml\r\n.idea/**/libraries\r\n\r\n# Gradle and Maven with auto-import\r\n# When using Gradle or Maven with auto-import, you should exclude module files,\r\n# since they will be recreated, and may cause churn.  Uncomment if using\r\n# auto-import.\r\n# .idea/artifacts\r\n# .idea/compiler.xml\r\n# .idea/jarRepositories.xml\r\n# .idea/modules.xml\r\n# .idea/*.iml\r\n# .idea/modules\r\n# *.iml\r\n# *.ipr\r\n\r\n# CMake\r\ncmake-build-*/\r\n\r\n# Mongo Explorer plugin\r\n.idea/**/mongoSettings.xml\r\n\r\n# File-based project format\r\n*.iws\r\n\r\n# IntelliJ\r\nout/\r\n\r\n# mpeltonen/sbt-idea plugin\r\n.idea_modules/\r\n\r\n# JIRA plugin\r\natlassian-ide-plugin.xml\r\n\r\n# Cursive Clojure plugin\r\n.idea/replstate.xml\r\n\r\n# SonarLint plugin\r\n.idea/sonarlint/\r\n\r\n# Crashlytics plugin (for Android Studio and IntelliJ)\r\ncom_crashlytics_export_strings.xml\r\ncrashlytics.properties\r\ncrashlytics-build.properties\r\nfabric.properties\r\n\r\n# Editor-based Rest Client\r\n.idea/httpRequests\r\n\r\n# Android studio 3.1+ serialized cache file\r\n.idea/caches/build_file_checksums.ser\r\n# Cloud9 IDE - http://c9.io\r\n.c9revisions\r\n.c9\r\nsecring.*\r\n\r\n# Virtualenv\r\n# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/\r\n.Python\r\npyvenv.cfg\r\n.venv\r\npip-selfcheck.json\r\n# Cache files for Sublime Text\r\n*.tmlanguage.cache\r\n*.tmPreferences.cache\r\n*.stTheme.cache\r\n\r\n# Workspace files are user-specific\r\n*.sublime-workspace\r\n\r\n# Project files should be checked into the repository, unless a significant\r\n# proportion of contributors will probably not be using Sublime Text\r\n# *.sublime-project\r\n\r\n# SFTP configuration file\r\nsftp-config.json\r\nsftp-config-alt*.json\r\n\r\n# Package control specific files\r\nPackage Control.last-run\r\nPackage Control.ca-list\r\nPackage Control.ca-bundle\r\nPackage Control.system-ca-bundle\r\nPackage Control.cache/\r\nPackage Control.ca-certs/\r\nPackage Control.merged-ca-bundle\r\nPackage Control.user-ca-bundle\r\noscrypto-ca-bundle.crt\r\nbh_unicode_properties.cache\r\n\r\n# Sublime-github package stores a github token in this file\r\n# https://packagecontrol.io/packages/sublime-github\r\nGitHub.sublime-settings\r\n.otto/\r\n*.tmproj\r\n*.tmproject\r\ntmtags\r\n*.esproj\r\n.metadata\r\nbin/\r\ntmp/\r\n*.tmp\r\n*.bak\r\n*.swp\r\n*~.nib\r\nlocal.properties\r\n.settings/\r\n.loadpath\r\n.recommenders\r\n\r\n# External tool builders\r\n.externalToolBuilders/\r\n\r\n# Locally stored \"Eclipse launch configurations\"\r\n*.launch\r\n\r\n# PyDev specific (Python IDE for Eclipse)\r\n*.pydevproject\r\n\r\n# CDT-specific (C/C++ Development Tooling)\r\n.cproject\r\n\r\n# CDT- autotools\r\n.autotools\r\n\r\n# Java annotation processor (APT)\r\n.factorypath\r\n\r\n# PDT-specific (PHP Development Tools)\r\n.buildpath\r\n\r\n# sbteclipse plugin\r\n.target\r\n\r\n# Tern plugin\r\n.tern-project\r\n\r\n# TeXlipse plugin\r\n.texlipse\r\n\r\n# STS (Spring Tool Suite)\r\n.springBeans\r\n\r\n# Code Recommenders\r\n.recommenders/\r\n\r\n# Annotation Processing\r\n.apt_generated/\r\n.apt_generated_test/\r\n\r\n# Scala IDE specific (Scala & Java development for Eclipse)\r\n.cache-main\r\n.scala_dependencies\r\n.worksheet\r\n\r\n# Uncomment this line if you wish to ignore the project description file.\r\n# Typically, this file would be tracked if it contains build/dependency configurations:\r\n#.project\r\n# Project Settings\r\n*.cywrk.*\r\n*.cyprj.*\r\n\r\n# Generated Assets and Resources\r\nDebug/\r\nRelease/\r\nExport/\r\n*/codegentemp\r\n*/Generated_Source\r\n*_datasheet.pdf\r\n*_timing.html\r\n*.cycdx\r\n*.cyfit\r\n*.rpt\r\n*.svd\r\n*.log\r\n*.zip\r\n\r\n# Notepad++ backups #\r\n*.bak\r\n# Swap\r\n[._]*.s[a-v][a-z]\r\n!*.svg  # comment out if you don't need vector files\r\n[._]*.sw[a-p]\r\n[._]s[a-rt-v][a-z]\r\n[._]ss[a-gi-z]\r\n[._]sw[a-p]\r\n\r\n# Session\r\nSession.vim\r\nSessionx.vim\r\n\r\n# Temporary\r\n.netrwhist\r\n*~\r\n# Auto-generated tag files\r\ntags\r\n# Persistent undo\r\n[._]*.un~\r\n# Ignore redis binary dump (dump.rdb) files\r\n\r\n*.rdb\r\n**/nbproject/private/\r\n**/nbproject/Makefile-*.mk\r\n**/nbproject/Package-*.bash\r\nbuild/\r\nnbbuild/\r\ndist/\r\nnbdist/\r\n.nb-gradle/\r\n#User Specific\r\n*.userprefs\r\n*.usertasks\r\n\r\n#Mono Project Files\r\n*.pidb\r\n*.resources\r\ntest-results/\r\n# -*- mode: gitignore; -*-\r\n*~\r\n\\#*\\#\r\n/.emacs.desktop\r\n/.emacs.desktop.lock\r\n*.elc\r\nauto-save-list\r\ntramp\r\n.\\#*\r\n\r\n# Org-mode\r\n.org-id-locations\r\n*_archive\r\n\r\n# flymake-mode\r\n*_flymake.*\r\n\r\n# eshell files\r\n/eshell/history\r\n/eshell/lastdir\r\n\r\n# elpa packages\r\n/elpa/\r\n\r\n# reftex files\r\n*.rel\r\n\r\n# AUCTeX auto folder\r\n/auto/\r\n\r\n# cask packages\r\n.cask/\r\ndist/\r\n\r\n# Flycheck\r\nflycheck_*.el\r\n\r\n# server auth directory\r\n/server/\r\n\r\n# projectiles files\r\n.projectile\r\n\r\n# directory configuration\r\n.dir-locals.el\r\n\r\n# network security\r\n/network-security.data\r\n\r\n.project\r\n.buildlog\r\n# Ensime specific\r\n.ensime\r\n.ensime_cache/\r\n.ensime_lucene/\r\n# Dropbox settings and caches\r\n.dropbox\r\n.dropbox.attr\r\n.dropbox.cache\r\n# Swap Files #\r\n.*.kate-swp\r\n.swp.*\r\n# JPEG\r\n*.jpg\r\n*.jpeg\r\n*.jpe\r\n*.jif\r\n*.jfif\r\n*.jfi\r\n\r\n# JPEG 2000\r\n*.jp2\r\n*.j2k\r\n*.jpf\r\n*.jpx\r\n*.jpm\r\n*.mj2\r\n\r\n# JPEG XR\r\n*.jxr\r\n*.hdp\r\n*.wdp\r\n\r\n# Graphics Interchange Format\r\n*.gif\r\n\r\n# RAW\r\n*.raw\r\n\r\n# Web P\r\n*.webp\r\n\r\n# Portable Network Graphics\r\n*.png\r\n\r\n# Animated Portable Network Graphics\r\n*.apng\r\n\r\n# Multiple-image Network Graphics\r\n*.mng\r\n\r\n# Tagged Image File Format\r\n*.tiff\r\n*.tif\r\n\r\n# Scalable Vector Graphics\r\n*.svg\r\n*.svgz\r\n\r\n# Portable Document Format\r\n*.pdf\r\n\r\n# X BitMap\r\n*.xbm\r\n\r\n# BMP\r\n*.bmp\r\n*.dib\r\n\r\n# ICO\r\n*.ico\r\n\r\n# 3D Images\r\n*.3dm\r\n*.max\r\n# intermediate build files\r\n*.bgn\r\n*.bit\r\n*.bld\r\n*.cmd_log\r\n*.drc\r\n*.ll\r\n*.lso\r\n*.msd\r\n*.msk\r\n*.ncd\r\n*.ngc\r\n*.ngd\r\n*.ngr\r\n*.pad\r\n*.par\r\n*.pcf\r\n*.prj\r\n*.ptwx\r\n*.rbb\r\n*.rbd\r\n*.stx\r\n*.syr\r\n*.twr\r\n*.twx\r\n*.unroutes\r\n*.ut\r\n*.xpi\r\n*.xst\r\n*_bitgen.xwbt\r\n*_envsettings.html\r\n*_map.map\r\n*_map.mrp\r\n*_map.ngm\r\n*_map.xrpt\r\n*_ngdbuild.xrpt\r\n*_pad.csv\r\n*_pad.txt\r\n*_par.xrpt\r\n*_summary.html\r\n*_summary.xml\r\n*_usage.xml\r\n*_xst.xrpt\r\n\r\n# iMPACT generated files\r\n_impactbatch.log\r\nimpact.xsl\r\nimpact_impact.xwbt\r\nise_impact.cmd\r\nwebtalk_impact.xml\r\n\r\n# Core Generator generated files\r\nxaw2verilog.log\r\n\r\n# project-wide generated files\r\n*.gise\r\npar_usage_statistics.html\r\nusage_statistics_webtalk.html\r\nwebtalk.log\r\nwebtalk_pn.xml\r\n\r\n# generated folders\r\niseconfig/\r\nxlnx_auto_0_xdb/\r\nxst/\r\n_ngo/\r\n_xmsgs/\r\n# General\r\n.vagrant/\r\n\r\n# Log files (if you are creating logs in debug mode, uncomment this)\r\n# *.log\r\n*.tmp\r\n\r\n# Word temporary\r\n~$*.doc*\r\n\r\n# Word Auto Backup File\r\nBackup of *.doc*\r\n\r\n# Excel temporary\r\n~$*.xls*\r\n\r\n# Excel Backup File\r\n*.xlk\r\n\r\n# PowerPoint temporary\r\n~$*.ppt*\r\n\r\n# Visio autosave temporary files\r\n*.~vsd*\r\n# JEnv local Java version configuration file\r\n.java-version\r\n\r\n# Used by previous versions of JEnv\r\n.jenv-version\r\n# It's better to unpack these files and commit the raw source because\r\n# git has its own built in compression methods.\r\n*.7z\r\n*.jar\r\n*.rar\r\n*.zip\r\n*.gz\r\n*.gzip\r\n*.tgz\r\n*.bzip\r\n*.bzip2\r\n*.bz2\r\n*.xz\r\n*.lzma\r\n*.cab\r\n*.xar\r\n\r\n# Packing-only formats\r\n*.iso\r\n*.tar\r\n\r\n# Package management formats\r\n*.dmg\r\n*.xpi\r\n*.gem\r\n*.egg\r\n*.deb\r\n*.rpm\r\n*.msi\r\n*.msm\r\n*.msp\r\n*.txz\r\n*.bak\r\n*.gho\r\n*.ori\r\n*.orig\r\n*.tmp\r\n# Waveform formats\r\n*.vcd\r\n*.vpd\r\n*.evcd\r\n*.fsdb\r\n\r\n# Default name of the simulation executable.  A different name can be\r\n# specified with this switch (the associated daidir database name is\r\n# also taken from here):  -o <path>/<filename>\r\nsimv\r\n\r\n# Generated for Verilog and VHDL top configs\r\nsimv.daidir/\r\nsimv.db.dir/\r\n\r\n# Infrastructure necessary to co-simulate SystemC models with\r\n# Verilog/VHDL models.  An alternate directory may be specified with this\r\n# switch:  -Mdir=<directory_path>\r\ncsrc/\r\n\r\n# Log file - the following switch allows to specify the file that will be\r\n# used to write all messages from simulation:  -l <filename>\r\n*.log\r\n\r\n# Coverage results (generated with urg) and database location.  The\r\n# following switch can also be used:  urg -dir <coverage_directory>.vdb\r\nsimv.vdb/\r\nurgReport/\r\n\r\n# DVE and UCLI related files.\r\nDVEfiles/\r\nucli.key\r\n\r\n# When the design is elaborated for DirectC, the following file is created\r\n# with declarations for C/C++ functions.\r\nvc_hdrs.h\r\n.vscode/*\r\n!.vscode/settings.json\r\n!.vscode/tasks.json\r\n!.vscode/launch.json\r\n!.vscode/extensions.json\r\n!.vscode/*.code-snippets\r\n\r\n# Local History for Visual Studio Code\r\n.history/\r\n\r\n# Built Visual Studio Code Extensions\r\n*.vsix\r\n# Windows thumbnail cache files\r\nThumbs.db\r\nThumbs.db:encryptable\r\nehthumbs.db\r\nehthumbs_vista.db\r\n\r\n# Dump file\r\n*.stackdump\r\n\r\n# Folder config file\r\n[Dd]esktop.ini\r\n\r\n# Recycle Bin used on file shares\r\n$RECYCLE.BIN/\r\n\r\n# Windows Installer files\r\n*.cab\r\n*.msi\r\n*.msix\r\n*.msm\r\n*.msp\r\n\r\n# Windows shortcuts\r\n*.lnk\r\n.svn/\r\nbin/\r\nbin-debug/\r\nbin-release/\r\n*.retry\r\n# Gitignore for Cadence Virtuoso\r\n################################################################\r\n\r\n# Log files\r\n*.log\r\npanic*.log.*\r\n\r\n# OpenAccess database lock files\r\n*.cdslck*\r\n\r\n# Run directories for layout vs. schematic and design rule check\r\nlvsRunDir/*\r\ndrcRunDir/*\r\n\r\n# Abstract generation tool\r\nabstract.log*\r\nabstract.record*\r\n\r\n# Windows default autosave extension\r\n*.asv\r\n\r\n# OSX / *nix default autosave extension\r\n*.m~\r\n\r\n# Compiled MEX binaries (all platforms)\r\n*.mex*\r\n\r\n# Packaged app and toolbox files\r\n*.mlappinstall\r\n*.mltbx\r\n\r\n# Generated helpsearch folders\r\nhelpsearch*/\r\n\r\n# Simulink code generation folders\r\nslprj/\r\nsccprj/\r\n\r\n# Matlab code generation folders\r\ncodegen/\r\n\r\n# Simulink autosave extension\r\n*.autosave\r\n\r\n# Simulink cache files\r\n*.slxc\r\n\r\n# Octave session info\r\noctave-workspace\r\n# Built files\r\nx86/\r\narm/\r\narm-p/\r\ntranslations/*.qm\r\n\r\n# IDE settings\r\n.settings/\r\n*.patch\r\n*.diff\r\n# Syncthing caches\r\n.stversions\r\n## User settings\r\nxcuserdata/\r\n\r\n## Xcode 8 and earlier\r\n*.xcscmblueprint\r\n*.xccheckout\r\n # Generated Metals (Scala Language Server) files\r\n # Reference: https://scalameta.org/metals/\r\n.metals/\r\n.bloop/\r\nproject/metals.sbt\r\n# default application storage directory used by the IDE Performance Cache feature\r\n.data/\r\n\r\n# used for ADF styles caching\r\ntemp/\r\n\r\n# default output directories\r\nclasses/\r\ndeploy/\r\njavadoc/\r\n\r\n# lock file, a part of Oracle Credential Store Framework\r\ncwallet.sso.lck# DW Dreamweaver added files\r\n_notes\r\n_compareTemp\r\nconfigs/\r\ndwsync.xml\r\ndw_php_codehinting.config\r\n*.mno\r\n"
  },
  {
    "path": "hushlogin",
    "content": "# The mere presence of this file in the home directory disables the system\n# copyright notice, the date and time of the last login, the message of the\n# day as well as other information that may otherwise appear on login.\n# See `man login`.\n"
  },
  {
    "path": "ignore",
    "content": "# Ruby development\nzeus.json\n.rbenv-version\n/config/database.yml\n.ruby-version\n.rbenv-version\n\n# Node development\nnode_modules/\nbower_components/\nDefinitelyTyped/\n\n# Sass files\n*.scssc\n\n# CTags files\n*tags\nGPATH\nGTAGS\nGRTAGS\n\n# Go development\ndeps\nGodeps\n\n# Other directories\nlog/\ntmp/\nvendor/\nreleases/\n\n# Other files\nnpm-debug.json\n*.log\n"
  },
  {
    "path": "inputrc",
    "content": "set editing-mode emacs\n\nControl-a: beginning-of-line\nControl-e: end-of-line\nControl-k: kill-line\n"
  },
  {
    "path": "pypirc",
    "content": "[distutils]\nindex-servers =\n  pypi\n  pypitest\n\n[pypi]\nusername: sheerun\n\n[pypitest]\nrepository: https://test.pypi.org/legacy/\nusername: sheerun\n"
  },
  {
    "path": "tmux.conf",
    "content": "set -g default-terminal \"xterm-256color\"\n\nset -g status on\nset -g status-left \" \"\nset -g status-right \" \"\nset -g status-justify centre\nset -g prefix2 C-Space\n\nset -gw window-status-format \"#I:#10W#F\"\nset -gw mode-style fg=colour226,bold\n\nset -g status-style fg=colour254\nset -g message-style fg=colour254\nset -g pane-active-border-style fg=colour238,bg=colour238\nset -g pane-border-style fg=colour238,bg=colour238\n\n# speedup vim\nset -sg escape-time 0\n\nset -g focus-events on\nset -g allow-rename off\nset -g history-limit 50000\nset -g status-keys emacs\n\nbind Space copy-mode\nbind C-Space copy-mode\n\nbind C-b send-prefix\n\nbind v split-window -h -c \"#{pane_current_path}\"\nbind C-v split-window -h -c \"#{pane_current_path}\"\n\nbind s split-window -v -c \"#{pane_current_path}\"\nbind C-s split-window -v -c \"#{pane_current_path}\"\n\nbind-key q kill-window\nbind-key C-q kill-window\n\nbind-key q kill-pane\nbind-key C-q kill-pane\n\nbind-key c new-window -c \"#{pane_current_path}\"\n\nbind h run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L\"\nbind j run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D\"\nbind k run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U\"\nbind l run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R\"\n\n# Mouse on\nset -g mouse on\nbind -n WheelUpPane   select-pane -t= \\; copy-mode -e \\; send-keys -M\nbind -n WheelDownPane select-pane -t= \\;                 send-keys -M\n\n# Use vim keybindings in copy mode\nsetw -g mode-keys vi\n\nbind-key C-e run-shell \"/Users/sheerun/Desktop/copycat \\\\#{session_id} #{window_index} #{pane_index} #{history_size} #{pane_current_path}\"\n\nsetw -g aggressive-resize off\n"
  },
  {
    "path": "vimrc",
    "content": "let g:CoolTotalMatches = 1\nlet g:lightline = { 'colorscheme': 'ayu_dark' }\n\nlet remote = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'\n\nif has('nvim')\n  let local = $HOME.'/.local/share/nvim/site/autoload/plug.vim'\nelse\n  let local = $HOME.'/.vim/autoload/plug.vim'\nendif\n\nif !filereadable(local)\n  :silent execute '!curl --create-dirs -sfLo '.local.' '.remote\nend\n\n\nlet g:vimspector_enable_mappings = 'HUMAN'\nlet g:vimspector_sidebar_width = 40\nlet g:vimspector_bottombar_height = 5\n\ncall plug#begin()\n\nPlug 'sheerun/vimrc'\nPlug 'sheerun/vim-polyglot'\n\nPlug 'eliba2/vim-node-inspect'\nPlug '~/.vim/plugged/vim-inspect'\n\n\" iTerm2 and tmux integration\nPlug 'sjl/vitality.vim'\n\"Plug 'camspiers/lens.vim'\n\nPlug 'junegunn/fzf', { 'do': { -> fzf#install() } }\nPlug 'junegunn/fzf.vim'\n\nPlug 'ayu-theme/ayu-vim'\n\n\"Nice bottom panel\nPlug 'itchyny/lightline.vim'\n\n\" File manager that open on '-'\nPlug 'justinmk/vim-dirvish'\n\n\" Press v over and over again to expand selection\nPlug 'terryma/vim-expand-region'\nvmap v <Plug>(expand_region_expand)\nvmap <C-v> <Plug>(expand_region_shrink)\n\n\" Toggle comments with gcc\nlet g:tcomment_mapleader1 = '<C-c>'\nPlug 'tomtom/tcomment_vim'\n\n\" Readline shortcuts (C-e etc.)\nPlug 'tpope/vim-rsi'\n\n\" Automatically adds 'end' block to code\nPlug 'cohama/lexima.vim'\n\n\" Integration with git\nPlug 'tpope/vim-fugitive'\n\n\" Supports repeating plugin commands with . \nPlug 'tpope/vim-repeat'\n\n\" Various shortcuts like ]z for next quick list item\n\" Plug 'tpope/vim-unimpaired'\n\n\" Automatically find root project directory\nPlug 'airblade/vim-rooter'\nlet g:rooter_disable_map = 1\nlet g:rooter_silent_chdir = 1\n\n\" Expand / wrap hashes etc.\nPlug 'AndrewRadev/splitjoin.vim'\nnmap sj :SplitjoinSplit<cr>\nnmap sk :SplitjoinJoin<cr>\n\n\" Use ii / ai for indenting\nPlug 'michaeljsmith/vim-indent-object'\n\nPlug 'tpope/vim-scriptease'\n\n\" For more reliable indenting and performance\nset foldmethod=indent\nset fillchars=\"fold: \"\n\n\" Better search tools\n\" Plug 'vim-scripts/IndexedSearch'\nPlug 'vim-scripts/SmartCase'\n\nPlug 'neoclide/coc.nvim', {'branch': 'release'}\nlet g:coc_quickfix_open_command = 'cfirst'\n\nfunction! s:check_back_space() abort\n  let col = col('.') - 1\n  return !col || getline('.')[col - 1]  =~ '\\s'\nendfunction\n\ninoremap <silent><expr> <TAB>\n  \\ pumvisible() ? \"\\<C-n>\" :\n  \\ <SID>check_back_space() ? \"\\<TAB>\" :\n  \\ coc#refresh()\n\n\" Auto disable search highlighting\nPlug 'romainl/vim-cool'\n\nPlug 'sbdchd/neoformat'\n\nPlug 'kristijanhusak/vim-js-file-import'\n\nPlug 'rakr/vim-one'\n\n\nPlug 'puremourning/vimspector'\n\ncall plug#end()\n\ncolorscheme ayu\n\nlet $FZF_DEFAULT_COMMAND = 'git ls-files'\nlet g:fzf_buffers_jump = 1\nlet g:fzf_layout = { 'down': '25%' }\nlet g:fzf_preview_window = []\n\nfunction! Ripgrep(query)\n  let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case -- %s || true'\n  let initial_command = printf(command_fmt, shellescape(a:query))\n  let reload_command = printf(command_fmt, '{q}')\n  let spec = {'options': ['--phony', '--query', a:query, '--multi', '--bind', 'enter:select-all+accept,change:reload:'.reload_command]}\n  call fzf#vim#grep(initial_command, 1, spec, 0)\nendfunction\n\nfunction! s:GetSelection()\n  return getline('.')[col(\"'<\")-1:col(\"'>\")-1]\nendfunction\n\nnnoremap <Leader>o :FZF<CR>\nvnoremap <Leader>/ :call Ripgrep(<SID>GetSelection())<CR>\nnnoremap <Leader>/ :call Ripgrep(\"\")<CR>\nnnoremap <silent>Q :cclose<CR>\n\nfunc! s:CustomiseUI()\n  \" Remove winbar for code window\n  call win_gotoid( g:vimspector_session_windows.code )\n  nunmenu WinBar\n  nnoremenu WinBar.x :call vimspector#Reset( { 'interactive': v:false } )<CR>\n  nnoremenu WinBar.F4\\ ⟲ :call vimspector#Restart()<CR>\n  nnoremenu WinBar.F5\\ ▶ :call vimspector#Continue()<CR>\n  nnoremenu WinBar.F9\\ ● :call vimspector#ToggleBreakpoint()<CR>\n  nnoremenu WinBar.F10\\ ↓  :call vimspector#StepOver()<CR>\n  nnoremenu WinBar.F11\\ → :call vimspector#StepInto()<CR>\n  nnoremenu WinBar.F12\\ ← :call vimspector#StepOut()<CR>\n\n  \" Create winbar for variables window\n  call win_gotoid( g:vimspector_session_windows.variables )\n  nunmenu WinBar\n\nendfunction\naugroup MyVimspectorUICustomistaion\n  autocmd!\n  autocmd User VimspectorUICreated call <SID>CustomiseUI()\naugroup END\n\nsign define vimspectorBP text=\\ ●           texthl=WarningMsg\nsign define vimspectorBPCond text=\\ •       texthl=WarningMsg\nsign define vimspectorBPDisabled text=\\ ○   texthl=LineNr\nsign define vimspectorPC text=\\ »           texthl=String\nsign define vimspectorPCBP text=\\ »         texthl=String\nsign define vimspectorCurrentThread text=>  texthl=String\nsign define vimspectorCurrentFrame text=>   texthl=String\n\nvmap <Leader>d \"+d\nnmap <Leader>p \"+p\nnmap <Leader>P \"+P\nvmap <Leader>p \"+p\nvmap <Leader>P \"+P\nnmap <Leader><Leader> V\nnmap <Leader>b :make<CR>\nnnoremap <Leader><Tab> <C-^>\nnnoremap <silent> <Leader><CR> :CocAction<CR>\n\n\n\" vnoremap <silent> i i`]\n\" vnoremap <silent> p p`]\n\" nnoremap <silent> p p`e\n\"\nnnoremap <Leader>w :w<CR>\nnnoremap <Leader>z :wq<CR>\nnnoremap <Leader>q :qa<CR>\n\nnnoremap <C-a> 0\nnnoremap <C-e> $\n\nnmap <silent> gy <Plug>(coc-type-definition)\nnmap <silent> gi <Plug>(coc-implementation)\nnmap <silent> gr <Plug>(coc-references)\n\"\n\nfunction! s:GoToDefinition()\n  if CocAction('jumpDefinition')\n    return v:true\n  endif\n\n  let ret = execute(\"silent! normal \\<C-]>\")\n  if ret =~ \"Error\"\n    call searchdecl(expand('<cword>'))\n  endif\nendfunction\nnnoremap <silent><nowait><CR> :<C-u>call <SID>GoToDefinition()<CR>\n\nnmap <silent> <F2> <Plug>(coc-rename)\nnmap <silent> <Leader>f <Plug>(coc-fix-current)\nnmap <silent><nowait>§  <Plug>(coc-codeaction-selected)<CR>\nvmap <silent><nowait>§  <Plug>(coc-codeaction-selected)<CR>\nxmap if <Plug>(coc-funcobj-i)\nomap if <Plug>(coc-funcobj-i)\nxmap af <Plug>(coc-funcobj-a)\nomap af <Plug>(coc-funcobj-a)\nxmap ic <Plug>(coc-classobj-i)\nomap ic <Plug>(coc-classobj-i)\nxmap ac <Plug>(coc-classobj-a)\nomap ac <Plug>(coc-classobj-a)\nnmap <silent> <Leader>= :call CocAction('format')<CR>:silent call CocAction('runCommand', 'editor.action.organizeImport')<CR>\n\nmap <silent> <C-j> :cnext<CR>\nmap <silent> <C-k> :cprev<CR>\n\nautocmd BufReadPost quickfix nnoremap <buffer> <CR> <CR>\nautocmd QuickfixCmdPost grep cfirst\n\nau BufNewFile,BufRead *.x set ft=vlang\nau BufWritePre *.go call CocAction('format')\n\n\" Show git commit that changed given line\nmap <silent><Leader>g :call setbufvar(winbufnr(popup_atcursor(systemlist(\"cd \" . shellescape(fnamemodify(resolve(expand('%:p')), \":h\")) . \" && git log --no-merges -n 1 -L \" . shellescape(line(\"v\") . \",\" . line(\".\") . \":\" . resolve(expand(\"%:p\")))), { \"padding\": [1,1,1,1], \"pos\": \"botleft\", \"wrap\": 0 })), \"&filetype\", \"git\")<CR>\n\n\" Show map output in editable window\ncnorea <expr> map getcmdtype() == ':' && getcmdline() ==# 'map'\n    \\ ? \"new <bar> put=execute('map') <bar> set buftype=nofile bufhidden=delete\"\n    \\ : 'map'\n\nset shortmess+=F\n"
  },
  {
    "path": "zshrc",
    "content": "source ~/.zsh/sheerun-home/home.plugin.zsh\nsource ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh\n\n# Brew command extensions\nfunction brew() {\n\t(\n\t\tset -eo pipefail\n\n\t\tif [ \"$1 $2\" = \"bundle \" ] && ! [ -f Brewfile ]; then\n\t\t\tclear\n\t\t\tvim ~/.config/Brewfile && brew bundle --file ~/.config/Brewfile --cleanup\n\t\t\t[ $? -eq 0 ] || return $?\n\t\t\tbrew cu --no-quarantine --yes --cleanup --all --no-brew-update\n\t\t\treturn $?\n\t\tfi\n\n\t\tcommand brew \"$@\"\n\t)\n}\n\n# Vim command extensions\nfunction vim() {\n\tcommand vim \"$@\"\n\n\tif [ \"$1\" = \"$HOME/.zshrc\" ]; then\n\t\tsource ~/.zshrc\n\tfi\n}\n\nexport GPG_TTY=$(tty)\n\ndownload-youtube-channel() {\n\tyoutube-dl --format 'bestvideo[height<=720]+bestaudio/best[height<=720]' --min-views 50000 --output '%(title)s-%(id)s.%(ext)s' $1\n}\n\nexport PUBLIC=$HOME/Public\n\nalias docker=\"lima nerdctl\"\n"
  }
]