[
  {
    "path": "Dockerfile",
    "content": "#\n# Ubuntu Dockerfile\n#\n# https://github.com/dockerfile/ubuntu\n#\n\n# Pull base image.\nFROM ubuntu:14.04\n\n# Install.\nRUN \\\n  sed -i 's/# \\(.*multiverse$\\)/\\1/g' /etc/apt/sources.list && \\\n  apt-get update && \\\n  apt-get -y upgrade && \\\n  apt-get install -y build-essential && \\\n  apt-get install -y software-properties-common && \\\n  apt-get install -y byobu curl git htop man unzip vim wget && \\\n  rm -rf /var/lib/apt/lists/*\n\n# Add files.\nADD root/.bashrc /root/.bashrc\nADD root/.gitconfig /root/.gitconfig\nADD root/.scripts /root/.scripts\n\n# Set environment variables.\nENV HOME /root\n\n# Define working directory.\nWORKDIR /root\n\n# Define default command.\nCMD [\"bash\"]\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) Dockerfile Project\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "## Ubuntu Dockerfile\n\n\nThis repository contains **Dockerfile** of [Ubuntu](http://www.ubuntu.com/) for [Docker](https://www.docker.com/)'s [automated build](https://registry.hub.docker.com/u/dockerfile/ubuntu/) published to the public [Docker Hub Registry](https://registry.hub.docker.com/).\n\n\n### Base Docker Image\n\n* [ubuntu:14.04](https://registry.hub.docker.com/u/library/ubuntu/)\n\n\n### Installation\n\n1. Install [Docker](https://www.docker.com/).\n\n2. Download [automated build](https://registry.hub.docker.com/u/dockerfile/ubuntu/) from public [Docker Hub Registry](https://registry.hub.docker.com/): `docker pull dockerfile/ubuntu`\n\n   (alternatively, you can build an image from Dockerfile: `docker build -t=\"dockerfile/ubuntu\" github.com/dockerfile/ubuntu`)\n\n\n### Usage\n\n    docker run -it --rm dockerfile/ubuntu\n"
  },
  {
    "path": "root/.bashrc",
    "content": "alias rm='rm -i'\nalias cp='cp -i'\nalias mv='mv -i'\n\nalias ls='ls -hFG'\nalias l='ls -lF'\nalias ll='ls -alF'\nalias lt='ls -ltrF'\nalias ll='ls -alF'\nalias lls='ls -alSrF'\nalias llt='ls -altrF'\n\nalias tarc='tar cvf'\nalias tarcz='tar czvf'\nalias tarx='tar xvf'\nalias tarxz='tar xvzf'\n\nalias g='git'\nalias less='less -R'\nalias os='lsb_release -a'\nalias vi='vim'\n\n# Colorize directory listing\nalias ls=\"ls -ph --color=auto\"\n\n# Colorize grep\nif echo hello|grep --color=auto l >/dev/null 2>&1; then\n  export GREP_OPTIONS=\"--color=auto\" GREP_COLOR=\"1;31\"\nfi\n\n# Shell\nexport CLICOLOR=\"1\"\nif [ -f $HOME/.scripts/git-prompt.sh ]; then\n  source $HOME/.scripts/git-prompt.sh\n  export GIT_PS1_SHOWDIRTYSTATE=\"1\"\n  export PS1=\"\\[\\033[40m\\]\\[\\033[34m\\][ \\u@\\H:\\[\\033[36m\\]\\w\\$(__git_ps1 \\\" \\[\\033[35m\\]{\\[\\033[32m\\]%s\\[\\033[35m\\]}\\\")\\[\\033[34m\\] ]$\\[\\033[0m\\] \"\nelse\n  export PS1=\"\\[\\033[40m\\]\\[\\033[34m\\][ \\u@\\H:\\[\\033[36m\\]\\w\\[\\033[34m\\] ]$\\[\\033[0m\\] \"\nfi\nexport LS_COLORS=\"di=34:ln=35:so=32:pi=33:ex=1;40:bd=34;40:cd=34;40:su=0;40:sg=0;40:tw=0;40:ow=0;40:\"\n\n# Git\nsource $HOME/.scripts/git-completion.sh\n\n# Z\nsource $HOME/.scripts/z.sh\n"
  },
  {
    "path": "root/.gitconfig",
    "content": "[user]\n  name = \n  email = \n\n[alias]\n  a = add\n  b = branch\n  c = commit\n  co = checkout\n  d = diff\n  e = add --edit\n  f = fetch\n  g = grep\n  h = help\n  i = init\n  l = log --pretty=format:\\\"%h %ad | %s%d [%an]\\\" --graph --date=short\n  ll = log --stat\n  m = merge\n  r = remote\n  s = status --branch --short\n  t = tag\n  w = whatchanged\n\n[core]\n  excludesfile = ~/.gitignore\n  editor = vim\n\n[color]\n  ui = always\n  status = auto\n  branch = auto\n  interactive = auto\n  diff = auto\n\n[merge]\n  tool = vimdiff\n\n[push]\n  default = upstream\n"
  },
  {
    "path": "root/.scripts/git-completion.sh",
    "content": "#!bash\n#\n# bash/zsh completion support for core Git.\n#\n# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>\n# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).\n# Distributed under the GNU General Public License, version 2.0.\n#\n# The contained completion routines provide support for completing:\n#\n#    *) local and remote branch names\n#    *) local and remote tag names\n#    *) .git/remotes file names\n#    *) git 'subcommands'\n#    *) tree paths within 'ref:path/to/file' expressions\n#    *) file paths within current working directory and index\n#    *) common --long-options\n#\n# To use these routines:\n#\n#    1) Copy this file to somewhere (e.g. ~/.git-completion.sh).\n#    2) Add the following line to your .bashrc/.zshrc:\n#        source ~/.git-completion.sh\n#    3) Consider changing your PS1 to also show the current branch,\n#       see git-prompt.sh for details.\n\ncase \"$COMP_WORDBREAKS\" in\n*:*) : great ;;\n*)   COMP_WORDBREAKS=\"$COMP_WORDBREAKS:\"\nesac\n\n# __gitdir accepts 0 or 1 arguments (i.e., location)\n# returns location of .git repo\n__gitdir ()\n{\n  if [ -z \"${1-}\" ]; then\n    if [ -n \"${__git_dir-}\" ]; then\n      echo \"$__git_dir\"\n    elif [ -n \"${GIT_DIR-}\" ]; then\n      test -d \"${GIT_DIR-}\" || return 1\n      echo \"$GIT_DIR\"\n    elif [ -d .git ]; then\n      echo .git\n    else\n      git rev-parse --git-dir 2>/dev/null\n    fi\n  elif [ -d \"$1/.git\" ]; then\n    echo \"$1/.git\"\n  else\n    echo \"$1\"\n  fi\n}\n\n# The following function is based on code from:\n#\n#   bash_completion - programmable completion functions for bash 3.2+\n#\n#   Copyright © 2006-2008, Ian Macdonald <ian@caliban.org>\n#             © 2009-2010, Bash Completion Maintainers\n#                     <bash-completion-devel@lists.alioth.debian.org>\n#\n#   This program is free software; you can redistribute it and/or modify\n#   it under the terms of the GNU General Public License as published by\n#   the Free Software Foundation; either version 2, or (at your option)\n#   any later version.\n#\n#   This program is distributed in the hope that it will be useful,\n#   but WITHOUT ANY WARRANTY; without even the implied warranty of\n#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n#   GNU General Public License for more details.\n#\n#   You should have received a copy of the GNU General Public License\n#   along with this program; if not, write to the Free Software Foundation,\n#   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n#\n#   The latest version of this software can be obtained here:\n#\n#   http://bash-completion.alioth.debian.org/\n#\n#   RELEASE: 2.x\n\n# This function can be used to access a tokenized list of words\n# on the command line:\n#\n# __git_reassemble_comp_words_by_ref '=:'\n# if test \"${words_[cword_-1]}\" = -w\n# then\n#   ...\n# fi\n#\n# The argument should be a collection of characters from the list of\n# word completion separators (COMP_WORDBREAKS) to treat as ordinary\n# characters.\n#\n# This is roughly equivalent to going back in time and setting\n# COMP_WORDBREAKS to exclude those characters.  The intent is to\n# make option types like --date=<type> and <rev>:<path> easy to\n# recognize by treating each shell word as a single token.\n#\n# It is best not to set COMP_WORDBREAKS directly because the value is\n# shared with other completion scripts.  By the time the completion\n# function gets called, COMP_WORDS has already been populated so local\n# changes to COMP_WORDBREAKS have no effect.\n#\n# Output: words_, cword_, cur_.\n\n__git_reassemble_comp_words_by_ref()\n{\n  local exclude i j first\n  # Which word separators to exclude?\n  exclude=\"${1//[^$COMP_WORDBREAKS]}\"\n  cword_=$COMP_CWORD\n  if [ -z \"$exclude\" ]; then\n    words_=(\"${COMP_WORDS[@]}\")\n    return\n  fi\n  # List of word completion separators has shrunk;\n  # re-assemble words to complete.\n  for ((i=0, j=0; i < ${#COMP_WORDS[@]}; i++, j++)); do\n    # Append each nonempty word consisting of just\n    # word separator characters to the current word.\n    first=t\n    while\n      [ $i -gt 0 ] &&\n      [ -n \"${COMP_WORDS[$i]}\" ] &&\n      # word consists of excluded word separators\n      [ \"${COMP_WORDS[$i]//[^$exclude]}\" = \"${COMP_WORDS[$i]}\" ]\n    do\n      # Attach to the previous token,\n      # unless the previous token is the command name.\n      if [ $j -ge 2 ] && [ -n \"$first\" ]; then\n        ((j--))\n      fi\n      first=\n      words_[$j]=${words_[j]}${COMP_WORDS[i]}\n      if [ $i = $COMP_CWORD ]; then\n        cword_=$j\n      fi\n      if (($i < ${#COMP_WORDS[@]} - 1)); then\n        ((i++))\n      else\n        # Done.\n        return\n      fi\n    done\n    words_[$j]=${words_[j]}${COMP_WORDS[i]}\n    if [ $i = $COMP_CWORD ]; then\n      cword_=$j\n    fi\n  done\n}\n\nif ! type _get_comp_words_by_ref >/dev/null 2>&1; then\n_get_comp_words_by_ref ()\n{\n  local exclude cur_ words_ cword_\n  if [ \"$1\" = \"-n\" ]; then\n    exclude=$2\n    shift 2\n  fi\n  __git_reassemble_comp_words_by_ref \"$exclude\"\n  cur_=${words_[cword_]}\n  while [ $# -gt 0 ]; do\n    case \"$1\" in\n    cur)\n      cur=$cur_\n      ;;\n    prev)\n      prev=${words_[$cword_-1]}\n      ;;\n    words)\n      words=(\"${words_[@]}\")\n      ;;\n    cword)\n      cword=$cword_\n      ;;\n    esac\n    shift\n  done\n}\nfi\n\n__gitcompadd ()\n{\n  local i=0\n  for x in $1; do\n    if [[ \"$x\" == \"$3\"* ]]; then\n      COMPREPLY[i++]=\"$2$x$4\"\n    fi\n  done\n}\n\n# Generates completion reply, appending a space to possible completion words,\n# if necessary.\n# It accepts 1 to 4 arguments:\n# 1: List of possible completion words.\n# 2: A prefix to be added to each possible completion word (optional).\n# 3: Generate possible completion matches for this word (optional).\n# 4: A suffix to be appended to each possible completion word (optional).\n__gitcomp ()\n{\n  local cur_=\"${3-$cur}\"\n\n  case \"$cur_\" in\n  --*=)\n    ;;\n  *)\n    local c i=0 IFS=$' \\t\\n'\n    for c in $1; do\n      c=\"$c${4-}\"\n      if [[ $c == \"$cur_\"* ]]; then\n        case $c in\n        --*=*|*.) ;;\n        *) c=\"$c \" ;;\n        esac\n        COMPREPLY[i++]=\"${2-}$c\"\n      fi\n    done\n    ;;\n  esac\n}\n\n# Generates completion reply from newline-separated possible completion words\n# by appending a space to all of them.\n# It accepts 1 to 4 arguments:\n# 1: List of possible completion words, separated by a single newline.\n# 2: A prefix to be added to each possible completion word (optional).\n# 3: Generate possible completion matches for this word (optional).\n# 4: A suffix to be appended to each possible completion word instead of\n#    the default space (optional).  If specified but empty, nothing is\n#    appended.\n__gitcomp_nl ()\n{\n  local IFS=$'\\n'\n  __gitcompadd \"$1\" \"${2-}\" \"${3-$cur}\" \"${4- }\"\n}\n\n# Generates completion reply with compgen from newline-separated possible\n# completion filenames.\n# It accepts 1 to 3 arguments:\n# 1: List of possible completion filenames, separated by a single newline.\n# 2: A directory prefix to be added to each possible completion filename\n#    (optional).\n# 3: Generate possible completion matches for this word (optional).\n__gitcomp_file ()\n{\n  local IFS=$'\\n'\n\n  # XXX does not work when the directory prefix contains a tilde,\n  # since tilde expansion is not applied.\n  # This means that COMPREPLY will be empty and Bash default\n  # completion will be used.\n  __gitcompadd \"$1\" \"${2-}\" \"${3-$cur}\" \"\"\n\n  # use a hack to enable file mode in bash < 4\n  compopt -o filenames +o nospace 2>/dev/null ||\n  compgen -f /non-existing-dir/ > /dev/null\n}\n\n# Execute 'git ls-files', unless the --committable option is specified, in\n# which case it runs 'git diff-index' to find out the files that can be\n# committed.  It return paths relative to the directory specified in the first\n# argument, and using the options specified in the second argument.\n__git_ls_files_helper ()\n{\n  (\n    test -n \"${CDPATH+set}\" && unset CDPATH\n    cd \"$1\"\n    if [ \"$2\" == \"--committable\" ]; then\n      git diff-index --name-only --relative HEAD\n    else\n      # NOTE: $2 is not quoted in order to support multiple options\n      git ls-files --exclude-standard $2\n    fi\n  ) 2>/dev/null\n}\n\n\n# __git_index_files accepts 1 or 2 arguments:\n# 1: Options to pass to ls-files (required).\n# 2: A directory path (optional).\n#    If provided, only files within the specified directory are listed.\n#    Sub directories are never recursed.  Path must have a trailing\n#    slash.\n__git_index_files ()\n{\n  local dir=\"$(__gitdir)\" root=\"${2-.}\" file\n\n  if [ -d \"$dir\" ]; then\n    __git_ls_files_helper \"$root\" \"$1\" |\n    while read -r file; do\n      case \"$file\" in\n      ?*/*) echo \"${file%%/*}\" ;;\n      *) echo \"$file\" ;;\n      esac\n    done | sort | uniq\n  fi\n}\n\n__git_heads ()\n{\n  local dir=\"$(__gitdir)\"\n  if [ -d \"$dir\" ]; then\n    git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n      refs/heads\n    return\n  fi\n}\n\n__git_tags ()\n{\n  local dir=\"$(__gitdir)\"\n  if [ -d \"$dir\" ]; then\n    git --git-dir=\"$dir\" for-each-ref --format='%(refname:short)' \\\n      refs/tags\n    return\n  fi\n}\n\n# __git_refs accepts 0, 1 (to pass to __gitdir), or 2 arguments\n# presence of 2nd argument means use the guess heuristic employed\n# by checkout for tracking branches\n__git_refs ()\n{\n  local i hash dir=\"$(__gitdir \"${1-}\")\" track=\"${2-}\"\n  local format refs\n  if [ -d \"$dir\" ]; then\n    case \"$cur\" in\n    refs|refs/*)\n      format=\"refname\"\n      refs=\"${cur%/*}\"\n      track=\"\"\n      ;;\n    *)\n      for i in HEAD FETCH_HEAD ORIG_HEAD MERGE_HEAD; do\n        if [ -e \"$dir/$i\" ]; then echo $i; fi\n      done\n      format=\"refname:short\"\n      refs=\"refs/tags refs/heads refs/remotes\"\n      ;;\n    esac\n    git --git-dir=\"$dir\" for-each-ref --format=\"%($format)\" \\\n      $refs\n    if [ -n \"$track\" ]; then\n      # employ the heuristic used by git checkout\n      # Try to find a remote branch that matches the completion word\n      # but only output if the branch name is unique\n      local ref entry\n      git --git-dir=\"$dir\" for-each-ref --shell --format=\"ref=%(refname:short)\" \\\n        \"refs/remotes/\" | \\\n      while read -r entry; do\n        eval \"$entry\"\n        ref=\"${ref#*/}\"\n        if [[ \"$ref\" == \"$cur\"* ]]; then\n          echo \"$ref\"\n        fi\n      done | sort | uniq -u\n    fi\n    return\n  fi\n  case \"$cur\" in\n  refs|refs/*)\n    git ls-remote \"$dir\" \"$cur*\" 2>/dev/null | \\\n    while read -r hash i; do\n      case \"$i\" in\n      *^{}) ;;\n      *) echo \"$i\" ;;\n      esac\n    done\n    ;;\n  *)\n    echo \"HEAD\"\n    git for-each-ref --format=\"%(refname:short)\" -- \"refs/remotes/$dir/\" | sed -e \"s#^$dir/##\"\n    ;;\n  esac\n}\n\n# __git_refs2 requires 1 argument (to pass to __git_refs)\n__git_refs2 ()\n{\n  local i\n  for i in $(__git_refs \"$1\"); do\n    echo \"$i:$i\"\n  done\n}\n\n# __git_refs_remotes requires 1 argument (to pass to ls-remote)\n__git_refs_remotes ()\n{\n  local i hash\n  git ls-remote \"$1\" 'refs/heads/*' 2>/dev/null | \\\n  while read -r hash i; do\n    echo \"$i:refs/remotes/$1/${i#refs/heads/}\"\n  done\n}\n\n__git_remotes ()\n{\n  local i IFS=$'\\n' d=\"$(__gitdir)\"\n  test -d \"$d/remotes\" && ls -1 \"$d/remotes\"\n  for i in $(git --git-dir=\"$d\" config --get-regexp 'remote\\..*\\.url' 2>/dev/null); do\n    i=\"${i#remote.}\"\n    echo \"${i/.url*/}\"\n  done\n}\n\n__git_list_merge_strategies ()\n{\n  git merge -s help 2>&1 |\n  sed -n -e '/[Aa]vailable strategies are: /,/^$/{\n    s/\\.$//\n    s/.*://\n    s/^[  ]*//\n    s/[   ]*$//\n    p\n  }'\n}\n\n__git_merge_strategies=\n# 'git merge -s help' (and thus detection of the merge strategy\n# list) fails, unfortunately, if run outside of any git working\n# tree.  __git_merge_strategies is set to the empty string in\n# that case, and the detection will be repeated the next time it\n# is needed.\n__git_compute_merge_strategies ()\n{\n  test -n \"$__git_merge_strategies\" ||\n  __git_merge_strategies=$(__git_list_merge_strategies)\n}\n\n__git_complete_revlist_file ()\n{\n  local pfx ls ref cur_=\"$cur\"\n  case \"$cur_\" in\n  *..?*:*)\n    return\n    ;;\n  ?*:*)\n    ref=\"${cur_%%:*}\"\n    cur_=\"${cur_#*:}\"\n    case \"$cur_\" in\n    ?*/*)\n      pfx=\"${cur_%/*}\"\n      cur_=\"${cur_##*/}\"\n      ls=\"$ref:$pfx\"\n      pfx=\"$pfx/\"\n      ;;\n    *)\n      ls=\"$ref\"\n      ;;\n    esac\n\n    case \"$COMP_WORDBREAKS\" in\n    *:*) : great ;;\n    *)   pfx=\"$ref:$pfx\" ;;\n    esac\n\n    __gitcomp_nl \"$(git --git-dir=\"$(__gitdir)\" ls-tree \"$ls\" 2>/dev/null \\\n        | sed '/^100... blob /{\n                   s,^.*  ,,\n                   s,$, ,\n               }\n               /^120000 blob /{\n                   s,^.*  ,,\n                   s,$, ,\n               }\n               /^040000 tree /{\n                   s,^.*  ,,\n                   s,$,/,\n               }\n               s/^.*  //')\" \\\n      \"$pfx\" \"$cur_\" \"\"\n    ;;\n  *...*)\n    pfx=\"${cur_%...*}...\"\n    cur_=\"${cur_#*...}\"\n    __gitcomp_nl \"$(__git_refs)\" \"$pfx\" \"$cur_\"\n    ;;\n  *..*)\n    pfx=\"${cur_%..*}..\"\n    cur_=\"${cur_#*..}\"\n    __gitcomp_nl \"$(__git_refs)\" \"$pfx\" \"$cur_\"\n    ;;\n  *)\n    __gitcomp_nl \"$(__git_refs)\"\n    ;;\n  esac\n}\n\n\n# __git_complete_index_file requires 1 argument:\n# 1: the options to pass to ls-file\n#\n# The exception is --committable, which finds the files appropriate commit.\n__git_complete_index_file ()\n{\n  local pfx=\"\" cur_=\"$cur\"\n\n  case \"$cur_\" in\n  ?*/*)\n    pfx=\"${cur_%/*}\"\n    cur_=\"${cur_##*/}\"\n    pfx=\"${pfx}/\"\n    ;;\n  esac\n\n  __gitcomp_file \"$(__git_index_files \"$1\" \"$pfx\")\" \"$pfx\" \"$cur_\"\n}\n\n__git_complete_file ()\n{\n  __git_complete_revlist_file\n}\n\n__git_complete_revlist ()\n{\n  __git_complete_revlist_file\n}\n\n__git_complete_remote_or_refspec ()\n{\n  local cur_=\"$cur\" cmd=\"${words[1]}\"\n  local i c=2 remote=\"\" pfx=\"\" lhs=1 no_complete_refspec=0\n  if [ \"$cmd\" = \"remote\" ]; then\n    ((c++))\n  fi\n  while [ $c -lt $cword ]; do\n    i=\"${words[c]}\"\n    case \"$i\" in\n    --mirror) [ \"$cmd\" = \"push\" ] && no_complete_refspec=1 ;;\n    --all)\n      case \"$cmd\" in\n      push) no_complete_refspec=1 ;;\n      fetch)\n        return\n        ;;\n      *) ;;\n      esac\n      ;;\n    -*) ;;\n    *) remote=\"$i\"; break ;;\n    esac\n    ((c++))\n  done\n  if [ -z \"$remote\" ]; then\n    __gitcomp_nl \"$(__git_remotes)\"\n    return\n  fi\n  if [ $no_complete_refspec = 1 ]; then\n    return\n  fi\n  [ \"$remote\" = \".\" ] && remote=\n  case \"$cur_\" in\n  *:*)\n    case \"$COMP_WORDBREAKS\" in\n    *:*) : great ;;\n    *)   pfx=\"${cur_%%:*}:\" ;;\n    esac\n    cur_=\"${cur_#*:}\"\n    lhs=0\n    ;;\n  +*)\n    pfx=\"+\"\n    cur_=\"${cur_#+}\"\n    ;;\n  esac\n  case \"$cmd\" in\n  fetch)\n    if [ $lhs = 1 ]; then\n      __gitcomp_nl \"$(__git_refs2 \"$remote\")\" \"$pfx\" \"$cur_\"\n    else\n      __gitcomp_nl \"$(__git_refs)\" \"$pfx\" \"$cur_\"\n    fi\n    ;;\n  pull|remote)\n    if [ $lhs = 1 ]; then\n      __gitcomp_nl \"$(__git_refs \"$remote\")\" \"$pfx\" \"$cur_\"\n    else\n      __gitcomp_nl \"$(__git_refs)\" \"$pfx\" \"$cur_\"\n    fi\n    ;;\n  push)\n    if [ $lhs = 1 ]; then\n      __gitcomp_nl \"$(__git_refs)\" \"$pfx\" \"$cur_\"\n    else\n      __gitcomp_nl \"$(__git_refs \"$remote\")\" \"$pfx\" \"$cur_\"\n    fi\n    ;;\n  esac\n}\n\n__git_complete_strategy ()\n{\n  __git_compute_merge_strategies\n  case \"$prev\" in\n  -s|--strategy)\n    __gitcomp \"$__git_merge_strategies\"\n    return 0\n  esac\n  case \"$cur\" in\n  --strategy=*)\n    __gitcomp \"$__git_merge_strategies\" \"\" \"${cur##--strategy=}\"\n    return 0\n    ;;\n  esac\n  return 1\n}\n\n__git_commands () {\n  if test -n \"${GIT_TESTING_COMMAND_COMPLETION:-}\"\n  then\n    printf \"%s\" \"${GIT_TESTING_COMMAND_COMPLETION}\"\n  else\n    git help -a|egrep '^  [a-zA-Z0-9]'\n  fi\n}\n\n__git_list_all_commands ()\n{\n  local i IFS=\" \"$'\\n'\n  for i in $(__git_commands)\n  do\n    case $i in\n    *--*)             : helper pattern;;\n    *) echo $i;;\n    esac\n  done\n}\n\n__git_all_commands=\n__git_compute_all_commands ()\n{\n  test -n \"$__git_all_commands\" ||\n  __git_all_commands=$(__git_list_all_commands)\n}\n\n__git_list_porcelain_commands ()\n{\n  local i IFS=\" \"$'\\n'\n  __git_compute_all_commands\n  for i in $__git_all_commands\n  do\n    case $i in\n    *--*)             : helper pattern;;\n    applymbox)        : ask gittus;;\n    applypatch)       : ask gittus;;\n    archimport)       : import;;\n    cat-file)         : plumbing;;\n    check-attr)       : plumbing;;\n    check-ignore)     : plumbing;;\n    check-mailmap)    : plumbing;;\n    check-ref-format) : plumbing;;\n    checkout-index)   : plumbing;;\n    commit-tree)      : plumbing;;\n    count-objects)    : infrequent;;\n    credential-cache) : credentials helper;;\n    credential-store) : credentials helper;;\n    cvsexportcommit)  : export;;\n    cvsimport)        : import;;\n    cvsserver)        : daemon;;\n    daemon)           : daemon;;\n    diff-files)       : plumbing;;\n    diff-index)       : plumbing;;\n    diff-tree)        : plumbing;;\n    fast-import)      : import;;\n    fast-export)      : export;;\n    fsck-objects)     : plumbing;;\n    fetch-pack)       : plumbing;;\n    fmt-merge-msg)    : plumbing;;\n    for-each-ref)     : plumbing;;\n    hash-object)      : plumbing;;\n    http-*)           : transport;;\n    index-pack)       : plumbing;;\n    init-db)          : deprecated;;\n    local-fetch)      : plumbing;;\n    lost-found)       : infrequent;;\n    ls-files)         : plumbing;;\n    ls-remote)        : plumbing;;\n    ls-tree)          : plumbing;;\n    mailinfo)         : plumbing;;\n    mailsplit)        : plumbing;;\n    merge-*)          : plumbing;;\n    mktree)           : plumbing;;\n    mktag)            : plumbing;;\n    pack-objects)     : plumbing;;\n    pack-redundant)   : plumbing;;\n    pack-refs)        : plumbing;;\n    parse-remote)     : plumbing;;\n    patch-id)         : plumbing;;\n    peek-remote)      : plumbing;;\n    prune)            : plumbing;;\n    prune-packed)     : plumbing;;\n    quiltimport)      : import;;\n    read-tree)        : plumbing;;\n    receive-pack)     : plumbing;;\n    remote-*)         : transport;;\n    repo-config)      : deprecated;;\n    rerere)           : plumbing;;\n    rev-list)         : plumbing;;\n    rev-parse)        : plumbing;;\n    runstatus)        : plumbing;;\n    sh-setup)         : internal;;\n    shell)            : daemon;;\n    show-ref)         : plumbing;;\n    send-pack)        : plumbing;;\n    show-index)       : plumbing;;\n    ssh-*)            : transport;;\n    stripspace)       : plumbing;;\n    symbolic-ref)     : plumbing;;\n    tar-tree)         : deprecated;;\n    unpack-file)      : plumbing;;\n    unpack-objects)   : plumbing;;\n    update-index)     : plumbing;;\n    update-ref)       : plumbing;;\n    update-server-info) : daemon;;\n    upload-archive)   : plumbing;;\n    upload-pack)      : plumbing;;\n    write-tree)       : plumbing;;\n    var)              : infrequent;;\n    verify-pack)      : infrequent;;\n    verify-tag)       : plumbing;;\n    *) echo $i;;\n    esac\n  done\n}\n\n__git_porcelain_commands=\n__git_compute_porcelain_commands ()\n{\n  __git_compute_all_commands\n  test -n \"$__git_porcelain_commands\" ||\n  __git_porcelain_commands=$(__git_list_porcelain_commands)\n}\n\n__git_pretty_aliases ()\n{\n  local i IFS=$'\\n'\n  for i in $(git --git-dir=\"$(__gitdir)\" config --get-regexp \"pretty\\..*\" 2>/dev/null); do\n    case \"$i\" in\n    pretty.*)\n      i=\"${i#pretty.}\"\n      echo \"${i/ */}\"\n      ;;\n    esac\n  done\n}\n\n__git_aliases ()\n{\n  local i IFS=$'\\n'\n  for i in $(git --git-dir=\"$(__gitdir)\" config --get-regexp \"alias\\..*\" 2>/dev/null); do\n    case \"$i\" in\n    alias.*)\n      i=\"${i#alias.}\"\n      echo \"${i/ */}\"\n      ;;\n    esac\n  done\n}\n\n# __git_aliased_command requires 1 argument\n__git_aliased_command ()\n{\n  local word cmdline=$(git --git-dir=\"$(__gitdir)\" \\\n    config --get \"alias.$1\")\n  for word in $cmdline; do\n    case \"$word\" in\n    \\!gitk|gitk)\n      echo \"gitk\"\n      return\n      ;;\n    \\!*)  : shell command alias ;;\n    -*) : option ;;\n    *=*)  : setting env ;;\n    git)  : git itself ;;\n    *)\n      echo \"$word\"\n      return\n    esac\n  done\n}\n\n# __git_find_on_cmdline requires 1 argument\n__git_find_on_cmdline ()\n{\n  local word subcommand c=1\n  while [ $c -lt $cword ]; do\n    word=\"${words[c]}\"\n    for subcommand in $1; do\n      if [ \"$subcommand\" = \"$word\" ]; then\n        echo \"$subcommand\"\n        return\n      fi\n    done\n    ((c++))\n  done\n}\n\n__git_has_doubledash ()\n{\n  local c=1\n  while [ $c -lt $cword ]; do\n    if [ \"--\" = \"${words[c]}\" ]; then\n      return 0\n    fi\n    ((c++))\n  done\n  return 1\n}\n\n# Try to count non option arguments passed on the command line for the\n# specified git command.\n# When options are used, it is necessary to use the special -- option to\n# tell the implementation were non option arguments begin.\n# XXX this can not be improved, since options can appear everywhere, as\n# an example:\n# git mv x -n y\n#\n# __git_count_arguments requires 1 argument: the git command executed.\n__git_count_arguments ()\n{\n  local word i c=0\n\n  # Skip \"git\" (first argument)\n  for ((i=1; i < ${#words[@]}; i++)); do\n    word=\"${words[i]}\"\n\n    case \"$word\" in\n      --)\n        # Good; we can assume that the following are only non\n        # option arguments.\n        ((c = 0))\n        ;;\n      \"$1\")\n        # Skip the specified git command and discard git\n        # main options\n        ((c = 0))\n        ;;\n      ?*)\n        ((c++))\n        ;;\n    esac\n  done\n\n  printf \"%d\" $c\n}\n\n__git_whitespacelist=\"nowarn warn error error-all fix\"\n\n_git_am ()\n{\n  local dir=\"$(__gitdir)\"\n  if [ -d \"$dir\"/rebase-apply ]; then\n    __gitcomp \"--skip --continue --resolved --abort\"\n    return\n  fi\n  case \"$cur\" in\n  --whitespace=*)\n    __gitcomp \"$__git_whitespacelist\" \"\" \"${cur##--whitespace=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      --3way --committer-date-is-author-date --ignore-date\n      --ignore-whitespace --ignore-space-change\n      --interactive --keep --no-utf8 --signoff --utf8\n      --whitespace= --scissors\n      \"\n    return\n  esac\n}\n\n_git_apply ()\n{\n  case \"$cur\" in\n  --whitespace=*)\n    __gitcomp \"$__git_whitespacelist\" \"\" \"${cur##--whitespace=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      --stat --numstat --summary --check --index\n      --cached --index-info --reverse --reject --unidiff-zero\n      --apply --no-add --exclude=\n      --ignore-whitespace --ignore-space-change\n      --whitespace= --inaccurate-eof --verbose\n      \"\n    return\n  esac\n}\n\n_git_add ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --interactive --refresh --patch --update --dry-run\n      --ignore-errors --intent-to-add\n      \"\n    return\n  esac\n\n  # XXX should we check for --update and --all options ?\n  __git_complete_index_file \"--others --modified\"\n}\n\n_git_archive ()\n{\n  case \"$cur\" in\n  --format=*)\n    __gitcomp \"$(git archive --list)\" \"\" \"${cur##--format=}\"\n    return\n    ;;\n  --remote=*)\n    __gitcomp_nl \"$(__git_remotes)\" \"\" \"${cur##--remote=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      --format= --list --verbose\n      --prefix= --remote= --exec=\n      \"\n    return\n    ;;\n  esac\n  __git_complete_file\n}\n\n_git_bisect ()\n{\n  __git_has_doubledash && return\n\n  local subcommands=\"start bad good skip reset visualize replay log run\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    if [ -f \"$(__gitdir)\"/BISECT_START ]; then\n      __gitcomp \"$subcommands\"\n    else\n      __gitcomp \"replay start\"\n    fi\n    return\n  fi\n\n  case \"$subcommand\" in\n  bad|good|reset|skip|start)\n    __gitcomp_nl \"$(__git_refs)\"\n    ;;\n  *)\n    ;;\n  esac\n}\n\n_git_branch ()\n{\n  local i c=1 only_local_ref=\"n\" has_r=\"n\"\n\n  while [ $c -lt $cword ]; do\n    i=\"${words[c]}\"\n    case \"$i\" in\n    -d|-m)  only_local_ref=\"y\" ;;\n    -r) has_r=\"y\" ;;\n    esac\n    ((c++))\n  done\n\n  case \"$cur\" in\n  --set-upstream-to=*)\n    __gitcomp \"$(__git_refs)\" \"\" \"${cur##--set-upstream-to=}\"\n    ;;\n  --*)\n    __gitcomp \"\n      --color --no-color --verbose --abbrev= --no-abbrev\n      --track --no-track --contains --merged --no-merged\n      --set-upstream-to= --edit-description --list\n      --unset-upstream\n      \"\n    ;;\n  *)\n    if [ $only_local_ref = \"y\" -a $has_r = \"n\" ]; then\n      __gitcomp_nl \"$(__git_heads)\"\n    else\n      __gitcomp_nl \"$(__git_refs)\"\n    fi\n    ;;\n  esac\n}\n\n_git_bundle ()\n{\n  local cmd=\"${words[2]}\"\n  case \"$cword\" in\n  2)\n    __gitcomp \"create list-heads verify unbundle\"\n    ;;\n  3)\n    # looking for a file\n    ;;\n  *)\n    case \"$cmd\" in\n      create)\n        __git_complete_revlist\n      ;;\n    esac\n    ;;\n  esac\n}\n\n_git_checkout ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --conflict=*)\n    __gitcomp \"diff3 merge\" \"\" \"${cur##--conflict=}\"\n    ;;\n  --*)\n    __gitcomp \"\n      --quiet --ours --theirs --track --no-track --merge\n      --conflict= --orphan --patch\n      \"\n    ;;\n  *)\n    # check if --track, --no-track, or --no-guess was specified\n    # if so, disable DWIM mode\n    local flags=\"--track --no-track --no-guess\" track=1\n    if [ -n \"$(__git_find_on_cmdline \"$flags\")\" ]; then\n      track=''\n    fi\n    __gitcomp_nl \"$(__git_refs '' $track)\"\n    ;;\n  esac\n}\n\n_git_cherry ()\n{\n  __gitcomp \"$(__git_refs)\"\n}\n\n_git_cherry_pick ()\n{\n  local dir=\"$(__gitdir)\"\n  if [ -f \"$dir\"/CHERRY_PICK_HEAD ]; then\n    __gitcomp \"--continue --quit --abort\"\n    return\n  fi\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--edit --no-commit --signoff --strategy= --mainline\"\n    ;;\n  *)\n    __gitcomp_nl \"$(__git_refs)\"\n    ;;\n  esac\n}\n\n_git_clean ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--dry-run --quiet\"\n    return\n    ;;\n  esac\n\n  # XXX should we check for -x option ?\n  __git_complete_index_file \"--others\"\n}\n\n_git_clone ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --local\n      --no-hardlinks\n      --shared\n      --reference\n      --quiet\n      --no-checkout\n      --bare\n      --mirror\n      --origin\n      --upload-pack\n      --template=\n      --depth\n      --single-branch\n      --branch\n      \"\n    return\n    ;;\n  esac\n}\n\n_git_commit ()\n{\n  case \"$prev\" in\n  -c|-C)\n    __gitcomp_nl \"$(__git_refs)\" \"\" \"${cur}\"\n    return\n    ;;\n  esac\n\n  case \"$cur\" in\n  --cleanup=*)\n    __gitcomp \"default strip verbatim whitespace\n      \" \"\" \"${cur##--cleanup=}\"\n    return\n    ;;\n  --reuse-message=*|--reedit-message=*|\\\n  --fixup=*|--squash=*)\n    __gitcomp_nl \"$(__git_refs)\" \"\" \"${cur#*=}\"\n    return\n    ;;\n  --untracked-files=*)\n    __gitcomp \"all no normal\" \"\" \"${cur##--untracked-files=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      --all --author= --signoff --verify --no-verify\n      --edit --no-edit\n      --amend --include --only --interactive\n      --dry-run --reuse-message= --reedit-message=\n      --reset-author --file= --message= --template=\n      --cleanup= --untracked-files --untracked-files=\n      --verbose --quiet --fixup= --squash=\n      \"\n    return\n  esac\n\n  if git rev-parse --verify --quiet HEAD >/dev/null; then\n    __git_complete_index_file \"--committable\"\n  else\n    # This is the first commit\n    __git_complete_index_file \"--cached\"\n  fi\n}\n\n_git_describe ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --all --tags --contains --abbrev= --candidates=\n      --exact-match --debug --long --match --always\n      \"\n    return\n  esac\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n__git_diff_algorithms=\"myers minimal patience histogram\"\n\n__git_diff_common_options=\"--stat --numstat --shortstat --summary\n      --patch-with-stat --name-only --name-status --color\n      --no-color --color-words --no-renames --check\n      --full-index --binary --abbrev --diff-filter=\n      --find-copies-harder\n      --text --ignore-space-at-eol --ignore-space-change\n      --ignore-all-space --exit-code --quiet --ext-diff\n      --no-ext-diff\n      --no-prefix --src-prefix= --dst-prefix=\n      --inter-hunk-context=\n      --patience --histogram --minimal\n      --raw --word-diff\n      --dirstat --dirstat= --dirstat-by-file\n      --dirstat-by-file= --cumulative\n      --diff-algorithm=\n\"\n\n_git_diff ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --diff-algorithm=*)\n    __gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"--cached --staged --pickaxe-all --pickaxe-regex\n      --base --ours --theirs --no-index\n      $__git_diff_common_options\n      \"\n    return\n    ;;\n  esac\n  __git_complete_revlist_file\n}\n\n__git_mergetools_common=\"diffuse ecmerge emerge kdiff3 meld opendiff\n      tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare\n\"\n\n_git_difftool ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --tool=*)\n    __gitcomp \"$__git_mergetools_common kompare\" \"\" \"${cur##--tool=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"--cached --staged --pickaxe-all --pickaxe-regex\n      --base --ours --theirs\n      --no-renames --diff-filter= --find-copies-harder\n      --relative --ignore-submodules\n      --tool=\"\n    return\n    ;;\n  esac\n  __git_complete_revlist_file\n}\n\n__git_fetch_options=\"\n  --quiet --verbose --append --upload-pack --force --keep --depth=\n  --tags --no-tags --all --prune --dry-run\n\"\n\n_git_fetch ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"$__git_fetch_options\"\n    return\n    ;;\n  esac\n  __git_complete_remote_or_refspec\n}\n\n__git_format_patch_options=\"\n  --stdout --attach --no-attach --thread --thread= --no-thread\n  --numbered --start-number --numbered-files --keep-subject --signoff\n  --signature --no-signature --in-reply-to= --cc= --full-index --binary\n  --not --all --cover-letter --no-prefix --src-prefix= --dst-prefix=\n  --inline --suffix= --ignore-if-in-upstream --subject-prefix=\n  --output-directory --reroll-count --to= --quiet --notes\n\"\n\n_git_format_patch ()\n{\n  case \"$cur\" in\n  --thread=*)\n    __gitcomp \"\n      deep shallow\n      \" \"\" \"${cur##--thread=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"$__git_format_patch_options\"\n    return\n    ;;\n  esac\n  __git_complete_revlist\n}\n\n_git_fsck ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --tags --root --unreachable --cache --no-reflogs --full\n      --strict --verbose --lost-found\n      \"\n    return\n    ;;\n  esac\n}\n\n_git_gc ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--prune --aggressive\"\n    return\n    ;;\n  esac\n}\n\n_git_gitk ()\n{\n  _gitk\n}\n\n__git_match_ctag() {\n  awk \"/^${1////\\\\/}/ { print \\$1 }\" \"$2\"\n}\n\n_git_grep ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --cached\n      --text --ignore-case --word-regexp --invert-match\n      --full-name --line-number\n      --extended-regexp --basic-regexp --fixed-strings\n      --perl-regexp\n      --files-with-matches --name-only\n      --files-without-match\n      --max-depth\n      --count\n      --and --or --not --all-match\n      \"\n    return\n    ;;\n  esac\n\n  case \"$cword,$prev\" in\n  2,*|*,-*)\n    if test -r tags; then\n      __gitcomp_nl \"$(__git_match_ctag \"$cur\" tags)\"\n      return\n    fi\n    ;;\n  esac\n\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_help ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--all --info --man --web\"\n    return\n    ;;\n  esac\n  __git_compute_all_commands\n  __gitcomp \"$__git_all_commands $(__git_aliases)\n    attributes cli core-tutorial cvs-migration\n    diffcore gitk glossary hooks ignore modules\n    namespaces repository-layout tutorial tutorial-2\n    workflows\n    \"\n}\n\n_git_init ()\n{\n  case \"$cur\" in\n  --shared=*)\n    __gitcomp \"\n      false true umask group all world everybody\n      \" \"\" \"${cur##--shared=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"--quiet --bare --template= --shared --shared=\"\n    return\n    ;;\n  esac\n}\n\n_git_ls_files ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--cached --deleted --modified --others --ignored\n      --stage --directory --no-empty-directory --unmerged\n      --killed --exclude= --exclude-from=\n      --exclude-per-directory= --exclude-standard\n      --error-unmatch --with-tree= --full-name\n      --abbrev --ignored --exclude-per-directory\n      \"\n    return\n    ;;\n  esac\n\n  # XXX ignore options like --modified and always suggest all cached\n  # files.\n  __git_complete_index_file \"--cached\"\n}\n\n_git_ls_remote ()\n{\n  __gitcomp_nl \"$(__git_remotes)\"\n}\n\n_git_ls_tree ()\n{\n  __git_complete_file\n}\n\n# Options that go well for log, shortlog and gitk\n__git_log_common_options=\"\n  --not --all\n  --branches --tags --remotes\n  --first-parent --merges --no-merges\n  --max-count=\n  --max-age= --since= --after=\n  --min-age= --until= --before=\n  --min-parents= --max-parents=\n  --no-min-parents --no-max-parents\n\"\n# Options that go well for log and gitk (not shortlog)\n__git_log_gitk_options=\"\n  --dense --sparse --full-history\n  --simplify-merges --simplify-by-decoration\n  --left-right --notes --no-notes\n\"\n# Options that go well for log and shortlog (not gitk)\n__git_log_shortlog_options=\"\n  --author= --committer= --grep=\n  --all-match\n\"\n\n__git_log_pretty_formats=\"oneline short medium full fuller email raw format:\"\n__git_log_date_formats=\"relative iso8601 rfc2822 short local default raw\"\n\n_git_log ()\n{\n  __git_has_doubledash && return\n\n  local g=\"$(git rev-parse --git-dir 2>/dev/null)\"\n  local merge=\"\"\n  if [ -f \"$g/MERGE_HEAD\" ]; then\n    merge=\"--merge\"\n  fi\n  case \"$cur\" in\n  --pretty=*|--format=*)\n    __gitcomp \"$__git_log_pretty_formats $(__git_pretty_aliases)\n      \" \"\" \"${cur#*=}\"\n    return\n    ;;\n  --date=*)\n    __gitcomp \"$__git_log_date_formats\" \"\" \"${cur##--date=}\"\n    return\n    ;;\n  --decorate=*)\n    __gitcomp \"long short\" \"\" \"${cur##--decorate=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      $__git_log_common_options\n      $__git_log_shortlog_options\n      $__git_log_gitk_options\n      --root --topo-order --date-order --reverse\n      --follow --full-diff\n      --abbrev-commit --abbrev=\n      --relative-date --date=\n      --pretty= --format= --oneline\n      --cherry-pick\n      --graph\n      --decorate --decorate=\n      --walk-reflogs\n      --parents --children\n      $merge\n      $__git_diff_common_options\n      --pickaxe-all --pickaxe-regex\n      \"\n    return\n    ;;\n  esac\n  __git_complete_revlist\n}\n\n__git_merge_options=\"\n  --no-commit --no-stat --log --no-log --squash --strategy\n  --commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit\n\"\n\n_git_merge ()\n{\n  __git_complete_strategy && return\n\n  case \"$cur\" in\n  --*)\n    __gitcomp \"$__git_merge_options\"\n    return\n  esac\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_mergetool ()\n{\n  case \"$cur\" in\n  --tool=*)\n    __gitcomp \"$__git_mergetools_common tortoisemerge\" \"\" \"${cur##--tool=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"--tool=\"\n    return\n    ;;\n  esac\n}\n\n_git_merge_base ()\n{\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_mv ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--dry-run\"\n    return\n    ;;\n  esac\n\n  if [ $(__git_count_arguments \"mv\") -gt 0 ]; then\n    # We need to show both cached and untracked files (including\n    # empty directories) since this may not be the last argument.\n    __git_complete_index_file \"--cached --others --directory\"\n  else\n    __git_complete_index_file \"--cached\"\n  fi\n}\n\n_git_name_rev ()\n{\n  __gitcomp \"--tags --all --stdin\"\n}\n\n_git_notes ()\n{\n  local subcommands='add append copy edit list prune remove show'\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n  case \"$subcommand,$cur\" in\n  ,--*)\n    __gitcomp '--ref'\n    ;;\n  ,*)\n    case \"$prev\" in\n    --ref)\n      __gitcomp_nl \"$(__git_refs)\"\n      ;;\n    *)\n      __gitcomp \"$subcommands --ref\"\n      ;;\n    esac\n    ;;\n  add,--reuse-message=*|append,--reuse-message=*|\\\n  add,--reedit-message=*|append,--reedit-message=*)\n    __gitcomp_nl \"$(__git_refs)\" \"\" \"${cur#*=}\"\n    ;;\n  add,--*|append,--*)\n    __gitcomp '--file= --message= --reedit-message=\n        --reuse-message='\n    ;;\n  copy,--*)\n    __gitcomp '--stdin'\n    ;;\n  prune,--*)\n    __gitcomp '--dry-run --verbose'\n    ;;\n  prune,*)\n    ;;\n  *)\n    case \"$prev\" in\n    -m|-F)\n      ;;\n    *)\n      __gitcomp_nl \"$(__git_refs)\"\n      ;;\n    esac\n    ;;\n  esac\n}\n\n_git_pull ()\n{\n  __git_complete_strategy && return\n\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --rebase --no-rebase\n      $__git_merge_options\n      $__git_fetch_options\n    \"\n    return\n    ;;\n  esac\n  __git_complete_remote_or_refspec\n}\n\n_git_push ()\n{\n  case \"$prev\" in\n  --repo)\n    __gitcomp_nl \"$(__git_remotes)\"\n    return\n  esac\n  case \"$cur\" in\n  --repo=*)\n    __gitcomp_nl \"$(__git_remotes)\" \"\" \"${cur##--repo=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      --all --mirror --tags --dry-run --force --verbose\n      --receive-pack= --repo= --set-upstream\n    \"\n    return\n    ;;\n  esac\n  __git_complete_remote_or_refspec\n}\n\n_git_rebase ()\n{\n  local dir=\"$(__gitdir)\"\n  if [ -d \"$dir\"/rebase-apply ] || [ -d \"$dir\"/rebase-merge ]; then\n    __gitcomp \"--continue --skip --abort\"\n    return\n  fi\n  __git_complete_strategy && return\n  case \"$cur\" in\n  --whitespace=*)\n    __gitcomp \"$__git_whitespacelist\" \"\" \"${cur##--whitespace=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"\n      --onto --merge --strategy --interactive\n      --preserve-merges --stat --no-stat\n      --committer-date-is-author-date --ignore-date\n      --ignore-whitespace --whitespace=\n      --autosquash\n      \"\n\n    return\n  esac\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_reflog ()\n{\n  local subcommands=\"show delete expire\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n  else\n    __gitcomp_nl \"$(__git_refs)\"\n  fi\n}\n\n__git_send_email_confirm_options=\"always never auto cc compose\"\n__git_send_email_suppresscc_options=\"author self cc bodycc sob cccmd body all\"\n\n_git_send_email ()\n{\n  case \"$cur\" in\n  --confirm=*)\n    __gitcomp \"\n      $__git_send_email_confirm_options\n      \" \"\" \"${cur##--confirm=}\"\n    return\n    ;;\n  --suppress-cc=*)\n    __gitcomp \"\n      $__git_send_email_suppresscc_options\n      \" \"\" \"${cur##--suppress-cc=}\"\n\n    return\n    ;;\n  --smtp-encryption=*)\n    __gitcomp \"ssl tls\" \"\" \"${cur##--smtp-encryption=}\"\n    return\n    ;;\n  --thread=*)\n    __gitcomp \"\n      deep shallow\n      \" \"\" \"${cur##--thread=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"--annotate --bcc --cc --cc-cmd --chain-reply-to\n      --compose --confirm= --dry-run --envelope-sender\n      --from --identity\n      --in-reply-to --no-chain-reply-to --no-signed-off-by-cc\n      --no-suppress-from --no-thread --quiet\n      --signed-off-by-cc --smtp-pass --smtp-server\n      --smtp-server-port --smtp-encryption= --smtp-user\n      --subject --suppress-cc= --suppress-from --thread --to\n      --validate --no-validate\n      $__git_format_patch_options\"\n    return\n    ;;\n  esac\n  __git_complete_revlist\n}\n\n_git_stage ()\n{\n  _git_add\n}\n\n__git_config_get_set_variables ()\n{\n  local prevword word config_file= c=$cword\n  while [ $c -gt 1 ]; do\n    word=\"${words[c]}\"\n    case \"$word\" in\n    --system|--global|--local|--file=*)\n      config_file=\"$word\"\n      break\n      ;;\n    -f|--file)\n      config_file=\"$word $prevword\"\n      break\n      ;;\n    esac\n    prevword=$word\n    c=$((--c))\n  done\n\n  git --git-dir=\"$(__gitdir)\" config $config_file --list 2>/dev/null |\n  while read -r line\n  do\n    case \"$line\" in\n    *.*=*)\n      echo \"${line/=*/}\"\n      ;;\n    esac\n  done\n}\n\n_git_config ()\n{\n  case \"$prev\" in\n  branch.*.remote|branch.*.pushremote)\n    __gitcomp_nl \"$(__git_remotes)\"\n    return\n    ;;\n  branch.*.merge)\n    __gitcomp_nl \"$(__git_refs)\"\n    return\n    ;;\n  branch.*.rebase)\n    __gitcomp \"false true\"\n    return\n    ;;\n  remote.pushdefault)\n    __gitcomp_nl \"$(__git_remotes)\"\n    return\n    ;;\n  remote.*.fetch)\n    local remote=\"${prev#remote.}\"\n    remote=\"${remote%.fetch}\"\n    if [ -z \"$cur\" ]; then\n      __gitcomp_nl \"refs/heads/\" \"\" \"\" \"\"\n      return\n    fi\n    __gitcomp_nl \"$(__git_refs_remotes \"$remote\")\"\n    return\n    ;;\n  remote.*.push)\n    local remote=\"${prev#remote.}\"\n    remote=\"${remote%.push}\"\n    __gitcomp_nl \"$(git --git-dir=\"$(__gitdir)\" \\\n      for-each-ref --format='%(refname):%(refname)' \\\n      refs/heads)\"\n    return\n    ;;\n  pull.twohead|pull.octopus)\n    __git_compute_merge_strategies\n    __gitcomp \"$__git_merge_strategies\"\n    return\n    ;;\n  color.branch|color.diff|color.interactive|\\\n  color.showbranch|color.status|color.ui)\n    __gitcomp \"always never auto\"\n    return\n    ;;\n  color.pager)\n    __gitcomp \"false true\"\n    return\n    ;;\n  color.*.*)\n    __gitcomp \"\n      normal black red green yellow blue magenta cyan white\n      bold dim ul blink reverse\n      \"\n    return\n    ;;\n  diff.submodule)\n    __gitcomp \"log short\"\n    return\n    ;;\n  help.format)\n    __gitcomp \"man info web html\"\n    return\n    ;;\n  log.date)\n    __gitcomp \"$__git_log_date_formats\"\n    return\n    ;;\n  sendemail.aliasesfiletype)\n    __gitcomp \"mutt mailrc pine elm gnus\"\n    return\n    ;;\n  sendemail.confirm)\n    __gitcomp \"$__git_send_email_confirm_options\"\n    return\n    ;;\n  sendemail.suppresscc)\n    __gitcomp \"$__git_send_email_suppresscc_options\"\n    return\n    ;;\n  --get|--get-all|--unset|--unset-all)\n    __gitcomp_nl \"$(__git_config_get_set_variables)\"\n    return\n    ;;\n  *.*)\n    return\n    ;;\n  esac\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --system --global --local --file=\n      --list --replace-all\n      --get --get-all --get-regexp\n      --add --unset --unset-all\n      --remove-section --rename-section\n      \"\n    return\n    ;;\n  branch.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"remote pushremote merge mergeoptions rebase\" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  branch.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur#*.}\"\n    __gitcomp_nl \"$(__git_heads)\" \"$pfx\" \"$cur_\" \".\"\n    return\n    ;;\n  guitool.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"\n      argprompt cmd confirm needsfile noconsole norescan\n      prompt revprompt revunmerged title\n      \" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  difftool.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"cmd path\" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  man.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"cmd path\" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  mergetool.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"cmd path trustExitCode\" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  pager.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur#*.}\"\n    __git_compute_all_commands\n    __gitcomp_nl \"$__git_all_commands\" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  remote.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"\n      url proxy fetch push mirror skipDefaultUpdate\n      receivepack uploadpack tagopt pushurl\n      \" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  remote.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur#*.}\"\n    __gitcomp_nl \"$(__git_remotes)\" \"$pfx\" \"$cur_\" \".\"\n    return\n    ;;\n  url.*.*)\n    local pfx=\"${cur%.*}.\" cur_=\"${cur##*.}\"\n    __gitcomp \"insteadOf pushInsteadOf\" \"$pfx\" \"$cur_\"\n    return\n    ;;\n  esac\n  __gitcomp \"\n    add.ignoreErrors\n    advice.commitBeforeMerge\n    advice.detachedHead\n    advice.implicitIdentity\n    advice.pushNonFastForward\n    advice.resolveConflict\n    advice.statusHints\n    alias.\n    am.keepcr\n    apply.ignorewhitespace\n    apply.whitespace\n    branch.autosetupmerge\n    branch.autosetuprebase\n    browser.\n    clean.requireForce\n    color.branch\n    color.branch.current\n    color.branch.local\n    color.branch.plain\n    color.branch.remote\n    color.decorate.HEAD\n    color.decorate.branch\n    color.decorate.remoteBranch\n    color.decorate.stash\n    color.decorate.tag\n    color.diff\n    color.diff.commit\n    color.diff.frag\n    color.diff.func\n    color.diff.meta\n    color.diff.new\n    color.diff.old\n    color.diff.plain\n    color.diff.whitespace\n    color.grep\n    color.grep.context\n    color.grep.filename\n    color.grep.function\n    color.grep.linenumber\n    color.grep.match\n    color.grep.selected\n    color.grep.separator\n    color.interactive\n    color.interactive.error\n    color.interactive.header\n    color.interactive.help\n    color.interactive.prompt\n    color.pager\n    color.showbranch\n    color.status\n    color.status.added\n    color.status.changed\n    color.status.header\n    color.status.nobranch\n    color.status.untracked\n    color.status.updated\n    color.ui\n    commit.status\n    commit.template\n    core.abbrev\n    core.askpass\n    core.attributesfile\n    core.autocrlf\n    core.bare\n    core.bigFileThreshold\n    core.compression\n    core.createObject\n    core.deltaBaseCacheLimit\n    core.editor\n    core.eol\n    core.excludesfile\n    core.fileMode\n    core.fsyncobjectfiles\n    core.gitProxy\n    core.ignoreStat\n    core.ignorecase\n    core.logAllRefUpdates\n    core.loosecompression\n    core.notesRef\n    core.packedGitLimit\n    core.packedGitWindowSize\n    core.pager\n    core.preferSymlinkRefs\n    core.preloadindex\n    core.quotepath\n    core.repositoryFormatVersion\n    core.safecrlf\n    core.sharedRepository\n    core.sparseCheckout\n    core.symlinks\n    core.trustctime\n    core.warnAmbiguousRefs\n    core.whitespace\n    core.worktree\n    diff.autorefreshindex\n    diff.external\n    diff.ignoreSubmodules\n    diff.mnemonicprefix\n    diff.noprefix\n    diff.renameLimit\n    diff.renames\n    diff.statGraphWidth\n    diff.submodule\n    diff.suppressBlankEmpty\n    diff.tool\n    diff.wordRegex\n    diff.algorithm\n    difftool.\n    difftool.prompt\n    fetch.recurseSubmodules\n    fetch.unpackLimit\n    format.attach\n    format.cc\n    format.headers\n    format.numbered\n    format.pretty\n    format.signature\n    format.signoff\n    format.subjectprefix\n    format.suffix\n    format.thread\n    format.to\n    gc.\n    gc.aggressiveWindow\n    gc.auto\n    gc.autopacklimit\n    gc.packrefs\n    gc.pruneexpire\n    gc.reflogexpire\n    gc.reflogexpireunreachable\n    gc.rerereresolved\n    gc.rerereunresolved\n    gitcvs.allbinary\n    gitcvs.commitmsgannotation\n    gitcvs.dbTableNamePrefix\n    gitcvs.dbdriver\n    gitcvs.dbname\n    gitcvs.dbpass\n    gitcvs.dbuser\n    gitcvs.enabled\n    gitcvs.logfile\n    gitcvs.usecrlfattr\n    guitool.\n    gui.blamehistoryctx\n    gui.commitmsgwidth\n    gui.copyblamethreshold\n    gui.diffcontext\n    gui.encoding\n    gui.fastcopyblame\n    gui.matchtrackingbranch\n    gui.newbranchtemplate\n    gui.pruneduringfetch\n    gui.spellingdictionary\n    gui.trustmtime\n    help.autocorrect\n    help.browser\n    help.format\n    http.lowSpeedLimit\n    http.lowSpeedTime\n    http.maxRequests\n    http.minSessions\n    http.noEPSV\n    http.postBuffer\n    http.proxy\n    http.sslCAInfo\n    http.sslCAPath\n    http.sslCert\n    http.sslCertPasswordProtected\n    http.sslKey\n    http.sslVerify\n    http.useragent\n    i18n.commitEncoding\n    i18n.logOutputEncoding\n    imap.authMethod\n    imap.folder\n    imap.host\n    imap.pass\n    imap.port\n    imap.preformattedHTML\n    imap.sslverify\n    imap.tunnel\n    imap.user\n    init.templatedir\n    instaweb.browser\n    instaweb.httpd\n    instaweb.local\n    instaweb.modulepath\n    instaweb.port\n    interactive.singlekey\n    log.date\n    log.decorate\n    log.showroot\n    mailmap.file\n    man.\n    man.viewer\n    merge.\n    merge.conflictstyle\n    merge.log\n    merge.renameLimit\n    merge.renormalize\n    merge.stat\n    merge.tool\n    merge.verbosity\n    mergetool.\n    mergetool.keepBackup\n    mergetool.keepTemporaries\n    mergetool.prompt\n    notes.displayRef\n    notes.rewrite.\n    notes.rewrite.amend\n    notes.rewrite.rebase\n    notes.rewriteMode\n    notes.rewriteRef\n    pack.compression\n    pack.deltaCacheLimit\n    pack.deltaCacheSize\n    pack.depth\n    pack.indexVersion\n    pack.packSizeLimit\n    pack.threads\n    pack.window\n    pack.windowMemory\n    pager.\n    pretty.\n    pull.octopus\n    pull.twohead\n    push.default\n    rebase.autosquash\n    rebase.stat\n    receive.autogc\n    receive.denyCurrentBranch\n    receive.denyDeleteCurrent\n    receive.denyDeletes\n    receive.denyNonFastForwards\n    receive.fsckObjects\n    receive.unpackLimit\n    receive.updateserverinfo\n    remote.pushdefault\n    remotes.\n    repack.usedeltabaseoffset\n    rerere.autoupdate\n    rerere.enabled\n    sendemail.\n    sendemail.aliasesfile\n    sendemail.aliasfiletype\n    sendemail.bcc\n    sendemail.cc\n    sendemail.cccmd\n    sendemail.chainreplyto\n    sendemail.confirm\n    sendemail.envelopesender\n    sendemail.from\n    sendemail.identity\n    sendemail.multiedit\n    sendemail.signedoffbycc\n    sendemail.smtpdomain\n    sendemail.smtpencryption\n    sendemail.smtppass\n    sendemail.smtpserver\n    sendemail.smtpserveroption\n    sendemail.smtpserverport\n    sendemail.smtpuser\n    sendemail.suppresscc\n    sendemail.suppressfrom\n    sendemail.thread\n    sendemail.to\n    sendemail.validate\n    showbranch.default\n    status.relativePaths\n    status.showUntrackedFiles\n    status.submodulesummary\n    submodule.\n    tar.umask\n    transfer.unpackLimit\n    url.\n    user.email\n    user.name\n    user.signingkey\n    web.browser\n    branch. remote.\n  \"\n}\n\n_git_remote ()\n{\n  local subcommands=\"add rename remove set-head set-branches set-url show prune update\"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n    return\n  fi\n\n  case \"$subcommand\" in\n  rename|remove|set-url|show|prune)\n    __gitcomp_nl \"$(__git_remotes)\"\n    ;;\n  set-head|set-branches)\n    __git_complete_remote_or_refspec\n    ;;\n  update)\n    local i c='' IFS=$'\\n'\n    for i in $(git --git-dir=\"$(__gitdir)\" config --get-regexp \"remotes\\..*\" 2>/dev/null); do\n      i=\"${i#remotes.}\"\n      c=\"$c ${i/ */}\"\n    done\n    __gitcomp \"$c\"\n    ;;\n  *)\n    ;;\n  esac\n}\n\n_git_replace ()\n{\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_reset ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--merge --mixed --hard --soft --patch\"\n    return\n    ;;\n  esac\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_revert ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--edit --mainline --no-edit --no-commit --signoff\"\n    return\n    ;;\n  esac\n  __gitcomp_nl \"$(__git_refs)\"\n}\n\n_git_rm ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"--cached --dry-run --ignore-unmatch --quiet\"\n    return\n    ;;\n  esac\n\n  __git_complete_index_file \"--cached\"\n}\n\n_git_shortlog ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      $__git_log_common_options\n      $__git_log_shortlog_options\n      --numbered --summary\n      \"\n    return\n    ;;\n  esac\n  __git_complete_revlist\n}\n\n_git_show ()\n{\n  __git_has_doubledash && return\n\n  case \"$cur\" in\n  --pretty=*|--format=*)\n    __gitcomp \"$__git_log_pretty_formats $(__git_pretty_aliases)\n      \" \"\" \"${cur#*=}\"\n    return\n    ;;\n  --diff-algorithm=*)\n    __gitcomp \"$__git_diff_algorithms\" \"\" \"${cur##--diff-algorithm=}\"\n    return\n    ;;\n  --*)\n    __gitcomp \"--pretty= --format= --abbrev-commit --oneline\n      $__git_diff_common_options\n      \"\n    return\n    ;;\n  esac\n  __git_complete_revlist_file\n}\n\n_git_show_branch ()\n{\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      --all --remotes --topo-order --current --more=\n      --list --independent --merge-base --no-name\n      --color --no-color\n      --sha1-name --sparse --topics --reflog\n      \"\n    return\n    ;;\n  esac\n  __git_complete_revlist\n}\n\n_git_stash ()\n{\n  local save_opts='--keep-index --no-keep-index --quiet --patch'\n  local subcommands='save list show apply clear drop pop create branch'\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    case \"$cur\" in\n    --*)\n      __gitcomp \"$save_opts\"\n      ;;\n    *)\n      if [ -z \"$(__git_find_on_cmdline \"$save_opts\")\" ]; then\n        __gitcomp \"$subcommands\"\n      fi\n      ;;\n    esac\n  else\n    case \"$subcommand,$cur\" in\n    save,--*)\n      __gitcomp \"$save_opts\"\n      ;;\n    apply,--*|pop,--*)\n      __gitcomp \"--index --quiet\"\n      ;;\n    show,--*|drop,--*|branch,--*)\n      ;;\n    show,*|apply,*|drop,*|pop,*|branch,*)\n      __gitcomp_nl \"$(git --git-dir=\"$(__gitdir)\" stash list \\\n          | sed -n -e 's/:.*//p')\"\n      ;;\n    *)\n      ;;\n    esac\n  fi\n}\n\n_git_submodule ()\n{\n  __git_has_doubledash && return\n\n  local subcommands=\"add status init deinit update summary foreach sync\"\n  if [ -z \"$(__git_find_on_cmdline \"$subcommands\")\" ]; then\n    case \"$cur\" in\n    --*)\n      __gitcomp \"--quiet --cached\"\n      ;;\n    *)\n      __gitcomp \"$subcommands\"\n      ;;\n    esac\n    return\n  fi\n}\n\n_git_svn ()\n{\n  local subcommands=\"\n    init fetch clone rebase dcommit log find-rev\n    set-tree commit-diff info create-ignore propget\n    proplist show-ignore show-externals branch tag blame\n    migrate mkdirs reset gc\n    \"\n  local subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n  if [ -z \"$subcommand\" ]; then\n    __gitcomp \"$subcommands\"\n  else\n    local remote_opts=\"--username= --config-dir= --no-auth-cache\"\n    local fc_opts=\"\n      --follow-parent --authors-file= --repack=\n      --no-metadata --use-svm-props --use-svnsync-props\n      --log-window-size= --no-checkout --quiet\n      --repack-flags --use-log-author --localtime\n      --ignore-paths= --include-paths= $remote_opts\n      \"\n    local init_opts=\"\n      --template= --shared= --trunk= --tags=\n      --branches= --stdlayout --minimize-url\n      --no-metadata --use-svm-props --use-svnsync-props\n      --rewrite-root= --prefix= --use-log-author\n      --add-author-from $remote_opts\n      \"\n    local cmt_opts=\"\n      --edit --rmdir --find-copies-harder --copy-similarity=\n      \"\n\n    case \"$subcommand,$cur\" in\n    fetch,--*)\n      __gitcomp \"--revision= --fetch-all $fc_opts\"\n      ;;\n    clone,--*)\n      __gitcomp \"--revision= $fc_opts $init_opts\"\n      ;;\n    init,--*)\n      __gitcomp \"$init_opts\"\n      ;;\n    dcommit,--*)\n      __gitcomp \"\n        --merge --strategy= --verbose --dry-run\n        --fetch-all --no-rebase --commit-url\n        --revision --interactive $cmt_opts $fc_opts\n        \"\n      ;;\n    set-tree,--*)\n      __gitcomp \"--stdin $cmt_opts $fc_opts\"\n      ;;\n    create-ignore,--*|propget,--*|proplist,--*|show-ignore,--*|\\\n    show-externals,--*|mkdirs,--*)\n      __gitcomp \"--revision=\"\n      ;;\n    log,--*)\n      __gitcomp \"\n        --limit= --revision= --verbose --incremental\n        --oneline --show-commit --non-recursive\n        --authors-file= --color\n        \"\n      ;;\n    rebase,--*)\n      __gitcomp \"\n        --merge --verbose --strategy= --local\n        --fetch-all --dry-run $fc_opts\n        \"\n      ;;\n    commit-diff,--*)\n      __gitcomp \"--message= --file= --revision= $cmt_opts\"\n      ;;\n    info,--*)\n      __gitcomp \"--url\"\n      ;;\n    branch,--*)\n      __gitcomp \"--dry-run --message --tag\"\n      ;;\n    tag,--*)\n      __gitcomp \"--dry-run --message\"\n      ;;\n    blame,--*)\n      __gitcomp \"--git-format\"\n      ;;\n    migrate,--*)\n      __gitcomp \"\n        --config-dir= --ignore-paths= --minimize\n        --no-auth-cache --username=\n        \"\n      ;;\n    reset,--*)\n      __gitcomp \"--revision= --parent\"\n      ;;\n    *)\n      ;;\n    esac\n  fi\n}\n\n_git_tag ()\n{\n  local i c=1 f=0\n  while [ $c -lt $cword ]; do\n    i=\"${words[c]}\"\n    case \"$i\" in\n    -d|-v)\n      __gitcomp_nl \"$(__git_tags)\"\n      return\n      ;;\n    -f)\n      f=1\n      ;;\n    esac\n    ((c++))\n  done\n\n  case \"$prev\" in\n  -m|-F)\n    ;;\n  -*|tag)\n    if [ $f = 1 ]; then\n      __gitcomp_nl \"$(__git_tags)\"\n    fi\n    ;;\n  *)\n    __gitcomp_nl \"$(__git_refs)\"\n    ;;\n  esac\n}\n\n_git_whatchanged ()\n{\n  _git_log\n}\n\n__git_main ()\n{\n  local i c=1 command __git_dir\n\n  while [ $c -lt $cword ]; do\n    i=\"${words[c]}\"\n    case \"$i\" in\n    --git-dir=*) __git_dir=\"${i#--git-dir=}\" ;;\n    --git-dir)   ((c++)) ; __git_dir=\"${words[c]}\" ;;\n    --bare)      __git_dir=\".\" ;;\n    --help) command=\"help\"; break ;;\n    -c|--work-tree|--namespace) ((c++)) ;;\n    -*) ;;\n    *) command=\"$i\"; break ;;\n    esac\n    ((c++))\n  done\n\n  if [ -z \"$command\" ]; then\n    case \"$cur\" in\n    --*)   __gitcomp \"\n      --paginate\n      --no-pager\n      --git-dir=\n      --bare\n      --version\n      --exec-path\n      --exec-path=\n      --html-path\n      --man-path\n      --info-path\n      --work-tree=\n      --namespace=\n      --no-replace-objects\n      --help\n      \"\n      ;;\n    *)     __git_compute_porcelain_commands\n           __gitcomp \"$__git_porcelain_commands $(__git_aliases)\" ;;\n    esac\n    return\n  fi\n\n  local completion_func=\"_git_${command//-/_}\"\n  declare -f $completion_func >/dev/null && $completion_func && return\n\n  local expansion=$(__git_aliased_command \"$command\")\n  if [ -n \"$expansion\" ]; then\n    completion_func=\"_git_${expansion//-/_}\"\n    declare -f $completion_func >/dev/null && $completion_func\n  fi\n}\n\n__gitk_main ()\n{\n  __git_has_doubledash && return\n\n  local g=\"$(__gitdir)\"\n  local merge=\"\"\n  if [ -f \"$g/MERGE_HEAD\" ]; then\n    merge=\"--merge\"\n  fi\n  case \"$cur\" in\n  --*)\n    __gitcomp \"\n      $__git_log_common_options\n      $__git_log_gitk_options\n      $merge\n      \"\n    return\n    ;;\n  esac\n  __git_complete_revlist\n}\n\nif [[ -n ${ZSH_VERSION-} ]]; then\n  echo \"WARNING: this script is deprecated, please see git-completion.zsh\" 1>&2\n\n  autoload -U +X compinit && compinit\n\n  __gitcomp ()\n  {\n    emulate -L zsh\n\n    local cur_=\"${3-$cur}\"\n\n    case \"$cur_\" in\n    --*=)\n      ;;\n    *)\n      local c IFS=$' \\t\\n'\n      local -a array\n      for c in ${=1}; do\n        c=\"$c${4-}\"\n        case $c in\n        --*=*|*.) ;;\n        *) c=\"$c \" ;;\n        esac\n        array[$#array+1]=\"$c\"\n      done\n      compset -P '*[=:]'\n      compadd -Q -S '' -p \"${2-}\" -a -- array && _ret=0\n      ;;\n    esac\n  }\n\n  __gitcomp_nl ()\n  {\n    emulate -L zsh\n\n    local IFS=$'\\n'\n    compset -P '*[=:]'\n    compadd -Q -S \"${4- }\" -p \"${2-}\" -- ${=1} && _ret=0\n  }\n\n  __gitcomp_file ()\n  {\n    emulate -L zsh\n\n    local IFS=$'\\n'\n    compset -P '*[=:]'\n    compadd -Q -p \"${2-}\" -f -- ${=1} && _ret=0\n  }\n\n  _git ()\n  {\n    local _ret=1 cur cword prev\n    cur=${words[CURRENT]}\n    prev=${words[CURRENT-1]}\n    let cword=CURRENT-1\n    emulate ksh -c __${service}_main\n    let _ret && _default && _ret=0\n    return _ret\n  }\n\n  compdef _git git gitk\n  return\nfi\n\n__git_func_wrap ()\n{\n  local cur words cword prev\n  _get_comp_words_by_ref -n =: cur words cword prev\n  $1\n}\n\n# Setup completion for certain functions defined above by setting common\n# variables and workarounds.\n# This is NOT a public function; use at your own risk.\n__git_complete ()\n{\n  local wrapper=\"__git_wrap${2}\"\n  eval \"$wrapper () { __git_func_wrap $2 ; }\"\n  complete -o bashdefault -o default -o nospace -F $wrapper $1 2>/dev/null \\\n    || complete -o default -o nospace -F $wrapper $1\n}\n\n# wrapper for backwards compatibility\n_git ()\n{\n  __git_wrap__git_main\n}\n\n# wrapper for backwards compatibility\n_gitk ()\n{\n  __git_wrap__gitk_main\n}\n\n__git_complete git __git_main\n__git_complete gitk __gitk_main\n\n# The following are necessary only for Cygwin, and only are needed\n# when the user has tab-completed the executable name and consequently\n# included the '.exe' suffix.\n#\nif [ Cygwin = \"$(uname -o 2>/dev/null)\" ]; then\n__git_complete git.exe __git_main\nfi\n"
  },
  {
    "path": "root/.scripts/git-prompt.sh",
    "content": "# bash/zsh git prompt support\n#\n# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>\n# Distributed under the GNU General Public License, version 2.0.\n#\n# This script allows you to see repository status in your prompt.\n#\n# To enable:\n#\n#    1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).\n#    2) Add the following line to your .bashrc/.zshrc:\n#        source ~/.git-prompt.sh\n#    3a) Change your PS1 to call __git_ps1 as\n#        command-substitution:\n#        Bash: PS1='[\\u@\\h \\W$(__git_ps1 \" (%s)\")]\\$ '\n#        ZSH:  setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 \" (%s)\")]\\$ '\n#        the optional argument will be used as format string.\n#    3b) Alternatively, for a slightly faster prompt, __git_ps1 can\n#        be used for PROMPT_COMMAND in Bash or for precmd() in Zsh\n#        with two parameters, <pre> and <post>, which are strings\n#        you would put in $PS1 before and after the status string\n#        generated by the git-prompt machinery.  e.g.\n#        Bash: PROMPT_COMMAND='__git_ps1 \"\\u@\\h:\\w\" \"\\\\\\$ \"'\n#          will show username, at-sign, host, colon, cwd, then\n#          various status string, followed by dollar and SP, as\n#          your prompt.\n#        ZSH:  precmd () { __git_ps1 \"%n\" \":%~$ \" \"|%s\" }\n#          will show username, pipe, then various status string,\n#          followed by colon, cwd, dollar and SP, as your prompt.\n#        Optionally, you can supply a third argument with a printf\n#        format string to finetune the output of the branch status\n#\n# The repository status will be displayed only if you are currently in a\n# git repository. The %s token is the placeholder for the shown status.\n#\n# The prompt status always includes the current branch name.\n#\n# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,\n# unstaged (*) and staged (+) changes will be shown next to the branch\n# name.  You can configure this per-repository with the\n# bash.showDirtyState variable, which defaults to true once\n# GIT_PS1_SHOWDIRTYSTATE is enabled.\n#\n# You can also see if currently something is stashed, by setting\n# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,\n# then a '$' will be shown next to the branch name.\n#\n# If you would like to see if there're untracked files, then you can set\n# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked\n# files, then a '%' will be shown next to the branch name.  You can\n# configure this per-repository with the bash.showUntrackedFiles\n# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is\n# enabled.\n#\n# If you would like to see the difference between HEAD and its upstream,\n# set GIT_PS1_SHOWUPSTREAM=\"auto\".  A \"<\" indicates you are behind, \">\"\n# indicates you are ahead, \"<>\" indicates you have diverged and \"=\"\n# indicates that there is no difference. You can further control\n# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list\n# of values:\n#\n#     verbose       show number of commits ahead/behind (+/-) upstream\n#     legacy        don't use the '--count' option available in recent\n#                   versions of git-rev-list\n#     git           always compare HEAD to @{upstream}\n#     svn           always compare HEAD to your SVN upstream\n#\n# By default, __git_ps1 will compare HEAD to your SVN upstream if it can\n# find one, or @{upstream} otherwise.  Once you have set\n# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by\n# setting the bash.showUpstream config variable.\n#\n# If you would like to see more information about the identity of\n# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE\n# to one of these values:\n#\n#     contains      relative to newer annotated tag (v1.6.3.2~35)\n#     branch        relative to newer tag or branch (master~4)\n#     describe      relative to older annotated tag (v1.6.3.1-13-gdd42c2f)\n#     default       exactly matching tag\n#\n# If you would like a colored hint about the current dirty state, set\n# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on\n# the colored output of \"git status -sb\" and are available only when\n# using __git_ps1 for PROMPT_COMMAND or precmd.\n\n# stores the divergence from upstream in $p\n# used by GIT_PS1_SHOWUPSTREAM\n__git_ps1_show_upstream ()\n{\n  local key value\n  local svn_remote svn_url_pattern count n\n  local upstream=git legacy=\"\" verbose=\"\"\n\n  svn_remote=()\n  # get some config options from git-config\n  local output=\"$(git config -z --get-regexp '^(svn-remote\\..*\\.url|bash\\.showupstream)$' 2>/dev/null | tr '\\0\\n' '\\n ')\"\n  while read -r key value; do\n    case \"$key\" in\n    bash.showupstream)\n      GIT_PS1_SHOWUPSTREAM=\"$value\"\n      if [[ -z \"${GIT_PS1_SHOWUPSTREAM}\" ]]; then\n        p=\"\"\n        return\n      fi\n      ;;\n    svn-remote.*.url)\n      svn_remote[$((${#svn_remote[@]} + 1))]=\"$value\"\n      svn_url_pattern+=\"\\\\|$value\"\n      upstream=svn+git # default upstream is SVN if available, else git\n      ;;\n    esac\n  done <<< \"$output\"\n\n  # parse configuration values\n  for option in ${GIT_PS1_SHOWUPSTREAM}; do\n    case \"$option\" in\n    git|svn) upstream=\"$option\" ;;\n    verbose) verbose=1 ;;\n    legacy)  legacy=1  ;;\n    esac\n  done\n\n  # Find our upstream\n  case \"$upstream\" in\n  git)    upstream=\"@{upstream}\" ;;\n  svn*)\n    # get the upstream from the \"git-svn-id: ...\" in a commit message\n    # (git-svn uses essentially the same procedure internally)\n    local -a svn_upstream\n    svn_upstream=($(git log --first-parent -1 \\\n          --grep=\"^git-svn-id: \\(${svn_url_pattern#??}\\)\" 2>/dev/null))\n    if [[ 0 -ne ${#svn_upstream[@]} ]]; then\n      svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}\n      svn_upstream=${svn_upstream%@*}\n      local n_stop=\"${#svn_remote[@]}\"\n      for ((n=1; n <= n_stop; n++)); do\n        svn_upstream=${svn_upstream#${svn_remote[$n]}}\n      done\n\n      if [[ -z \"$svn_upstream\" ]]; then\n        # default branch name for checkouts with no layout:\n        upstream=${GIT_SVN_ID:-git-svn}\n      else\n        upstream=${svn_upstream#/}\n      fi\n    elif [[ \"svn+git\" = \"$upstream\" ]]; then\n      upstream=\"@{upstream}\"\n    fi\n    ;;\n  esac\n\n  # Find how many commits we are ahead/behind our upstream\n  if [[ -z \"$legacy\" ]]; then\n    count=\"$(git rev-list --count --left-right \\\n        \"$upstream\"...HEAD 2>/dev/null)\"\n  else\n    # produce equivalent output to --count for older versions of git\n    local commits\n    if commits=\"$(git rev-list --left-right \"$upstream\"...HEAD 2>/dev/null)\"\n    then\n      local commit behind=0 ahead=0\n      for commit in $commits\n      do\n        case \"$commit\" in\n        \"<\"*) ((behind++)) ;;\n        *)    ((ahead++))  ;;\n        esac\n      done\n      count=\"$behind  $ahead\"\n    else\n      count=\"\"\n    fi\n  fi\n\n  # calculate the result\n  if [[ -z \"$verbose\" ]]; then\n    case \"$count\" in\n    \"\") # no upstream\n      p=\"\" ;;\n    \"0  0\") # equal to upstream\n      p=\"=\" ;;\n    \"0  \"*) # ahead of upstream\n      p=\">\" ;;\n    *\"  0\") # behind upstream\n      p=\"<\" ;;\n    *)      # diverged from upstream\n      p=\"<>\" ;;\n    esac\n  else\n    case \"$count\" in\n    \"\") # no upstream\n      p=\"\" ;;\n    \"0  0\") # equal to upstream\n      p=\" u=\" ;;\n    \"0  \"*) # ahead of upstream\n      p=\" u+${count#0 }\" ;;\n    *\"  0\") # behind upstream\n      p=\" u-${count%  0}\" ;;\n    *)      # diverged from upstream\n      p=\" u+${count#* }-${count%  *}\" ;;\n    esac\n  fi\n\n}\n\n# Helper function that is meant to be called from __git_ps1.  It\n# injects color codes into the appropriate gitstring variables used\n# to build a gitstring.\n__git_ps1_colorize_gitstring ()\n{\n  if [[ -n ${ZSH_VERSION-} ]]; then\n    local c_red='%F{red}'\n    local c_green='%F{green}'\n    local c_lblue='%F{blue}'\n    local c_clear='%f'\n  else\n    # Using \\[ and \\] around colors is necessary to prevent\n    # issues with command line editing/browsing/completion!\n    local c_red='\\[\\e[31m\\]'\n    local c_green='\\[\\e[32m\\]'\n    local c_lblue='\\[\\e[1;34m\\]'\n    local c_clear='\\[\\e[0m\\]'\n  fi\n  local bad_color=$c_red\n  local ok_color=$c_green\n  local flags_color=\"$c_lblue\"\n\n  local branch_color=\"\"\n  if [ $detached = no ]; then\n    branch_color=\"$ok_color\"\n  else\n    branch_color=\"$bad_color\"\n  fi\n  c=\"$branch_color$c\"\n\n  z=\"$c_clear$z\"\n  if [ \"$w\" = \"*\" ]; then\n    w=\"$bad_color$w\"\n  fi\n  if [ -n \"$i\" ]; then\n    i=\"$ok_color$i\"\n  fi\n  if [ -n \"$s\" ]; then\n    s=\"$flags_color$s\"\n  fi\n  if [ -n \"$u\" ]; then\n    u=\"$bad_color$u\"\n  fi\n  r=\"$c_clear$r\"\n}\n\n# __git_ps1 accepts 0 or 1 arguments (i.e., format string)\n# when called from PS1 using command substitution\n# in this mode it prints text to add to bash PS1 prompt (includes branch name)\n#\n# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)\n# in that case it _sets_ PS1. The arguments are parts of a PS1 string.\n# when two arguments are given, the first is prepended and the second appended\n# to the state string when assigned to PS1.\n# The optional third parameter will be used as printf format string to further\n# customize the output of the git-status string.\n# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true\n__git_ps1 ()\n{\n  local pcmode=no\n  local detached=no\n  local ps1pc_start='\\u@\\h:\\w '\n  local ps1pc_end='\\$ '\n  local printf_format=' (%s)'\n\n  case \"$#\" in\n    2|3)  pcmode=yes\n      ps1pc_start=\"$1\"\n      ps1pc_end=\"$2\"\n      printf_format=\"${3:-$printf_format}\"\n    ;;\n    0|1)  printf_format=\"${1:-$printf_format}\"\n    ;;\n    *)  return\n    ;;\n  esac\n\n  local repo_info rev_parse_exit_code\n  repo_info=\"$(git rev-parse --git-dir --is-inside-git-dir \\\n    --is-bare-repository --is-inside-work-tree \\\n    --short HEAD 2>/dev/null)\"\n  rev_parse_exit_code=\"$?\"\n\n  if [ -z \"$repo_info\" ]; then\n    if [ $pcmode = yes ]; then\n      #In PC mode PS1 always needs to be set\n      PS1=\"$ps1pc_start$ps1pc_end\"\n    fi\n    return\n  fi\n\n  local short_sha\n  if [ \"$rev_parse_exit_code\" = \"0\" ]; then\n    short_sha=\"${repo_info##*$'\\n'}\"\n    repo_info=\"${repo_info%$'\\n'*}\"\n  fi\n  local inside_worktree=\"${repo_info##*$'\\n'}\"\n  repo_info=\"${repo_info%$'\\n'*}\"\n  local bare_repo=\"${repo_info##*$'\\n'}\"\n  repo_info=\"${repo_info%$'\\n'*}\"\n  local inside_gitdir=\"${repo_info##*$'\\n'}\"\n  local g=\"${repo_info%$'\\n'*}\"\n\n  local r=\"\"\n  local b=\"\"\n  local step=\"\"\n  local total=\"\"\n  if [ -d \"$g/rebase-merge\" ]; then\n    read b 2>/dev/null <\"$g/rebase-merge/head-name\"\n    read step 2>/dev/null <\"$g/rebase-merge/msgnum\"\n    read total 2>/dev/null <\"$g/rebase-merge/end\"\n    if [ -f \"$g/rebase-merge/interactive\" ]; then\n      r=\"|REBASE-i\"\n    else\n      r=\"|REBASE-m\"\n    fi\n  else\n    if [ -d \"$g/rebase-apply\" ]; then\n      read step 2>/dev/null <\"$g/rebase-apply/next\"\n      read total 2>/dev/null <\"$g/rebase-apply/last\"\n      if [ -f \"$g/rebase-apply/rebasing\" ]; then\n        read b 2>/dev/null <\"$g/rebase-apply/head-name\"\n        r=\"|REBASE\"\n      elif [ -f \"$g/rebase-apply/applying\" ]; then\n        r=\"|AM\"\n      else\n        r=\"|AM/REBASE\"\n      fi\n    elif [ -f \"$g/MERGE_HEAD\" ]; then\n      r=\"|MERGING\"\n    elif [ -f \"$g/CHERRY_PICK_HEAD\" ]; then\n      r=\"|CHERRY-PICKING\"\n    elif [ -f \"$g/REVERT_HEAD\" ]; then\n      r=\"|REVERTING\"\n    elif [ -f \"$g/BISECT_LOG\" ]; then\n      r=\"|BISECTING\"\n    fi\n\n    if [ -n \"$b\" ]; then\n      :\n    elif [ -h \"$g/HEAD\" ]; then\n      # symlink symbolic ref\n      b=\"$(git symbolic-ref HEAD 2>/dev/null)\"\n    else\n      local head=\"\"\n      if ! read head 2>/dev/null <\"$g/HEAD\"; then\n        if [ $pcmode = yes ]; then\n          PS1=\"$ps1pc_start$ps1pc_end\"\n        fi\n        return\n      fi\n      # is it a symbolic ref?\n      b=\"${head#ref: }\"\n      if [ \"$head\" = \"$b\" ]; then\n        detached=yes\n        b=\"$(\n        case \"${GIT_PS1_DESCRIBE_STYLE-}\" in\n        (contains)\n          git describe --contains HEAD ;;\n        (branch)\n          git describe --contains --all HEAD ;;\n        (describe)\n          git describe HEAD ;;\n        (* | default)\n          git describe --tags --exact-match HEAD ;;\n        esac 2>/dev/null)\" ||\n\n        b=\"$short_sha...\"\n        b=\"($b)\"\n      fi\n    fi\n  fi\n\n  if [ -n \"$step\" ] && [ -n \"$total\" ]; then\n    r=\"$r $step/$total\"\n  fi\n\n  local w=\"\"\n  local i=\"\"\n  local s=\"\"\n  local u=\"\"\n  local c=\"\"\n  local p=\"\"\n\n  if [ \"true\" = \"$inside_gitdir\" ]; then\n    if [ \"true\" = \"$bare_repo\" ]; then\n      c=\"BARE:\"\n    else\n      b=\"GIT_DIR!\"\n    fi\n  elif [ \"true\" = \"$inside_worktree\" ]; then\n    if [ -n \"${GIT_PS1_SHOWDIRTYSTATE-}\" ] &&\n       [ \"$(git config --bool bash.showDirtyState)\" != \"false\" ]\n    then\n      git diff --no-ext-diff --quiet --exit-code || w=\"*\"\n      if [ -n \"$short_sha\" ]; then\n        git diff-index --cached --quiet HEAD -- || i=\"+\"\n      else\n        i=\"#\"\n      fi\n    fi\n    if [ -n \"${GIT_PS1_SHOWSTASHSTATE-}\" ] &&\n       [ -r \"$g/refs/stash\" ]; then\n      s=\"$\"\n    fi\n\n    if [ -n \"${GIT_PS1_SHOWUNTRACKEDFILES-}\" ] &&\n       [ \"$(git config --bool bash.showUntrackedFiles)\" != \"false\" ] &&\n       git ls-files --others --exclude-standard --error-unmatch -- '*' >/dev/null 2>/dev/null\n    then\n      u=\"%${ZSH_VERSION+%}\"\n    fi\n\n    if [ -n \"${GIT_PS1_SHOWUPSTREAM-}\" ]; then\n      __git_ps1_show_upstream\n    fi\n  fi\n\n  local z=\"${GIT_PS1_STATESEPARATOR-\" \"}\"\n\n  # NO color option unless in PROMPT_COMMAND mode\n  if [ $pcmode = yes ] && [ -n \"${GIT_PS1_SHOWCOLORHINTS-}\" ]; then\n    __git_ps1_colorize_gitstring\n  fi\n\n  local f=\"$w$i$s$u\"\n  local gitstring=\"$c${b##refs/heads/}${f:+$z$f}$r$p\"\n\n  if [ $pcmode = yes ]; then\n    if [[ -n ${ZSH_VERSION-} ]]; then\n      gitstring=$(printf -- \"$printf_format\" \"$gitstring\")\n    else\n      printf -v gitstring -- \"$printf_format\" \"$gitstring\"\n    fi\n    PS1=\"$ps1pc_start$gitstring$ps1pc_end\"\n  else\n    printf -- \"$printf_format\" \"$gitstring\"\n  fi\n}\n"
  },
  {
    "path": "root/.scripts/z.sh",
    "content": "# Copyright (c) 2009 rupa deadwyler under the WTFPL license\n\n# maintains a jump-list of the directories you actually use\n#\n# INSTALL:\n#     * put something like this in your .bashrc/.zshrc:\n#         . /path/to/z.sh\n#     * cd around for a while to build up the db\n#     * PROFIT!!\n#     * optionally:\n#         set $_Z_CMD in .bashrc/.zshrc to change the command (default z).\n#         set $_Z_DATA in .bashrc/.zshrc to change the datafile (default ~/.z).\n#         set $_Z_NO_RESOLVE_SYMLINKS to prevent symlink resolution.\n#         set $_Z_NO_PROMPT_COMMAND if you're handling PROMPT_COMMAND yourself.\n#         set $_Z_EXCLUDE_DIRS to an array of directories to exclude.\n#\n# USE:\n#     * z foo     # cd to most frecent dir matching foo\n#     * z foo bar # cd to most frecent dir matching foo and bar\n#     * z -r foo  # cd to highest ranked dir matching foo\n#     * z -t foo  # cd to most recently accessed dir matching foo\n#     * z -l foo  # list matches instead of cd\n#     * z -c foo  # restrict matches to subdirs of $PWD\n\n[ -d \"${_Z_DATA:-$HOME/.z}\" ] && {\n    echo \"ERROR: z.sh's datafile (${_Z_DATA:-$HOME/.z}) is a directory.\"\n}\n\n_z() {\n\n    local datafile=\"${_Z_DATA:-$HOME/.z}\"\n\n    # bail if we don't own ~/.z (we're another user but our ENV is still set)\n    [ -f \"$datafile\" -a ! -O \"$datafile\" ] && return\n\n    # add entries\n    if [ \"$1\" = \"--add\" ]; then\n        shift\n\n        # $HOME isn't worth matching\n        [ \"$*\" = \"$HOME\" ] && return\n\n        # don't track excluded dirs\n        local exclude\n        for exclude in \"${_Z_EXCLUDE_DIRS[@]}\"; do\n            [ \"$*\" = \"$exclude\" ] && return\n        done\n\n        # maintain the data file\n        local tempfile=\"$datafile.$RANDOM\"\n        while read line; do\n            # only count directories\n            [ -d \"${line%%\\|*}\" ] && echo $line\n        done < \"$datafile\" | awk -v path=\"$*\" -v now=\"$(date +%s)\" -F\"|\" '\n            BEGIN {\n                rank[path] = 1\n                time[path] = now\n            }\n            $2 >= 1 {\n                # drop ranks below 1\n                if( $1 == path ) {\n                    rank[$1] = $2 + 1\n                    time[$1] = now\n                } else {\n                    rank[$1] = $2\n                    time[$1] = $3\n                }\n                count += $2\n            }\n            END {\n                if( count > 6000 ) {\n                    # aging\n                    for( x in rank ) print x \"|\" 0.99*rank[x] \"|\" time[x]\n                } else for( x in rank ) print x \"|\" rank[x] \"|\" time[x]\n            }\n        ' 2>/dev/null >| \"$tempfile\"\n        # do our best to avoid clobbering the datafile in a race condition\n        if [ $? -ne 0 -a -f \"$datafile\" ]; then\n            env rm -f \"$tempfile\"\n        else\n            env mv -f \"$tempfile\" \"$datafile\" || env rm -f \"$tempfile\"\n        fi\n\n    # tab completion\n    elif [ \"$1\" = \"--complete\" ]; then\n        while read line; do\n            [ -d \"${line%%\\|*}\" ] && echo $line\n        done < \"$datafile\" | awk -v q=\"$2\" -F\"|\" '\n            BEGIN {\n                if( q == tolower(q) ) imatch = 1\n                split(substr(q, 3), fnd, \" \")\n            }\n            {\n                if( imatch ) {\n                    for( x in fnd ) tolower($1) !~ tolower(fnd[x]) && $1 = \"\"\n                } else {\n                    for( x in fnd ) $1 !~ fnd[x] && $1 = \"\"\n                }\n                if( $1 ) print $1\n            }\n        ' 2>/dev/null\n\n    else\n        # list/go\n        while [ \"$1\" ]; do case \"$1\" in\n            --) while [ \"$1\" ]; do shift; local fnd=\"$fnd${fnd:+ }$1\";done;;\n            -*) local opt=${1:1}; while [ \"$opt\" ]; do case ${opt:0:1} in\n                    c) local fnd=\"^$PWD $fnd\";;\n                    h) echo \"${_Z_CMD:-z} [-chlrtx] args\" >&2; return;;\n                    x) sed -i \"\\:^${PWD}|.*:d\" \"$datafile\";;\n                    l) local list=1;;\n                    r) local typ=\"rank\";;\n                    t) local typ=\"recent\";;\n                esac; opt=${opt:1}; done;;\n             *) local fnd=\"$fnd${fnd:+ }$1\";;\n        esac; local last=$1; shift; done\n        [ \"$fnd\" -a \"$fnd\" != \"^$PWD \" ] || local list=1\n\n        # if we hit enter on a completion just go there\n        case \"$last\" in\n            # completions will always start with /\n            /*) [ -z \"$list\" -a -d \"$last\" ] && cd \"$last\" && return;;\n        esac\n\n        # no file yet\n        [ -f \"$datafile\" ] || return\n\n        local cd\n        cd=\"$(while read line; do\n            [ -d \"${line%%\\|*}\" ] && echo $line\n        done < \"$datafile\" | awk -v t=\"$(date +%s)\" -v list=\"$list\" -v typ=\"$typ\" -v q=\"$fnd\" -F\"|\" '\n            function frecent(rank, time) {\n                # relate frequency and time\n                dx = t - time\n                if( dx < 3600 ) return rank * 4\n                if( dx < 86400 ) return rank * 2\n                if( dx < 604800 ) return rank / 2\n                return rank / 4\n            }\n            function output(files, out, common) {\n                # list or return the desired directory\n                if( list ) {\n                    cmd = \"sort -n >&2\"\n                    for( x in files ) {\n                        if( files[x] ) printf \"%-10s %s\\n\", files[x], x | cmd\n                    }\n                    if( common ) {\n                        printf \"%-10s %s\\n\", \"common:\", common > \"/dev/stderr\"\n                    }\n                } else {\n                    if( common ) out = common\n                    print out\n                }\n            }\n            function common(matches) {\n                # find the common root of a list of matches, if it exists\n                for( x in matches ) {\n                    if( matches[x] && (!short || length(x) < length(short)) ) {\n                        short = x\n                    }\n                }\n                if( short == \"/\" ) return\n                # use a copy to escape special characters, as we want to return\n                # the original. yeah, this escaping is awful.\n                clean_short = short\n                gsub(/[\\(\\)\\[\\]\\|]/, \"\\\\\\\\&\", clean_short)\n                for( x in matches ) if( matches[x] && x !~ clean_short ) return\n                return short\n            }\n            BEGIN { split(q, words, \" \"); hi_rank = ihi_rank = -9999999999 }\n            {\n                if( typ == \"rank\" ) {\n                    rank = $2\n                } else if( typ == \"recent\" ) {\n                    rank = $3 - t\n                } else rank = frecent($2, $3)\n                matches[$1] = imatches[$1] = rank\n                for( x in words ) {\n                    if( $1 !~ words[x] ) delete matches[$1]\n                    if( tolower($1) !~ tolower(words[x]) ) delete imatches[$1]\n                }\n                if( matches[$1] && matches[$1] > hi_rank ) {\n                    best_match = $1\n                    hi_rank = matches[$1]\n                } else if( imatches[$1] && imatches[$1] > ihi_rank ) {\n                    ibest_match = $1\n                    ihi_rank = imatches[$1]\n                }\n            }\n            END {\n                # prefer case sensitive\n                if( best_match ) {\n                    output(matches, best_match, common(matches))\n                } else if( ibest_match ) {\n                    output(imatches, ibest_match, common(imatches))\n                }\n            }\n        ')\"\n        [ $? -gt 0 ] && return\n        [ \"$cd\" ] && cd \"$cd\"\n    fi\n}\n\nalias ${_Z_CMD:-z}='_z 2>&1'\n\n[ \"$_Z_NO_RESOLVE_SYMLINKS\" ] || _Z_RESOLVE_SYMLINKS=\"-P\"\n\nif compctl >/dev/null 2>&1; then\n    # zsh\n    [ \"$_Z_NO_PROMPT_COMMAND\" ] || {\n        # populate directory list, avoid clobbering any other precmds.\n        if [ \"$_Z_NO_RESOLVE_SYMLINKS\" ]; then\n            _z_precmd() {\n                _z --add \"${PWD:a}\"\n            }\n        else\n            _z_precmd() {\n                _z --add \"${PWD:A}\"\n            }\n        fi\n        [[ -n \"${precmd_functions[(r)_z_precmd]}\" ]] || {\n            precmd_functions[$(($#precmd_functions+1))]=_z_precmd\n        }\n    }\n    _z_zsh_tab_completion() {\n        # tab completion\n        local compl\n        read -l compl\n        reply=(${(f)\"$(_z --complete \"$compl\")\"})\n    }\n    compctl -U -K _z_zsh_tab_completion _z\nelif complete >/dev/null 2>&1; then\n    # bash\n    # tab completion\n    complete -o filenames -C '_z --complete \"$COMP_LINE\"' ${_Z_CMD:-z}\n    [ \"$_Z_NO_PROMPT_COMMAND\" ] || {\n        # populate directory list. avoid clobbering other PROMPT_COMMANDs.\n        grep \"_z --add\" <<< \"$PROMPT_COMMAND\" >/dev/null || {\n            PROMPT_COMMAND=\"$PROMPT_COMMAND\"$'\\n''_z --add \"$(pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)\" 2>/dev/null;'\n        }\n    }\nfi\n"
  }
]