[
  {
    "path": ".bashrc",
    "content": "#!/usr/bin/env bash\n#--------------------------------------------------------------------------------------------------------------------\n###WAL COLORS\n(cat ~/.cache/wal/sequences &)\nsource ~/.cache/wal/colors.sh\n\n#--------------------------------------------------------------------------------------------------------------------\n###FUNCTIONS\n[ -d ~/.func ] && for file in ~/.func/*; do source \"$file\" ; done\n###PROFILE\n[[ -e ~/.profile ]] && source ~/.profile\n###DIRENV\neval \"$(direnv hook bash)\"\n\n###LAUNCHER\nif [[ -n ${LAUNCHER} ]]; then\n    PS1=\"> \"\n    bind 'RETURN: \"\\e[4~ & \\n exit \\n\"'\n    return\nfi\n\n#--------------------------------------------------------------------------------------------------------------------\n###SETTINGS\n[[ $- != *i* ]] && return\n[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion\nuse_color=true\n[[ -f ~/.dir_colors   ]] && match_lhs=\"${match_lhs}$(<~/.dir_colors)\"\n[[ -f /etc/DIR_COLORS ]] && match_lhs=\"${match_lhs}$(</etc/DIR_COLORS)\"\n[[ -z ${match_lhs}    ]] && type -P dircolors >/dev/null && match_lhs=$(dircolors --print-database)\n[[ $'\\n'${match_lhs} == *$'\\n'\"TERM \"${safe_term}* ]] && use_color=true\n\nxhost +local:root > /dev/null 2>&1\ncomplete -cf sudo\nshopt -s checkwinsize\nshopt -s expand_aliases\nshopt -s histappend\n\n#--------------------------------------------------------------------------------------------------------------------\n###THEME\nsource ~/.config/promptline\n#--------------------------------------------------------------------------------------------------------------------\n\nsource /home/bresilla/.config/broot/launcher/bash/br\n\n[[ -f ~/.resh/shellrc ]] && source ~/.resh/shellrc\n\n[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh\n"
  },
  {
    "path": ".config/alacritty/alacritty.yml",
    "content": "# Configuration for Alacritty, the GPU enhanced terminal emulator.\n\n# Any items in the `env` entry below will be added as\n# environment variables. Some entries may override variables\n# set by alacritty itself.\n#env:\n  # TERM variable\n  #\n  # This value is used to set the `$TERM` environment variable for\n  # each instance of Alacritty. If it is not present, alacritty will\n  # check the local terminfo database and use `alacritty` if it is\n  # available, otherwise `xterm-256color` is used.\n#TERM: xterm-256color\n\nwindow:\n  # Window dimensions (changes require restart)\n  #\n  # Specified in number of columns/lines, not pixels.\n  # If both are `0`, this setting is ignored.\n  dimensions:\n    columns: 0\n    lines: 0\n\n  # Window position (changes require restart)\n  #\n  # Specified in number of pixels.\n  # If the position is not set, the window manager will handle the placement.\n  #position:\n  #  x: 0\n  #  y: 0\n\n  # Window padding (changes require restart)\n  #\n  # Blank space added around the window in pixels. This padding is scaled\n  # by DPI and the specified value is always added at both opposing sides.\n  padding:\n    x: 5\n    y: 5\n\n  # Spread additional padding evenly around the terminal content.\ndynamic_padding: true\n\n# Display tabs using this many cells (changes require restart)\ntabspaces: 4\n\n# When true, bold text is drawn using the bright variant of colors.\ndraw_bold_text_with_bright_colors: true\n\n# Font configuration (changes require restart)\nfont:\n  # The normal (roman) font face to use.\n  normal:\n    family: Iosevka Term SS01\n    style: Regular\n\n  # The bold font face\n  bold:\n    family: Iosevka Term SS01\n    style: Bold\n\n  # The italic font face\n  italic:\n    family: Iosevka Term SS01\n    style: Italic\n\n  # Point size of the font\n  size: 6.0\n\n  # Offset is the extra space around each character. offset.y can be thought of\n  # as modifying the linespacing, and offset.x as modifying the letter spacing.\n  offset:\n    x: 0\n    y: 0\n\n  # OS X only: use thin stroke font rendering. Thin strokes are suitable\n  # for retina displays, but for non-retina you probably want this set to\n  # false.\n  use_thin_strokes: true\n\n# Colors (Tomorrow Night Bright)\ncolors:\n  # Default colors\n  primary:\n    background: '0x000000'\n    foreground: '0xeaeaea'\n\n  # Normal colors\n  normal:\n    black:   '0x000000'\n    red:     '0xd54e53'\n    green:   '0xb9ca4a'\n    yellow:  '0xe6c547'\n    blue:    '0x7aa6da'\n    magenta: '0xc397d8'\n    cyan:    '0x70c0ba'\n    white:   '0x424242'\n\n  # Bright colors\n  bright:\n    black:   '0x666666'\n    red:     '0xff3334'\n    green:   '0x9ec400'\n    yellow:  '0xe7c547'\n    blue:    '0x7aa6da'\n    magenta: '0xb77ee0'\n    cyan:    '0x54ced6'\n    white:   '0x2a2a2a'\n\n# Visual Bell\n#\n# Any time the BEL code is received, Alacritty \"rings\" the visual bell. Once\n# rung, the terminal background will be set to white and transition back to the\n# default background color. You can control the rate of this transition by\n# setting the `duration` property (represented in milliseconds). You can also\n# configure the transition function by setting the `animation` property.\n#\n# Possible values for `animation`\n# `Ease`\n# `EaseOut`\n# `EaseOutSine`\n# `EaseOutQuad`\n# `EaseOutCubic`\n# `EaseOutQuart`\n# `EaseOutQuint`\n# `EaseOutExpo`\n# `EaseOutCirc`\n# `Linear`\n#\n# To completely disable the visual bell, set its duration to 0.\nvisual_bell:\n  animation: EaseOutCubic\n  duration: 200\n\n# Key bindings\n#\n# Each binding is defined as an object with some properties. Most of the\n# properties are optional. All of the alphabetical keys should have a letter for\n# the `key` value such as `V`. Function keys are probably what you would expect\n# as well (F1, F2, ..). The number keys above the main keyboard are encoded as\n# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,\n# etc.  These all match the glutin::VirtualKeyCode variants.\n#\n# Possible values for `mods`\n# `Command`, `Super` refer to the super/command/windows key\n# `Control` for the control key\n# `Shift` for the Shift key\n# `Alt` and `Option` refer to alt/option\n#\n# mods may be combined with a `|`. For example, requiring control and shift\n# looks like:\n#\n# mods: Control|Shift\n#\n# The parser is currently quite sensitive to whitespace and capitalization -\n# capitalization must match exactly, and piped items must not have whitespace\n# around them.\n#\n# Either an `action` or `chars` field must be present. `chars` writes the\n# specified string every time that binding is activated. These should generally\n# be escape sequences, but they can be configured to send arbitrary strings of\n# bytes. Possible values of `action` include `Paste` and `PasteSelection`.\nkey_bindings:\n  - { key: V,        mods: Control|Shift, action: Paste                        }\n  - { key: C,        mods: Control|Shift, action: Copy                         }\n  - { key: Q,        mods: Command,       action: Quit                         }\n  - { key: W,        mods: Command,       action: Quit                         }\n  - { key: PageUp,   mods: Shift,         action: ScrollPageUp                 }\n  - { key: PageDown, mods: Shift,         action: ScrollPageDown               }\n  - { key: End,      mods: Shift,         action: ScrollToBottom               }\n  - { key: Home,     mods: Shift,         action: ScrollToTop                  }\n  - { key: Home,                          chars: \"\\x1b[H\",    mode: ~AppCursor }\n  - { key: Home,                          chars: \"\\x1b[1~\",   mode: AppCursor  }\n  - { key: End,                           chars: \"\\x1b[F\",    mode: ~AppCursor }\n  - { key: End,                           chars: \"\\x1b[4~\",   mode: AppCursor  }\n  - { key: PageUp,                        chars: \"\\x1b[5~\"                     }\n  - { key: PageDown,                      chars: \"\\x1b[6~\"                     }\n  - { key: Left,     mods: Shift,         chars: \"\\x1b[1;2D\"                   }\n  - { key: Left,     mods: Control,       chars: \"\\x1b[1;5D\"                   }\n  - { key: Left,     mods: Alt,           chars: \"\\x1b[1;3D\"                   }\n  - { key: Left,                          chars: \"\\x1b[D\",    mode: ~AppCursor }\n  - { key: Left,                          chars: \"\\x1bOD\",    mode: AppCursor  }\n  - { key: Right,    mods: Shift,         chars: \"\\x1b[1;2C\"                   }\n  - { key: Right,    mods: Control,       chars: \"\\x1b[1;5C\"                   }\n  - { key: Right,    mods: Alt,           chars: \"\\x1b[1;3C\"                   }\n  - { key: Right,                         chars: \"\\x1b[C\",    mode: ~AppCursor }\n  - { key: Right,                         chars: \"\\x1bOC\",    mode: AppCursor  }\n  - { key: Up,       mods: Shift,         chars: \"\\x1b[1;2A\"                   }\n  - { key: Up,       mods: Control,       chars: \"\\x1b[1;5A\"                   }\n  - { key: Up,       mods: Alt,           chars: \"\\x1b[1;3A\"                   }\n  - { key: Up,                            chars: \"\\x1b[A\",    mode: ~AppCursor }\n  - { key: Up,                            chars: \"\\x1bOA\",    mode: AppCursor  }\n  - { key: Down,     mods: Shift,         chars: \"\\x1b[1;2B\"                   }\n  - { key: Down,     mods: Control,       chars: \"\\x1b[1;5B\"                   }\n  - { key: Down,     mods: Alt,           chars: \"\\x1b[1;3B\"                   }\n  - { key: Down,                          chars: \"\\x1b[B\",    mode: ~AppCursor }\n  - { key: Down,                          chars: \"\\x1bOB\",    mode: AppCursor  }\n  - { key: Tab,      mods: Shift,         chars: \"\\x1b[Z\"                      }\n  - { key: F1,                            chars: \"\\x1bOP\"                      }\n  - { key: F2,                            chars: \"\\x1bOQ\"                      }\n  - { key: F3,                            chars: \"\\x1bOR\"                      }\n  - { key: F4,                            chars: \"\\x1bOS\"                      }\n  - { key: F5,                            chars: \"\\x1b[15~\"                    }\n  - { key: F6,                            chars: \"\\x1b[17~\"                    }\n  - { key: F7,                            chars: \"\\x1b[18~\"                    }\n  - { key: F8,                            chars: \"\\x1b[19~\"                    }\n  - { key: F9,                            chars: \"\\x1b[20~\"                    }\n  - { key: F10,                           chars: \"\\x1b[21~\"                    }\n  - { key: F11,                           chars: \"\\x1b[23~\"                    }\n  - { key: F12,                           chars: \"\\x1b[24~\"                    }\n  - { key: Back,                          chars: \"\\x7f\"                        }\n  - { key: Delete,                        chars: \"\\x1b[3~\",   mode: AppKeypad  }\n  - { key: Delete,                        chars: \"\\x1b[P\",    mode: ~AppKeypad }\n\n# Mouse bindings\n#\n# Currently doesn't support modifiers. Both the `mouse` and `action` fields must\n# be specified.\n#\n# Values for `mouse`:\n# - Middle\n# - Left\n# - Right\n# - Numeric identifier such as `5`\n#\n# Values for `action`:\n# - Paste\n# - PasteSelection\n# - Copy (TODO)\nmouse_bindings:\n  - { mouse: Middle, action: PasteSelection }\n\nscrolling:\n  # How many lines of scrollback to keep,\n  # '0' will disable scrolling.\n  history: 10000\n\n  # Number of lines the viewport will move for every line\n  # scrolled when scrollback is enabled (history > 0).\n  multiplier: 3\n\n  # Faux Scrolling\n  #\n  # The `faux_multiplier` setting controls the number\n  # of lines the terminal should scroll when the alternate\n  # screen buffer is active. This is used to allow mouse\n  # scrolling for applications like `man`.\n  #\n  # To disable this completely, set `faux_multiplier` to 0.\n  faux_multiplier: 3\n\n  # Automatically scroll to the bottom when new text is written\n  # to the terminal.\n  auto_scroll: false\n\n# Live config reload (changes require restart)\nlive_config_reload: true\n"
  },
  {
    "path": ".config/boomer/config",
    "content": ""
  },
  {
    "path": ".config/bspwm/bspwmrc",
    "content": "#! /bin/sh\nmonitor1=eDP1\nmonitor2=DP1\nsxhkd -c /home/bresilla/.config/sxhkd/sxhkdrc &\nbtops &\n\n\n###############################################################################################################################\n#|||\tSETTINGS\n###############################################################################################################################\nbspc config border_width         0\nbspc config normal_border_color \"#000000\"\nbspc config focused_border_color \"#000000\"\nbspc config presel_feedback_color \"#000000\"\nbspc config window_gap          14\nbspc config split_ratio          0.51\nbspc config borderless_monocle   true\nbspc config gapless_monocle      true\nbspc config focus_follows_pointer   true\nbspc config pointer_follows_focus   true\nbspc config pointer_follows_monitor true\nbspc config auto_alternate true\nbspc config pointer_action1 move\nbspc config remove_unplugged_monitors true\nbspc config remove_disabled_monitors true\n\n\n###############################################################################################################################\n#|||\tWORKSPACES & MONITORS\n###############################################################################################################################\n# bspc monitor $monitor1 -d 1 2 3 4 5\n# bspc monitor $monitor2 -d 1 2 3 4 5\n\n\n###############################################################################################################################\n#|||\tASSIGNMENTS\n###############################################################################################################################\nbspc rule -a kitty state=floating sticky\nbspc rule -a cool-retro-term state=floating sticky\nbspc rule -a til state=tiled\nbspc rule -a feh state=floating\nbspc rule -a sxiv state=floating\nbspc rule -a mpv state=floating\nbspc rule -a MPlayer state=floating\nbspc rule -a matplotlib state=floating\nbspc rule -a URxvt state=floating\nbspc rule -a Oblogout state=fullscreen\nbspc rule -a Zathura state=tiled\nbspc rule -a URxvt:launcher state=floating center sticky\nbspc rule -a LAUNCHER state=floating center sticky\nbspc rule -a Boomer state=fullscreen sticky\nbspc rule -a Screenkey manage=off\n\n\n###############################################################################################################################\n#|||\tSCRIPTS\n###############################################################################################################################\nbash ~/.startup &\nbash ~/.startup -r &\n"
  },
  {
    "path": ".config/bspwm/scripts/deskmenu",
    "content": "#!/bin/sh\n. \"${HOME}/.cache/wal/colors.sh\"\n[[  $BROWSER && ${BROWSER-x} ]] && browser=$BROWSER || browser='firefox'\n[[  $GUI_EDITOR && ${GUI_EDITOR-x} ]] && gui_editor=$GUI_EDITOR || gui_editor='nvim'\nDMENU_FN=\"Monoid-16\"\nDMENU_NB=\"$color0\"\nDMENU_NF=\"$color6\"\nDMENU_SB=\"$color6\"\nDMENU_SF=\"$color0\"\nDMENU_OPTIONS=\"-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB\"\n\n\n\neval $(xdotool getmouselocation --shell)\nmenu_widht=400\nmonitor_widht=$(wattr w $(lsw -r))\nmonitor_height=$(wattr h $(lsw -r))\nlines=14\nmenu_height=$(( $lines * 23 ))\nmaxx=$(( $monitor_widht - $menu_widht ))\nminy=$PANEL_HEIGHT\nmaxy=$(( $monitor_height - $menu_height ))\nXP=$X\n[[ $XP -gt $maxx ]] && XP=$maxx\nYP=$Y\n[[ $YP -lt $miny ]] && YP=$miny\n[[ $YP -gt $maxy ]] && YP=$maxy\n\n#DMENU='dmenu $DMENU_OPTIONS'\nif [[ \"$@\" == \"\" ]]; then\n\tchoice=$(echo -e \"Flip\\nRotate\\nBalance windows\\nEqualize windows\\nRename desktop\\nAdd desktop\\nRemove desktop\\nShow hidden windows\\nEnable autogap\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\n\telse\n\tcase $@ in\n\tFlip)\n\t\tchoice=$(echo -e \"Vertically\\nHorizontally\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\n\t\t;;\n\tRotate)\n\t\tchoice=$(echo -e \"Right\\nLeft\\nFull turn\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\t\t\n\t\t;;\n\tesac\nfi\n\n\ndesktop2add(){\n\tname=\"$(echo \" \" | dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Name new workspace:')\";\n\tbspc monitor -a \"$name\";\n}\n\ndesktop2remove(){\n\tname=\"$(bspc query -D | dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Remove workspace:')\";\n\tbspc monitor -r \"$name\";\n}\n\ndesktop2rename(){\n\tname=\"$(dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Rename workspace to:')\";\n\tbspc desktop -n \"$name\";\n}\n\ncase \"$choice\" in\n  Flip) $0 Flip & ;;\n  Rotate) $0 Rotate & ;;\n  \"Balance windows\") bspc node @/ -B & ;;\n  \"Equalize windows\") bspc node @/ -E & ;;\n  \"Rename desktop\") desktop2rename & ;;\n  \"Add desktop\") desktop2add & ;;\n  \"Remove desktop\") desktop2remove & ;;\n  \"Focus follows pointer\") toggle-focus-follows-pointer & ;;\n  \"Pointer follows focus\") toggle-pointer-follows-focus & ;;\n  \"Show hidden windows\") whid dmenu & ;;\n  \"Enable autogap\") autogap & ;;\n  \"Left\") bspc node @/ -R -90 & ;;\n  \"Right\") bspc node @/ -R 90 & ;;\n  \"Full turn\") bspc node @/ -R 180 & ;;\n  \"Vertically\") bspc node @/ -F vertical & ;;\n  \"Horizontally\") bspc node @/ -F horizontal & ;;\nesac\n"
  },
  {
    "path": ".config/bspwm/scripts/focus",
    "content": "#!/usr/bin/env bash\ndir=$1\n\nnode=$(bspc query -N -n)\nnode=${node^^}\ntarget=$(bspc query -N -n $dir)\n\n# if there are any floating windows, use an edge of that if it overlaps into us\nnode_dir=$1\ncase $node_dir in\n  east)  dir=x; sign=-lt;;\n  west)  dir=x; sign=-gt;;\n  north) dir=y; sign=-gt;;\n  south) dir=y; sign=-lt;;\nesac\n\nfloating_windows=$(bspc query -N -d -n .window.local.floating)\ndeclare -A winmap=();\nwhile read wid x y w h; do\n  wid=\"${wid^^}\"\n  # capture window corners, abcd clockwise from top left\n  winmap[\"${wid}_a_x\"]=$x\n  winmap[\"${wid}_a_y\"]=$y\n  winmap[\"${wid}_b_x\"]=$((x+w))\n  winmap[\"${wid}_b_y\"]=$y\n  winmap[\"${wid}_c_x\"]=$((x+w))\n  winmap[\"${wid}_c_y\"]=$((y + h))\n  winmap[\"${wid}_d_x\"]=$x\n  winmap[\"${wid}_d_y\"]=$((y+h))\ndone < <(wattr ixywh $floating_windows $node $og_target)\n\ninside_node() {\n  x=$1\n  y=$2\n  ax=\"${winmap[\"${node}_a_x\"]}\"\n  ay=\"${winmap[\"${node}_a_y\"]}\"\n  bx=\"${winmap[\"${node}_b_x\"]}\"\n  by=\"${winmap[\"${node}_b_y\"]}\"\n  dx=\"${winmap[\"${node}_d_x\"]}\"\n  dy=\"${winmap[\"${node}_d_y\"]}\"\n\n  bax=$((bx - ax))\n  bay=$((by - ay))\n  dax=$((dx - ax))\n  day=$((dy - ay))\n\n  [ $(( (x - ax) * bax + (y - ay) * bay )) -lt \"0\" ] && return 1\n  [ $(( (x - bx) * bax + (y - by) * bay )) -gt \"0\" ] && return 1\n  [ $(( (x - ax) * dax + (y - ay) * day )) -lt \"0\" ] && return 1\n  [ $(( (x - dx) * dax + (y - dy) * day )) -gt \"0\" ] && return 1\n\n  return 0;\n}\n\ncheck_corner() {\n  for c in $*; do\n    x=${winmap[\"${wid}_${c}_x\"]}\n    y=${winmap[\"${wid}_${c}_y\"]}\n    if ! inside_node $x $y; then\n      return 1\n    fi\n  done\n\n  return 0\n}\n\ncheck_corners() {\n  wid=\"$1\"\n  # if they are all inside node, we don't care\n  # turns out this meant we couldn't grab floaters in certain situations\n  # if check_corner a b c d; then\n  #   return 0;\n  # fi\n\n  case $node_dir in\n    east) corners=\"a d\";;\n    west) corners=\"b c\";;\n    north) corners=\"c d\";;\n    south) corners=\"a b\";;\n  esac\n\n  if check_corner $corners; then\n    target_corners $corners\n  fi\n\n  if check_corner a b c d; then\n    target_corners $corners\n  fi\n\n  # make a check-corner for the left or right half of node, allow matching one\n\n}\n\ntarget_corners() {\n  for c in $*; do\n    x=${winmap[\"${wid}_${c}_x\"]}\n    y=${winmap[\"${wid}_${c}_y\"]}\n\n    if [ -z \"$target_x\" ]; then\n      target_x=$x\n      target_y=$y\n      target=\"$wid\"\n    fi\n\n    # bias towards close corners\n    val=${winmap[\"${wid}_${c}_${dir}\"]}\n    if [ \"$val\" \"$sign\" \"$(eval echo \\$target_$dir)\" ]; then\n      target=$wid\n      target_x=$x\n      target_y=$y\n    fi\n  done\n}\n\n# if any corner falls in us, use that, biased to higher values\nif [ ! -z \"$floating_windows\" ]; then\n  for wid in $floating_windows; do\n    wid=\"${wid^^}\"\n    [ \"$wid\" = \"$node\" ] && continue\n    check_corners \"$wid\"\n  done\nfi\n\nbspc config pointer_follows_focus true\nbspc node -f $target\nbspc config pointer_follows_focus false\n"
  },
  {
    "path": ".config/bspwm/scripts/move",
    "content": "#!/bin/sh\n\nbspc config pointer_follows_focus true\ndir=$1\nnode=$(bspc query -N -n)\n\ncase $dir in\n  west)  fdim=width; tdim=height; sign=-;;\n  east)  fdim=width; tdim=height;;\n  north) fdim=height; tdim=width; sign=-;;\n  south) fdim=height; tdim=width;;\nesac\n\nfloating_move() {\n  percent=5\n  moveArgs=\"$sign$(echo \"$percent/100*$(bspc query -T -m | jq .rectangle.$fdim)\" | bc -l)\"\n  [ $fdim = \"height\" ] && moveArgs=\"0 $moveArgs\" || moveArgs=\"$moveArgs 0\"\n  bspc node -v $moveArgs\n}\n\ntiled_move() {\n  (bspc node -n $dir.\\!automatic || bspc node -s \"$dir\") && return\n\n  # compare height or width to parent\n  self_measure=\"$(bspc query -T -n \"$node\" | jq .rectangle.$tdim)\"\n  parent_measure=\"$(bspc query -T -n \"${node}#@parent\" | jq .rectangle.$tdim)\"\n\n  if [ \"$parent_measure\" -gt \"$self_measure\" ]; then\n    bspc node \"${node}#@parent\" -p $dir\n    bspc node \"${node}#@parent\" -i\n\n    receptacle_id=\"$(bspc query -N \"${node}#@parent#@parent\" -n '.descendant_of.leaf.!window')\"\n    bspc node $node -n $receptacle_id\n    bspc node \"${node}#@parent\" -B\n  else\n    node=\"$(bspc query -N -n \"${node}#@parent\")\"\n    [ ! -z \"$node\" ] && tiled_move\n  fi\n}\n\n$(bspc query -T -n | jq -r .client.state)_move\n\nbspc config pointer_follows_focus false\n"
  },
  {
    "path": ".config/bspwm/scripts/resize",
    "content": "#!/bin/sh\ndir=$2;\nif [ $1 == b ]; then\n    if [ $dir == Left ]; then\n        bspc node -z left -20 0 || bspc node -z right -20 0;\n    elif [ $dir == Right ]; then\n        bspc node -z right 20 0 || bspc node -z left 20 0;\n    elif [ $dir == Up ]; then\n        bspc node -z top 0 -20 || bspc node -z bottom 0 -20;\n    elif [ $dir == Down ]; then\n        bspc node -z bottom 0 20 || bspc node -z top 0 20;\n    else\n        exit 1\n    fi;\nelif [ $1 == s ]; then\n    if [ $dir == Left ]; then\n        bspc node -z right -20 0;\n    elif [ $dir == Right ]; then\n        bspc node -z left 20 0;\n    elif [ $dir == Up ]; then\n        bspc node -z bottom 0 -20;\n    elif [ $dir == Down ]; then\n        bspc node -z top 0 20;\n    else\n        exit 1\n    fi;\nelse\n    exit 1\nfi;\n"
  },
  {
    "path": ".config/bspwm/scripts/scratch",
    "content": "#!/usr/bin/env bash\nid=$(xdotool search --class $1)\n\nif [ \"$id\" != \"\" ]\n then\n  bspc node \"$id\" --flag hidden -f\nfi\n"
  },
  {
    "path": ".config/bspwm/scripts/select",
    "content": "#!/usr/bin/env bash\nread -r X Y W H < <(slop -f \"%x %y %w %h\" -b 1 -t 0 -q)\n# Width and Height in px need to be converted to columns/rows\n# To get these magic values, make a fullscreen st, and divide your screen width by ${tput cols}, height by ${tput lines} \n(( W /= 18 ))\n(( H /= 32 ))\ng=${W}x${H}+${X}+${Y}\nbspc rule -a urxvt  -o state=floating\nurxvt -g $g\n"
  },
  {
    "path": ".config/bspwm/scripts/split",
    "content": "#!/bin/bash\n# needs https://github.com/wmutils/core for wattr\n \neval $(xdotool getmouselocation --shell)\nIFS=\" \" read -a window <<< $(wattr whxy $(bspc query -N -n focused))\n \nnorth=$(( Y - window[3]))\nwest=$(( X - window[2]))\nwidth=${window[0]}\nheight=${window[1]}\n \nif [ \"$1\" = \"right\" ]; then\n    ratio=$(echo \"$west / $width\" | bc -l)\n    bspc node -p east -o $ratio\nelif [ \"$1\" = \"left\" ]; then\n    ratio=$(echo \"$west / $width\" | bc -l)\n    bspc node -p west -o $ratio\nelif [ \"$1\" = \"up\" ]; then\n    ratio=$(echo \"$north / $height\" | bc -l)\n    bspc node -p north -o $ratio\nelif [ \"$1\" = \"down\" ]; then\n    ratio=$(echo \"$north / $height\" | bc -l)\n    bspc node -p south -o $ratio\nfi\n \nterminal\n \nbspc query -N -d | xargs -I id -n 1 bspc node id -p cancel\n"
  },
  {
    "path": ".config/bspwm/scripts/windmenu",
    "content": "#!/bin/sh\n. \"${HOME}/.cache/wal/colors.sh\"\n[[  $BROWSER && ${BROWSER-x} ]] && browser=$BROWSER || browser='firefox'\n[[  $GUI_EDITOR && ${GUI_EDITOR-x} ]] && gui_editor=$GUI_EDITOR || gui_editor='nvim'\nDMENU_FN=\"Monoid-16\"\nDMENU_NB=\"$color0\"\nDMENU_NF=\"$color6\"\nDMENU_SB=\"$color6\"\nDMENU_SF=\"$color0\"\nDMENU_OPTIONS=\"-fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB\"\n\n\n\neval $(xdotool getmouselocation --shell)\nmenu_widht=400\nmonitor_widht=$(wattr w $(lsw -r))\nmonitor_height=$(wattr h $(lsw -r))\nlines=14\nmenu_height=$(( $lines * 23 ))\nmaxx=$(( $monitor_widht - $menu_widht ))\nminy=$PANEL_HEIGHT\nmaxy=$(( $monitor_height - $menu_height ))\nXP=$X\n[[ $XP -gt $maxx ]] && XP=$maxx\nYP=$Y\n[[ $YP -lt $miny ]] && YP=$miny\n[[ $YP -gt $maxy ]] && YP=$maxy\n\n#DMENU='dmenu $DMENU_OPTIONS'\nif [[ \"$@\" == \"\" ]]; then\n\tchoice=$(echo -e \"Window\\nMove\\nSplit\\nClose\\nHide\\nUrgent\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\n\telse\n\tcase $@ in\n\tWindow)\n\t\tchoice=$(echo -e \"Floating\\nMonocle\\nFullscreen\\nSticky\\nPrivate\\nLock\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\n\t\t;;\n\tSplit)\n\t\tchoice=$(echo -e \"Split up\\nSplit down\\nSplit left\\nSplit right\\nSplit 25%\\nSplit 50%\\nSplit 75%\\nMove to split\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\t\t\n\t\t;;\n\t\"Move to\")\n\n\t\tchoice=$(echo -e \"Desktop...\\nNext free desktop\\nLast focused desktop\\nPromote\" | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB)\n\t\t;;\n\tesac\nfi\n\nmove2desktop(){\n\tname=\"$(bspc query -D | dmenu -i -l 10 -y $PANEL_HEIGHT -w 500 $DMENU_OPTIONS -p 'Move to workspace:')\";\n\tbspc node -d \"$name\";\n}\n\n\ncase \"$choice\" in\n  Window) $0 Window & ;;\n  \"Move to\") $0 Move to & ;;\n  Split) $0 Split & ;;\n  Close) bspc node -c & ;;\n  \"Close windo class\") xdo close -cd & ;;\n  Hide) whid hide & ;;\n  Urgent) bspc node -f next.urgent & ;;\n  Floating) bspc node -t '~floating' & ;;\n  Monocle) bspc desktop -l next & ;;\n  Fullscreen) bspc node -t '~fullscreen' & ;;\n  Private) bspc node -g private & ;;\n  Lock) bspc node -g lock & ;;\n  Desktop...) move2desktop & ;;\n  \"Next free desktop\") bspc node -d next.free & ;;\n  \"Last focused desktop\") bspc node -d last & ;;\n  Promote) bspc node -w biggest.local & ;;\n  \"Split up\") bspc node -p north & ;;  \n  \"Split down\") bspc node -p south & ;;\n  \"Split left\") bspc node -p west & ;;\n  \"Split right\") bspc node -p east & ;;\n  \"Split 25%\") bspc node -o 0.25 & ;;\n  \"Split 50%\") bspc node -o 0.5 & ;;\n  \"Split 75%\") bspc node -o 0.75 & ;;\n  \"Move to split\") bspc node -n last.\\!automatic & ;;\nesac\n"
  },
  {
    "path": ".config/cheat/cheatrc.yaml",
    "content": "database: /home/bresilla/.local/share/cheat/cheatsheet.db\n"
  },
  {
    "path": ".config/color/bloks",
    "content": "#!/usr/bin/env bash\n\n# ANSI Color -- use these variables to easily have different color\n#    and format output. Make sure to output the reset sequence after \n#    colors (f = foreground, b = background), and use the 'off'\n#    feature for anything you turn on.\n\ninitializeANSI()\n{\n  esc=\"\u001b\"\n\n  blackf=\"${esc}[30m\";   redf=\"${esc}[31m\";    greenf=\"${esc}[32m\"\n  yellowf=\"${esc}[33m\"   bluef=\"${esc}[34m\";   purplef=\"${esc}[35m\"\n  cyanf=\"${esc}[36m\";    whitef=\"${esc}[37m\"\n  \n  blackb=\"${esc}[1;30m\";   redb=\"${esc}[1;31m\";    greenb=\"${esc}[1;32m\"\n  yellowb=\"${esc}[1;33m\"   blueb=\"${esc}[1;34m\";   purpleb=\"${esc}[1;35m\"\n  cyanb=\"${esc}[1;36m\";    whiteb=\"${esc}[1;37m\"\n\n  boldon=\"${esc}[1m\";    boldoff=\"${esc}[22m\"\n  italicson=\"${esc}[3m\"; italicsoff=\"${esc}[23m\"\n  ulon=\"${esc}[4m\";      uloff=\"${esc}[24m\"\n  invon=\"${esc}[7m\";     invoff=\"${esc}[27m\"\n\n  reset=\"${esc}[0m\"\n}\n\n# note in this first use that switching colors doesn't require a reset\n# first - the new color overrides the old one.\n\nnumbers (){\n\ninitializeANSI\n\ncat << EOF\n\n${blackf}11111111${reset} ${redf}22222222${reset} ${greenf}33333333${reset} ${yellowf}44444444${reset} ${bluef}55555555${reset} ${purplef}66666666${reset} ${cyanf}77777777${reset} ${whitef}88888888${reset}\n${blackb}11111111${reset} ${redb}22222222${reset} ${greenb}33333333${reset} ${yellowb}44444444${reset} ${blueb}55555555${reset} ${purpleb}66666666${reset} ${cyanb}77777777${reset} ${whiteb}88888888${reset}\n\nEOF\n\n}\n\nblocks (){\n\ninitializeANSI\n\ncat << EOF\n\n${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset}\n${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset}\n${blackf}████${reset}${blackb}████${reset} ${redf}████${reset}${redb}████${reset} ${greenf}████${reset}${greenb}████${reset} ${yellowf}████${reset}${yellowb}████${reset} ${bluef}████${reset}${blueb}████${reset} ${purplef}████${reset}${purpleb}████${reset} ${cyanf}████${reset}${cyanb}████${reset} ${whitef}████${reset}${whiteb}████${reset}\n\nEOF\n\n}\n\ncase $1 in\n\tb)\tblocks;;\n\tn)\tnumbers;;\n\ta)\tblocks && numbers;;\n\t*)  blocks && numbers;;\nesac\n"
  },
  {
    "path": ".config/color/colorz",
    "content": "#!/usr/bin/env bash\n\n#   Daniel Crisman's ANSI color chart script from\n#   The Bash Prompt HOWTO: 6.1. Colours\n#   http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html\n#  \n#   This function echoes a bunch of color codes to the \n#   terminal to demonstrate what's available.  Each \n#   line is the color code of one forground color,\n#   out of 17 (default + 16 escapes), followed by a \n#   test use of that color on all nine background \n#   colors (default + 8 escapes).\n \n    T='•••'   # The text for the color test\n    \n    echo -e \"\\n         def     40m     41m     42m     43m     44m     45m     46m     47m\";\n    \n    for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \\\n               '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \\\n               '  36m' '1;36m' '  37m' '1;37m';\n    \n      do FG=${FGs// /}\n      echo -en \" $FGs \\033[$FG  $T  \"\n      \n      for BG in 40m 41m 42m 43m 44m 45m 46m 47m;\n        do echo -en \"$EINS \\033[$FG\\033[$BG  $T  \\033[0m\";\n      done\n      echo;\n    done\n    echo\n"
  },
  {
    "path": ".config/color/pipes",
    "content": "#!/usr/bin/env bash\n\ndeclare -i f=75 s=13 r=2000 t=0 c=1 n=0 l=0\ndeclare -ir w=$(tput cols) h=$(tput lines)\ndeclare -i x=$((w/2)) y=$((h/2))\ndeclare -ar v=( [00]=\"\\x83\" [01]=\"\\x8f\" [03]=\"\\x93\"\n        [10]=\"\\x9b\" [11]=\"\\x81\" [12]=\"\\x93\"\n        [21]=\"\\x97\" [22]=\"\\x83\" [23]=\"\\x9b\"\n        [30]=\"\\x97\" [32]=\"\\x8f\" [33]=\"\\x81\" )\n\nOPTIND=1\nwhile getopts \"f:s:r:h\" arg; do\ncase $arg in\n    f) ((f=($OPTARG>19 && $OPTARG<101)?$OPTARG:$f));;\n    s) ((s=($OPTARG>4 && $OPTARG<16 )?$OPTARG:$s));;\n    r) ((r=($OPTARG>0)?$OPTARG:$r));;\n    h) echo -e \"Usage: pipes [OPTION]...\"\n        echo -e \"Animated pipes terminal screensaver.\\n\"\n        echo -e \" -f [20-100]\\tframerate (D=75).\"\n        echo -e \" -s [5-15]\\tprobability of a straight fitting (D=13).\"\n        echo -e \" -r LIMIT\\treset after x characters (D=2000).\"\n        echo -e \" -h\\t\\thelp (this screen).\\n\"\n        exit 0;;\n    esac\ndone\n\ntput smcup\ntput reset\ntput civis\nwhile ! read -t0.0$((1000/$f)) -n1; do\n    # New position:\n    (($l%2)) && ((x+=($l==1)?1:-1))\n    ((!($l%2))) && ((y+=($l==2)?1:-1))\n\n    # Loop on edges (change color on loop):\n    ((c=($x>$w || $x<0 || $y>$h || $y<0)?($RANDOM%7-1):$c))\n    ((x=($x>$w)?0:(($x<0)?$w:$x)))\n    ((y=($y>$h)?0:(($y<0)?$h:$y)))\n\n    # New random direction:\n    ((n=$RANDOM%$s-1))\n    ((n=($n>1||$n==0)?$l:$l+$n))\n    ((n=($n<0)?3:$n%4))\n\n    # Print:\n    tput cup $y $x\n    echo -ne \"\\033[1;3${c}m\\xe2\\x94${v[$l$n]}\"\n    (($t>$r)) && tput reset && tput civis && t=0 || ((t++))\n    l=$n\ndone\ntput rmcup\n\n"
  },
  {
    "path": ".config/color/skull",
    "content": "#!/bin/sh\n#  ┳━┓┳━┓0┏┓┓┳━┓┏━┓┓ ┳\n#  ┃┳┛┃━┫┃┃┃┃┃━┃┃ ┃┃┃┃\n#  ┃┗┛┛ ┃┃┃┗┛┻━┛┛━┛┗┻┛\n#     ┳━┓┳ ┓┳┏ ┳━┓\n#     ┃━┛┃ ┃┣┻┓┣━ \n#     ┇  ┗━┛┃ ┛┻━┛\n#    ┓━┓┳┏ ┳ ┓┳  ┳\n#    ┗━┓┣┻┓┃ ┃┃  ┃\n#    ━━┛┇ ┛┗━┛┗━┛┗━┛\n#\n# the worst color script\n# by xero <http://0w.nz>\n\ncat << 'EOF'\n\u001b[1;37m                  .................\n\u001b[1;37m             .syhhso++++++++/++osyyhys+.\n\u001b[1;37m          -oddyo+o+++++++++++++++o+oo+osdms:\n\u001b[1;37m        :dmyo++oosssssssssssssssooooooo+/+ymm+`\n\u001b[1;37m       hmyo++ossyyhhddddddddddddhyyyssss+//+ymd-\n\u001b[1;37m     -mho+oosyhhhddmmmmmmmmmmmmmmddhhyyyso+//+hN+\n\u001b[1;37m     my+++syhhhhdmmNNNNNNNNNNNNmmmmmdhhyyyyo//+sd:\n\u001b[1;37m    hs//+oyhhhhdmNNNNNNNNNNNNNNNNNNmmdhyhhhyo//++y\n\u001b[1;37m    s+++shddhhdmmNNNNNNNNNNNNNNNNNNNNmdhhhdhyo/++/\n\u001b[1;37m    'hs+shmmmddmNNNNNNNNNNNNNNNNNNNNNmddddddhs+oh/\n\u001b[1;37m     shsshdmmmmmNNMMMMMMMMMMMNNNNNNNNmmmmmmdhssdh-\n\u001b[1;37m      +ssohdmmmmNNNNNMMMMMMMMNNNNNNmmmmmNNmdhhhs:`\n\u001b[1;37m  -+oo++////++sydmNNNNNNNNNNNNNNNNNNNdyyys/--://+//:\n\u001b[1;37m  d/+hmNNNmmdddhhhdmNNNNNNNNNNNNNNNmdhyyyhhhddmmNmdyd-\n\u001b[1;37m  ++--+ymNMMNNNNNNmmmmNNNNNNNNNNNmdhddmNNMMMMMMNmhyss\n\u001b[1;37m   /d+` -+ydmNMMMMMMNNmNMMMMMMMmmmmNNMMMMMNNmh- :sdo\n\u001b[1;37m    sNo   ` /ohdmNNMMMMNNMMMMMNNNMMMMMNmdyo/ `  hNh\n\u001b[1;37m     M+'     ``-/oyhmNNMNhNMNhNMMMMNmho/ `     'MN/\n\u001b[1;37m     d+'         `-+osydh0w.nzmNNmho:          'mN:\n\u001b[1;37m    +o/             ` :oo+:s :+o/-`            -dds\n\u001b[1;37m   :hdo       \u001b[0;31mx\u001b[1;37m    `-/ooss:':+ooo: `    \u001b[0;31m0\u001b[1;37m      :sdm+\n\u001b[1;37m  +dNNNh+         :ydmNNm'   `sddmyo          +hmNmds\n\u001b[1;37m dhNMMNNNNmddhsyhdmmNNNM:      NNmNmhyo+oyyyhmNMMNmysd\n\u001b[1;37m ydNNNNNh+/++ohmMMMMNMNh       oNNNNNNNmho++++yddhyssy\n\u001b[1;37m              `:sNMMMMN'       `mNMNNNd/`\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mX\u001b[1;37m y/hMMNm/  .dXb.  -hdmdy: ` \u001b[0;34mXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;37m `o+hNNds. -ymNNy-  .yhys+/`` \u001b[0;34mXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;37m +-+//o/+odMNMMMNdmh++////-/s \u001b[0;34mXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXX\u001b[1;37m mhNd -+d/+myo++ysy/hs -mNsdh/ \u001b[0;34mXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;37m mhMN+ dMm-/-smy-::dMN/sMMmdo \u001b[0;34mXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXX\u001b[1;37m NMy+NMMh oMMMs yMMMyNMMs+ \u001b[0;34mXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXX\u001b[1;37m dy-hMMm+dMMMdoNMMh ydo \u001b[1;34mX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mX \u001b[1;37m smm 'NMMy dms  sm  \u001b[1;34mXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXX                   \u001b[1;34mXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXXXX\n    \u001b[1;31mXXXX\u001b[0;31mXXXX\u001b[1;33mXXXX\u001b[0;33mXXXX\u001b[1;35mXXXX\u001b[0;35mXXXX\u001b[1;32mXXXX\u001b[0;32mXXXX\u001b[1;34mXXXX\u001b[0;34mXXXX\u001b[1;37mXER0\nEOF\n"
  },
  {
    "path": ".config/compton/compton",
    "content": "# Shadow\nshadow = true;\nshadow-radius = 15;\nshadow-offset-x = -5;\nshadow-offset-y = -5;\nshadow-opacity = 0.6;\nshadow-exclude = [\n    \"! name~=''\",\n    \"class_g = 'Conky'\",\n    \"class_g = 'Dunst'\"\n];\n\n# Opacity\ninactive-opacity = 1.0;\nblur-background = false;\nblur-kern = \"3x3box\";\nblur-background-fixed = false;\nblur-background-exclude = [\n    \"window_type = 'dock'\",\n    \"window_type = 'desktop'\"\n];\n\n# Fading\nfading = true;\nfade-delta = 5;\nfade-in-step = 0.03;\nfade-out-step = 0.03;\nfade-exclude = [ ];\n\n# Other\nbackend = \"glx\";\nmark-wmwin-focused = true;\nmark-ovredir-focused = true;\nuse-ewmh-active-win = false;\ndetect-rounded-corners = true;\ndetect-client-opacity = true;\nrefresh-rate = 0;\nvsync = true;\nsw-opti = false;\nunredir-if-possible = false;\nfocus-exclude = [ ];\ndetect-transient = true;\ndetect-client-leader = true;\ninvert-color-include = [ ];\n\n# GLX backend\nglx-no-stencil = true;\nglx-no-rebind-pixmap = false;\nuse-damage = true;\n\n# Window type settings\nwintypes:\n{\n    tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }\n    dock = { shadow = false; }\n    dnd = { shadow = false; }\n    popup_menu = { opacity = 1.0; }\n    dropdown_menu = { opacity = 1.0; }\n};\n"
  },
  {
    "path": ".config/conky/conky",
    "content": "conky.config = {\n    alignment = 'top_left',\n    background = false,\n    border_width = 0,\n\tcolor0 = 'white',\n\tcolor1 = 'black',\n\tcolor5 = '#F69CDA',\n    --cpu_avg_samples = 2,\n\t--default_color = 'white',\n\t--default_bar_height = 6,\n\t--default_bar_width = 0,\n\t--default_gauge_height = 25,\n\t--default_gauge_width = 40,\n\t--default_graph_height = 25,\n\t--default_graph_width = ,\n    --default_outline_color = 'white',\n    --default_shade_color = 'white',\n\t--disable_auto_reload = true,\n\tdiskio_avg_samples = 3,\n\t--display = ,\n\t--xinerama_head = ,\n\tdouble_buffer = true,\n    --draw_borders = false,\n    --draw_graph_borders = true,\n    --draw_outline = false,\n    --draw_shades = false,\n    --extra_newline = false,\n    font = 'Iosevka Term SS01:size=12',\n    gap_x = 3285,\n    gap_y = 80,\n\t--http_refresh = false,\n\tif_up_strictness = 'link',\n\t--max_text_width = 0,\n\t--max_user_text = 16384,\n\t--maximum_width = ,\n    --minimum_height = 5,\n\t--minimum_width = 5,\n    net_avg_samples = 4,\n    --no_buffers = true,\n\t--nvidia_display = ,\n    --out_to_console = false,\n\t--out_to_http = false,\n\t--out_to_ncurses = false,\n    --out_to_stderr = false,\n\t--out_to_x = true,\n\t--override_utf8_locale = true,\n    own_window = true,\n    --own_window_class = 'Conky',\n\t--own_window_title = 'conky0 (<hostname>)'\n\town_window_argb_visual = true,\n\town_window_argb_value = 0,\n\t--own_window_transparent = yes,\n    own_window_type = 'override',\n\t--short_units = true,\n    --show_graph_scale = false,\n    --show_graph_range = false,\n    --stippled_borders = 0,\n\t--text_buffer_size = 256,\n\t--top_cpu_separate = true,\n\t--top_name_verbose = true,\n\t--top_name_width = 15,\n\t--total_run_times = 0,\n    update_interval = 0.5,\n\tupdate_interval_on_battery = 1,\n    use_spacer = 'none',\n    use_xft = true\n}\n\n\n\nconky.text = [[\n$color5${hr 2}\n\n${alignc}${color0}${font ChessType:pixelsize=80}${time %I:%M}$font\n\n${alignc}${time %d}$color ${time %B} ${time %Y}\n\n${alignc}${color5}${font ChessType:pixelsize=80}BRESILLA$font\n${color0}\nHostname: $alignr$nodename\nProcessor: ${alignr}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'| uniq | cut -c 1-27}\n#Graphics: ${alignr}${exec nvidia-smi --query-gpu=name --format=csv,noheader}\nKernel: $alignr$kernel\nBattery: ${battery_percent BAT0}% ${battery_bar 12 BAT0}\nVolume: ${exec amixer -c 0 get Master | grep Mono: | cut -d \" \" -f6} ${goto 200}\\\nBrightness: ${exec cat /sys/class/backlight/intel*/brightness} ${alignr}Uptime: $alignr$uptime\n\n$color5${hr 2}\n\n${color0}${goto 50}$cpu% ${goto 90}${freq}mHz ${goto 180}${color0}${acpitemp}℃\\\n${alignr 40}${color0}$memperc% = $mem / $memmax\n${color0}${cpugraph 120,250 00ffff 00ff00} \\\n${color0}${memgraph 120,250 00ffff 00ff00}\n${color0}CPU 1 : $color0${cpu cpu1}% ${goto 100}${cpubar cpu1 12,150}  \\\n${color0}CPU 5 : ${alignr 5}$color0${cpu cpu5}% ${cpubar cpu5 12,150}\n${color0}CPU 2 : $color0${cpu cpu2}% ${goto 100}${cpubar cpu2 12,150}  \\\n${color0}CPU 6 : ${alignr 5}$color0${cpu cpu6}% ${cpubar cpu6 12,150}\n${color0}CPU 3 : $color0${cpu cpu3}% ${goto 100}${cpubar cpu3 12,150}  \\\n${color0}CPU 7 : ${alignr 5}$color0${cpu cpu7}% ${cpubar cpu7 12,150}\n${color0}CPU 4 : $color0${cpu cpu4}% ${goto 100}${cpubar cpu4 12,150}  \\\n${color0}CPU 8 : ${alignr 5}$color0${cpu cpu8}% ${cpubar cpu8 12,150}\n#GPU:${alignr}${exec nvidia-smi --query-gpu=memory.used --format=csv,noheader} / ${exec nvidia-smi --query-gpu=memory.total --format=csv,noheader}\n${color0}Swap memory: $swapperc% = $swap/$swapmax \\\n${color0} ${swapbar 12 00ff00 ff0000}\n\n$color5${hr 2}\n\n${color0}Highest CPU         PID   CPU% | \\\n${color0}Highest MEM         PID   MEM%\n${color0} ${top     name 1} ${top     pid 1} ${top     cpu 1} | \\\n${color0} ${top_mem name 1} ${top_mem pid 1} ${top_mem mem 1}\n${color0} ${top     name 2} ${top     pid 2} ${top     cpu 2} | \\\n${color0} ${top_mem name 2} ${top_mem pid 2} ${top_mem mem 2}\n${color0} ${top     name 3} ${top     pid 3} ${top     cpu 3} | \\\n${color0} ${top_mem name 3} ${top_mem pid 3} ${top_mem mem 3}\n${color0} ${top     name 4} ${top     pid 4} ${top     cpu 4} | \\\n${color0} ${top_mem name 4} ${top_mem pid 4} ${top_mem mem 4}\n${color0} ${top     name 5} ${top     pid 5} ${top     cpu 5} | \\\n${color0} ${top_mem name 5} ${top_mem pid 5} ${top_mem mem 5}\n${color0} ${top     name 6} ${top     pid 6} ${top     cpu 6} | \\\n${color0} ${top_mem name 6} ${top_mem pid 6} ${top_mem mem 6}\n${color0} ${top     name 7} ${top     pid 7} ${top     cpu 7} | \\\n${color0} ${top_mem name 7} ${top_mem pid 7} ${top_mem mem 7}\n${color0} ${top     name 8} ${top     pid 8} ${top     cpu 8} | \\\n${color0} ${top_mem name 8} ${top_mem pid 8} ${top_mem mem 8}\n\n$color5${hr 2}\n\n ${color0}/dev/sda1\\\n ${goto 160}${color0}${diskio_read sda1}\\\n ${goto 242}${color0}R|${color0}|W\\\n ${goto 320}${color0}${diskio_write sda1}\n${color0}${diskiograph_read 60,250 00ffff 00ff00} \\\n${color0}${diskiograph_write 60,250 00ffff 00ff00}\n ${color0}${fs_used /} /\\\n ${color0}${fs_size /} \\\n ${color0}${fs_bar 12 /}\n\n ${color0}/dev/nvme0n1\\\n ${goto 160}${color0}${diskio_read nvme0n1}\\\n ${goto 242}${color0}R|${color0}|W\\\n ${goto 320}${color0}${diskio_write nvme0n1}\n${color0}${diskiograph_read 60,250 00ffff 00ff00} \\\n${color0}${diskiograph_write 60,250 00ffff 00ff00}\n ${color0}${fs_used /home/bresilla/DATA} /\\\n ${color0}${fs_size /home/bresilla/DATA} \\\n ${color0}${fs_bar 12 /home/bresilla/DATA}\n\n$color5${hr 2}\n\n${if_up wlp2s0}\\\n ${goto 80}${color0}T:${totaldown wlp2s0} \\\n ${goto 180}${color0}${downspeed wlp2s0}\\\n ${goto 245}↓${color0}↑ ${upspeed wlp2s0}\\\n ${goto 350}${color0}T:${totalup wlp2s0}\n${color0}${downspeedgraph wlp2s0 90,250 00ffff 00ff00} \\\n${color0}${upspeedgraph wlp2s0 90,250 00ffff 00ff00}\n${color0}ID: ${color0}wlp2s0    \\\n${goto 150}${color0}MAC: ${color0}${wireless_ap wlp2s0} \\\n${alignr}${color0}IP: ${addr wlp2s0}\n${color0}CHN: ${color0}${wireless_channel wlp2s0} \\\n${goto 150}${color0} FRQ: ${color0}${wireless_freq wlp2s0}  \\\n${alignr}${color0}ESSID: ${color0}${wireless_essid wlp2s0}\n${endif}\\\n\n$color5${hr 2}\n\n${color0}Outbound Connection ${alignr} Remote Service/Port${color}\n${tcp_portmon 32768 61000 rhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}\n${tcp_portmon 32768 61000 rhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}\n${tcp_portmon 32768 61000 rhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}\n${tcp_portmon 32768 61000 rhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}\n${color0}Inbound Connection ${alignr} Local Service/Port${color}\n${tcp_portmon 1 32767 rhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}\n${tcp_portmon 1 32767 rhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}\n$color5${hr 2}\n]]\n\n"
  },
  {
    "path": ".config/cool-retro-term/TRIM.json",
    "content": "{\n  \"backgroundColor\": \"#000000\",\n  \"fontColor\": \"#edfff1\",\n  \"flickering\": 0.2997,\n  \"horizontalSync\": 0.2962,\n  \"staticNoise\": 0.2038,\n  \"chromaColor\": 0.399,\n  \"saturationColor\": 0.5017,\n  \"screenCurvature\": 0,\n  \"glowingLine\": 0.0976,\n  \"burnIn\": 0.5976,\n  \"bloom\": 0.7962,\n  \"rasterization\": 0,\n  \"jitter\": 0.0976,\n  \"rbgShift\": 0.1045,\n  \"brightness\": 0.2963,\n  \"contrast\": 1,\n  \"ambientLight\": 0,\n  \"windowOpacity\": 0.795,\n  \"fontName\": \"System: Iosevka Term SS01\",\n  \"fontWidth\": 1,\n  \"margin\": 0.7533,\n  \"name\": \"TRIM\",\n  \"version\": 2\n}"
  },
  {
    "path": ".config/direnv/direnvrc",
    "content": "export INDIRENV=true;\n\nuse_ros(){\n    _CATKIN_SETUP_DIR=/opt/ubuntu/opt/ros/install\n    export PYTHONPATH=/opt/ubuntu/usr/lib/python3/dist-packages\n    ROSPATH=\"$_CATKIN_SETUP_DIR/bin\" && [[ -d \"$ROSPATH\" ]] && PATH=\"$ROSPATH:$PATH\" || exit 1\n    if [[ -n ${ZSH_VERSION-} ]]; then\n        echo \"sourcing $_CATKIN_SETUP_DIR/setup.zsh\";\n        source $_CATKIN_SETUP_DIR/setup.zsh;\n    elif [[ -n ${BASH_VERSION-} ]]; then\n        echo \"sourcing $_CATKIN_SETUP_DIR/setup.bash\";\n        source $_CATKIN_SETUP_DIR/setup.bash;\n    else\n        echo \"sourcing $_CATKIN_SETUP_DIR/setup.sh\";\n        source $_CATKIN_SETUP_DIR/setup.sh;\n    fi\n}\n\nuse_docker(){\n    if [[ -n $(awk -F/ '$2 == \"docker\"' /proc/self/cgroup) ]]; then\n        echo \"ALREADY INSIDE DOCKER\";\n    else\n        docker run -v $PWD/:/$(basename $PWD)/ -w /$( basename $PWD)/ --rm -it $@;\n    fi\n}\n\n\nlayout_viper() {\n    local BLUE='\\033[0;34m';local GREEN='\\033[0;32m';local RED='\\033[0;31m';local NC='\\033[0m'\n    CONDAPATH=\"/opt/conda/bin\" && [[ -d \"$CONDAPATH\" ]] && PATH=\"$CONDAPATH:$PATH\" || exit 1\n\n    if [ -f environment.yml ]; then\n        local env_name =$(grep name: environment.yml | sed -e 's/name: //' | cut -d \"'\" -f 2 | cut -d '\"' -f 2)\n        source activate ${env_name}\n        PATH=\"/opt/conda/envs/${env_name}/bin:$PATH\"\n        printf \"\\n${GREEN}environment specified${NC}\\nusing environment: ${BLUE}${conda_env}${NC}\\n\\n\";\n    else\n        CONDALOC=\"$PWD/.direnv/bin\"\n        conda_env=$(conda info | sed -n '3p' | cut -d: -f2)\n        if [[ -d \"$CONDALOC\" ]]; then\n            source activate $PWD/.direnv\n            # PATH=\"$CONDALOC:$PATH\"\n            conda_env=$(conda info | sed -n '3p' | cut -d: -f2)\n            printf \"\\n${GREEN}environment specified${NC}\\nusing environment: ${BLUE}${conda_env}${NC}\\n\\n\";\n        else\n            conda create -p $PWD/.direnv python=${1:-3.7}\n            source activate $PWD/.direnv\n            # PATH=\"$CONDALOC:$PATH\"\n        fi\n    fi;\n}\n\n\nlayout_conda() {\n    local BLUE='\\033[0;34m';local GREEN='\\033[0;32m';local RED='\\033[0;31m';local NC='\\033[0m'\n    CONDAPATH=\"/opt/conda/bin\" && [[ -d \"$CONDAPATH\" ]] && PATH=\"$CONDAPATH:$PATH\" || exit 1\n\n    if [ -n \"$1\" ]; then\n        local env_name=\"$1\"\n        source activate ${env_name}\n        conda_env=$(conda info | sed -n '3p' | cut -d: -f2)\n        if [ $? == 1 ]; then\n            printf \"\\n${RED}no environment specified${NC}\\nusing environment: ${BLUE}${conda_env}${NC}\\n\\n\";\n        else\n            printf \"\\n${GREEN}environment specified${NC}\\nusing environment: ${BLUE}${conda_env}${NC}\\n\\n\";\n        fi\n    elif [ -f environment.yml ]; then\n        local env_name =$(grep name: environment.yml | sed -e 's/name: //' | cut -d \"'\" -f 2 | cut -d '\"' -f 2)\n        source activate ${env_name}\n        printf \"\\n${GREEN}environment specified${NC}\\nusing environment: ${BLUE}${conda_env}${NC}\\n\\n\";\n    else\n        printf \"\\n${RED}no environment specified${NC}\\nusing base environment\\n\\n\";\n    fi;\n}\n\n\nexport_function() {\n  local name=$1\n  local alias_dir=$PWD/.direnv/functions\n  mkdir -p \"$alias_dir\"\n  PATH_add \"$alias_dir\"\n  local target=\"$alias_dir/$name\"\n  if declare -f \"$name\" >/dev/null; then\n    echo \"#!$SHELL\" > \"$target\"\n    declare -f \"$name\" >> \"$target\" 2>/dev/null\n    # Notice that we add shell variables to the function trigger.\n    echo \"$name \\$*\" >> \"$target\"\n    chmod +x \"$target\"\n  fi\n}\n# EXAMPLE\n# woot() {\n  # echo woot\n# }\n# export_function woot\n\nexport_alias() {\n    local name=$1\n    shift\n    local alias_dir=$PWD/.direnv/aliases\n    local target=\"$alias_dir/$name\"\n    mkdir -p \"$alias_dir\"\n    PATH_add \"$alias_dir\"\n    echo \"#!/usr/bin/env bash -e\" > \"$target\"\n    echo \"$@\" >> \"$target\"\n    chmod +x \"$target\"\n}\n# EXAMPLE\n# export_alias piuu \"ls -la\"\n\ntidyup(){\n    [[ -d \"$PWD/.direnv/functions\" ]] && rm -r $PWD/.direnv/functions\n    [[ -d \"$PWD/.direnv/aliases\" ]] && rm -r $PWD/.direnv/aliases\n}\n"
  },
  {
    "path": ".config/fish/completions/fisher.fish",
    "content": "fisher complete\n"
  },
  {
    "path": ".config/fish/conf.d/done.fish",
    "content": "# MIT License\n\n# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\nset -g __done_version 1.12.0\n\nfunction __done_get_focused_window_id\n    if type -q lsappinfo\n        lsappinfo info -only bundleID (lsappinfo front) | cut -d '\"' -f4\n    else if test -n \"$SWAYSOCK\"\n        and type -q jq\n        swaymsg --type get_tree | jq '.. | objects | select(.focused == true) | .id'\n    else if type -q xprop\n        and test -n \"$DISPLAY\"\n        xprop -root 32x '\\t$0' _NET_ACTIVE_WINDOW | cut -f 2\n    else if uname -a | string match --quiet --regex Microsoft\n        echo 12345 # dummy value since cannot get window state info under WSL\n    end\nend\n\nfunction __done_is_tmux_window_active\n    set -q fish_pid; or set -l fish_pid %self\n\n    # If tmux is set to not run as a login shell,\n    # e.g. `set -g default-command \"${SHELL}\"` in tmux config,\n    # then the pane_pid will be parent pid of the current fish shell.\n    if status is-login\n        set tmux_fish_pid $fish_pid\n    else\n        set tmux_fish_pid (ps -o ppid= -p $fish_pid)\n    end\n    # tmux session attached and window is active -> no notification\n    # all other combinations -> send notification\n    tmux list-panes -a -F \"#{session_attached} #{window_active} #{pane_pid}\" | string match -q \"1 1 $tmux_fish_pid\"\nend\n\nfunction __done_is_screen_window_active\n    string match --quiet --regex \"$STY\\s+\\(Attached\" (screen -ls)\nend\n\nfunction __done_is_process_window_focused\n    # Return false if the window is not focused\n    set __done_focused_window_id (__done_get_focused_window_id)\n    if test \"$__done_initial_window_id\" != \"$__done_focused_window_id\"\n        return 1\n    end\n    # If inside a tmux session, check if the tmux window is focused\n    if type -q tmux\n        and test -n \"$TMUX\"\n        __done_is_tmux_window_active\n        return $status\n    end\n\n    # If inside a screen session, check if the screen window is focused\n    if type -q screen\n        and test -n \"$STY\"\n        __done_is_screen_window_active\n        return $status\n    end\n\n    return 0\nend\n\n\n# verify that the system has graphical capabilities before initializing\nif test -z \"$SSH_CLIENT\" # not over ssh\n    and count (__done_get_focused_window_id) >/dev/null # is able to get window id\n\n    set -g __done_initial_window_id ''\n    set -q __done_min_cmd_duration; or set -g __done_min_cmd_duration 5000\n    set -q __done_exclude; or set -g __done_exclude 'git (?!push|pull)'\n    set -q __done_notify_sound; or set -g __done_notify_sound 0\n\n    function __done_started --on-event fish_preexec\n        set __done_initial_window_id (__done_get_focused_window_id)\n    end\n\n    function __done_ended --on-event fish_prompt\n        set -l exit_status $status\n\n        # backwards compatibility for fish < v3.0\n        set -q cmd_duration; or set -l cmd_duration $CMD_DURATION\n\n        if test $cmd_duration\n            and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration\n            and not __done_is_process_window_focused # process pane or window not focused\n            and not string match -qr $__done_exclude $history[1] # don't notify on git commands which might wait external editor\n\n            # Store duration of last command\n            set -l humanized_duration (echo \"$cmd_duration\" | humanize_duration)\n\n            set -l title \"Done in $humanized_duration\"\n            set -l wd (pwd | sed \"s,^$HOME,~,\")\n            set -l message \"$wd/ $history[1]\"\n            set -l sender $__done_initial_window_id\n\n            if test $exit_status -ne 0\n                set title \"Failed ($exit_status) after $humanized_duration\"\n            end\n\n            if set -q __done_notification_command\n                eval $__done_notification_command\n                if test \"$__done_notify_sound\" -eq 1\n                    echo -e \"\\a\" # bell sound\n                end\n            else if type -q terminal-notifier # https://github.com/julienXX/terminal-notifier\n                if test \"$__done_notify_sound\" -eq 1\n                    terminal-notifier -message \"$message\" -title \"$title\" -sender \"$__done_initial_window_id\" -sound default\n                else\n                    terminal-notifier -message \"$message\" -title \"$title\" -sender \"$__done_initial_window_id\"\n                end\n\n            else if type -q osascript # AppleScript\n                osascript -e \"display notification \\\"$message\\\" with title \\\"$title\\\"\"\n                if test \"$__done_notify_sound\" -eq 1\n                    echo -e \"\\a\" # bell sound\n                end\n\n            else if type -q notify-send # Linux notify-send\n                set -l urgency\n                if test $exit_status -ne 0\n                    set urgency \"--urgency=critical\"\n                end\n                notify-send $urgency --icon=terminal --app-name=fish \"$title\" \"$message\"\n                if test \"$__done_notify_sound\" -eq 1\n                    echo -e \"\\a\" # bell sound\n                end\n\n            else if type -q notify-desktop # Linux notify-desktop\n                set -l urgency\n                if test $exit_status -ne 0\n                    set urgency \"--urgency=critical\"\n                end\n                notify-desktop $urgency --icon=terminal --app-name=fish \"$title\" \"$message\"\n                if test \"$__done_notify_sound\" -eq 1\n                    echo -e \"\\a\" # bell sound\n                end\n\n            else if uname -a | string match --quiet --regex Microsoft\n                if powershell.exe -command \"Import-Module -Name BurntToast\" 2>/dev/null\n                    if test \"$__done_notify_sound\" -eq 1\n                        set soundopt \"-Sound Default\"\n                    end\n                    powershell.exe -command New-BurntToastNotification -Text \\\"\"$title\"\\\",\\\"\"$message\"\\\" $soundopt\n                end\n\n            else # anything else\n                echo -e \"\\a\" # bell sound\n            end\n\n        end\n    end\nend\n\nfunction __done_uninstall -e done_uninstall\n    # Erase all __done_* functions\n    functions -e __done_ended\n    functions -e __done_started\n    functions -e __done_get_focused_window_id\n    functions -e __done_is_tmux_window_active\n    functions -e __done_is_screen_window_active\n    functions -e __done_is_process_window_focused\n\n    # Erase __done variables\n    set -e __done_version\nend\n"
  },
  {
    "path": ".config/fish/config.fish",
    "content": "function fish_mode_prompt; end\nfunction fish_greeting; end\n\nfunction fish_prompt\n    env FISH_VERSION=$FISH_VERSION PROMPTLINE_LAST_EXIT_CODE=$status bash ~/.config/promptline left $fish_bind_modea (__fish_git_prompt)\nend\nfunction fish_right_prompt\n    env FISH_VERSION=$FISH_VERSION PROMPTLINE_LAST_EXIT_CODE=$status bash ~/.config/promptline right $fish_bind_mode (__fish_git_prompt)\nend\n\nset -g __fish_git_prompt_show_informative_status 1\nset -g __fish_git_prompt_hide_untrackedfiles 1\nset -g __fish_git_prompt_color_branch magenta\nset -g __fish_git_prompt_showupstream \"informative\"\nset -g __fish_git_prompt_char_upstream_ahead \"↑\"\nset -g __fish_git_prompt_char_upstream_behind \"↓\"\nset -g __fish_git_prompt_char_upstream_prefix \"\"\nset -g __fish_git_prompt_char_stagedstate \"●\"\nset -g __fish_git_prompt_char_dirtystate \"✚\"\nset -g __fish_git_prompt_char_untrackedfiles \"-\"\nset -g __fish_git_prompt_char_conflictedstate \"✖\"\nset -g __fish_git_prompt_char_cleanstate \"✔\"\nset -g __fish_git_prompt_color_dirtystate blue\nset -g __fish_git_prompt_color_stagedstate yellow\nset -g __fish_git_prompt_color_invalidstate red\nset -g __fish_git_prompt_color_untrackedfiles $fish_color_normal\nset -g __fish_git_prompt_color_cleanstate green\nset -g __fish_prompt_normal (set_color normal)\n\nfunction sh_aliases \\\n    --description 'import bash aliases to .fish function files.'\n    for file in ~/.func/*\n        for a in (cat $file  | grep \"^alias\")\n            set aname (echo $a | sed 's/alias \\(.*\\)=\\(\\'\\|\\\"\\).*/\\1/')\n            set command (echo $a | sed 's/alias \\(.*\\)=\\(\\'\\|\\\"\\)\\(.*\\)\\2/\\3/')\n            if test -f ~/.config/fish/functions2/$aname.fish\n                echo \"Overwriting alias $aname as $command\"\n            else\n                echo \"Creating alias $aname as $command\"\n            end\n            alias $aname $command\n            funcsave $aname\n        end\n    end\nend\n\n###DIRENV\n# direnv hook fish | source\n"
  },
  {
    "path": ".config/fish/fish_variables",
    "content": "# This file contains fish universal variable definitions.\n# VERSION: 3.0\nSETUVAR __fish_init_2_39_8:\\x1d\nSETUVAR __fish_init_2_3_0:\\x1d\nSETUVAR __fish_init_3_x:\\x1d\nSETUVAR fish_color_autosuggestion:555\\x1ebrblack\nSETUVAR fish_color_cancel:\\x2dr\nSETUVAR fish_color_command:005fd7\nSETUVAR fish_color_comment:990000\nSETUVAR fish_color_cwd:green\nSETUVAR fish_color_cwd_root:red\nSETUVAR fish_color_end:009900\nSETUVAR fish_color_error:ff0000\nSETUVAR fish_color_escape:00a6b2\nSETUVAR fish_color_history_current:\\x2d\\x2dbold\nSETUVAR fish_color_host:normal\nSETUVAR fish_color_match:\\x2d\\x2dbackground\\x3dbrblue\nSETUVAR fish_color_normal:normal\nSETUVAR fish_color_operator:00a6b2\nSETUVAR fish_color_param:00afff\nSETUVAR fish_color_quote:999900\nSETUVAR fish_color_redirection:00afff\nSETUVAR fish_color_search_match:bryellow\\x1e\\x2d\\x2dbackground\\x3dbrblack\nSETUVAR fish_color_selection:white\\x1e\\x2d\\x2dbold\\x1e\\x2d\\x2dbackground\\x3dbrblack\nSETUVAR fish_color_status:red\nSETUVAR fish_color_user:brgreen\nSETUVAR fish_color_valid_path:\\x2d\\x2dunderline\nSETUVAR fish_greeting:Welcome\\x20to\\x20fish\\x2c\\x20the\\x20friendly\\x20interactive\\x20shell\nSETUVAR fish_key_bindings:fish_vi_key_bindings\nSETUVAR fish_pager_color_completion:\\x1d\nSETUVAR fish_pager_color_description:B3A06D\\x1eyellow\nSETUVAR fish_pager_color_prefix:white\\x1e\\x2d\\x2dbold\\x1e\\x2d\\x2dunderline\nSETUVAR fish_pager_color_progress:brwhite\\x1e\\x2d\\x2dbackground\\x3dcyan\n"
  },
  {
    "path": ".config/fish/fishfile",
    "content": "edc/bass\njorgebucaran/fish-bax\nfranciscolourenco/done\n"
  },
  {
    "path": ".config/fish/functions/:q.fish",
    "content": "# Defined in - @ line 1\nfunction :q --description 'alias :q exit'\n\texit  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/__bass.py",
    "content": "\"\"\"\nTo be used with a companion fish function like this:\n\n        function refish\n            set -l _x (python /tmp/bass.py source ~/.nvm/nvim.sh ';' nvm use iojs); source $_x; and rm -f $_x\n        end\n\n\"\"\"\n\nfrom __future__ import print_function\n\nimport json\nimport os\nimport signal\nimport subprocess\nimport sys\nimport traceback\n\n\nBASH = 'bash'\n\nFISH_READONLY = [\n    'PWD', 'SHLVL', 'history', 'pipestatus', 'status', 'version',\n    'FISH_VERSION', 'fish_pid', 'hostname', '_', 'fish_private_mode'\n]\n\nIGNORED = [\n 'PS1', 'XPC_SERVICE_NAME'\n]\n\ndef ignored(name):\n    if name == 'PWD':  # this is read only, but has special handling\n        return False\n    # ignore other read only variables\n    if name in FISH_READONLY:\n        return True\n    if name in IGNORED or name.startswith(\"BASH_FUNC\"):\n        return True\n    return False\n\ndef escape(string):\n    # use json.dumps to reliably escape quotes and backslashes\n    return json.dumps(string).replace(r'$', r'\\$')\n\ndef comment(string):\n    return '\\n'.join(['# ' + line for line in string.split('\\n')])\n\ndef gen_script():\n    # Use the following instead of /usr/bin/env to read environment so we can\n    # deal with multi-line environment variables (and other odd cases).\n    env_reader = \"python -c 'import os,json; print(json.dumps({k:v for k,v in os.environ.items()}))'\"\n    args = [BASH, '-c', env_reader]\n    output = subprocess.check_output(args, universal_newlines=True)\n    old_env = output.strip()\n\n    pipe_r, pipe_w = os.pipe()\n    if sys.version_info >= (3, 4):\n      os.set_inheritable(pipe_w, True)\n    command = 'eval $1 && ({}; alias) >&{}'.format(\n        env_reader,\n        pipe_w\n    )\n    args = [BASH, '-c', command, 'bass', ' '.join(sys.argv[1:])]\n    subprocess.check_call(args, universal_newlines=True, close_fds=False)\n    os.close(pipe_w)\n    with os.fdopen(pipe_r) as f:\n        new_env = f.readline()\n        alias = f.read()\n    new_env = new_env.strip()\n\n    old_env = json.loads(old_env)\n    new_env = json.loads(new_env)\n\n    script_lines = []\n\n    for k, v in new_env.items():\n        if ignored(k):\n            continue\n        v1 = old_env.get(k)\n        if not v1:\n            script_lines.append(comment('adding %s=%s' % (k, v)))\n        elif v1 != v:\n            script_lines.append(comment('updating %s=%s -> %s' % (k, v1, v)))\n            # process special variables\n            if k == 'PWD':\n                script_lines.append('cd %s' % escape(v))\n                continue\n        else:\n            continue\n        if k == 'PATH':\n            value = ' '.join([escape(directory)\n                              for directory in v.split(':')])\n        else:\n            value = escape(v)\n        script_lines.append('set -g -x %s %s' % (k, value))\n\n    for var in set(old_env.keys()) - set(new_env.keys()):\n        script_lines.append(comment('removing %s' % var))\n        script_lines.append('set -e %s' % var)\n\n    script = '\\n'.join(script_lines)\n\n    return script + '\\n' + alias\n\nscript_file = os.fdopen(3, 'w')\n\nif not sys.argv[1:]:\n    print('__bass_usage', file=script_file, end='')\n    sys.exit(0)\n\ntry:\n    script = gen_script()\nexcept subprocess.CalledProcessError as e:\n    sys.exit(e.returncode)\nexcept Exception:\n    print('Bass internal error!', file=sys.stderr)\n    raise # traceback will output to stderr\nexcept KeyboardInterrupt:\n    signal.signal(signal.SIGINT, signal.SIG_DFL)\n    os.kill(os.getpid(), signal.SIGINT)\nelse:\n    script_file.write(script)\n"
  },
  {
    "path": ".config/fish/functions/ari.fish",
    "content": "# Defined in - @ line 1\nfunction ari --description 'alias ari aria2c'\n\taria2c  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/asci.fish",
    "content": "# Defined in - @ line 1\nfunction asci --description 'alias asci asciinema'\n\tasciinema  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/bass.fish",
    "content": "function bass\n  set -l bash_args $argv\n  set -l bass_debug\n  if test \"$bash_args[1]_\" = '-d_'\n    set bass_debug true\n    set -e bash_args[1]\n  end\n\n  set -l script_file (mktemp)\n  python (dirname (status -f))/__bass.py $bash_args 3>$script_file\n  set -l bass_status $status\n  if test $bass_status -ne 0\n    return $bass_status\n  end\n\n  if test -n \"$bass_debug\"\n    cat $script_file\n  end\n  source $script_file\n  /bin/rm $script_file\nend\n\nfunction __bass_usage\n  echo \"Usage: bass [-d] <bash-command>\"\nend\n"
  },
  {
    "path": ".config/fish/functions/bax.fish",
    "content": "set -g bax_version 1.0.0\n\ncomplete -xc bax -n __fish_use_subcommand -a --help -d \"Show usage help\"\ncomplete -xc bax -n __fish_use_subcommand -a --version -d \"$bax_version\"\n\nfunction bax\n    switch \"$argv\"\n        case {,-}-h{elp,} \"\"\n            echo \"usage: bax <bash commands>    Run a bash command\"\n            echo \"       bax --help             Show this help\"\n            echo \"       bax --version          Show the current version\"\n        case {,-}-v{ersion,}\n            echo \"bax version $bax_version\"\n        case \\*\n            set -l delim \"@@@@bax@@@@\"\n            command bash -c \"\n                $argv\n                status=\\$?\n                [ \\$status -eq 0 ] && echo $delim && alias && echo $delim && command awk '\n                    BEGIN {\n                        for (k in ENVIRON)\n                            if (gsub(/\\n/, \\\"\\\\\\n\\\", ENVIRON[k]) >= 0)\n                                print k, ENVIRON[k]\n                    }\n                ' || echo $delim \\$status\n            \" | command awk -v delim=\"$delim\" '\n                $0 != delim || !++i {\n                    if ($1 == delim) exit $2\n                    else if (i < 2) print (i ? $0 : gsub(/\\$/, \"\\\\\\$\") >= 0 ? \"echo \\\"\" $0 \"\\\"\" : \"\")\n                    else env[$1] = (gsub(/\\\\\\n/, \"\\n\") >= 0 ? substr($0, length($1) + 2) : \"\")\n                }\n                END {\n                    for (k in env)\n                        if (len++ && k !~ /^(_|SHLVL|PS1|XPC_SERVICE_NAME|AWK(LIB)?PATH)$|^BASH_FUNC/\\\n                        && !(k in ENVIRON && ENVIRON[k] == env[k]))\n                            print (\\\n                                k == \"PATH\" && gsub(/:/, \"\\\" \\\"\", env[k]) >= 0\\\n                                    ? \"set PATH \\\"\" env[k] \"\\\"\" : k == \"PWD\"\\\n                                    ? \"cd \\\"\" env[k] \"\\\"\" : \"set -gx \" k \" \\\"\" env[k] \"\\\"\"\\\n                            )\n                    if (!len) print \"exit \" $2\n                    else for (k in ENVIRON) if (!(k in env)) print \"set -e \" k\n                }\n            ' | source\n    end\nend\n"
  },
  {
    "path": ".config/fish/functions/class.fish",
    "content": "# Defined in - @ line 1\nfunction class --description alias\\ class\\ xprop\\ \\|awk\\ \\'/WM_CLASS/\\{print\\ \\$4\\}\\'\n\txprop |awk '/WM_CLASS/{print $4}' $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/copy.fish",
    "content": "# Defined in - @ line 1\nfunction copy --description 'alias copy xclip -sel clip'\n\txclip -sel clip $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/cp.fish",
    "content": "# Defined in - @ line 1\nfunction cp --description 'alias cp acp -g -r'\n\tacp -g -r $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/dev.fish",
    "content": "# Defined in - @ line 1\nfunction dev --description 'alias dev devenv'\n\tdevenv  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/df.fish",
    "content": "# Defined in - @ line 1\nfunction df --description 'alias df dfc -w'\n\tdfc -w $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/doc.fish",
    "content": "# Defined in - @ line 1\nfunction doc --description 'alias doc docker'\n\tdocker  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/docker.fish",
    "content": "# Defined in - @ line 1\nfunction docker --description 'alias docker supdock'\n\tsupdock  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/dotfile.fish",
    "content": "# Defined in - @ line 1\nfunction dotfile --description 'alias dotfile /usr/bin/git --git-dir=$HOME/Dots --work-tree=$HOME'\n\t/usr/bin/git --git-dir=$HOME/Dots --work-tree=$HOME $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/dxe.fish",
    "content": "# Defined in - @ line 1\nfunction dxe --description 'alias dxe chmod -x'\n\tchmod -x $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/exe.fish",
    "content": "# Defined in - @ line 1\nfunction exe --description 'alias exe chmod +x'\n\tchmod +x $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/fisher.fish",
    "content": "set -g fisher_version 3.2.10\n\nfunction fisher -a cmd -d \"fish package manager\"\n    set -q XDG_CACHE_HOME; or set XDG_CACHE_HOME ~/.cache\n    set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config\n\n    set -g fish_config $XDG_CONFIG_HOME/fish\n    set -g fisher_cache $XDG_CACHE_HOME/fisher\n    set -g fisher_config $XDG_CONFIG_HOME/fisher\n\n    set -q fisher_path; or set -g fisher_path $fish_config\n    set -g fishfile $fish_config/fishfile\n\n    for path in {$fish_config,$fisher_path}/{functions,completions,conf.d} $fisher_cache\n        if test ! -d $path\n            command mkdir -p $path\n        end\n    end\n\n    if test ! -e $fisher_path/completions/fisher.fish\n        echo \"fisher complete\" >$fisher_path/completions/fisher.fish\n        _fisher_complete\n    end\n\n    if test -e $fisher_path/conf.d/fisher.fish\n        switch \"$version\"\n            case \\*-\\*\n                command rm -f $fisher_path/conf.d/fisher.fish\n            case 2\\*\n            case \\*\n                command rm -f $fisher_path/conf.d/fisher.fish\n        end\n    else\n        switch \"$version\"\n            case \\*-\\*\n            case 2\\*\n                echo \"fisher copy-user-key-bindings\" >$fisher_path/conf.d/fisher.fish\n        end\n    end\n\n    # 2019-10-22: temp code, migrates fishfile from old path back to $fish_config\n    if test -e \"$fisher_path/fishfile\"; and test ! -e \"$fishfile\"\n        command mv -f \"$fisher_path/fishfile\" \"$fishfile\"\n    end\n\n    switch \"$cmd\"\n        case {,self-}complete\n            _fisher_complete\n        case copy-user-key-bindings\n            _fisher_copy_user_key_bindings\n        case ls\n            set -e argv[1]\n            if test -s \"$fishfile\"\n                set -l file (_fisher_fmt <$fishfile | _fisher_parse -R | command sed \"s|@.*||\")\n                _fisher_ls | _fisher_fmt | command awk -v FILE=\"$file\" \"\n                    BEGIN { for (n = split(FILE, f); ++i <= n;) file[f[i]] } \\$0 in file && /$argv[1]/\n                \" | command sed \"s|^$HOME|~|\"\n            end\n        case self-update\n            _fisher_self_update (status -f)\n        case self-uninstall\n            _fisher_self_uninstall\n        case {,-}-v{ersion,}\n            echo \"fisher version $fisher_version\" (status -f | command sed \"s|^$HOME|~|\")\n        case {,-}-h{elp,}\n            _fisher_help\n        case \"\"\n            _fisher_commit --\n        case add rm\n            if not isatty\n                while read -l arg\n                    set argv $argv $arg\n                end\n            end\n\n            if test (count $argv) = 1\n                echo \"fisher: invalid number of arguments\" >&2\n                _fisher_help >&2\n                return 1\n            end\n\n            _fisher_commit $argv\n        case \\*\n            echo \"fisher: unknown flag or command \\\"$cmd\\\"\" >&2\n            _fisher_help >&2\n            return 1\n    end\nend\n\nfunction _fisher_complete\n    complete -ec fisher\n    complete -xc fisher -n __fish_use_subcommand -a add -d \"Add packages\"\n    complete -xc fisher -n __fish_use_subcommand -a rm -d \"Remove packages\"\n    complete -xc fisher -n __fish_use_subcommand -a ls -d \"List installed packages matching REGEX\"\n    complete -xc fisher -n __fish_use_subcommand -a --help -d \"Show usage help\"\n    complete -xc fisher -n __fish_use_subcommand -a --version -d \"$fisher_version\"\n    complete -xc fisher -n __fish_use_subcommand -a self-update -d \"Update to the latest version\"\n    for pkg in (fisher ls)\n        complete -xc fisher -n \"__fish_seen_subcommand_from rm\" -a $pkg\n    end\nend\n\nfunction _fisher_copy_user_key_bindings\n    if functions -q fish_user_key_bindings\n        functions -c fish_user_key_bindings fish_user_key_bindings_copy\n    end\n    function fish_user_key_bindings\n        for file in $fisher_path/conf.d/*_key_bindings.fish\n            source $file >/dev/null 2>/dev/null\n        end\n        if functions -q fish_user_key_bindings_copy\n            fish_user_key_bindings_copy\n        end\n    end\nend\n\nfunction _fisher_ls\n    for pkg in $fisher_config/*/*/*\n        command readlink $pkg; or echo $pkg\n    end\nend\n\nfunction _fisher_fmt\n    command sed \"s|^[[:space:]]*||;s|^$fisher_config/||;s|^~|$HOME|;s|^\\.\\/*|$PWD/|;s|^https*:/*||;s|^github\\.com/||;s|/*\\$||\"\nend\n\nfunction _fisher_help\n    echo \"usage: fisher add <package...>     Add packages\"\n    echo \"       fisher rm  <package...>     Remove packages\"\n    echo \"       fisher                      Update all packages\"\n    echo \"       fisher ls  [<regex>]        List installed packages matching <regex>\"\n    echo \"       fisher --help               Show this help\"\n    echo \"       fisher --version            Show the current version\"\n    echo \"       fisher self-update          Update to the latest version\"\n    echo \"       fisher self-uninstall       Uninstall from your system\"\n    echo \"examples:\"\n    echo \"       fisher add jethrokuan/z rafaelrinaldi/pure\"\n    echo \"       fisher add gitlab.com/foo/bar@v2\"\n    echo \"       fisher add ~/path/to/local/pkg\"\n    echo \"       fisher add <file\"\n    echo \"       fisher rm rafaelrinaldi/pure\"\n    echo \"       fisher ls | fisher rm\"\n    echo \"       fisher ls fish-\\*\"\nend\n\nfunction _fisher_self_update -a file\n    set -l url \"https://raw.githubusercontent.com/jorgebucaran/fisher/master/fisher.fish\"\n    echo \"fetching $url\" >&2\n    command curl -s \"$url?nocache\" >$file.\n\n    set -l next_version (command awk '{ print $4 } { exit }' <$file.)\n    switch \"$next_version\"\n        case \"\" $fisher_version\n            command rm -f $file.\n            if test -z \"$next_version\"\n                echo \"fisher: cannot update fisher -- are you offline?\" >&2\n                return 1\n            end\n            echo \"fisher is already up-to-date\" >&2\n        case \\*\n            echo \"linking $file\" | command sed \"s|$HOME|~|\" >&2\n            command mv -f $file. $file\n            source $file\n            echo \"updated to fisher $fisher_version -- hooray!\" >&2\n            _fisher_complete\n    end\nend\n\nfunction _fisher_self_uninstall\n    for pkg in (_fisher_ls)\n        _fisher_rm $pkg\n    end\n\n    for file in $fisher_cache $fisher_config $fisher_path/{functions,completions,conf.d}/fisher.fish $fishfile\n        echo \"removing $file\"\n        command rm -Rf $file 2>/dev/null\n    end | command sed \"s|$HOME|~|\" >&2\n\n    for name in (set -n | command awk '/^fisher_/')\n        set -e \"$name\"\n    end\n\n    functions -e (functions -a | command awk '/^_fisher/') fisher\n    complete -c fisher --erase\nend\n\nfunction _fisher_commit -a cmd\n    set -e argv[1]\n    set -l elapsed (_fisher_now)\n\n    if test ! -e \"$fishfile\"\n        command touch $fishfile\n        echo \"created new fishfile in $fishfile\" | command sed \"s|$HOME|~|\" >&2\n    end\n\n    set -l old_pkgs (_fisher_ls | _fisher_fmt)\n    for pkg in (_fisher_ls)\n        _fisher_rm $pkg\n    end\n    command rm -Rf $fisher_config\n    command mkdir -p $fisher_config\n\n    set -l next_pkgs (_fisher_fmt <$fishfile | _fisher_parse -R $cmd (printf \"%s\\n\" $argv | _fisher_fmt))\n    set -l actual_pkgs (_fisher_fetch $next_pkgs)\n    set -l updated_pkgs\n    for pkg in $old_pkgs\n        if contains -- $pkg $actual_pkgs\n            set updated_pkgs $updated_pkgs $pkg\n        end\n    end\n\n    if test -z \"$actual_pkgs$updated_pkgs$old_pkgs$next_pkgs\"\n        echo \"fisher: nothing to commit -- try adding some packages\" >&2\n        return 1\n    end\n\n    set -l out_pkgs\n    if test \"$cmd\" = \"rm\"\n        set out_pkgs $next_pkgs\n    else\n        for pkg in $next_pkgs\n            if contains -- (echo $pkg | command sed \"s|@.*||\") $actual_pkgs\n                set out_pkgs $out_pkgs $pkg\n            end\n        end\n    end\n\n    printf \"%s\\n\" (_fisher_fmt <$fishfile | _fisher_parse -W $cmd $out_pkgs | command sed \"s|^$HOME|~|\") >$fishfile\n\n    _fisher_complete\n\n    command awk -v A=(count $actual_pkgs) -v U=(count $updated_pkgs) -v O=(count $old_pkgs) -v E=(_fisher_now $elapsed) '\n        BEGIN {\n            res = fmt(\"removed\", O - U, fmt(\"updated\", U, fmt(\"added\", A - U)))\n            printf((res ? res : \"done\") \" in %.2fs\\n\", E / 1000)\n        }\n        function fmt(action, n, s) {\n            return n ? (s ? s \", \" : s) action \" \" n \" package\" (n > 1 ? \"s\" : \"\") : s\n        }\n    ' >&2\nend\n\nfunction _fisher_parse -a mode cmd\n    set -e argv[1..2]\n    command awk -v FS=\"[[:space:]]*#+\" -v MODE=\"$mode\" -v CMD=\"$cmd\" -v ARGSTR=\"$argv\" '\n        BEGIN {\n            for (n = split(ARGSTR, a, \" \"); i++ < n;) pkgs[getkey(a[i])] = a[i]\n        }\n        !NF { next } { k = getkey($1) }\n        MODE == \"-R\" && !(k in pkgs) && $0 = $1\n        MODE == \"-W\" && (/^#/ || k in pkgs || CMD != \"rm\") { print pkgs[k] (sub($1, \"\") ? $0 : \"\") }\n        MODE == \"-W\" || CMD == \"rm\" { delete pkgs[k] }\n        END {\n            for (k in pkgs) {\n                if (CMD != \"rm\" || MODE == \"-W\") print pkgs[k]\n                else print \"fisher: cannot remove \\\"\"k\"\\\" -- package is not in fishfile\" > \"/dev/stderr\"\n            }\n        }\n        function getkey(s,  a) {\n            return (split(s, a, /@+|:/) > 2) ? a[2]\"/\"a[1]\"/\"a[3] : a[1]\n        }\n    '\nend\n\nfunction _fisher_fetch\n    set -l pkg_jobs\n    set -l out_pkgs\n    set -l next_pkgs\n    set -l local_pkgs\n    set -q fisher_user_api_token; and set -l curl_opts -u $fisher_user_api_token\n\n    for pkg in $argv\n        switch $pkg\n            case \\~\\* /\\*\n                set -l path (echo \"$pkg\" | command sed \"s|^~|$HOME|\")\n                if test -e \"$path\"\n                    set local_pkgs $local_pkgs $path\n                else\n                    echo \"fisher: cannot add \\\"$pkg\\\" -- is this a valid file?\" >&2\n                end\n                continue\n        end\n\n        command awk -v PKG=\"$pkg\" -v FS=/ '\n            BEGIN {\n                if (split(PKG, tmp, /@+|:/) > 2) {\n                    if (tmp[4]) sub(\"@\"tmp[4], \"\", PKG)\n                    print PKG \"\\t\" tmp[2]\"/\"tmp[1]\"/\"tmp[3] \"\\t\" (tmp[4] ? tmp[4] : \"master\")\n                } else {\n                    pkg = split(PKG, _, \"/\") <= 2 ? \"github.com/\"tmp[1] : tmp[1]\n                    tag = tmp[2] ? tmp[2] : \"master\"\n                    print (\\\n                        pkg ~ /^github/ ? \"https://codeload.\"pkg\"/tar.gz/\"tag : \\\n                        pkg ~ /^gitlab/ ? \"https://\"pkg\"/-/archive/\"tag\"/\"tmp[split(pkg, tmp, \"/\")]\"-\"tag\".tar.gz\" : \\\n                        pkg ~ /^bitbucket/ ? \"https://\"pkg\"/get/\"tag\".tar.gz\" : pkg \\\n                    ) \"\\t\" pkg\n                }\n            }\n        ' | read -l url pkg branch\n\n        if test ! -d \"$fisher_config/$pkg\"\n            fish -c \"\n                echo fetching $url >&2\n                command mkdir -p $fisher_config/$pkg $fisher_cache/(command dirname $pkg)\n                if test ! -z \\\"$branch\\\"\n                     command git clone $url $fisher_config/$pkg --branch $branch --depth 1 2>/dev/null\n                     or echo fisher: cannot clone \\\"$url\\\" -- is this a valid url\\? >&2\n                else if command curl $curl_opts -Ss -w \\\"\\\" $url 2>&1 | command tar -xzf- -C $fisher_config/$pkg 2>/dev/null\n                    command rm -Rf $fisher_cache/$pkg\n                    command mv -f $fisher_config/$pkg/* $fisher_cache/$pkg\n                    command rm -Rf $fisher_config/$pkg\n                    command cp -Rf {$fisher_cache,$fisher_config}/$pkg\n                else if test -d \\\"$fisher_cache/$pkg\\\"\n                    echo fisher: cannot connect to server -- looking in \\\"$fisher_cache/$pkg\\\" | command sed 's|$HOME|~|' >&2\n                    command cp -Rf $fisher_cache/$pkg $fisher_config/$pkg/..\n                else\n                    command rm -Rf $fisher_config/$pkg\n                    echo fisher: cannot add \\\"$pkg\\\" -- is this a valid package\\? >&2\n                end\n            \" >/dev/null &\n            set pkg_jobs $pkg_jobs (_fisher_jobs --last)\n            set next_pkgs $next_pkgs \"$fisher_config/$pkg\"\n        end\n    end\n\n    if set -q pkg_jobs[1]\n        while for job in $pkg_jobs\n                contains -- $job (_fisher_jobs); and break\n            end\n        end\n        for pkg in $next_pkgs\n            if test -d \"$pkg\"\n                set out_pkgs $out_pkgs $pkg\n                _fisher_add $pkg\n            end\n        end\n    end\n\n    set -l local_prefix $fisher_config/local/$USER\n    if test ! -d \"$local_prefix\"\n        command mkdir -p $local_prefix\n    end\n    for pkg in $local_pkgs\n        set -l target $local_prefix/(command basename $pkg)\n        if test ! -L \"$target\"\n            command ln -sf $pkg $target\n            set out_pkgs $out_pkgs $pkg\n            _fisher_add $pkg --link\n        end\n    end\n\n    if set -q out_pkgs[1]\n        _fisher_fetch (\n            for pkg in $out_pkgs\n                if test -s \"$pkg/fishfile\"\n                    _fisher_fmt <$pkg/fishfile | _fisher_parse -R\n                end\n            end)\n        printf \"%s\\n\" $out_pkgs | _fisher_fmt\n    end\nend\n\nfunction _fisher_add -a pkg opts\n    for src in $pkg/{functions,completions,conf.d}/**.* $pkg/*.fish\n        set -l target (command basename $src)\n        switch $src\n            case $pkg/conf.d\\*\n                set target $fisher_path/conf.d/$target\n            case $pkg/completions\\*\n                set target $fisher_path/completions/$target\n            case $pkg/{functions,}\\*\n                switch $target\n                    case uninstall.fish\n                        continue\n                    case {init,key_bindings}.fish\n                        set target $fisher_path/conf.d/(command basename $pkg)\\_$target\n                    case \\*\n                        set target $fisher_path/functions/$target\n                end\n        end\n        echo \"linking $target\" | command sed \"s|$HOME|~|\" >&2\n        if set -q opts[1]\n            command ln -sf $src $target\n        else\n            command cp -f $src $target\n        end\n        switch $target\n            case \\*.fish\n                source $target >/dev/null 2>/dev/null\n        end\n    end\nend\n\nfunction _fisher_rm -a pkg\n    for src in $pkg/{conf.d,completions,functions}/**.* $pkg/*.fish\n        set -l target (command basename $src)\n        set -l filename (command basename $target .fish)\n        switch $src\n            case $pkg/conf.d\\*\n                test \"$filename.fish\" = \"$target\"; and emit \"$filename\"_uninstall\n                set target conf.d/$target\n            case $pkg/completions\\*\n                test \"$filename.fish\" = \"$target\"; and complete -ec $filename\n                set target completions/$target\n            case $pkg/{,functions}\\*\n                test \"$filename.fish\" = \"$target\"; and functions -e $filename\n                switch $target\n                    case uninstall.fish\n                        source $src\n                        continue\n                    case {init,key_bindings}.fish\n                        set target conf.d/(command basename $pkg)\\_$target\n                    case \\*\n                        set target functions/$target\n                end\n        end\n        command rm -f $fisher_path/$target\n    end\n    if not functions -q fish_prompt\n        source \"$__fish_datadir$__fish_data_dir/functions/fish_prompt.fish\"\n    end\nend\n\nfunction _fisher_jobs\n    jobs $argv | command awk '/^[0-9]+\\t/ { print $1 }'\nend\n\nfunction _fisher_now -a elapsed\n    switch (command uname)\n        case Darwin \\*BSD\n            command perl -MTime::HiRes -e 'printf(\"%.0f\\n\", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed\n        case \\*\n            math (command date \"+%s%3N\") - \"0$elapsed\"\n    end\nend\n"
  },
  {
    "path": ".config/fish/functions/g.fish",
    "content": "# Defined in - @ line 1\nfunction g --description 'alias g rg -i'\n\trg -i $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/git.fish",
    "content": "# Defined in - @ line 1\nfunction git --description 'alias git hub'\n\thub  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/humanize_duration.fish",
    "content": "function humanize_duration -d \"Make a time interval human readable\"\n    command awk '\n        function hmTime(time,   stamp) {\n            split(\"h:m:s:ms\", units, \":\")\n            for (i = 2; i >= -1; i--) {\n                if (t = int( i < 0 ? time % 1000 : time / (60 ^ i * 1000) % 60 )) {\n                    stamp = stamp t units[sqrt((i - 2) ^ 2) + 1] \" \"\n                }\n            }\n            if (stamp ~ /^ *$/) {\n                return \"0ms\"\n            }\n            return substr(stamp, 1, length(stamp) - 1)\n        }\n        { \n            print hmTime($0) \n        }\n    '\nend\n"
  },
  {
    "path": ".config/fish/functions/la.fish",
    "content": "# Defined in - @ line 1\nfunction la --description 'alias la exa -laiSHF --header --git --group-directories-first --tree -L1'\n\texa -laiSHF --header --git --group-directories-first --tree -L1 $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/ll.fish",
    "content": "# Defined in - @ line 1\nfunction ll --description 'alias ll exa -liSHF --header --git --group-directories-first --tree -L1'\n\texa -liSHF --header --git --group-directories-first --tree -L1 $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/ls.fish",
    "content": "# Defined in - @ line 1\nfunction ls --description 'alias ls exa -F'\n\texa -F $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/lt.fish",
    "content": "# Defined in - @ line 1\nfunction lt --description 'alias lt exa -liSHF --header --git --tree -L2'\n\texa -liSHF --header --git --tree -L2 $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/lu.fish",
    "content": "# Defined in - @ line 1\nfunction lu --description 'alias lu dutree -d1 --usage -x .git -x .direnv'\n\tdutree -d1 --usage -x .git -x .direnv $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/md.fish",
    "content": "# Defined in - @ line 1\nfunction md --description 'alias md mkdir -p'\n\tmkdir -p $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/mf.fish",
    "content": "# Defined in - @ line 1\nfunction mf --description 'alias mf touch'\n\ttouch  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/mirror.fish",
    "content": "# Defined in - @ line 1\nfunction mirror --description 'alias mirror sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu'\n\tsudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/mutt.fish",
    "content": "# Defined in - @ line 1\nfunction mutt --description 'alias mutt neomutt'\n\tneomutt  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/mv.fish",
    "content": "# Defined in - @ line 1\nfunction mv --description 'alias mv amv -g -u'\n\tamv -g -u $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/one.fish",
    "content": "# Defined in - @ line 1\nfunction one --description 'alias one nix-shell --command zsh'\n\tnix-shell --command zsh $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/own.fish",
    "content": "# Defined in - @ line 1\nfunction own --description 'alias own sudo chown -R $USER'\n\tsudo chown -R $USER $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/pack.fish",
    "content": "# Defined in - @ line 1\nfunction pack --description 'alias pack yay'\n\tyay  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/pro.fish",
    "content": "# Defined in - @ line 1\nfunction pro --description 'alias pro proji'\n\tproji  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/q.fish",
    "content": "# Defined in - @ line 1\nfunction q --description 'alias q exit'\n\texit  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/refresh.fish",
    "content": "# Defined in - @ line 1\nfunction refresh --description 'alias refresh pkill -USR1 -x sxhkd && bash ~/.startup -r'\n\tpkill -USR1 -x sxhkd && bash ~/.startup -r $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/rm.fish",
    "content": "# Defined in - @ line 1\nfunction rm --description 'alias rm rm -rf'\n\tcommand rm -rf $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/s.fish",
    "content": "# Defined in /home/bresilla/.config/fish/functions/s.fish @ line 2\nfunction s --description 'alias s=shko -c --short && cd (cat ~/.config/shko/settings/chdir)'\n\tshko -c --short && cd (cat ~/.config/shko/settings/chdir) $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/six.fish",
    "content": "# Defined in - @ line 1\nfunction six --description 'alias six nix-shell --command zsh support/shell.nix'\n\tnix-shell --command zsh support/shell.nix $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/speed.fish",
    "content": "# Defined in - @ line 1\nfunction speed --description 'alias speed wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip'\n\twget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/sudo.fish",
    "content": "# Defined in - @ line 1\nfunction sudo --description 'alias sudo sudo -E '\n\tcommand sudo -E  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/suspend.fish",
    "content": "# Defined in - @ line 1\nfunction suspend --description 'alias suspend systemctl suspend'\n\tsystemctl suspend $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/sys.fish",
    "content": "# Defined in - @ line 1\nfunction sys --description 'alias sys optirun inxi -Fxxxz'\n\toptirun inxi -Fxxxz $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/up.fish",
    "content": "# Defined in - @ line 1\nfunction up --description 'alias up sudo -S systemctl'\n\tsudo -S systemctl $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/v.fish",
    "content": "# Defined in - @ line 1\nfunction v --description 'alias v nvim'\n\tnvim  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/vim.fish",
    "content": "# Defined in - @ line 1\nfunction vim --description 'alias vim nvim'\n\tnvim  $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/virsh.fish",
    "content": "# Defined in - @ line 1\nfunction virsh --description 'alias virsh sudo virsh'\n\tsudo virsh $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/x.fish",
    "content": "# Defined in - @ line 1\nfunction x --description 'alias x dtrx --one-entry=rename'\n\tdtrx --one-entry=rename $argv;\nend\n"
  },
  {
    "path": ".config/fish/functions/z.fish",
    "content": "# Defined in - @ line 1\nfunction z --description 'alias z sudo ncdu --color=dark --exclude /home/bresilla/DATA'\n\tsudo ncdu --color=dark --exclude /home/bresilla/DATA $argv;\nend\n"
  },
  {
    "path": ".config/fontconfig/fonts.conf",
    "content": "<?xml version=\"1.0\"?><!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>\n<fontconfig>\n    <match target=\"font\">\n        <edit name=\"antialias\" mode=\"assign\">\n            <bool>true</bool>\n        </edit>\n        <edit name=\"hinting\" mode=\"assign\">\n            <bool>true</bool>\n        </edit>\n        <edit name=\"hintstyle\" mode=\"assign\">\n            <const>hintfull</const>\n        </edit>\n        <edit name=\"lcdfilter\" mode=\"assign\">\n            <const>lcddefault</const>\n        </edit>\n        <edit name=\"rgba\" mode=\"assign\">\n            <const>rgb</const>\n        </edit>\n    </match>\n    <dir>/usr/share/fonts</dir>\n</fontconfig>\n"
  },
  {
    "path": ".config/gitstatus/gitstatus.plugin.sh",
    "content": "# Copyright 2019 Roman Perepelitsa.\n#\n# This file is part of GitStatus. It provides Bash bindings.\n#\n# GitStatus 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 3 of the License, or\n# (at your option) any later version.\n#\n# GitStatus 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 GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n[[ $- == *i* ]] || return  # non-interactive shell\n\n# Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd\n# is already running.\n#\n# Usage: gitstatus_start [OPTION]...\n#\n#   -t FLOAT  Fail the self-check on initialization if not getting a response from\n#             gitstatusd for this this many seconds. Defaults to 5.\n#\n#   -s INT    Report at most this many staged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -u INT    Report at most this many unstaged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -c INT    Report at most this many conflicted changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -d INT    Report at most this many untracked files; negative value means infinity.\n#             Defaults to 1.\n#\n#   -m INT    Report -1 unstaged and untracked if there are more than this many files\n#             in the index. Negative value means infinity. Defaults to -1.\n#\n#   -e        Count files within untracked directories like `git status --untracked-files`.\nfunction gitstatus_start() {\n  unset OPTIND\n  local opt timeout=5 max_dirty=-1 recurse_untracked_dirs\n  local max_num_staged=1 max_num_unstaged=1 max_num_conflicted=1 max_num_untracked=1\n  while getopts \"t:s:u:c:d:m:e\" opt; do\n    case \"$opt\" in\n      t) timeout=$OPTARG;;\n      s) max_num_staged=$OPTARG;;\n      u) max_num_unstaged=$OPTARG;;\n      c) max_num_conflicted=$OPTARG;;\n      d) max_num_untracked=$OPTARG;;\n      m) max_dirty=$OPTARG;;\n      e) recurse_untracked_dirs='--recurse-untracked-dirs';;\n      *) return 1;;\n    esac\n  done\n\n  (( OPTIND == $# + 1 )) || { echo \"usage: gitstatus_start [OPTION]...\" >&2; return 1; }\n\n  [[ -z \"${GITSTATUS_DAEMON_PID:-}\" ]] || return 0  # already started\n\n  local req_fifo resp_fifo\n\n  function gitstatus_start_impl() {\n    local log_level=\"${GITSTATUS_LOG_LEVEL:-}\"\n    [[ -n \"$log_level\" || \"${GITSTATUS_ENABLE_LOGGING:-0}\" != 1 ]] || log_level=INFO\n\n    local daemon=\"${GITSTATUS_DAEMON:-}\"\n    if [[ -z \"$daemon\" ]]; then\n      local os   &&   os=$(uname -s)                    || return\n      local arch && arch=$(uname -m)                    || return\n      local dir  &&  dir=$(dirname \"${BASH_SOURCE[0]}\") || return\n      [[ \"$os\" != Linux || \"$(uname -o)\" != Android ]]  || os=Android\n      daemon=\"$dir/bin/gitstatusd-${os,,}-${arch,,}\"\n    fi\n\n    local threads=\"${GITSTATUS_NUM_THREADS:-0}\"\n    if (( threads <= 0 )); then\n      case \"$(uname -s)\" in\n        FreeBSD) threads=$(sysctl -n hw.ncpu)         || return;;\n        *)       threads=$(getconf _NPROCESSORS_ONLN) || return;;\n      esac\n      (( threads *=  2 ))\n      (( threads >=  2 )) || threads=2\n      (( threads <= 32 )) || threads=32\n    fi\n\n    req_fifo=$(mktemp -u \"${TMPDIR:-/tmp}\"/gitstatus.$$.pipe.req.XXXXXXXXXX)   || return\n    resp_fifo=$(mktemp -u \"${TMPDIR:-/tmp}\"/gitstatus.$$.pipe.resp.XXXXXXXXXX) || return\n    mkfifo \"$req_fifo\" \"$resp_fifo\"                                            || return\n    exec {_GITSTATUS_REQ_FD}<>\"$req_fifo\" {_GITSTATUS_RESP_FD}<>\"$resp_fifo\"   || return\n    command rm \"$req_fifo\" \"$resp_fifo\"                                        || return\n\n    local d=\"${GITSTATUS_DAEMON:-}\"\n    local daemon_args=(\n      --parent-pid=\"$$\"\n      --num-threads=\"$threads\"\n      --max-num-staged=\"$max_num_staged\"\n      --max-num-unstaged=\"$max_num_unstaged\"\n      --max-num-conflicted=\"$max_num_conflicted\"\n      --max-num-untracked=\"$max_num_untracked\"\n      --dirty-max-index-size=\"$max_dirty\"\n      $recurse_untracked_dirs)\n\n    if [[ -n \"$log_level\" ]]; then\n      GITSTATUS_DAEMON_LOG=$(mktemp \"${TMPDIR:-/tmp}\"/gitstatus.$$.log.XXXXXXXXXX) || return\n      [[ \"$log_level\" == INFO ]] || daemon_args+=(--log-level=\"$log_level\")\n    else\n      GITSTATUS_DAEMON_LOG=/dev/null\n    fi\n\n    local IFS=\n    [[ \"${daemon_args[*]}\" =~ ^[a-z0-9=-]*$ ]] || return\n    IFS=' '\n\n    { <&$_GITSTATUS_REQ_FD >&$_GITSTATUS_RESP_FD 2>\"$GITSTATUS_DAEMON_LOG\" \\\n        _gitstatus_daemon=\"$daemon\" bash -cx \"\n          trap 'kill %1 &>/dev/null' SIGINT SIGTERM EXIT\n          \\\"\\$_gitstatus_daemon\\\" ${daemon_args[*]} 0<&0 1>&1 2>&2 &\n          wait %1\n          if [[ \\$? != 0 && \\$? != 10 && \\$? -le 128 && -f \\\"\\$_gitstatus_daemon\\\"-static ]]; then\n            \\\"\\$_gitstatus_daemon\\\"-static ${daemon_args[*]} 0<&0 1>&1 2>&2 &\n            wait %1\n          fi\n          echo -nE $'bye\\x1f0\\x1e'\" & } 2>/dev/null\n    disown\n    GITSTATUS_DAEMON_PID=$!\n\n    local reply\n    echo -nE $'hello\\x1f\\x1e' >&$_GITSTATUS_REQ_FD                     || return\n    IFS='' read -rd $'\\x1e' -u $_GITSTATUS_RESP_FD -t \"$timeout\" reply || return\n    [[ \"$reply\" == $'hello\\x1f0' ]]                                    || return\n\n    _GITSTATUS_DIRTY_MAX_INDEX_SIZE=$max_dirty\n  }\n\n  if ! gitstatus_start_impl; then\n    echo \"gitstatus_start: failed to start gitstatusd\" >&2\n    [[ -z \"${req_fifo:-}\"  ]] || command rm -f \"$req_fifo\"\n    [[ -z \"${resp_fifo:-}\" ]] || command rm -f \"$resp_fifo\"\n    unset -f gitstatus_start_impl\n    gitstatus_stop\n    return 1\n  fi\n\n  unset -f gitstatus_start_impl\n\n  if [[ \"${GITSTATUS_STOP_ON_EXEC:-1}\" == 1 ]]; then\n    type -t _gitstatus_exec &>/dev/null    || function _gitstatus_exec()    { exec    \"$@\"; }\n    type -t _gitstatus_builtin &>/dev/null || function _gitstatus_builtin() { builtin \"$@\"; }\n\n    function _gitstatus_exec_wrapper() {\n      (( ! $# )) || gitstatus_stop\n      local ret=0\n      _gitstatus_exec \"$@\" || ret=$?\n      [[ -n \"${GITSTATUS_DAEMON_PID:-}\" ]] || gitstatus_start || true\n      return $ret\n    }\n\n    function _gitstatus_builtin_wrapper() {\n      while [[ \"${1:-}\" == builtin ]]; do shift; done\n      if [[ \"${1:-}\" == exec ]]; then\n        _gitstatus_exec_wrapper \"${@:2}\"\n      else\n        _gitstatus_builtin \"$@\"\n      fi\n    }\n\n    alias exec=_gitstatus_exec_wrapper\n    alias builtin=_gitstatus_builtin_wrapper\n\n    _GITSTATUS_EXEC_HOOK=1\n  else\n    unset _GITSTATUS_EXEC_HOOK\n  fi\n}\n\n# Stops gitstatusd if it's running.\nfunction gitstatus_stop() {\n  [[ -z \"${_GITSTATUS_REQ_FD:-}\"    ]] || exec {_GITSTATUS_REQ_FD}>&-              || true\n  [[ -z \"${_GITSTATUS_RESP_FD:-}\"   ]] || exec {_GITSTATUS_RESP_FD}>&-             || true\n  [[ -z \"${GITSTATUS_DAEMON_PID:-}\" ]] || kill \"$GITSTATUS_DAEMON_PID\" &>/dev/null || true\n  if [[ -n \"${_GITSTATUS_EXEC_HOOK:-}\" ]]; then\n    unalias exec builtin &>/dev/null || true\n    function _gitstatus_exec_wrapper()    { _gitstatus_exec    \"$@\"; }\n    function _gitstatus_builtin_wrapper() { _gitstatus_builtin \"$@\"; }\n  fi\n  unset _GITSTATUS_REQ_FD _GITSTATUS_RESP_FD GITSTATUS_DAEMON_PID _GITSTATUS_EXEC_HOOK\n  unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE\n}\n\n# Retrives status of a git repository from a directory under its working tree.\n#\n# Usage: gitstatus_query [OPTION]...\n#\n#   -d STR    Directory to query. Defaults to ${GIT_DIR:-$PWD}.\n#   -t FLOAT  Timeout in seconds. Will block for at most this long. If no results\n#             are available by then, will return error.\n#\n# On success sets VCS_STATUS_RESULT to one of the following values:\n#\n#   norepo-sync  The directory doesn't belong to a git repository.\n#   ok-sync      The directory belongs to a git repository.\n#\n# If VCS_STATUS_RESULT is ok-sync, additional variables are set:\n#\n#   VCS_STATUS_WORKDIR              Git repo working directory. Not empty.\n#   VCS_STATUS_COMMIT               Commit hash that HEAD is pointing to. Either 40 hex digits or\n#                                   empty if there is no HEAD (empty repo).\n#   VCS_STATUS_LOCAL_BRANCH         Local branch name or empty if not on a branch.\n#   VCS_STATUS_REMOTE_NAME          The remote name, e.g. \"upstream\" or \"origin\".\n#   VCS_STATUS_REMOTE_BRANCH        Upstream branch name. Can be empty.\n#   VCS_STATUS_REMOTE_URL           Remote URL. Can be empty.\n#   VCS_STATUS_ACTION               Repository state, A.K.A. action. Can be empty.\n#   VCS_STATUS_INDEX_SIZE           The number of files in the index.\n#   VCS_STATUS_NUM_STAGED           The number of staged changes.\n#   VCS_STATUS_NUM_CONFLICTED       The number of conflicted changes.\n#   VCS_STATUS_NUM_UNSTAGED         The number of unstaged changes.\n#   VCS_STATUS_NUM_UNTRACKED        The number of untracked files.\n#   VCS_STATUS_HAS_STAGED           1 if there are staged changes, 0 otherwise.\n#   VCS_STATUS_HAS_CONFLICTED       1 if there are conflicted changes, 0 otherwise.\n#   VCS_STATUS_HAS_UNSTAGED         1 if there are unstaged changes, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files\n#                                   are reported as deleted plus added.\n#   VCS_STATUS_HAS_UNTRACKED        1 if there are untracked files, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_COMMITS_AHEAD        Number of commits the current branch is ahead of upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_COMMITS_BEHIND       Number of commits the current branch is behind upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_STASHES              Number of stashes. Non-negative integer.\n#   VCS_STATUS_TAG                  The last tag (in lexicographical order) that points to the same\n#                                   commit as HEAD.\n#\n# The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in\n# large repos. See -m flag of gitstatus_start.\n#\n# gitstatus_query returns an error if gitstatus_start hasn't been called in the same\n# shell or the call had failed.\nfunction gitstatus_query() {\n  unset OPTIND\n  local opt dir=\"${GIT_DIR:-}\" timeout=()\n  while getopts \"d:c:t:\" opt \"$@\"; do\n    case \"$opt\" in\n      d) dir=$OPTARG;;\n      t) timeout=(-t \"$OPTARG\");;\n      *) return 1;;\n    esac\n  done\n  (( OPTIND == $# + 1 )) || { echo \"usage: gitstatus_query [OPTION]...\" >&2; return 1; }\n\n  [[ -n \"$GITSTATUS_DAEMON_PID\" ]] || return  # not started\n\n  local req_id=\"$RANDOM.$RANDOM.$RANDOM.$RANDOM\"\n  [[ \"$dir\" == /* ]] || dir=\"$(pwd -P)/$dir\" || return\n  echo -nE \"$req_id\"$'\\x1f'\"$dir\"$'\\x1e' >&$_GITSTATUS_REQ_FD || return\n\n  local -a resp\n  while true; do\n    IFS=$'\\x1f' read -rd $'\\x1e' -a resp -u $_GITSTATUS_RESP_FD \"${timeout[@]}\" || return\n    [[ \"${resp[0]}\" == \"$req_id\" ]] && break\n  done\n\n  if [[ \"${resp[1]}\" == 1 ]]; then\n    VCS_STATUS_RESULT=ok-sync\n    VCS_STATUS_WORKDIR=\"${resp[2]}\"\n    VCS_STATUS_COMMIT=\"${resp[3]}\"\n    VCS_STATUS_LOCAL_BRANCH=\"${resp[4]}\"\n    VCS_STATUS_REMOTE_BRANCH=\"${resp[5]}\"\n    VCS_STATUS_REMOTE_NAME=\"${resp[6]}\"\n    VCS_STATUS_REMOTE_URL=\"${resp[7]}\"\n    VCS_STATUS_ACTION=\"${resp[8]}\"\n    VCS_STATUS_INDEX_SIZE=\"${resp[9]}\"\n    VCS_STATUS_NUM_STAGED=\"${resp[10]}\"\n    VCS_STATUS_NUM_UNSTAGED=\"${resp[11]}\"\n    VCS_STATUS_NUM_CONFLICTED=\"${resp[12]}\"\n    VCS_STATUS_NUM_UNTRACKED=\"${resp[13]}\"\n    VCS_STATUS_COMMITS_AHEAD=\"${resp[14]}\"\n    VCS_STATUS_COMMITS_BEHIND=\"${resp[15]}\"\n    VCS_STATUS_STASHES=\"${resp[16]}\"\n    VCS_STATUS_TAG=\"${resp[17]:-}\"\n    VCS_STATUS_NUM_UNSTAGED_DELETED=\"${resp[18]:-0}\"\n    VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))\n    if (( _GITSTATUS_DIRTY_MAX_INDEX_SIZE >= 0 &&\n          VCS_STATUS_INDEX_SIZE > _GITSTATUS_DIRTY_MAX_INDEX_SIZE_ )); then\n      VCS_STATUS_HAS_UNSTAGED=-1\n      VCS_STATUS_HAS_CONFLICTED=-1\n      VCS_STATUS_HAS_UNTRACKED=-1\n    else\n      VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0))\n      VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0))\n      VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0))\n    fi\n  else\n    VCS_STATUS_RESULT=norepo-sync\n    unset VCS_STATUS_WORKDIR\n    unset VCS_STATUS_COMMIT\n    unset VCS_STATUS_LOCAL_BRANCH\n    unset VCS_STATUS_REMOTE_BRANCH\n    unset VCS_STATUS_REMOTE_NAME\n    unset VCS_STATUS_REMOTE_URL\n    unset VCS_STATUS_ACTION\n    unset VCS_STATUS_INDEX_SIZE\n    unset VCS_STATUS_NUM_STAGED\n    unset VCS_STATUS_NUM_UNSTAGED\n    unset VCS_STATUS_NUM_CONFLICTED\n    unset VCS_STATUS_NUM_UNTRACKED\n    unset VCS_STATUS_HAS_STAGED\n    unset VCS_STATUS_HAS_UNSTAGED\n    unset VCS_STATUS_HAS_CONFLICTED\n    unset VCS_STATUS_HAS_UNTRACKED\n    unset VCS_STATUS_COMMITS_AHEAD\n    unset VCS_STATUS_COMMITS_BEHIND\n    unset VCS_STATUS_STASHES\n    unset VCS_STATUS_TAG\n    unset VCS_STATUS_NUM_UNSTAGED_DELETED\n  fi\n}\n\n# Usage: gitstatus_check.\n#\n# Returns 0 if and only if gitstatus_start has succeeded previously.\n# If it returns non-zero, gitstatus_query is guaranteed to return non-zero.\nfunction gitstatus_check() {\n  [[ -n \"$GITSTATUS_DAEMON_PID\" ]]\n}\n"
  },
  {
    "path": ".config/gitstatus/gitstatus.plugin.zsh",
    "content": "# Copyright 2019 Roman Perepelitsa.\n#\n# This file is part of GitStatus. It provides ZSH bindings.\n#\n# GitStatus 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 3 of the License, or\n# (at your option) any later version.\n#\n# GitStatus 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 GitStatus. If not, see <https://www.gnu.org/licenses/>.\n#\n# ------------------------------------------------------------------\n#\n# Example: Start gitstatusd, send it a request, wait for response and print it.\n#\n#   source ~/gitstatus/gitstatus.plugin.zsh\n#   gitstatus_start MY\n#   gitstatus_query -d $PWD MY\n#   typeset -m 'VCS_STATUS_*'\n#\n# Output:\n#\n#   VCS_STATUS_ACTION=''\n#   VCS_STATUS_COMMIT=c000eddcff0fb38df2d0137efe24d9d2d900f209\n#   VCS_STATUS_COMMITS_AHEAD=0\n#   VCS_STATUS_COMMITS_BEHIND=0\n#   VCS_STATUS_HAS_CONFLICTED=0\n#   VCS_STATUS_HAS_STAGED=0\n#   VCS_STATUS_HAS_UNSTAGED=1\n#   VCS_STATUS_HAS_UNTRACKED=1\n#   VCS_STATUS_INDEX_SIZE=33\n#   VCS_STATUS_LOCAL_BRANCH=master\n#   VCS_STATUS_NUM_CONFLICTED=0\n#   VCS_STATUS_NUM_STAGED=0\n#   VCS_STATUS_NUM_UNSTAGED=1\n#   VCS_STATUS_NUM_UNSTAGED_DELETED=0\n#   VCS_STATUS_NUM_UNTRACKED=1\n#   VCS_STATUS_REMOTE_BRANCH=master\n#   VCS_STATUS_REMOTE_NAME=origin\n#   VCS_STATUS_REMOTE_URL=git@github.com:romkatv/powerlevel10k.git\n#   VCS_STATUS_RESULT=ok-sync\n#   VCS_STATUS_STASHES=0\n#   VCS_STATUS_TAG=''\n#   VCS_STATUS_WORKDIR=/home/romka/powerlevel10k\n\n[[ -o 'interactive' ]] || 'return'\n\n# Temporarily change options.\n'builtin' 'local' '-a' '_gitstatus_opts'\n[[ ! -o 'aliases'         ]] || _gitstatus_opts+=('aliases')\n[[ ! -o 'sh_glob'         ]] || _gitstatus_opts+=('sh_glob')\n[[ ! -o 'no_brace_expand' ]] || _gitstatus_opts+=('no_brace_expand')\n'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'\n\nautoload -Uz add-zsh-hook\nzmodload zsh/datetime zsh/system\n\ntypeset -g _gitstatus_plugin_dir=${${(%):-%x}:A:h}\n\n# Retrives status of a git repo from a directory under its working tree.\n#\n## Usage: gitstatus_query [OPTION]... NAME\n#\n#   -d STR    Directory to query. Must be absolute. Defaults to $GIT_DIR or the current\n#             directory if GIT_DIR is not set.\n#   -c STR    Callback function to call once the results are available. Called only after\n#             gitstatus_query returns 0 with VCS_STATUS_RESULT=tout.\n#   -t FLOAT  Timeout in seconds. Will block for at most this long. If no results are\n#             available by then: if -c isn't specified, will return 1; otherwise will set\n#             VCS_STATUS_RESULT=tout and return 0.\n#   -p        Don't compute anything that requires reading Git index. If this option is used,\n#             the following parameters will be 0: VCS_STATUS_INDEX_SIZE,\n#             VCS_STATUS_{NUM,HAS}_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED}.\n#\n# On success sets VCS_STATUS_RESULT to one of the following values:\n#\n#   tout         Timed out waiting for data; will call the user-specified callback later.\n#   norepo-sync  The directory isn't a git repo.\n#   ok-sync      The directory is a git repo.\n#\n# When the callback is called VCS_STATUS_RESULT is set to one of the following values:\n#\n#   norepo-async  The directory isn't a git repo.\n#   ok-async      The directory is a git repo.\n#\n# If VCS_STATUS_RESULT is ok-sync or ok-async, additional variables are set:\n#\n#   VCS_STATUS_WORKDIR              Git repo working directory. Not empty.\n#   VCS_STATUS_COMMIT               Commit hash that HEAD is pointing to. Either 40 hex digits or\n#                                   empty if there is no HEAD (empty repo).\n#   VCS_STATUS_LOCAL_BRANCH         Local branch name or empty if not on a branch.\n#   VCS_STATUS_REMOTE_NAME          The remote name, e.g. \"upstream\" or \"origin\".\n#   VCS_STATUS_REMOTE_BRANCH        Upstream branch name. Can be empty.\n#   VCS_STATUS_REMOTE_URL           Remote URL. Can be empty.\n#   VCS_STATUS_ACTION               Repository state, A.K.A. action. Can be empty.\n#   VCS_STATUS_INDEX_SIZE           The number of files in the index.\n#   VCS_STATUS_NUM_STAGED           The number of staged changes.\n#   VCS_STATUS_NUM_CONFLICTED       The number of conflicted changes.\n#   VCS_STATUS_NUM_UNSTAGED         The number of unstaged changes.\n#   VCS_STATUS_NUM_UNTRACKED        The number of untracked files.\n#   VCS_STATUS_HAS_STAGED           1 if there are staged changes, 0 otherwise.\n#   VCS_STATUS_HAS_CONFLICTED       1 if there are conflicted changes, 0 otherwise.\n#   VCS_STATUS_HAS_UNSTAGED         1 if there are unstaged changes, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_NUM_UNSTAGED_DELETED The number of unstaged deleted files. Note that renamed files\n#                                   are reported as deleted plus added.\n#   VCS_STATUS_HAS_UNTRACKED        1 if there are untracked files, 0 if there aren't, -1 if\n#                                   unknown.\n#   VCS_STATUS_COMMITS_AHEAD        Number of commits the current branch is ahead of upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_COMMITS_BEHIND       Number of commits the current branch is behind upstream.\n#                                   Non-negative integer.\n#   VCS_STATUS_STASHES              Number of stashes. Non-negative integer.\n#   VCS_STATUS_TAG                  The last tag (in lexicographical order) that points to the same\n#                                   commit as HEAD.\n#\n# The point of reporting -1 via VCS_STATUS_HAS_* is to allow the command to skip scanning files in\n# large repos. See -m flag of gitstatus_start.\n#\n# gitstatus_query returns an error if gitstatus_start hasn't been called in the same shell or\n# the call had failed.\n#\n#       !!!!! WARNING: CONCURRENT CALLS WITH THE SAME NAME ARE NOT ALLOWED !!!!!\n#\n# It's illegal to call gitstatus_query if the last asynchronous call with the same NAME hasn't\n# completed yet. If you need to issue concurrent requests, use different NAME arguments.\nfunction gitstatus_query() {\n  emulate -L zsh\n  setopt err_return no_unset\n\n  local opt\n  local dir=${GIT_DIR:-}\n  local callback\n  local -F timeout=-1\n  local no_diff=0\n  while true; do\n    getopts \"d:c:t:p\" opt || break\n    case $opt in\n      d) dir=$OPTARG;;\n      c) callback=$OPTARG;;\n      t) timeout=$OPTARG;;\n      p) no_diff=1;;\n      ?) return 1;;\n      done) break;;\n    esac\n  done\n  (( OPTIND == ARGC )) || { echo \"usage: gitstatus_query [OPTION]... NAME\" >&2; return 1 }\n  local name=${*[$OPTIND]}\n\n  local daemon_pid_var=GITSTATUS_DAEMON_PID_${name}\n  (( ${(P)daemon_pid_var:-0} > 0 ))\n\n  # Verify that gitstatus_query is running in the same process that ran gitstatus_start.\n  local client_pid_var=_GITSTATUS_CLIENT_PID_${name}\n  [[ ${(P)client_pid_var} == $$ ]]\n\n  [[ $dir == /* ]] || dir=${(%):-%/}/$dir\n\n  local req_fd_var=_GITSTATUS_REQ_FD_${name}\n  local -i req_fd=${(P)req_fd_var}\n  local -r req_id=\"$EPOCHREALTIME\"\n  echo -nE $req_id' '$callback$'\\x1f'$dir$'\\x1f'$no_diff$'\\x1e' >&$req_fd\n\n  while true; do\n    _gitstatus_process_response $name $timeout $req_id\n    [[ $VCS_STATUS_RESULT == *-async ]] || break\n  done\n\n  [[ $VCS_STATUS_RESULT != tout || -n $callback ]]\n}\n\nfunction _gitstatus_process_response() {\n  emulate -L zsh\n  setopt err_return no_unset\n\n  local name=$1\n  local -F timeout=$2\n  local req_id=$3\n  local resp_fd_var=_GITSTATUS_RESP_FD_${name}\n  local -i dirty_max_index_size=_GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name}\n\n  typeset -g VCS_STATUS_RESULT\n  (( timeout >= 0 )) && local -a t=(-t $timeout) || local -a t=()\n  local -a resp\n  local IFS=$'\\x1f'\n  read -rd $'\\x1e' -u ${(P)resp_fd_var} $t -A resp || {\n    VCS_STATUS_RESULT=tout\n    return\n  }\n\n  local -a header=(\"${(@Q)${(z)resp[1]}}\")\n  [[ ${header[1]} == $req_id ]] && local -i ours=1 || local -i ours=0\n  shift header\n  [[ ${resp[2]} == 1 ]] && {\n    (( ours )) && VCS_STATUS_RESULT=ok-sync || VCS_STATUS_RESULT=ok-async\n    typeset -g  VCS_STATUS_WORKDIR=\"${resp[3]}\"\n    typeset -g  VCS_STATUS_COMMIT=\"${resp[4]}\"\n    typeset -g  VCS_STATUS_LOCAL_BRANCH=\"${resp[5]}\"\n    typeset -g  VCS_STATUS_REMOTE_BRANCH=\"${resp[6]}\"\n    typeset -g  VCS_STATUS_REMOTE_NAME=\"${resp[7]}\"\n    typeset -g  VCS_STATUS_REMOTE_URL=\"${resp[8]}\"\n    typeset -g  VCS_STATUS_ACTION=\"${resp[9]}\"\n    typeset -gi VCS_STATUS_INDEX_SIZE=\"${resp[10]}\"\n    typeset -gi VCS_STATUS_NUM_STAGED=\"${resp[11]}\"\n    typeset -gi VCS_STATUS_NUM_UNSTAGED=\"${resp[12]}\"\n    typeset -gi VCS_STATUS_NUM_CONFLICTED=\"${resp[13]}\"\n    typeset -gi VCS_STATUS_NUM_UNTRACKED=\"${resp[14]}\"\n    typeset -gi VCS_STATUS_COMMITS_AHEAD=\"${resp[15]}\"\n    typeset -gi VCS_STATUS_COMMITS_BEHIND=\"${resp[16]}\"\n    typeset -gi VCS_STATUS_STASHES=\"${resp[17]}\"\n    typeset -g  VCS_STATUS_TAG=\"${resp[18]}\"\n    typeset -gi VCS_STATUS_NUM_UNSTAGED_DELETED=\"${resp[19]:-0}\"\n    typeset -gi VCS_STATUS_HAS_STAGED=$((VCS_STATUS_NUM_STAGED > 0))\n    (( dirty_max_index_size >= 0 && VCS_STATUS_INDEX_SIZE > dirty_max_index_size )) && {\n      typeset -gi VCS_STATUS_HAS_UNSTAGED=-1\n      typeset -gi VCS_STATUS_HAS_CONFLICTED=-1\n      typeset -gi VCS_STATUS_HAS_UNTRACKED=-1\n    } || {\n      typeset -gi VCS_STATUS_HAS_UNSTAGED=$((VCS_STATUS_NUM_UNSTAGED > 0))\n      typeset -gi VCS_STATUS_HAS_CONFLICTED=$((VCS_STATUS_NUM_CONFLICTED > 0))\n      typeset -gi VCS_STATUS_HAS_UNTRACKED=$((VCS_STATUS_NUM_UNTRACKED > 0))\n    }\n  } || {\n    (( ours )) && VCS_STATUS_RESULT=norepo-sync || VCS_STATUS_RESULT=norepo-async\n    unset VCS_STATUS_WORKDIR\n    unset VCS_STATUS_COMMIT\n    unset VCS_STATUS_LOCAL_BRANCH\n    unset VCS_STATUS_REMOTE_BRANCH\n    unset VCS_STATUS_REMOTE_NAME\n    unset VCS_STATUS_REMOTE_URL\n    unset VCS_STATUS_ACTION\n    unset VCS_STATUS_INDEX_SIZE\n    unset VCS_STATUS_NUM_STAGED\n    unset VCS_STATUS_NUM_UNSTAGED\n    unset VCS_STATUS_NUM_CONFLICTED\n    unset VCS_STATUS_NUM_UNTRACKED\n    unset VCS_STATUS_HAS_STAGED\n    unset VCS_STATUS_HAS_UNSTAGED\n    unset VCS_STATUS_HAS_CONFLICTED\n    unset VCS_STATUS_HAS_UNTRACKED\n    unset VCS_STATUS_COMMITS_AHEAD\n    unset VCS_STATUS_COMMITS_BEHIND\n    unset VCS_STATUS_STASHES\n    unset VCS_STATUS_TAG\n    unset VCS_STATUS_NUM_UNSTAGED_DELETED\n  }\n\n  (( ! ours )) && (( #header )) && emulate -L zsh && \"${header[@]}\" || true\n}\n\n# Starts gitstatusd in the background. Does nothing and succeeds if gitstatusd is already running.\n#\n# Usage: gitstatus_start [OPTION]... NAME\n#\n#   -t FLOAT  Fail the self-check on initialization if not getting a response from gitstatusd for\n#             this this many seconds. Defaults to 5.\n#\n#   -s INT    Report at most this many staged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -u INT    Report at most this many unstaged changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -c INT    Report at most this many conflicted changes; negative value means infinity.\n#             Defaults to 1.\n#\n#   -d INT    Report at most this many untracked files; negative value means infinity.\n#             Defaults to 1.\n#\n#   -m INT    If a repo has more files in its index than this, override -u and -d (but not -s)\n#             with zeros. Negative value means infinity. Defaults to -1.\n#\n#   -e        Count files within untracked directories like `git status --untracked-files`.\nfunction gitstatus_start() {\n  emulate -L zsh\n  setopt err_return no_unset no_bg_nice\n\n  local opt\n  local -F timeout=5\n  local -i max_num_staged=1\n  local -i max_num_unstaged=1\n  local -i max_num_conflicted=1\n  local -i max_num_untracked=1\n  local -i dirty_max_index_size=-1\n  local -i async\n  local recurse_untracked_dirs\n  while true; do\n    getopts \"t:s:u:c:d:m:ea\" opt || break\n    case $opt in\n      a) async=1;;\n      t) timeout=$OPTARG;;\n      s) max_num_staged=$OPTARG;;\n      u) max_num_unstaged=$OPTARG;;\n      c) max_num_conflicted=$OPTARG;;\n      d) max_num_untracked=$OPTARG;;\n      m) dirty_max_index_size=$OPTARG;;\n      e) recurse_untracked_dirs='--recurse-untracked-dirs';;\n      +e) recurse_untracked_dirs=;;\n      ?) return 1;;\n    esac\n  done\n\n  (( timeout > 0 )) || { echo \"invalid -t: $timeout\" >&2; return 1 }\n  (( OPTIND == ARGC )) || { echo \"usage: gitstatus_start [OPTION]... NAME\" >&2; return 1 }\n  local name=${*[$OPTIND]}\n\n  local lock_file req_fifo resp_fifo log_level\n  local log_file=/dev/null xtrace_file=/dev/null\n  local -i stderr_fd lock_fd req_fd resp_fd daemon_pid\n  local daemon_pid_var=GITSTATUS_DAEMON_PID_${name}\n  (( $+parameters[$daemon_pid_var] )) && {\n    (( ! async )) || return 0\n    daemon_pid=${(P)daemon_pid_var}\n    (( daemon_pid == -1 )) || return 0\n    local resp_fd_var=_GITSTATUS_RESP_FD_${name}\n    local log_file_var=GITSTATUS_DAEMON_LOG_${name}\n    local xtrace_file_var=GITSTATUS_XTRACE_${name}\n    resp_fd=${(P)resp_fd_var}\n    log_file=${(P)log_file_var}\n    xtrace_file=${(P)xtrace_file_var}\n  } || {\n    log_level=${GITSTATUS_LOG_LEVEL:-}\n    [[ -n $log_level || ${GITSTATUS_ENABLE_LOGGING:-0} != 1 ]] || log_level=INFO\n    [[ -z $log_level ]] || {\n      log_file=${TMPDIR:-/tmp}/gitstatus.$$.daemon-log.$EPOCHREALTIME.$RANDOM\n      xtrace_file=${TMPDIR:-/tmp}/gitstatus.$$.xtrace.$EPOCHREALTIME.$RANDOM\n    }\n    typeset -g GITSTATUS_DAEMON_LOG_${name}=$log_file\n    typeset -g GITSTATUS_XTRACE_${name}=$xtrace_file\n  }\n\n  function gitstatus_start_impl() {\n    [[ $xtrace_file == /dev/null ]] || {\n      exec {stderr_fd}>&2 2>>$xtrace_file\n      setopt xtrace\n    }\n\n    (( daemon_pid == -1 )) || {\n      local daemon=${GITSTATUS_DAEMON:-} os\n      [[ -n $daemon ]] || {\n        os=\"$(uname -s)\" && [[ -n $os ]]\n        [[ $os != Linux || \"$(uname -o)\" != Android ]] || os=Android\n        local arch && arch=\"$(uname -m)\" && [[ -n $arch ]]\n        daemon=$_gitstatus_plugin_dir/bin/gitstatusd-${os:l}-${arch:l}\n      }\n      [[ -x $daemon ]]\n\n      lock_file=${TMPDIR:-/tmp}/gitstatus.$$.lock.$EPOCHREALTIME.$RANDOM\n      echo -n >$lock_file\n      zsystem flock -f lock_fd $lock_file\n\n      req_fifo=${TMPDIR:-/tmp}/gitstatus.$$.req.$EPOCHREALTIME.$RANDOM\n      resp_fifo=${TMPDIR:-/tmp}/gitstatus.$$.resp.$EPOCHREALTIME.$RANDOM\n      mkfifo $req_fifo $resp_fifo\n\n      local -i threads=${GITSTATUS_NUM_THREADS:-0}\n      (( threads > 0)) || {\n        threads=8\n        [[ -n $os ]] || { os=\"$(uname -s)\" && [[ -n $os ]] }\n        case $os in\n          FreeBSD) (( ! $+commands[sysctl] )) || threads=$(( 2 * $(sysctl -n hw.ncpu) ));;\n          *) (( ! $+commands[getconf] )) || threads=$(( 2 * $(getconf _NPROCESSORS_ONLN) ));;\n        esac\n        (( threads <= 32 )) || threads=32\n      }\n\n      local -a daemon_args=(\n        --lock-fd=3\n        --parent-pid=${(q)$}\n        --num-threads=${(q)threads}\n        --max-num-staged=${(q)max_num_staged}\n        --max-num-unstaged=${(q)max_num_unstaged}\n        --max-num-conflicted=${(q)max_num_conflicted}\n        --max-num-untracked=${(q)max_num_untracked}\n        --dirty-max-index-size=${(q)dirty_max_index_size}\n        --log-level=${(q)log_level:-INFO}\n        $recurse_untracked_dirs)\n\n      local cmd=\"\n        exec >&4\n        echo \\$\\$\n        ${(q)daemon} $daemon_args\n        if [[ \\$? != (0|10) && \\$? -le 128 && -f ${(q)daemon}-static ]]; then\n          ${(q)daemon}-static $daemon_args\n        fi\n        echo -nE $'bye\\x1f0\\x1e'\"\n      local setsid=${commands[setsid]:-/usr/local/opt/util-linux/bin/setsid}\n      [[ -x $setsid ]] && setsid=${(q)setsid} || setsid=\n      cmd=\"cd /; read; $setsid zsh -dfxc ${(q)cmd} &!; rm -f ${(q)req_fifo} ${(q)resp_fifo} ${(q)lock_file}\"\n      # We use `zsh -c` instead of plain {} or () to work around bugs in zplug (it hangs on\n      # startup). Double fork is to daemonize, and so is `setsid`. Note that on macOS `setsid` has\n      # to be installed manually by running  `brew install util-linux`.\n      zsh -dfmxc $cmd <$req_fifo >$log_file 2>&1 3<$lock_file 4>$resp_fifo &!\n\n      sysopen -w -o cloexec,sync -u req_fd $req_fifo\n      sysopen -r -o cloexec -u resp_fd $resp_fifo\n      echo -nE $'0\\nhello\\x1f\\x1e' >&$req_fd\n    }\n\n    (( async )) && {\n      daemon_pid=-1\n    } || {\n      local reply IFS=''\n      read -ru $resp_fd reply\n      [[ $reply == <1-> ]]\n      daemon_pid=reply\n\n      function _gitstatus_process_response_${name}() {\n        local name=${${(%):-%N}#_gitstatus_process_response_}\n        (( ARGC == 1 )) && {\n          _gitstatus_process_response $name 0 ''\n          true\n        } || {\n          gitstatus_stop $name\n        }\n      }\n      zle -F $resp_fd _gitstatus_process_response_${name}\n\n      read -r -d $'\\x1e' -u $resp_fd -t $timeout reply\n      [[ $reply == $'hello\\x1f0' ]]\n\n      function _gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid}() {\n        emulate -L zsh\n        setopt err_return no_unset\n        local fname=${(%):-%N}\n        local prefix=_gitstatus_cleanup_$$_${ZSH_SUBSHELL}_\n        [[ $fname == ${prefix}* ]] || return 0\n        local -i daemon_pid=${fname#$prefix}\n        kill -- -$daemon_pid &>/dev/null || true\n      }\n      add-zsh-hook zshexit _gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid}\n    }\n\n    (( ! stderr_fd )) || {\n      unsetopt xtrace\n      exec 2>&$stderr_fd {stderr_fd}>&-\n      stderr_fd=0\n    }\n  }\n\n  gitstatus_start_impl && {\n    typeset -gi  GITSTATUS_DAEMON_PID_${name}=$daemon_pid\n    (( ! req_fd )) || {\n      typeset -gi _GITSTATUS_REQ_FD_${name}=$req_fd\n      typeset -gi _GITSTATUS_RESP_FD_${name}=$resp_fd\n      typeset -gi _GITSTATUS_LOCK_FD_${name}=$lock_fd\n      typeset -gi _GITSTATUS_CLIENT_PID_${name}=$$\n      typeset -gi _GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name}=$dirty_max_index_size\n    }\n    unset -f gitstatus_start_impl\n  } || {\n    unsetopt err_return\n    add-zsh-hook -d zshexit _gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid}\n    (( $+functions[_gitstatus_process_response_${name}] )) && {\n      zle -F $resp_fd\n      unfunction _gitstatus_process_response_${name}\n    }\n    (( resp_fd        )) && exec {resp_fd}>&-\n    (( req_fd         )) && exec {req_fd}>&-\n    (( lock_fd        )) && zsystem flock -u $lock_fd\n    (( stderr_fd      )) && { exec 2>&$stderr_fd {stderr_fd}>&- }\n    (( daemon_pid > 0 )) && kill -- -$daemon_pid &>/dev/null\n\n    rm -f $lock_file $req_fifo $resp_fifo\n    unset -f gitstatus_start_impl\n\n    unset GITSTATUS_DAEMON_PID_${name}\n    unset _GITSTATUS_REQ_FD_${name}\n    unset _GITSTATUS_RESP_FD_${name}\n    unset _GITSTATUS_LOCK_FD_${name}\n    unset _GITSTATUS_CLIENT_PID_${name}\n    unset _GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name}\n\n    >&2 print -P '[%F{red}ERROR%f]: gitstatus failed to initialize.'\n    >&2 echo -E ''\n    >&2 echo -E '  Your git prompt may disappear or become slow.'\n    if [[ -s $xtrace_file ]]; then\n      >&2 echo -E ''\n      >&2 echo -E \"  The content of ${(q-)xtrace_file} (gitstatus_start_impl xtrace):\"\n      >&2 print -P '%F{yellow}'\n      >&2 awk '{print \"    \" $0}' <$xtrace_file\n      >&2 print -P '%F{red}                               ^ this command failed%f'\n    fi\n    if [[ -s $log_file ]]; then\n      >&2 echo -E ''\n      >&2 echo -E \"  The content of ${(q-)log_file} (gitstatus daemon log):\"\n      >&2 print -P '%F{yellow}'\n      >&2 awk '{print \"    \" $0}' <$log_file\n      >&2 print -nP '%f'\n    fi\n    if [[ ${GITSTATUS_LOG_LEVEL:-} == DEBUG ]]; then\n      >&2 echo -E ''\n      >&2 echo -E '  Your system information:'\n      >&2 print -P '%F{yellow}'\n      >&2 echo -E \"    zsh:      $ZSH_VERSION\"\n      >&2 echo -E \"    uname -a: $(uname -a)\"\n      >&2 print -P '%f'\n      >&2 echo -E '  If you need help, open an issue and attach this whole error message to it:'\n      >&2 echo -E ''\n      >&2 print -P '    %F{green}https://github.com/romkatv/gitstatus/issues/new%f'\n    else\n      >&2 echo -E ''\n      >&2 echo -E '  Run the following command to retry with extra diagnostics:'\n      >&2 print -P '%F{green}'\n      >&2 echo -E \"    GITSTATUS_LOG_LEVEL=DEBUG gitstatus_start ${(@q-)*}\"\n      >&2 print -nP '%f'\n    fi\n\n    return 1\n  }\n}\n\n# Stops gitstatusd if it's running.\n#\n# Usage: gitstatus_stop NAME.\nfunction gitstatus_stop() {\n  emulate -L zsh\n  setopt no_unset\n  (( ARGC == 1 )) || { echo \"usage: gitstatus_stop NAME\" >&2; return 1 }\n\n  local name=$1\n\n  local req_fd_var=_GITSTATUS_REQ_FD_${name}\n  local resp_fd_var=_GITSTATUS_RESP_FD_${name}\n  local lock_fd_var=_GITSTATUS_LOCK_FD_${name}\n  local daemon_pid_var=GITSTATUS_DAEMON_PID_${name}\n  local client_pid_var=_GITSTATUS_CLIENT_PID_${name}\n  local dirty_size_var=_GITSTATUS_DIRTY_MAX_INDEX_SIZE_${name}\n\n  [[ ${(P)daemon_pid_var:-} != -1 ]] || gitstatus_start -t 0 \"$name\" 2>/dev/null\n\n  local req_fd=${(P)req_fd_var:-}\n  local resp_fd=${(P)resp_fd_var:-}\n  local lock_fd=${(P)lock_fd_var:-}\n  local daemon_pid=${(P)daemon_pid_var:-0}\n\n  local cleanup_func=_gitstatus_cleanup_$$_${ZSH_SUBSHELL}_${daemon_pid}\n\n  (( $+functions[_gitstatus_process_response_${name}] )) && {\n    zle -F $resp_fd\n    unfunction _gitstatus_process_response_${name}\n  }\n\n  (( resp_fd        )) && exec {resp_fd}>&-\n  (( req_fd         )) && exec {req_fd}>&-\n  (( lock_fd        )) && zsystem flock -u $lock_fd\n  (( daemon_pid > 0 )) && kill -- -$daemon_pid &>/dev/null\n\n  unset $req_fd_var $resp_fd_var $lock_fd_var $daemon_pid_var $client_pid_var $dirty_size_var\n\n  if (( $+functions[$cleanup_func] )); then\n    add-zsh-hook -d zshexit $cleanup_func\n    unfunction $cleanup_func\n  fi\n\n  return 0\n}\n\n# Usage: gitstatus_check NAME.\n#\n# Returns 0 if and only if `gitstatus_start NAME` has succeeded previously.\n# If it returns non-zero, gitstatus_query NAME is guaranteed to return non-zero.\nfunction gitstatus_check() {\n  emulate -L zsh\n  (( ARGC == 1 )) || { echo \"usage: gitstatus_check NAME\" >&2; return 1 }\n  local daemon_pid_var=GITSTATUS_DAEMON_PID_${1}\n  (( ${(P)daemon_pid_var:-0} > 0 ))\n}\n\n(( ${#_gitstatus_opts} )) && setopt ${_gitstatus_opts[@]}\n'builtin' 'unset' '_gitstatus_opts'\n"
  },
  {
    "path": ".config/gitstatus/gitstatus.prompt.sh",
    "content": "# Copyright 2019 Roman Perepelitsa.\n#\n# This file is part of GitStatus. It sets Bash PS1 parameter to reflect git status.\n#\n# GitStatus 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 3 of the License, or\n# (at your option) any later version.\n#\n# GitStatus 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 GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n# Source gitstatus.plugin.sh from $GITSTATUS_DIR or from the same directory\n# in which the current script resides if the variable isn't set.\nGITSTATUS_DIR=\"/home/$USER/.config/gitstatus\"\nsource \"${GITSTATUS_DIR:-${BASH_SOURCE[0]%/*}}/gitstatus.plugin.sh\" || exit \n\n# Sets GITSTATUS_PROMPT to reflect the state of the current git repository.\n# The value is empty if not in a git repository. Forwards all arguments to\n# gitstatus_query.\n#\n# Example value of GITSTATUS_PROMPT:\n#\n#   master+!? ⇡2 ⇣3 *4\n#\n# Meaning:\n#\n#   master   current branch\n#   +        git repo has changes staged for commit\n#   !        git repo has unstaged changes\n#   ?        git repo has untracked files\n#   ⇡2       local branch is ahead of origin by 2 commits\n#   ⇣3       local branch is behind origin by 3 commits\n#   *4       git repo has 4 stashes\nfunction gitstatus_prompt_update() {\n  GITSTATUS_PROMPT=\"\"\n\n  gitstatus_query \"$@\"                  || return 1  # error\n  [[ \"$VCS_STATUS_RESULT\" == ok-sync ]] || return 0  # not a git repo\n\n  local      reset=$'\\e[0m'         # no color\n  local      clean=$'\\e[38;5;076m'  # green foreground\n  local  untracked=$'\\e[38;5;014m'  # teal foreground\n  local   modified=$'\\e[38;5;011m'  # yellow foreground\n  local conflicted=$'\\e[38;5;196m'  # red foreground\n\n  local p\n\n  local where  # branch name, tag or commit\n  if [[ -n \"$VCS_STATUS_LOCAL_BRANCH\" ]]; then\n    where=\"$VCS_STATUS_LOCAL_BRANCH\"\n  elif [[ -n \"$VCS_STATUS_TAG\" ]]; then\n    p+=\"${reset}#\"\n    where=\"$VCS_STATUS_TAG\"\n  else\n    p+=\"${reset}@\"\n    where=\"${VCS_STATUS_COMMIT:0:8}\"\n  fi\n\n  (( ${#where} > 32 )) && where=\"${where:0:12}…${where: -12}\"  # truncate long branch names and tags\n  p+=\"${clean}${where}\"\n\n  # ⇣42 if behind the remote.\n  (( VCS_STATUS_COMMITS_BEHIND )) && p+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n  # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n  (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=\" \"\n  (( VCS_STATUS_COMMITS_AHEAD  )) && p+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n  # *42 if have stashes.\n  (( VCS_STATUS_STASHES        )) && p+=\" ${clean}*${VCS_STATUS_STASHES}\"\n  # 'merge' if the repo is in an unusual state.\n  [[ -n \"$VCS_STATUS_ACTION\"   ]] && p+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n  # ~42 if have merge conflicts.\n  (( VCS_STATUS_NUM_CONFLICTED )) && p+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n  # +42 if have staged changes.\n  (( VCS_STATUS_NUM_STAGED     )) && p+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n  # !42 if have unstaged changes.\n  (( VCS_STATUS_NUM_UNSTAGED   )) && p+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n  # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n  (( VCS_STATUS_NUM_UNTRACKED  )) && p+=\" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}\"\n\n  GITSTATUS_PROMPT=\"${p}${reset}\"\n}\n\n# Start gitstatusd in the background.\ngitstatus_stop && gitstatus_start\n\n# On every prompt, fetch git status and set GITSTATUS_PROMPT.\nPROMPT_COMMAND=gitstatus_prompt_update\n\n# Enable promptvars so that ${GITSTATUS_PROMPT} in PS1 is expanded.\nshopt -s promptvars\n\n"
  },
  {
    "path": ".config/gitstatus/gitstatus.prompt.zsh",
    "content": "# Copyright 2019 Roman Perepelitsa.\n#\n# This file is part of GitStatus. It sets ZSH PROMPT parameter to reflect git status.\n#\n# GitStatus 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 3 of the License, or\n# (at your option) any later version.\n#\n# GitStatus 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 GitStatus. If not, see <https://www.gnu.org/licenses/>.\n\n# Source gitstatus.plugin.zsh from $GITSTATUS_DIR or from the same directory\n# in which the current script resides if the variable isn't set.\nsource \"${GITSTATUS_DIR:-${${(%):-%x}:h}}/gitstatus.plugin.zsh\" || return\n\n# Sets GITSTATUS_PROMPT to reflect the state of the current git repository. Empty if not\n# in a git repository. In addition, sets GITSTATUS_PROMPT_LEN to the number of columns\n# $GITSTATUS_PROMPT will occupy when printed.\n#\n# Example:\n#\n#   GITSTATUS_PROMPT='master ⇣42⇡42 *42 merge ~42 +42 !42 ?42'\n#   GITSTATUS_PROMPT_LEN=39\n#\n#   master  current branch\n#      ⇣42  local branch is 42 commits behind the remote\n#      ⇡42  local branch is 42 commits ahead of the remote\n#      *42  42 stashes\n#    merge  merge in progress\n#      ~42  42 merge conflicts\n#      +42  42 staged changes\n#      !42  42 unstaged changes\n#      ?42  42 untracked files\n#\nfunction gitstatus_prompt_update() {\n  emulate -L zsh\n  typeset -g  GITSTATUS_PROMPT=''\n  typeset -gi GITSTATUS_PROMPT_LEN=0\n\n  # Call gitstatus_query synchronously. Note that gitstatus_query can also be called\n  # asynchronously; see documentation in gitstatus.plugin.zsh.\n  gitstatus_query 'MY'                  || return 1  # error\n  [[ $VCS_STATUS_RESULT == 'ok-sync' ]] || return 0  # not a git repo\n\n  local      clean='%76F'   # green foreground\n  local   modified='%178F'  # yellow foreground\n  local  untracked='%39F'   # blue foreground\n  local      black='%59F'   # black foreground\n  local conflicted='%196F'  # red foreground\n  local branch=\" \"\n\n  local p\n  p+=$branch\n\n  local where  # branch name, tag or commit\n  if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then\n    where=$VCS_STATUS_LOCAL_BRANCH\n  elif [[ -n $VCS_STATUS_TAG ]]; then\n    p+='%f#'\n    where=$VCS_STATUS_TAG\n  else\n    p+='%f@'\n    where=${VCS_STATUS_COMMIT[1,8]}\n  fi\n\n\n  (( $#where > 32 )) && where[13,-13]=\"…\"  # truncate long branch names and tags\n  p+=\"${where//\\%/%%}\"                     # escape %\n\n  # ⇣42 if behind the remote.\n  (( VCS_STATUS_COMMITS_BEHIND )) && p+=\" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}\"\n  # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.\n  (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && p+=\" \"\n  (( VCS_STATUS_COMMITS_AHEAD  )) && p+=\"${clean}⇡${VCS_STATUS_COMMITS_AHEAD}\"\n  # *42 if have stashes.\n  (( VCS_STATUS_STASHES        )) && p+=\" ${clean}*${VCS_STATUS_STASHES}\"\n  # 'merge' if the repo is in an unusual state.\n  [[ -n $VCS_STATUS_ACTION     ]] && p+=\" ${conflicted}${VCS_STATUS_ACTION}\"\n  # ~42 if have merge conflicts.\n  (( VCS_STATUS_NUM_CONFLICTED )) && p+=\" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}\"\n  # +42 if have staged changes.\n  (( VCS_STATUS_NUM_STAGED     )) && p+=\" ${modified}+${VCS_STATUS_NUM_STAGED}\"\n  # !42 if have unstaged changes.\n  (( VCS_STATUS_NUM_UNSTAGED   )) && p+=\" ${modified}!${VCS_STATUS_NUM_UNSTAGED}\"\n  # ?42 if have untracked files. It's really a question mark, your font isn't broken.\n  (( VCS_STATUS_NUM_UNTRACKED  )) && p+=\" ${untracked}?${VCS_STATUS_NUM_UNTRACKED}\"\n\n  GITSTATUS_PROMPT=\"${p}%f\"\n\n  # The length of GITSTATUS_PROMPT after removing %f and %F.\n  GITSTATUS_PROMPT_LEN=\"${(m)#${${GITSTATUS_PROMPT//\\%\\%/x}//\\%(f|<->F)}}\"\n}\n\n# Start gitstatusd instance with name \"MY\". The same name is passed to\n# gitstatus_query in gitstatus_prompt_update. The flags with -1 as values\n# enable staged, unstaged, conflicted and untracked counters.\ngitstatus_stop 'MY' && gitstatus_start -s -1 -u -1 -c -1 -d -1 'MY'\n\n# On every prompt, fetch git status and set GITSTATUS_PROMPT.\nautoload -Uz add-zsh-hook\nadd-zsh-hook precmd gitstatus_prompt_update\n\n# Enable/disable the right prompt options.\nsetopt no_prompt_bang prompt_percent prompt_subst\n\n# Customize prompt. Put $GITSTATUS_PROMPT in it to reflect git status.\n#\n# Example:\n#\n#   user@host ~/projects/skynet master ⇡42\n#   % █\n#\n# The current directory gets truncated from the left if the whole prompt doesn't fit on the line.\nPROMPT='%70F%n@%m%f '                                  # green user@host\nPROMPT+='%39F%$((-GITSTATUS_PROMPT_LEN-1))<…<%~%<<%f'  # blue current working directory\nPROMPT+='${GITSTATUS_PROMPT:+ $GITSTATUS_PROMPT}'      # git status\nPROMPT+=$'\\n'                                          # new line\nPROMPT+='%F{%(?.76.196)}%#%f '                         # %/# (normal/root); green/red (ok/error)\n"
  },
  {
    "path": ".config/i3/config",
    "content": "#########################################################################################################################################\n#|||\tSETTINGS\n#########################################################################################################################################\ngaps inner 10\ngaps outer 5\nworkspace_auto_back_and_forth yes\npopup_during_fullscreen smart\nfocus_follows_mouse yes\nfocus_on_window_activation focus\nfocus_wrapping yes\nfloating_minimum_size 1600x900\nfor_window [class=.*] border pixel 0\nfont pango:Monoid 12px\nfloating_modifier mod4\nbindsym mod4+e layout toggle split\nbindsym F12 exec \"bash ~/.config/rofi/menu/SEARCH\"\nbindsym F11 exec \"bash ~/.config/rofi/menu/SYSTEM\"\n\n#########################################################################################################################################\n#|||\tWORKSPACES & MONITORS\n#########################################################################################################################################\nworkspace 001 output eDP1\nworkspace 002 output eDP1\nworkspace 003 output eDP1\nworkspace 004 output eDP1\nworkspace 005 output DP1\nworkspace 006 output DP1\nworkspace 007 output DP1\nworkspace 008 output DP1\nworkspace 009 output DP1\n\n#########################################################################################################################################\n#|||\tASSIGNMENTS\n#########################################################################################################################################\nassign [class=\"Firefox\"] \"009\"\nassign [class=\"Code\"] \"002\"\nassign [class=\"Nautilus\"] \"001\"\nfor_window [class=\"MPlayer\"] floating enable, move position center\nfor_window [class=\"URxvt\"] floating enable, move position center\nfor_window [class=\"kitty\"] floating enable, move position center\nfor_window [class=\"mpv\"] floating enable, move scratchpad, scratchpad show\nfor_window [class=\"matplotlib\"] floating enable, move position center, fullscreen enable\n\n#########################################################################################################################################\n#|||\tKICKSTART\n#########################################################################################################################################\nexec bash ~/.startup\nexec_always bash ~/.startup -r\n"
  },
  {
    "path": ".config/kitty/kitty.conf",
    "content": "#foreground   #EAEAEA\n#background   #121212\n#color0   #000000\n#color8   #4D4D4D\n#color1   #FF5555\n#color9   #FF6E67\n#color2   #50FA7B\n#color10  #5AF78E\n#color3   #F1FA8C\n#color11  #F4F99D\n#color4   #BD93F9\n#color12  #CAA9FA\n#color5   #FF79C6\n#color13  #FF92D0\n#color6   #8BE9FD\n#color14  #9AEDFE\n#color7   #BFBFBF\n#color15  #E6E6E6\n\ninclude ~/.cache/wal/colors-kitty.conf\n\nfont_family      Iosevka Term SS01\nbold_font        Iosevka Term SS01\nitalic_font      Iosevka Term SS01\nbold_italic_font Iosevka Term SS01\n\n# font_family      Input Mono Compressed\n# bold_font        Input Mono Compressed\n# italic_font      Input Mono Compressed\n# bold_italic_font Input Mono Compressed\n\nfont_size 16.0\nadjust_line_height  0\nadjust_column_width 0\nbox_drawing_scale 0.001, 1, 1.5, 2\ncursor_shape block\ncursor_blink_interval      0.5\ncursor_stop_blinking_after 15.0\nscrollback_lines 10000\nscrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER\nwheel_scroll_multiplier 2.0\ncursor #ddff6c\nurl_color #0087BD\nurl_style curly\nopen_url_modifiers kitty_mod\nopen_url_with default\ncopy_on_select yes\nrectangle_select_modifiers ctrl+alt\nselect_by_word_characters :@-./_~?&=%+#\nclick_interval 0.5\nmouse_hide_wait 3.0\nfocus_follows_mouse no\nrepaint_delay 10\ninput_delay 3\nsync_to_monitor yes\nremember_window_size  yes\ninitial_window_width  640\ninitial_window_height 400\nenabled_layouts *\nwindow_resize_step_cells 2\nwindow_resize_step_lines 2\nwindow_border_width 1.0\ndraw_minimal_borders yes\nwindow_margin_width 0.0\nsingle_window_margin_width -1000.0\nwindow_padding_width 30.0\nactive_border_color #00ff00\ninactive_border_color #cccccc\nbell_border_color #ff5a00\ninactive_text_alpha 1.0\ntab_bar_edge bottom\ntab_bar_margin_width 0.0\ntab_bar_style fade\ntab_fade 0.25 0.5 0.75 1\ntab_separator \" ┇\"\nactive_tab_foreground   #000\nactive_tab_background   #eee\nactive_tab_font_style   bold-italic\ninactive_tab_foreground #444\ninactive_tab_background #999\ninactive_tab_font_style normal\nbackground_opacity         1.0\ndynamic_background_opacity no\ndim_opacity 1\nselection_foreground #000000\nselection_background #FFFACD\nshell .\neditor .\nclose_on_child_death no\nallow_remote_control no\nstartup_session none\nclipboard_control write-clipboard read-clipboard write-primary read-primary\nterm xterm-kitty\nx11_hide_window_decorations yes\nmap ctrl+0x2b change_font_size all +0.5\nmap ctrl+0x2d change_font_size all -0.5\nkitty_mod ctrl+shift\nmap kitty_mod+c  copy_to_clipboard\nmap kitty_mod+v  paste_from_clipboard\nmap kitty_mod+s  paste_from_selection\nmap shift+insert paste_from_selection\nmap kitty_mod+o  pass_selection_to_program\nenable_audio_bell no\n"
  },
  {
    "path": ".config/mutt/aliases",
    "content": "# vim: filetype=neomuttrc\n# A file for aliases\n"
  },
  {
    "path": ".config/mutt/colors",
    "content": "# vim: filetype=neomuttrc\n\n# Default index colors:\ncolor index yellow default '.*'\ncolor index_author red default '.*'\ncolor index_number blue default\ncolor index_subject cyan default '.*'\n\n# For new mail:\ncolor index brightyellow black \"~N\"\ncolor index_author brightred black \"~N\"\ncolor index_subject brightcyan black \"~N\"\n\n# Header colors:\ncolor header blue default \".*\"\ncolor header brightmagenta default \"^(From)\"\ncolor header brightcyan default \"^(Subject)\"\ncolor header brightwhite default \"^(CC|BCC)\"\n\nmono bold bold\nmono underline underline\nmono indicator reverse\nmono error bold\ncolor normal default default\ncolor indicator brightblack white\ncolor sidebar_highlight red default\ncolor sidebar_divider brightblack black\ncolor sidebar_flagged red black\ncolor sidebar_new green black\ncolor normal brightyellow default\ncolor error red default\ncolor tilde black default\ncolor message cyan default\ncolor markers red white\ncolor attachment white default\ncolor search brightmagenta default\ncolor status brightyellow black\ncolor hdrdefault brightgreen default\ncolor quoted green default\ncolor quoted1 blue default\ncolor quoted2 cyan default\ncolor quoted3 yellow default\ncolor quoted4 red default\ncolor quoted5 brightred default\ncolor signature brightgreen default\ncolor bold black default\ncolor underline black default\ncolor normal default default\n\ncolor body brightred default \"[\\-\\.+_a-zA-Z0-9]+@[\\-\\.a-zA-Z0-9]+\" # Email addresses\ncolor body brightblue default \"(https?|ftp)://[\\-\\.,/%~_:?&=\\#a-zA-Z0-9]+\" # URL\ncolor body green default \"\\`[^\\`]*\\`\" # Green text between ` and `\ncolor body brightblue default \"^# \\.*\" # Headings as bold blue\ncolor body brightcyan default \"^## \\.*\" # Subheadings as bold cyan\ncolor body brightgreen default \"^### \\.*\" # Subsubheadings as bold green\ncolor body yellow default \"^(\\t| )*(-|\\\\*) \\.*\" # List items as yellow\ncolor body brightcyan default \"[;:][-o][)/(|]\" # emoticons\ncolor body brightcyan default \"[;:][)(|]\" # emoticons\ncolor body brightcyan default \"[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\\\n |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\\\n |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?\"\ncolor body brightcyan default \"[ ][*][^*]*[*][ ]?\" # more emoticon?\ncolor body brightcyan default \"[ ]?[*][^*]*[*][ ]\" # more emoticon?\ncolor body red default \"(BAD signature)\"\ncolor body cyan default \"(Good signature)\"\ncolor body brightblack default \"^gpg: Good signature .*\"\ncolor body brightyellow default \"^gpg: \"\ncolor body brightyellow red \"^gpg: BAD signature from.*\"\nmono body bold \"^gpg: Good signature\"\nmono body bold \"^gpg: BAD signature from.*\"\ncolor body red default \"([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\\\.?|[0-9]+\\\\.[0-9]+\\\\.[0-9]+\\\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \\t\\r\\n<>\\\"]\"\n"
  },
  {
    "path": ".config/mutt/muttrc",
    "content": "# Folder hooks\nfolder-hook 'account.com.gmail.kushtrim' 'source ~/.config/mutt/account.com.gmail.kushtrim'\nfolder-hook 'account.com.yahoo.kushtrim' 'source ~/.config/mutt/account.com.yahoo.kushtrim'\nfolder-hook 'account.com.hotmail.kushtrim' 'source ~/.config/mutt/account.com.hotmail.kushtrim'\nfolder-hook 'account.com.unibo.kushtrim' 'source ~/.config/mutt/account.com.unibo.kushtrim'\n# Default account\nsource ~/.config/mutt/account.com.gmail.kushtrim\n# Macros for switching accounts\nmacro index <F1> '<sync-mailbox><enter-command>source ~/.config/mutt/account.com.gmail.kushtrim<enter><change-folder>!<enter>'\nmacro index <F2> '<sync-mailbox><enter-command>source ~/.config/mutt/account.com.hotmail.kushtrim<enter><change-folder>!<enter>'\nmacro index <F3> '<sync-mailbox><enter-command>source ~/.config/mutt/account.com.yahoo.kushtrim<enter><change-folder>!<enter>'\nmacro index <F4> '<sync-mailbox><enter-command>source ~/.config/mutt/account.com.unibo.kushtrim<enter><change-folder>!<enter>'\n\n# vim: filetype=neomuttrc\n# This is the general mutt config which has the settings that all accounts use.\nbind index,pager i noop\nbind index,pager g noop\nbind index \\Cf noop\nsource ~/.config/mutt/colors\nsource ~/.config/mutt/aliases\nset sleep_time = 0\nset sort = 'reverse-date'\nset editor = $EDITOR\n#set copy = no\nset timeout = \"5\"\nset mail_check = \"10\"\nset mailcap_path = ~/.config/mutt/etc/mailcap\nset date_format=\"%y/%m/%d %I:%M\"\nset index_format=\"%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)\"\nset markers = no\nset mark_old = no\nset mime_forward = yes\nset smtp_authenticators = 'gssapi:login'\nset wait_key = no\nauto_view text/html\nauto_view application/pgp-encrypted\nalternative_order text/plain text/enriched text/html\nset rfc2047_parameters = yes\n\n# General remappings\nbind editor <space> noop\nbind index G last-entry\nbind index gg first-entry\nbind pager j next-line\nbind pager k previous-line\nbind pager gg top\nbind pager G bottom\nbind index d half-down\nbind index u half-up\nbind index D delete-message\nbind index U undelete-message\nbind index F search\nbind index,pager R group-reply\nbind index,pager \\031 previous-undeleted # Mouse wheel\nbind index,pager \\005 next-undeleted # Mouse wheel\nmacro index,pager S <sync-mailbox>\nmacro index,pager \\Cu |urlscan\\n\nmacro index,pager ,, |urlscan\\n\n\n# View attachments properly.\nbind attach <return> view-mailcap\nset fast_reply           # skip to compose when replying\nset fcc_attach           # save attachments with the body\nunset mime_forward       # forward attachments as part of body\nset forward_format = \"Fwd: %s\"       # format of subject when forwarding\nset forward_decode                   # decode when forwarding\nset forward_quote                    # include message in forwards\nset reverse_name                     # reply as whomever it was to\nset include                          # include message in replies\n\n#Ctrl-R to mark all as read\nmacro index \\Cr \"T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>\" \"mark all messages as read\"\n\n#sync email\nmacro index O \"<shell-escape>$HOME/.config/mutt/etc/mailsync.sh<enter>\" \"run offlineimap to sync all mail\"\nmacro index o \"<shell-escape>$HOME/.config/mutt/etc/mailsync.sh -qf INBOX<enter>\" \"run offlineimap to sync inbox\"\n\n#copy/move dialogs\nmacro index C \"<copy-message>?<toggle-mailboxes>\" \"copy a message to a mailbox\"\nmacro index M \"<save-message>?<toggle-mailboxes>\" \"move a message to a mailbox\"\n\n# Notmuch searching\nmacro index \\Cf \"<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuch query: ' x; echo \\$x >~/.cache/mutt_terms<enter><limit>~i \\\"\\`notmuch search --output=messages \\$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;chomp@a;s/\\^id:// for@a;$,=\\\"|\\\";print@a'\\`\\\"<enter>\" \"show only messages matching a notmuch pattern\"\nmacro index A \"<limit>all\\n\" \"show all messages (undo limit)\"\n\n# Sidebar mappings\nset sidebar_visible = yes\nset sidebar_width = 20\nset sidebar_short_path = yes\nset sidebar_next_new_wrap = yes\nset mail_check_stats\nset sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'\nbind index,pager \\Ck sidebar-prev\nbind index,pager \\Cj sidebar-next\nbind index,pager \\Co sidebar-open\nbind index,pager \\Cp sidebar-prev-new\nbind index,pager \\Cn sidebar-next-new\nbind index,pager B sidebar-toggle-visible\n"
  },
  {
    "path": ".config/neofetch/config.conf",
    "content": "# See this wiki page for more info:\n# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info\nprint_info() {\n    info title\n    info underline\n\n    info \"OS\" distro\n    info \"Host\" model\n    info \"Kernel\" kernel\n    info \"Uptime\" uptime\n    info \"Packages\" packages\n    info \"Shell\" shell\n    info \"Resolution\" resolution\n    info \"DE\" de\n    info \"WM\" wm\n    info \"WM Theme\" wm_theme\n    info \"Theme\" theme\n    info \"Icons\" icons\n    info \"Terminal\" term\n    info \"Terminal Font\" term_font\n    info \"CPU\" cpu\n    info \"GPU\" gpu\n    info \"Memory\" memory\n\n    # info \"GPU Driver\" gpu_driver  # Linux/macOS only\n    # info \"CPU Usage\" cpu_usage\n    # info \"Disk\" disk\n    # info \"Battery\" battery\n    # info \"Font\" font\n    # info \"Song\" song\n    # info \"Local IP\" local_ip\n    # info \"Public IP\" public_ip\n    # info \"Users\" users\n    # info \"Locale\" locale  # This only works on glibc systems.\n\n    info line_break\n    info cols\n    info line_break\n}\n\n\n# Kernel\n\n\n# Shorten the output of the kernel function.\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --kernel_shorthand\n# Supports: Everything except *BSDs (except PacBSD and PC-BSD)\n#\n# Example:\n# on:  '4.8.9-1-ARCH'\n# off: 'Linux 4.8.9-1-ARCH'\nkernel_shorthand=\"on\"\n\n\n# Distro\n\n\n# Shorten the output of the distro function\n#\n# Default:  'off'\n# Values:   'on', 'off', 'tiny'\n# Flag:     --distro_shorthand\n# Supports: Everything except Windows and Haiku\ndistro_shorthand=\"off\"\n\n# Show/Hide OS Architecture.\n# Show 'x86_64', 'x86' and etc in 'Distro:' output.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --os_arch\n#\n# Example:\n# on:  'Arch Linux x86_64'\n# off: 'Arch Linux'\nos_arch=\"on\"\n\n\n# Uptime\n\n\n# Shorten the output of the uptime function\n#\n# Default: 'on'\n# Values:  'on', 'off', 'tiny'\n# Flag:    --uptime_shorthand\n#\n# Example:\n# on:   '2 days, 10 hours, 3 mins'\n# off:  '2 days, 10 hours, 3 minutes'\n# tiny: '2d 10h 3m'\nuptime_shorthand=\"on\"\n\n\n# Packages\n\n\n# Show/Hide Package Manager names.\n#\n# Default: 'tiny'\n# Values:  'on', 'tiny' 'off'\n# Flag:    --package_managers\n#\n# Example:\n# on:   '998 (pacman), 8 (flatpak), 4 (snap)'\n# tiny: '908 (pacman, flatpak, snap)'\n# off:  '908'\npackage_managers=\"on\"\n\n\n# Shell\n\n\n# Show the path to $SHELL\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --shell_path\n#\n# Example:\n# on:  '/bin/bash'\n# off: 'bash'\nshell_path=\"off\"\n\n# Show $SHELL version\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --shell_version\n#\n# Example:\n# on:  'bash 4.4.5'\n# off: 'bash'\nshell_version=\"on\"\n\n\n# CPU\n\n\n# CPU speed type\n#\n# Default: 'bios_limit'\n# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.\n# Flag:    --speed_type\n# Supports: Linux with 'cpufreq'\n# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.\nspeed_type=\"bios_limit\"\n\n# CPU speed shorthand\n#\n# Default: 'off'\n# Values: 'on', 'off'.\n# Flag:    --speed_shorthand.\n# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz\n#\n# Example:\n# on:    'i7-6500U (4) @ 3.1GHz'\n# off:   'i7-6500U (4) @ 3.100GHz'\nspeed_shorthand=\"off\"\n\n# Enable/Disable CPU brand in output.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --cpu_brand\n#\n# Example:\n# on:   'Intel i7-6500U'\n# off:  'i7-6500U (4)'\ncpu_brand=\"on\"\n\n# CPU Speed\n# Hide/Show CPU speed.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --cpu_speed\n#\n# Example:\n# on:  'Intel i7-6500U (4) @ 3.1GHz'\n# off: 'Intel i7-6500U (4)'\ncpu_speed=\"on\"\n\n# CPU Cores\n# Display CPU cores in output\n#\n# Default: 'logical'\n# Values:  'logical', 'physical', 'off'\n# Flag:    --cpu_cores\n# Support: 'physical' doesn't work on BSD.\n#\n# Example:\n# logical:  'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)\n# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)\n# off:      'Intel i7-6500U @ 3.1GHz'\ncpu_cores=\"logical\"\n\n# CPU Temperature\n# Hide/Show CPU temperature.\n# Note the temperature is added to the regular CPU function.\n#\n# Default: 'off'\n# Values:  'C', 'F', 'off'\n# Flag:    --cpu_temp\n# Supports: Linux, BSD\n# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable\n#       coretemp kernel module. This only supports newer Intel processors.\n#\n# Example:\n# C:   'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'\n# F:   'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'\n# off: 'Intel i7-6500U (4) @ 3.1GHz'\ncpu_temp=\"off\"\n\n\n# GPU\n\n\n# Enable/Disable GPU Brand\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gpu_brand\n#\n# Example:\n# on:  'AMD HD 7950'\n# off: 'HD 7950'\ngpu_brand=\"on\"\n\n# Which GPU to display\n#\n# Default: 'all'\n# Values:  'all', 'dedicated', 'integrated'\n# Flag:    --gpu_type\n# Supports: Linux\n#\n# Example:\n# all:\n#   GPU1: AMD HD 7950\n#   GPU2: Intel Integrated Graphics\n#\n# dedicated:\n#   GPU1: AMD HD 7950\n#\n# integrated:\n#   GPU1: Intel Integrated Graphics\ngpu_type=\"all\"\n\n\n# Resolution\n\n\n# Display refresh rate next to each monitor\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --refresh_rate\n# Supports: Doesn't work on Windows.\n#\n# Example:\n# on:  '1920x1080 @ 60Hz'\n# off: '1920x1080'\nrefresh_rate=\"off\"\n\n\n# Gtk Theme / Icons / Font\n\n\n# Shorten output of GTK Theme / Icons / Font\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --gtk_shorthand\n#\n# Example:\n# on:  'Numix, Adwaita'\n# off: 'Numix [GTK2], Adwaita [GTK3]'\ngtk_shorthand=\"off\"\n\n\n# Enable/Disable gtk2 Theme / Icons / Font\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gtk2\n#\n# Example:\n# on:  'Numix [GTK2], Adwaita [GTK3]'\n# off: 'Adwaita [GTK3]'\ngtk2=\"on\"\n\n# Enable/Disable gtk3 Theme / Icons / Font\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --gtk3\n#\n# Example:\n# on:  'Numix [GTK2], Adwaita [GTK3]'\n# off: 'Numix [GTK2]'\ngtk3=\"on\"\n\n\n# IP Address\n\n\n# Website to ping for the public IP\n#\n# Default: 'http://ident.me'\n# Values:  'url'\n# Flag:    --ip_host\npublic_ip_host=\"http://ident.me\"\n\n\n\n# Disk\n\n\n# Which disks to display.\n# The values can be any /dev/sdXX, mount point or directory.\n# NOTE: By default we only show the disk info for '/'.\n#\n# Default: '/'\n# Values:  '/', '/dev/sdXX', '/path/to/drive'.\n# Flag:    --disk_show\n#\n# Example:\n# disk_show=('/' '/dev/sdb1'):\n#      'Disk (/): 74G / 118G (66%)'\n#      'Disk (/mnt/Videos): 823G / 893G (93%)'\n#\n# disk_show=('/'):\n#      'Disk (/): 74G / 118G (66%)'\n#\ndisk_show=('/')\n\n# Disk subtitle.\n# What to append to the Disk subtitle.\n#\n# Default: 'mount'\n# Values:  'mount', 'name', 'dir'\n# Flag:    --disk_subtitle\n#\n# Example:\n# name:   'Disk (/dev/sda1): 74G / 118G (66%)'\n#         'Disk (/dev/sdb2): 74G / 118G (66%)'\n#\n# mount:  'Disk (/): 74G / 118G (66%)'\n#         'Disk (/mnt/Local Disk): 74G / 118G (66%)'\n#         'Disk (/mnt/Videos): 74G / 118G (66%)'\n#\n# dir:    'Disk (/): 74G / 118G (66%)'\n#         'Disk (Local Disk): 74G / 118G (66%)'\n#         'Disk (Videos): 74G / 118G (66%)'\ndisk_subtitle=\"mount\"\n\n\n# Song\n\n\n# Manually specify a music player.\n#\n# Default: 'auto'\n# Values:  'auto', 'player-name'\n# Flag:    --music_player\n#\n# Available values for 'player-name':\n#\n# amarok\n# audacious\n# banshee\n# bluemindo\n# clementine\n# cmus\n# deadbeef\n# deepin-music\n# dragon\n# elisa\n# exaile\n# gnome-music\n# gmusicbrowser\n# Google Play\n# guayadeque\n# iTunes\n# juk\n# lollypop\n# mocp\n# mopidy\n# mpd\n# pogo\n# pragha\n# qmmp\n# quodlibet\n# rhythmbox\n# sayonara\n# smplayer\n# spotify\n# Spotify\n# tomahawk\n# vlc\n# xmms2d\n# yarock\nmusic_player=\"auto\"\n\n# Format to display song information.\n#\n# Default: '%artist% - %album% - %title%'\n# Values:  '%artist%', '%album%', '%title%'\n# Flag:    --song_format\n#\n# Example:\n# default: 'Song: Jet - Get Born - Sgt Major'\nsong_format=\"%artist% - %album% - %title%\"\n\n# Print the Artist, Album and Title on separate lines\n#\n# Default: 'off'\n# Values:  'on', 'off'\n# Flag:    --song_shorthand\n#\n# Example:\n# on:  'Artist: The Fratellis'\n#      'Album: Costello Music'\n#      'Song: Chelsea Dagger'\n#\n# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'\nsong_shorthand=\"off\"\n\n# 'mpc' arguments (specify a host, password etc).\n#\n# Default:  ''\n# Example: mpc_args=(-h HOST -P PASSWORD)\nmpc_args=()\n\n\n# Text Colors\n\n\n# Text Colors\n#\n# Default:  'distro'\n# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'\n# Flag:     --colors\n#\n# Each number represents a different part of the text in\n# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'\n#\n# Example:\n# colors=(distro)      - Text is colored based on Distro colors.\n# colors=(4 6 1 8 8 6) - Text is colored in the order above.\ncolors=(distro)\n\n\n# Text Options\n\n\n# Toggle bold text\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --bold\nbold=\"on\"\n\n# Enable/Disable Underline\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --underline\nunderline_enabled=\"on\"\n\n# Underline character\n#\n# Default:  '-'\n# Values:   'string'\n# Flag:     --underline_char\nunderline_char=\"-\"\n\n\n# Color Blocks\n\n\n# Color block range\n# The range of colors to print.\n#\n# Default:  '0', '7'\n# Values:   'num'\n# Flag:     --block_range\n#\n# Example:\n#\n# Display colors 0-7 in the blocks.  (8 colors)\n# neofetch --block_range 0 7\n#\n# Display colors 0-15 in the blocks. (16 colors)\n# neofetch --block_range 0 15\nblock_range=(0 7)\n\n# Toggle color blocks\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --color_blocks\ncolor_blocks=\"on\"\n\n# Color block width in spaces\n#\n# Default:  '3'\n# Values:   'num'\n# Flag:     --block_width\nblock_width=3\n\n# Color block height in lines\n#\n# Default:  '1'\n# Values:   'num'\n# Flag:     --block_height\nblock_height=1\n\n\n# Progress Bars\n\n\n# Bar characters\n#\n# Default:  '-', '='\n# Values:   'string', 'string'\n# Flag:     --bar_char\n#\n# Example:\n# neofetch --bar_char 'elapsed' 'total'\n# neofetch --bar_char '-' '='\nbar_char_elapsed=\"-\"\nbar_char_total=\"=\"\n\n# Toggle Bar border\n#\n# Default:  'on'\n# Values:   'on', 'off'\n# Flag:     --bar_border\nbar_border=\"on\"\n\n# Progress bar length in spaces\n# Number of chars long to make the progress bars.\n#\n# Default:  '15'\n# Values:   'num'\n# Flag:     --bar_length\nbar_length=15\n\n# Progress bar colors\n# When set to distro, uses your distro's logo colors.\n#\n# Default:  'distro', 'distro'\n# Values:   'distro', 'num'\n# Flag:     --bar_colors\n#\n# Example:\n# neofetch --bar_colors 3 4\n# neofetch --bar_colors distro 5\nbar_color_elapsed=\"distro\"\nbar_color_total=\"distro\"\n\n\n# Info display\n# Display a bar with the info.\n#\n# Default: 'off'\n# Values:  'bar', 'infobar', 'barinfo', 'off'\n# Flags:   --cpu_display\n#          --memory_display\n#          --battery_display\n#          --disk_display\n#\n# Example:\n# bar:     '[---=======]'\n# infobar: 'info [---=======]'\n# barinfo: '[---=======] info'\n# off:     'info'\ncpu_display=\"off\"\nmemory_display=\"off\"\nbattery_display=\"off\"\ndisk_display=\"off\"\n\n\n# Backend Settings\n\n\n# Image backend.\n#\n# Default:  'ascii'\n# Values:   'ascii', 'caca', 'jp2a', 'iterm2', 'off', 'termpix', 'pixterm', 'tycat', 'w3m'\n# Flag:     --backend\nimage_backend=\"ascii\"\n\n# Image Source\n#\n# Which image or ascii file to display.\n#\n# Default:  'auto'\n# Values:   'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'\n# Flag:     --source\n#\n# NOTE: 'auto' will pick the best image source for whatever image backend is used.\n#       In ascii mode, distro ascii art will be used and in an image mode, your\n#       wallpaper will be used.\nimage_source=\"auto\"\n\n\n# Ascii Options\n\n\n# Ascii distro\n# Which distro's ascii art to display.\n#\n# Default: 'auto'\n# Values:  'auto', 'distro_name'\n# Flag:    --ascii_distro\n#\n# NOTE: Arch and Ubuntu have 'old' logo variants.\n#       Change this to 'arch_old' or 'ubuntu_old' to use the old logos.\n# NOTE: Ubuntu has flavor variants.\n#       Change this to 'Lubuntu', 'Xubuntu', 'Ubuntu-GNOME' or 'Ubuntu-Budgie' to use the flavors.\n# NOTE: Arch, Crux and Gentoo have a smaller logo variant.\n#       Change this to 'arch_small', 'crux_small' or 'gentoo_small' to use the small logos.\nascii_distro=\"auto\"\n\n# Ascii Colors\n#\n# Default:  'distro'\n# Values:   'distro', 'num' 'num' 'num' 'num' 'num' 'num'\n# Flag:     --ascii_colors\n#\n# Example:\n# ascii_colors=(distro)      - Ascii is colored based on Distro colors.\n# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.\nascii_colors=(distro)\n\n# Bold ascii logo\n# Whether or not to bold the ascii logo.\n#\n# Default: 'on'\n# Values:  'on', 'off'\n# Flag:    --ascii_bold\nascii_bold=\"on\"\n\n\n# Image Options\n\n\n# Image loop\n# Setting this to on will make neofetch redraw the image constantly until\n# Ctrl+C is pressed. This fixes display issues in some terminal emulators.\n#\n# Default:  'off'\n# Values:   'on', 'off'\n# Flag:     --loop\nimage_loop=\"off\"\n\n# Thumbnail directory\n#\n# Default: '~/.cache/thumbnails/neofetch'\n# Values:  'dir'\nthumbnail_dir=\"${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch\"\n\n# Crop mode\n#\n# Default:  'normal'\n# Values:   'normal', 'fit', 'fill'\n# Flag:     --crop_mode\n#\n# See this wiki page to learn about the fit and fill options.\n# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F\ncrop_mode=\"normal\"\n\n# Crop offset\n# Note: Only affects 'normal' crop mode.\n#\n# Default:  'center'\n# Values:   'northwest', 'north', 'northeast', 'west', 'center'\n#           'east', 'southwest', 'south', 'southeast'\n# Flag:     --crop_offset\ncrop_offset=\"center\"\n\n# Image size\n# The image is half the terminal width by default.\n#\n# Default: 'auto'\n# Values:  'auto', '00px', '00%', 'none'\n# Flags:   --image_size\n#          --size\nimage_size=\"auto\"\n\n# Gap between image and text\n#\n# Default: '3'\n# Values:  'num', '-num'\n# Flag:    --gap\ngap=3\n\n# Image offsets\n# Only works with the w3m backend.\n#\n# Default: '0'\n# Values:  'px'\n# Flags:   --xoffset\n#          --yoffset\nyoffset=0\nxoffset=0\n\n# Image background color\n# Only works with the w3m backend.\n#\n# Default: ''\n# Values:  'color', 'blue'\n# Flag:    --bg_color\nbackground_color=\n\n\n# Misc Options\n\n# Stdout mode\n# Turn off all colors and disables image backend (ASCII/Image).\n# Useful for piping into another command.\n# Default: 'off'\n# Values: 'on', 'off'\nstdout=\"off\"\n"
  },
  {
    "path": ".config/nixpkgs/config.nix",
    "content": "{\n  packageOverrides = pkgs: {\n    nur = import (builtins.fetchTarball \"https://github.com/nix-community/NUR/archive/master.tar.gz\") {\n      inherit pkgs;\n    };\n  };\n}\n"
  },
  {
    "path": ".config/nvim/bookmarks",
    "content": "let l:bm_file_version = 1\nlet l:bm_sessions = {'default': {'/home/bresilla/WORK/data_structures/ControlP': [{'sign_idx': 9500, 'line_nr': 10, 'content': '> bin/main', 'annotation': 'n'},],'/home/bresilla/DATA/DOTFILES/Dots/.config/tmux/modules/STATUS': [{'sign_idx': 9500, 'line_nr': 62, 'content': 'cdr=\"$sealTX\"'},],}}\nlet l:bm_current_session = 'default'\n"
  },
  {
    "path": ".config/nvim/init.vim",
    "content": "call plug#begin()\n    \"SYNTAX\n    Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'bash install.sh'}\n    Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins'}\n    Plug 'ncm2/float-preview.nvim'\n    Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }\n    Plug 'sheerun/vim-polyglot'           \t\"A collection of language packs for Vim\n\tPlug 'w0rp/ale'                       \t\"syntax checker for vim\n    Plug 'SirVer/ultisnips'               \t\"snipets engine\n    Plug 'honza/vim-snippets'             \t\"snippets collection\n    Plug 'ntpeters/vim-better-whitespace' \t\"whitespace detection\n    Plug 'lfilho/cosco.vim'               \t\"add semicolon or comma n the end\n    Plug 'lilydjwg/colorizer'             \t\"show hex colors\n    \"WORKSPACE\n    Plug 'vim-ctrlspace/vim-ctrlspace'    \t\"a better workspace manager\n    Plug 'benmills/vimux'                 \t\"run shell comands in a tmux pane\n    Plug 'christoomey/vim-tmux-navigator'\n\tPlug 'voldikss/vim-floaterm'\t\t  \t\"terminal\n\tPlug 'ingolemo/vim-bufferclose'\n    Plug '907th/vim-auto-save'            \t\"vim autsave plugin\n    Plug 'editorconfig/editorconfig-vim'  \t\"EDITOR-CONFIG settings\n    \"THEME\n    Plug 'vim-airline/vim-airline-themes'\n    Plug 'vim-airline/vim-airline'\n    Plug 'edkolev/promptline.vim'\n    Plug 'powerline/fonts'                \t\"patched powerline-fonts\n    Plug 'rakr/vim-one'                   \t\"Atom ONE theme\n    \"NAVIGATION\n    Plug 'easymotion/vim-easymotion'      \t\"jump to any location\n    Plug 'matze/vim-move'                 \t\"move lines with alt-arrow\n    Plug 'yuttie/comfortable-motion.vim'  \t\"comfortable scroll\n    Plug 'tpope/vim-repeat'               \t\" '.' for better repeat functioalities\n    \"VIEWS\n\tPlug 'scrooloose/nerdtree'            \t\"side-bar file manager\n    Plug 'ryanoasis/vim-devicons'         \t\"icons for nerdtree\n    Plug 'zgpio/tree.nvim'                  \"better file browser\n    Plug 'mcchrish/nnn.vim'\n    Plug 'junegunn/goyo.vim'\n\tPlug 'mox-mox/vim-localsearch'\t\t  \t\"vim localsearch\n\tPlug 'ctrlpvim/ctrlp.vim'             \t\"fuzzy searcher\n\tPlug 'liuchengxu/vim-clap'\t\t\t  \t\"interactive floating finder and dispatcher\n\tPlug 'dyng/ctrlsf.vim'\t\t\t\t  \t\"grep search withind directory\n    Plug 'majutsushi/tagbar'              \t\"methods viever\n    Plug 'mbbill/undotree'                \t\"show a tree of undos\n    Plug 'gcavallanti/vim-noscrollbar'    \t\"scrollbar-like for statusline\n    \"TOOLS\n    Plug 'terryma/vim-multiple-cursors'   \t\"some multiple cursor things\n    Plug 'scrooloose/nerdcommenter'       \t\"commenter\n    Plug 'tpope/vim-abolish'              \t\"better renamer substituter\n    Plug 'svermeulen/vim-subversive'      \t\"subsiitute motion\n\tPlug 'yggdroot/indentline'            \t\"indentation (characters)\n    Plug 'rrethy/vim-illuminate'          \t\"highlightusert same words as cursor\n    Plug 'wellle/targets.vim'             \t\"more objects to operate functions\n    Plug 'jiangmiao/auto-pairs'           \t\"auto close brackets and parenthesis\n    Plug 'luochen1990/rainbow'            \t\"colored brackets\n    Plug 'godlygeek/tabular'              \t\"text aligner\n    Plug 'haya14busa/incsearch.vim'\n    Plug 'mattesgroeger/vim-bookmarks'    \t\"bookmarks per line\n    Plug 'kana/vim-fakeclip'              \t\"better clipboard\n    \"GIT\n    Plug 'airblade/vim-gitgutter'         \t\"show differences (GIT)\n    Plug 'whiteinge/diffconflicts'\n    Plug 'tpope/vim-fugitive'             \t\"git wrapper\n    \"BUILD\n\tPlug 'sakhnik/nvim-gdb'               \t\"GDB, LLVM wrapper\n\tPlug 'puremourning/vimspector'\t\t  \t\"VIM DEBUGGER\n\t\" Plug 'strottos/vim-padre', { 'dir': '~/.config/nvim/plugged/vim-padre', 'do': 'make' }\n    \"OTHER\n\t\" Plug 'wakatime/vim-wakatime'\t\t  \t\"coding time tracker plugin\n\tPlug 'duggiefresh/vim-easydir'        \t\"create new files and folders easily\n    Plug 'wincent/terminus'               \t\"integration with terminal functioalities\n    Plug 'othree/xml.vim'\n    Plug 'reedes/vim-pencil'\n\tPlug 'tpope/vim-markdown'\n\tPlug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() } }\n    Plug 'lervag/vimtex'\t\t\t\t  \" LATEX for vim\ncall plug#end()\n\nlet g:python_host_prog='/usr/bin/python'\nlet g:python3_host_prog='/usr/bin/python3'\n\nsyntax on\nfiletype on\nfiletype indent on\nfiletype plugin on\nfiletype plugin indent on\n\nlet &t_SI = \"\\e[6 q\"\nlet &t_EI = \"\\e[3 q\"\nlet mapleader = \"\\<Space>\"\n\nset nocompatible\nset hidden\nset encoding=utf8\nset guifont=Monoisome\\ 12\nset t_Co=256\nset laststatus=2\nset clipboard+=unnamedplus              \" system clipboard\nset viminfo=\"\"\nset noswapfile\nset nobackup\nset nowritebackup\nset autoread\nset mouse=a                             \"let vim mouse scroll\nset sidescroll=1\nset scrollopt+=hor\nset showbreak=↪\\\nset ruler\nset showcmd                             \" display incomplete commands\nset showmode                            \" display current modes<Paste>\nset number                              \" show numbers\nset relativenumber\nset display+=lastline\nset shiftround\nset hlsearch\nset incsearch\nset ignorecase\nset smartcase\n\n\"folding things...\nset foldmethod=indent\nset foldnestmax=10\nset foldlevel=2\nset nofoldenable\n\n\"tab settings\nfunction! UseTabs()\n  set tabstop=4     \" Size of a hard tabstop (ts).\n  set shiftwidth=4  \" Size of an indentation (sw).\n  set noexpandtab   \" Always uses tabs instead of space characters (noet).\n  set autoindent    \" Copy indent from current line when starting a new line (ai).\n  set list lcs=tab:\\|\\                    \" show line indentation when tabs\nendfunction\nfunction! UseSpaces()\n  set tabstop=4     \" Size of a hard tabstop (ts).\n  set shiftwidth=4  \" Size of an indentation (sw).\n  set expandtab     \" Always uses spaces instead of tab characters (et).\n  set softtabstop=0 \" Number of spaces a <Tab> counts for. When 0, featuer is off (sts).\n  set autoindent    \" Copy indent from current line when starting a new line.\n  set smarttab      \" Inserts blanks on a <Tab> key (as per sw, ts and sts).\n  set list lcs=tab:\\|\\                    \" show line indentation when tabs\n  :retab\nendfunction\ncall UseSpaces()\n\nset completeopt=longest,menuone,preview\nset wildmenu                            \" show a navigable menu for tab completion\nset wildmode=longest,list,full\nset wildignore=*.o,*~,*.pyc,*.class,*.so,*.zip,*.a,*/tmp/*\nset fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1\nset backspace=indent,eol,start          \" make that backspace key work the way it should\nset whichwrap+=<,>,h,l\nset listchars=extends:›,precedes:‹,nbsp:␣,trail:·,tab:→\\ ,eol:¬\nset iskeyword-=_,.,=,-,:,               \" specify what e word is\n\nset scrolloff=10                        \" Leave 10 lines of buffer when scrolling\nset sidescrolloff=10                    \" Leave 10 characters of horizontal buffer when scrolling\nset cursorline\nset cursorcolumn                        \" column before numbers\nset signcolumn=\"yes\"\n\n\n\n\" === WHERE YOU LEFT ===\"\"\n\"go to last position you were editing\nau BufWinLeave * silent! mkview\nau BufWinEnter * silent! loadview\n\n\n\n\" === GOYO ===\"\nfunction! s:goyo_enter()\n    silent !tmux set status off\n    silent !tmux list-panes -F '\\#F' | grep -q Z || tmux resize-pane -Z\n    :SoftPencil\n    set noshowmode\n    set nonumber\nendfunction\nfunction! s:goyo_leave()\n    silent !tmux set status on\n    silent !tmux list-panes -F '\\#F' | grep -q Z && tmux resize-pane -Z\n    :NoPencil\n    set showmode\n    set number\n    silent! call s:highlightuser()\nendfunction\nautocmd! User GoyoEnter nested call <SID>goyo_enter()\nautocmd! User GoyoLeave nested call <SID>goyo_leave()\nnoremap <C-g>  :Goyo<CR>\nlet g:goyo_width = 90\n\n\n\" === SEARCH SETTINGS === \"\nlet g:better_whitespace_enabled=1\nlet g:incsearch#auto_nohlsearch = 1\nmap / <Plug>(incsearch-forward)\nnmap <leader>/ <Plug>localsearch_toggle\nnnoremap * *``\n\"substitute normal\n\"nnoremap <silent> + :%s/\\<<C-r><C-w>\\>//g<Left><Left>\n\"substitute with subversive + abolish\nnmap s <plug>(SubversiveSubstituteRangeConfirm)\nnmap + <plug>(SubversiveSubstituteWordRangeConfirm)\n\n\n\n\" === FILEMANAGER === \"\n\"nerdtree\nnoremap <C-t>  :NERDTreeToggle<CR>\nlet NERDTreeQuitOnOpen=1                \"automatically clone nerd tre after open\nlet NERDTreeShowHidden=1\nlet g:NERDTreeMinimalUI = 1\nautocmd StdinReadPre * let s:std_in=1\nautocmd VimEnter * if argc() == 0 && !exists(\"s:std_in\") | NERDTree | endif\nau VimEnter * NERDTreeRefreshRoot\n\n\n\n\" === OUTLINE BAR === \"\n\"tagbar\nnoremap <leader>t :TagbarToggle<CR>\nlet g:tagbar_compact = 1\nlet g:tagbar_sort = 0\n\" autocmd FileType cpp silent! :call tagbar#autoopen(0)\n\n\n\n\" === INDENTATION LINES === \"\nlet g:indentLine_char_list = ['|', '¦', '┆', '┊']\nlet g:indentLine_color_term = 236\nlet g:indentLine_setConceal = 2\n\" default ''.\n\" n for Normal mode\n\" v for Visual mode\n\" i for Insert mode\n\" c for Command line editing, for 'incsearch'\nlet g:indentLine_concealcursor = \"\"\n\n\n\n\" === EASY MOTION === \"\nnnoremap <buffer><CR> <Plug>(easymotion-overwin-w)\nhi EasyMotionTarget ctermfg=15 cterm=bold,underline\nhi link EasyMotionTarget2First EasyMotionTarget\nhi EasyMotionTarget2Second ctermfg=2 cterm=underline\n\n\n\n\" === WORKSPACE === \"\n\" ctrlspace\nset showtabline=0\nnnoremap <f1> :CtrlSpaceSaveWorkspace<CR>\nlet g:CtrlSpaceDefaultMappingKey = \"<C-space> \"\nlet g:CtrlSpaceLoadLastWorkspaceOnStart = 1\n\" let g:CtrlSpaceSaveWorkspaceOnSwitch = 1\n\" let g:CtrlSpaceSaveWorkspaceOnExit = 1\nhi link CtrlSpaceNormal   Normal\nhi link CtrlSpaceSelected PMenu\nhi link CtrlSpaceSearch   Search\nhi link CtrlSpaceStatus   StatusLine\nif executable(\"ag\")\n    let g:CtrlSpaceGlobCommand = 'ag -l --nocolor -g \"\"'\nendif\nlet g:CtrlSpaceSymbols = { \"File\": \"◯\", \"CTab\": \"▣\", \"Tabs\": \"▢\" }\nlet g:CtrlSpaceUseArrowsInTerm = 1\n\n\n\n\" === CTRLP === \"\nlet g:ctrlp_map = '<leader><leader>'\nlet g:ctrlp_custom_ignore = {\n  \\ 'dir':  '\\v[\\/]\\.(git|hg|svn)$',\n  \\ 'file': '\\v\\.(exe|so|dll)$',\n  \\ 'link': 'some_bad_symbolic_links',\n  \\ }\nlet g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard']\n\n\n\n\" === CTRLF === \"\nnmap     <leader>f <Plug>CtrlSFPrompt\n\n\n\n\" === FLOAT-TERM === \"\nnoremap  <silent> <Insert>           :FloatermToggle<CR>i\nnoremap! <silent> <Insert>           <Esc>:FloatermToggle<CR>i\ntnoremap <silent> <Insert>           <C-\\><C-n>:FloatermToggle<CR>\nlet g:floaterm_position = 'center'\nlet g:floaterm_width = float2nr(&columns/1.5)\nlet g:floaterm_height = float2nr(winheight(0)/1.5)\n\n\n\n\" === NEOGDB === \"\nlet g:gdb_keymap_continue = '<f8>'\nlet g:gdb_keymap_next = '<f10>'\nlet g:gdb_keymap_step = '<f11>'\n\" Usually, F23 is just Shift+F11\nlet g:gdb_keymap_finish = '<f23>'\nlet g:gdb_keymap_toggle_break = '<f9>'\n\" Usually, F33 is just Ctrl+F9\nlet g:gdb_keymap_toggle_break_all = '<f33>'\nlet g:gdb_keymap_frame_up = '<c-n>'\nlet g:gdb_keymap_frame_down = '<c-p>'\n\" Usually, F21 is just Shift+F9\nlet g:gdb_keymap_clear_break = '<f21>'\n\" Usually, F17 is just Shift+F5\nlet g:gdb_keymap_debug_stop = '<f17>'\n\n\n\n\" === MOCELINES === \"\nnmap <C-A-Down> <Plug>MoveLineDown\nnmap <C-A-Up> <Plug>MoveLineUp\nvmap <C-A-Down> <Plug>MoveBlockDown\nvmap <C-A-Up> <Plug>MoveBlockUp\n\n\n\n\" === NAVIGATION === \"\n\"navigation panes\nimap <C-Pagedown> <C-O>:CtrlSpaceGoDown<CR>\nimap <C-Pageup> <C-O>:CtrlSpaceGoUp<CR>\nmap <C-Pagedown> :CtrlSpaceGoDown<CR>\nmap <C-Pageup> :CtrlSpaceGoUp<CR>\nmap <C-M-Pagedown> :tabn<CR>\nmap <C-M-Pageup> :tabp<CR>\nmap <leader>v :vnew<CR>\nmap <leader>b :new<CR>\nmap <leader>n :enew<CR>\nnmap - :e #<cr>\nmap <C-Up> <C-k>\nmap <C-Down> <C-j>\nmap <C-Left> <C-h>\nmap <C-Right> <C-l>\n\"move vertically on soft lines\nnnoremap j gj\nnnoremap k gk\nvnoremap j gj\nvnoremap k gk\nnnoremap <Down> gj\nnnoremap <Up> gk\nvnoremap <Down> gj\nvnoremap <Up> gk\ninoremap <Down> <C-o>gj\ninoremap <Up> <C-o>gk\n\"move horizontally\nmap <home> ^\nmap <end> $\n\"exit\ncmap Q quitall\ncmap W write\n\n\n\n\" === COMFORTABLE SCROLLING === \"\nlet g:comfortable_motion_no_default_key_mappings = 1\nmap <silent> <ScrollWheelDown> :call comfortable_motion#flick(40)<CR>\nimap <ScrollWheelDown> <C-O><ScrollWheelDown>\nmap <silent> <ScrollWheelUp>   :call comfortable_motion#flick(-40)<CR>\nimap <ScrollWheelUp> <C-O><ScrollWheelUp>\nlet g:comfortable_motion_impulse_multiplier = 2\nmap <silent> <Pagedown> :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0))<CR>\nimap <Pagedown> <C-O><Pagedown>\nmap <silent> <Pageup>   :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * -winheight(0))<CR>\nimap <Pageup> <C-O><Pageup>\nlet g:comfortable_motion_friction = 60.0\nlet g:comfortable_motion_air_drag = 4.0\nlet g:comfortable_motion_interval = 1000.0 / 60\n\n\n\n\" ===RUN === \"\n\" asyncrun\nlet g:asyncrun_rootmarks = ['.svn', '.git', '.root', '_darcs', 'build.xml']\nlet g:asyncrun_open = 8\n\"cmakerun\nmap <C-F7> <ESC><Esc>:!cmake --build build/ --target<CR>\nmap <C-F8> <ESC><Esc>:!rm -rf build/*<CR>:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug<CR>\nmap <C-F9> <ESC><Esc>:!rm -rf build/*<CR>:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=FastDebug<CR>\nmap <F7> <ESC><Esc>:!ninja -C build<CR>\nmap <F8> <ESC><Esc>:!rm -rf build/*<CR>:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=Debug -GNinja<CR>\nmap <F9> <ESC><Esc>:!rm -rf build/*<CR>:!cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=FastDebug -GNinja<CR>\n\n\n\n\n\" === ALE === \"\nlet g:ale_sign_error = '×'\nlet g:ale_sign_warning = '!'\nhighlight ALEWarning ctermbg=0 ctermfg=220 cterm=bold\nhighlight ALEWarningSign ctermbg=220 ctermfg=231 cterm=bold\nhighlight ALEError ctermbg=0 ctermfg=196 cterm=bold\nhighlight ALEErrorSign ctermbg=196 ctermfg=231 cterm=bold\nlet g:airline#extensions#ale#enabled = 1\nlet g:ale_linters = {\n    \\ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'],\n    \\ 'go': ['~/.go/bin/gopls'],\n    \\ 'nim': ['~/.nimble/bin/nimlsp'],\n\t\\ 'cpp': ['clangtidy'],\n    \\ 'python': ['/usr/local/bin/pyls']\n\t\\ }\nlet g:ale_fixers = {\n\t\\ 'cpp': ['clang-format'],\n\t\\ }\nlet g:ale_lint_on_save = 1\nlet g:ale_lint_on_text_changed = 1\n\" let g:ale_fix_on_save = 1\nnmap <F10> <Plug>(ale_fix)\nau TabLeave * silent! <Plug>(ale_fix)\nau BufLeave * silent! <Plug>(ale_fix)\n\n\n\n\" === LANGUAGE SERVER === \"\nlet g:LanguageClient_autoStart = 1\nlet g:LanguageClient_useFloatingHover = 1\nlet g:LanguageClient_hoverPreview = \"Never\"\nlet g:LanguageClient_serverCommands = {\n    \\ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'],\n    \\ 'go': ['~/.go/bin/gopls'],\n    \\ 'nim': ['~/.nimble/bin/nimlsp'],\n    \\ 'python': ['/usr/local/bin/pyls'],\n    \\ 'c': ['clangd', '-compile-commands-dir=' . getcwd() . '/build'],\n    \\ 'cpp': ['clangd', '-compile-commands-dir=' . getcwd() . '/build'],\n    \\ 'julia': ['julia', '--startup-file=no', '--history-file=no', '-e', '\n    \\       using LanguageServer;\n    \\       using Pkg;\n    \\       import StaticLint;\n    \\       import SymbolServer;\n    \\       env_path = dirname(Pkg.Types.Context().env.project_file);\n    \\       debug = false;\n    \\       server = LanguageServer.LanguageServerInstance(stdin, stdout, debug, env_path, \"\", Dict());\n    \\       server.runlinter = true;\n    \\       run(server);']\n    \\ }\n    \" \\ 'cpp': ['cquery', '--log-file=/tmp/cq.log'],\nnnoremap <S-tab> :call LanguageClient_textDocument_definition()<cr>\nnnoremap <tab> :call LanguageClient#textDocument_hover()<CR>\nnnoremap <F2> :call LanguageClient_textDocument_rename()<cr>\nnnoremap <bs> :call LanguageClient_textDocument_rename()<cr>\n\" markdown\nlet g:markdown_syntax_conceal = 0\n\n\n\n\" === DEOPLETE === \"\nlet g:deoplete#enable_at_startup = 1\nlet g:deoplete#enable_smart_case = 1\n\" let g:deoplete#sources._ = ['buffer', 'member', 'tag', 'file', 'omni', 'ultisnips']\ncall deoplete#custom#source('LanguageClient', 'min_pattern_length', 2)\ncall deoplete#custom#var('tabnine',{'line_limit': 500,'max_num_results': 5})\ncall deoplete#custom#option('auto_complete_delay', 200)\n\"autocomplete popup - nvigation keys and enter to select\ninoremap <expr> <Esc>      pumvisible() ? \"\\<C-e>\" : \"\\<Esc>\"\ninoremap <expr> <CR>       pumvisible() ? \"\\<C-y>\" : \"\\<CR>\"\ninoremap <expr> <Down>     pumvisible() ? \"\\<C-n>\" : \"\\<Down>\"\ninoremap <expr> <Up>       pumvisible() ? \"\\<C-p>\" : \"\\<Up>\"\n\"floating window\nlet g:float_preview#docked = 0\nlet g:float_preview#auto_close = 1\nfunction! DisableExtras()\n  call nvim_win_set_option(g:float_preview#win, 'number', v:false)\n  call nvim_win_set_option(g:float_preview#win, 'relativenumber', v:false)\n  call nvim_win_set_option(g:float_preview#win, 'cursorline', v:false)\nendfunction\nautocmd User FloatPreviewWinOpen call DisableExtras()\n\n\n\n\" === ULTISNIPS === \"\nlet g:UltiSnipsExpandTrigger = \"<tab>\"\nlet g:UltiSnipsJumpForwardTrigger = \"<tab>\"\nlet g:UltiSnipsJumpBackwardTrigger = \"<C-tab>\"\n\n\n\n\" === COMMENTER === \"\nlet g:NERDCompactSexyComs = 1\nlet g:NERDSpaceDelims = 1\nmap <silent> # <plug>NERDCommenterToggle\n\n\n\n\" === GIT GUTTER & FUGITIVE === \"\nhighlight GitGutterAdd    ctermfg=2 ctermbg=1\nhighlight GitGutterChange ctermfg=3 ctermbg=2\nhighlight GitGutterDelete ctermfg=1 ctermbg=3\n\n\n\" === VIMTEX === \"\nlet g:tex_flavor='latex'\nlet g:vimtex_view_method='zathura'\nlet g:vimtex_quickfix_mode=0\nset conceallevel=1\nlet g:tex_conceal='abdmg'\n\n\n\n\" === OTHER SHORTCUTS === \"\n\"undo and undotree\nnnoremap U :redo<CR>\nnnoremap <C-U> :UndotreeToggle<CR> :UndotreeFocus<CR>\n\"rainbow brackets\nlet g:rainbow_active = 1\n\"bookmarks\nlet g:bookmark_auto_save_file = $HOME .'/.config/nvim/bookmarks'\n\"semicolons\nautocmd FileType cpp nmap <silent> , <Plug>(cosco-commaOrSemiColon)\n\n\n\n\" === AUTOSAVE === \"\nautocmd FileType cpp let b:auto_save = 1\nautocmd FileType hpp let b:auto_save = 1\nautocmd FileType h let b:auto_save = 1\nautocmd FileType cmake let b:auto_save = 1\nlet g:auto_save_events = [\"InsertLeave\", \"TextChanged\", \"FocusLost\", \"FocusGained\"]\nlet g:auto_save_write_all_buffers = 1\n\" let g:auto_save_presave_hook = 'call AbortIfNotGitDirectory()'\n\" function! AbortIfNotGitDirectory()\n  \" if ...\n    \" let g:auto_save_abort = 0\n  \" else\n    \" let g:auto_save_abort = 1\n  \" endif\n\" endfunction\n\n\n\n\" === FOLDING === \"\nif has('folding')\n\tset foldenable\n\tset foldmethod=syntax\n\tset foldlevelstart=99\n\tset foldtext=FoldText()\nendif\nfunction! FoldText()\n\t\" Get first non-blank line\n\tlet fs = v:foldstart\n\twhile getline(fs) =~? '^\\s*$' | let fs = nextnonblank(fs + 1)\n\tendwhile\n\tif fs > v:foldend\n\t\tlet line = getline(v:foldstart)\n\telse\n\t\tlet line = substitute(getline(fs), '\\t', repeat(' ', &tabstop), 'g')\n\tendif\n\n\tlet w = winwidth(0) - &foldcolumn - (&number ? 8 : 0)\n\tlet foldSize = 1 + v:foldend - v:foldstart\n\tlet foldSizeStr = ' ' . foldSize . ' lines '\n\tlet foldLevelStr = repeat('+--', v:foldlevel)\n\tlet lineCount = line('$')\n\tlet foldPercentage = printf('[%.1f', (foldSize*1.0)/lineCount*100) . '%] '\n\tlet expansionString = repeat('.', w - strwidth(foldSizeStr.line.foldLevelStr.foldPercentage))\n\treturn line . expansionString . foldSizeStr . foldPercentage . foldLevelStr\nendfunction\n\n\n\n\" === HIGHLIGHTS === \"\nfunction! s:highlightuser()\n    \"background\n    highlight Normal ctermbg=0\n\t\"visual select\n    highlight Visual ctermbg=236 cterm=bold\n\t\"cursor\n    highlight Search ctermfg=231 ctermbg=9\n    highlight CursorLine ctermbg=16 cterm=bold\n    highlight CursorColumn ctermbg=16 cterm=bold\n    highlight Cursor ctermfg=7 ctermbg=7\n    \"similar words\n    highlight illuminatedWord ctermbg=16 cterm=bold,underline\n    \"squicky lines \"~\" hide\n    highlight EndOfBuffer ctermfg=0 ctermbg=0\n    \"splits and number backgrounds\n    highlight VertSplit ctermbg=black ctermfg=16    \"vertical split colorscheme\n    highlight foldcolumn ctermbg=0                 \" colum before numbers\n    highlight LineNr ctermbg=0 ctermfg=1\n    highlight CursorLineNR ctermbg=16 ctermfg=1 cterm=bold\n    \"special characters of endline\n    highlight NonText ctermfg=236\n    \"completion menu\n    highlight Pmenu ctermbg=16 ctermfg=231\n    highlight PmenuSel ctermbg=0 ctermfg=9 cterm=bold\n    highlight PmenuSbar ctermbg=0\n    highlight PmenuThumb ctermbg=0\n    \"other\n    highlight MatchParen ctermfg=231 ctermbg=1 cterm=bold\nendfunction\n\n\n\n\" === FOCUS === \"\n\"change color on focus lost\nfunction! s:beactive()\n    highlight CursorLine ctermbg=16\n    highlight CursorColumn ctermbg=16\n    highlight CursorLineNR ctermbg=16\n    \" set number\n    highlight LineNr ctermfg=1\n    highlight CursorLineNR ctermfg=1\n    highlight NonText ctermfg=236\n    \"syntax on\nendfunction\nfunction! s:bepassive()\n    highlight CursorLine ctermbg=NONE\n    highlight CursorColumn ctermbg=NONE\n    highlight CursorLineNR ctermbg=NONE\n    \" set nonumber\n    highlight LineNr ctermfg=0\n    highlight CursorLineNR ctermfg=0\n    highlight NonText ctermfg=0\n    \"syntax off\nendfunction\nau FocusLost * silent! call s:bepassive()\nau FocusGained * silent! call s:beactive()\n\n\n\n\" === AIRLINE THEME === \"\nlet g:airline_powerline_fonts=1\nlet g:airline_theme='deus'\nlet g:airline#extensions#tabline#enabled = 1 \" set tabs/buffers in the top\nlet g:airline_section_z=airline#section#create(['%{noscrollbar#statusline(15,\"─\",\"■\")} ']) \"Ø ×⊙\nlet g:airline_exclude_preview = 1\n\n\n\n\" === SYNTAX === \"\nfunction! s:syntaxuser()\n    highlight Normal ctermfg=231 ctermbg=16 cterm=NONE\n    highlight Boolean ctermfg=219 ctermbg=NONE cterm=NONE\n    highlight Character ctermfg=219 ctermbg=NONE cterm=NONE\n    highlight Comment ctermfg=103 ctermbg=NONE cterm=NONE\n    highlight Conditional ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight Constant ctermfg=NONE ctermbg=NONE cterm=NONE\n    highlight Define ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight DiffAdd ctermfg=231 ctermbg=64 cterm=bold\n    highlight DiffDelete ctermfg=88 ctermbg=NONE cterm=NONE\n    highlight DiffChange ctermfg=231 ctermbg=23 cterm=NONE\n    highlight DiffText ctermfg=231 ctermbg=24 cterm=bold\n    highlight ErrorMsg ctermfg=231 ctermbg=203 cterm=NONE\n    highlight WarningMsg ctermfg=231 ctermbg=203 cterm=NONE\n    highlight Float ctermfg=219 ctermbg=NONE cterm=NONE\n    highlight Function ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight Identifier ctermfg=51 ctermbg=NONE cterm=NONE\n    highlight Keyword ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight Label ctermfg=111 ctermbg=NONE cterm=NONE\n    highlight NonText ctermfg=60 ctermbg=17 cterm=NONE\n    highlight Number ctermfg=219 ctermbg=NONE cterm=NONE\n    highlight Operator ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight PreProc ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight Special ctermfg=231 ctermbg=NONE cterm=NONE\n    highlight SpecialKey ctermfg=60 ctermbg=23 cterm=NONE\n    highlight Statement ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight StorageClass ctermfg=51 ctermbg=NONE cterm=NONE\n    highlight String ctermfg=111 ctermbg=NONE cterm=NONE\n    highlight Tag ctermfg=203 ctermbg=NONE cterm=NONE\n    highlight Title ctermfg=231 ctermbg=NONE cterm=bold\n    highlight Todo ctermfg=103 ctermbg=NONE cterm=inverse,bold\n    highlight Type ctermfg=NONE ctermbg=NONE cterm=NONE\n    highlight Underlined ctermfg=NONE ctermbg=NONE cterm=underline\nendfunction\n\n\n\n\" === THEME === \"\ncolorscheme one\ncall s:highlightuser()\n\n\n\n\" === REMOVE HABITS === \"\nnnoremap d \"_d\nvnoremap d \"_d\nmap <S-Up> <Nop>\nmap <S-Down> <Nop>\n"
  },
  {
    "path": ".config/pet/config.toml",
    "content": "[General]\n  snippetfile = \"/home/bresilla/.config/pet/snippet.toml\"\n  editor = \"nvim\"\n  column = 40\n  selectcmd = \"fzf\"\n  backend = \"gist\"\n  sortby = \"\"\n\n[Gist]\n  file_name = \"pet-snippet.toml\"\n  access_token = \"\"\n  gist_id = \"\"\n  public = false\n  auto_sync = false\n\n[GitLab]\n  file_name = \"pet-snippet.toml\"\n  access_token = \"\"\n  url = \"\"\n  id = \"\"\n  visibility = \"private\"\n  auto_sync = false\n"
  },
  {
    "path": ".config/pet/snippet.toml",
    "content": "[[snippets]]\n  description = \"run personal container\"\n  command = \"con start --user=bresilla --volume=\\\"/home/bresilla:/home/bresilla\\\"\"\n  output = \"\"\n\n[[snippets]]\n  description = \"one drive sync locally\"\n  command = \"rclone --vfs-cache-mode writes mount one: ~/DATA/ONEDRIVE\"\n  output = \"\"\n\n[[snippets]]\n  description = \"git password cache\"\n  command = \"git config --global credential.helper 'cache --timeout=10000'\"\n  output = \"\"\n\n[[snippets]]\n  description = \"battery status\"\n  command = \"upower -i /org/freedesktop/UPower/devices/battery_BAT0\"\n  output = \"\"\n"
  },
  {
    "path": ".config/polybar/center",
    "content": "[colors]\n    accent = #EDD080\n    bckgrd = #121212\n    select = #161A1B\n\n    background =            #66000000\n    background-alt =        ${self.select}\n    foreground =            ${xrdb:color6:#A5ffffff}\n    foreground-alt =        ${xrdb:color7:#222}\n    primary =               ${xrdb:color1:self.accent}\n    secondary =             ${xrdb:color2:#222}\n    alert =                 ${xrdb:color3:#bd2c40}\n    light =                 ${xrdb:color15:#ffffff}\n    white =                 #FFFFFF\n    grey =                  #AAAAAA\n    transparent =           #00000000\n\n\n[global/wm]\n    margin-top = 0\n    margin-bottom = 0\n\n\n[settings]\n    throttle-output = 5\n    throttle-output-for = 10\n    throttle-input-for = 30\n    screenchange-reload = true\n    font = Iosevka Term SS01:size=12;4\n    bargapp= 10\n    radius = 14\n    barwidth = 100%\n    barheigh = 48\n\n\n[bar/main]\n    monitor = ${env:MONITOR}\n    monitor-strict = true\n    fixed-center = true\n    dpi = 96\n    bottom = false\n    width = ${settings.barwidth}\n    height = ${settings.barheigh}\n    offset-x = 0\n    offset-y = 0\n    background = ${colors.background}\n    foreground = ${colors.light}\n    overline-size = 0\n    overline-color = #f00\n    underline-size = 2\n    underline-color = #00f\n    border-top-size = ${settings.bargapp}\n    border-left-size = ${settings.bargapp}\n    border-right-size = ${settings.bargapp}\n    border-bottom-size = 0\n    border-color = ${colors.transparent}\n    radius-top = ${settings.radius}\n    radius-bottom = ${settings.radius}\n    spacing = 2\n    padding-left = 2\n    padding-right = 2\n    module-margin-left = 2\n    module-margin-right = 2\n    font-0 = ${settings.font}\n    font-1 = unifont:size=12;1\n    font-2 = FontAwesome:size=12;3\n    font-3 = NotoSans-Regular:size=12;-1\n    font-4 = MaterialIcons:size=16;5\n    tray-position = right\n    tray-padding = 4\n    modules-center = mpd\n\n\n[bar/workspaces]\n    monitor = ${env:MONITOR}\n    monitor-strict = true\n    dpi = 96\n    bottom = true\n    width = ${settings.barwidth}\n    height = 4\n    background = ${colors.transparent}\n    foreground = ${colors.foreground}\n    border-top-size = 0\n    border-bottom-size = 0\n    border-color = ${colors.transparent}\n    font-0 = Monoisome:size=10;4\n    font-1 = FontAwesome:pixelsize=10;3\n    font-5 = unifont:size=14;1\n    modules-center = BSP\n\n\n[module/BSP]\n    type = internal/bspwm\n    pin-workspaces = true\n    format = <label-state> <label-mode>\n    label-mode-background = ${colors.foreground}\n    label-focused = \"_\"\n    label-focused-background = ${colors.foreground}\n    label-focused-padding = 3\n    label-occupied = \"_\"\n    label-occupied-background = #808080\n    label-occupied-padding = 3\n    label-empty = \"_\"\n    label-empty-background = #404040\n    label-empty-padding = 3\n    label-separator = \"_\"\n    label-separator-background = ${colors.transparent}\n\n\n[module/mpd]\n    type = internal/mpd\n    host = 127.0.0.1\n    port = 6600\n    interval = 1\n    format-online = <icon-prev> <icon-stop> <toggle> <icon-next>  <icon-repeat> <icon-random>  <bar-progress> <label-time>  <label-song>\n    icon-play = \n    icon-pause = \n    icon-stop = \n    icon-prev = \n    icon-next = \n    icon-random = \n    icon-repeat = \n    toggle-on-foreground =\n    toggle-off-foreground = #55\n    bar-progress-width = 30\n    bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A}\n    bar-progress-indicator = |\n    bar-progress-indicator-foreground = #ff\n    bar-progress-indicator-font = 3\n    bar-progress-fill = —\n    bar-progress-fill-foreground = #bb\n    bar-progress-fill-font = 3\n    bar-progress-empty = —\n    bar-progress-empty-font = 3\n    bar-progress-empty-foreground = #44\n"
  },
  {
    "path": ".config/polybar/main",
    "content": "[colors]\n    accent = #EDD080\n    bckgrd = #121212\n    select = #161A1B\n\n    background =            ${self.bckgrd}\n    background-alt =        ${self.select}\n    foreground =            ${xrdb:color6:#A5ffffff}\n    foreground-alt =        ${xrdb:color7:#222}\n    primary =               ${xrdb:color1:self.accent}\n    secondary =             ${xrdb:color2:#222}\n    alert =                 ${xrdb:color3:#bd2c40}\n    light =                 ${xrdb:color15:#ffffff}\n    white =                 #FFFFFF\n    grey =                  #AAAAAA\n    transparent =           #00000000\n\n\n[global/wm]\n    margin-top = 0\n    margin-bottom = 0\n\n\n[settings]\n    throttle-output = 5\n    throttle-output-for = 10\n    throttle-input-for = 30\n    screenchange-reload = true\n    font = Iosevka Term SS01:size=12;4\n    bargapp= 10\n    radius = 14\n    barwidth = 100%\n    barheigh = 48\n\n\n[bar/main]\n    monitor = ${env:MONITOR}\n    monitor-strict = true\n    fixed-center = true\n    dpi = 96\n    bottom = false\n    width = ${settings.barwidth}\n    height = ${settings.barheigh}\n    offset-x = 0\n    offset-y = 0\n    background = ${colors.background}\n    foreground = ${colors.light}\n    overline-size = 0\n    overline-color = #f00\n    underline-size = 2\n    underline-color = #00f\n    border-top-size = ${settings.bargapp}\n    border-left-size = ${settings.bargapp}\n    border-right-size = ${settings.bargapp}\n    border-bottom-size = 0\n    border-color = ${colors.transparent}\n    radius-top = ${settings.radius}\n    radius-bottom = ${settings.radius}\n    spacing = 2\n    padding-left = 5\n    padding-right = 5\n    module-margin-left = 2\n    module-margin-right = 2\n    font-0 = ${settings.font}\n    font-1 = unifont:size=10;1\n    font-2 = FontAwesome:size=10;3\n    font-3 = FontAwesome Pro:size=10;3\n    font-4 = Iosevka Nerd Font:style=Medium:size=16;3\n    font-5 = MaterialIcons:size=16;5\n    tray-position = right\n    tray-padding = 4\n    modules-left = time date pomo wlan signal speed hotspot wireguard\n    modules-center = \n    modules-right = audit gpu cpu memory sda1 sda2 nvme light battery volume\n\n\n[bar/workspaces]\n    monitor = ${env:MONITOR}\n    monitor-strict = true\n    dpi = 96\n    bottom = true\n    width = ${settings.barwidth}\n    height = 4\n    background = ${colors.transparent}\n    foreground = ${colors.foreground}\n    border-top-size = 0\n    border-bottom-size = 0\n    border-color = ${colors.transparent}\n    font-0 = Monoisome:size=10;4\n    font-1 = FontAwesome:pixelsize=10;3\n    font-5 = unifont:size=14;1\n    modules-center = BSP\n\n\n[module/BSP]\n    type = internal/bspwm\n    pin-workspaces = true\n    format = <label-state> <label-mode>\n    label-mode-background = ${colors.foreground}\n    label-focused = \"_\"\n    label-focused-background = ${colors.foreground}\n    label-focused-padding = 3\n    label-occupied = \"_\"\n    label-occupied-background = #808080\n    label-occupied-padding = 3\n    label-empty = \"_\"\n    label-empty-background = #404040\n    label-empty-padding = 3\n    label-separator = \"_\"\n    label-separator-background = ${colors.transparent}\n\n\n[module/mpd]\n    type = internal/mpd\n    host = 127.0.0.1\n    port = 6600\n    interval = 1\n    format-online = <icon-prev> <icon-stop> <toggle> <icon-next>  <icon-repeat> <icon-random>  <bar-progress> <label-time>  <label-song>\n    icon-play = \n    icon-pause = \n    icon-stop = \n    icon-prev = \n    icon-next = \n    icon-random = \n    icon-repeat = \n    toggle-on-foreground =\n    toggle-off-foreground = #55\n    bar-progress-width = 30\n    bar-progress-format = %{A4:mpdseek+2: A5:mpdseek-2:}%fill%%indicator%%empty%%{A A}\n    bar-progress-indicator = |\n    bar-progress-indicator-foreground = #ff\n    bar-progress-indicator-font = 3\n    bar-progress-fill = —\n    bar-progress-fill-foreground = #bb\n    bar-progress-fill-font = 3\n    bar-progress-empty = —\n    bar-progress-empty-font = 3\n    bar-progress-empty-foreground = #44\n\n\n[module/title]\n    type = internal/xwindow\n    format = <label>\n    ;format-foreground = ${colors.foreground}\n\n\n[module/cpu]\n    format-label = internal/cpu\n    format = <label>\n    type = internal/cpu\n    interval = 2\n    label = \" %percentage%%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/memory]\n    type = internal/memory\n    interval = 2\n    label = \" %percentage_used%%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/temperature]\n    type = internal/temperature\n    warn-temperature = 65\n    format = <label>\n    format-warn = <label-warn>\n    label = %temperature%\n    label-warn = %temperature%!!!\n\n\n[module/bluetooth]\n    type = custom/script\n    exec = /home/bresilla/.config/polybar/scripts/bluetooth\n    tail = true\n    interval = 600\n    format-foreground = ${colors.foreground}\n    label = \" %output%\"\n\n[module/wireguard]\n    type = custom/script\n    exec = /home/bresilla/.config/polybar/scripts/wireguard\n    interval = 5\n    click-left = /home/bresilla/.config/polybar/scripts/wireguard --toggle &\n    format-foreground = ${colors.foreground}\n    label = \" %output%\"\n\n[module/wlan]\n    type = internal/network\n    interface = wlp2s0\n    interval = 5.0\n    label-connected =  %essid%\n    format-connected = <label-connected>\n    label-disconnected = \"%{A1:connman-gtk &:}%{A}\"\n    label-disconnected-foreground = #5b\n    ramp-signal-0 = \n    ramp-signal-1 = \n    ramp-signal-2 = \n    ramp-signal-3 = \n    ramp-signal-4 = \n    ramp-signal-foreground = ${colors.foreground}\n    format-connected-foreground = ${colors.foreground}\n\n[module/signal]\n    type = internal/network\n    interface = wlp2s0\n    interval = 5.0\n    label-connected =  %signal%\n    format-connected = <label-connected>\n    ramp-signal-foreground = ${colors.foreground}\n    format-connected-foreground = ${colors.foreground}\n\n\n[module/speed]\n    type = internal/network\n    interface = wlp2s0\n    interval = 5.0\n    format-connected = <label-connected>\n    label-connected = %upspeed%     %downspeed%\n    ramp-signal-foreground = ${colors.foreground}\n    format-connected-foreground = ${colors.foreground}\n\n\n[module/date]\n    type = internal/date\n    interval = 1.0\n    date = %d/%m/%Y\n    time = %H:%M\n    label = %date%\n    format = <label>\n    format-foreground = ${colors.foreground}\n\n[module/time]\n    type = internal/date\n    interval = 1.0\n    time = %H:%M\n    label = %time%\n    format = <label>\n    format-foreground = ${colors.foreground}\n\n\n[module/volume]\n    type = internal/alsa\n    format-volume =  <label-volume>\n    format-muted = <label-muted>\n    format-volume-foreground = ${colors.foreground}\n    label-volume = %percentage%\n    label-muted =   M\n    label-muted-foreground = #aaa\n\n\n[module/spotify]\n    type = custom/script\n    interval = 1\n    exec = /home/bresilla/.config/polybar/scripts/spotify\n    label = \"%output%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/hotspot]\n    type = custom/script\n    interval = 1\n    exec = /home/bresilla/.config/polybar/scripts/hotspot\n    label = \" %output%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/arandr]\n    type = custom/script\n    interval = 1\n    exec = var=$(cat /tmp/lighter) && echo $(echo \"$var * 100\"| bc) | awk -F'.' '{print $1}'\n    label = \" %output%\"\n    format-foreground = ${colors.foreground}\n\n[module/updates]\n    type = custom/script\n    exec = /home/bresilla/.config/polybar/scripts/update\n    interval = 600\n    format-foreground = ${colors.foreground}\n    label = \" %output%\"\n\n[module/kernel]\n    type = custom/script\n    interval = 3600\n    exec = dkms status | wc -l\n    label = \" %output%\"\n    format-foreground = ${colors.foreground}\n\n[module/audit]\n    type = custom/script\n    interval = 3600\n    exec = arch-audit | wc -l\n    label = \" %output%\"\n    format-foreground = ${colors.foreground}\n\n\n\n[module/pomo]\n    type = custom/script\n    interval = 1\n    exec = pomo status | awk '{print substr($3,1,6)}' | grep -o '[0-9]\\+' | sed 'N;s/\\n/:/'\n    label = \" %output%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/gpu]\n    type = custom/script\n    interval = 1\n    exec = if [[ $(cat /proc/acpi/bbswitch | awk 'NF>1{print $NF}') == ON ]]; then optirun nvidia-smi | sed -n '9p' | awk '{print $13}'; else echo NO; fi;\n    label = \" %output%\"\n    format-foreground = ${colors.foreground}\n\n\n\n[module/light]\n    type = internal/backlight\n    card = intel_backlight\n    enable-scroll = true\n    format = <label>\n    label =  %percentage%%\n    label-foreground = ${colors.foreground}\n\n\n[module/battery]\n    type = internal/battery\n    battery = BAT0\n    adapter = AC\n    full-at = 98\n    label-charging = %percentage%%\n    label-discharging = %percentage%%\n    format-charging =  <label-charging>\n    format-discharging =  <label-discharging>\n    format-charging-foreground = ${colors.foreground}\n    label-charging-foreground = ${colors.foreground}\n    format-discharging-foreground = ${colors.foreground}\n    label-discharging-foreground = ${colors.foreground}\n    format-full-prefix = \" \"\n    label-full-foreground = ${colors.foreground}\n    format-full-prefix-foreground = ${colors.foreground}\n\n\n[module/sda1]\n    type = internal/fs\n    mount-0 = /\n    interval = 10\n    fixed-values = true\n    spacing = 4\n    format-mounted = <label-mounted>\n    format-unmounted = <label-unmounted>\n    label-mounted =  %percentage_used%%\n    label-mounted-foreground = ${colors.foreground}\n    label-unmounted = %mountpoint%: not mounted\n    label-unmounted-foreground = ${colors.foreground}\n\n[module/sda2]\n    type = internal/fs\n    mount-0 = /nix\n    interval = 10\n    fixed-values = true\n    spacing = 4\n    format-mounted = <label-mounted>\n    format-unmounted = <label-unmounted>\n    label-mounted =  %percentage_used%%\n    label-mounted-foreground = ${colors.foreground}\n    label-unmounted = %mountpoint%: not mounted\n    label-unmounted-foreground = ${colors.foreground}\n\n\n\n[module/nvme]\n    type = internal/fs\n    mount-0 = /home\n    interval = 10\n    fixed-values = true\n    spacing = 4\n    format-mounted = <label-mounted>\n    format-unmounted = <label-unmounted>\n    label-mounted =  %percentage_used%%\n    label-mounted-foreground = ${colors.foreground}\n    label-unmounted = %mountpoint%: not mounted\n    label-unmounted-foreground = ${colors.foreground}\n"
  },
  {
    "path": ".config/polybar/scripts/hotspot",
    "content": "if [ -e /tmp/hotspot.all.lock ]; then\n    [[ -z $(wispot list) ]] && exit 1 || wispot list | tail -n+2 | wc -l;\nfi\n"
  },
  {
    "path": ".config/polybar/scripts/netwidth",
    "content": "#!/bin/bash\n# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>\n# Copyright (C) 2014 kaueraal\n# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>\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 3 of the License, or\n# (at your option) 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, see <http://www.gnu.org/licenses/>.\n\n# Get custom IN and OUT labels if provided by command line arguments\nwhile [[ $# -gt 1 ]]; do\n    key=\"$1\"\n    case \"$key\" in \n        -i|--inlabel)\n            INLABEL=\"$2\"\n            shift;;\n        -o|--outlabel)\n            OUTLABEL=\"$2\"\n            shift;;\n    esac\n    shift\ndone\n\n[[ -z $INLABEL ]] && INLABEL=\"IN \"\n[[ -z $OUTLABEL ]] && OUTLABEL=\"OUT \"\n\n# Use the provided interface, otherwise the device used for the default route.\nif [[ -n $BLOCK_INSTANCE ]]; then\n  INTERFACE=$BLOCK_INSTANCE\nelse\n  INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')\nfi\n\n# Issue #36 compliant.\nif ! [ -e \"/sys/class/net/${INTERFACE}/operstate\" ] || ! [ \"`cat /sys/class/net/${INTERFACE}/operstate`\" = \"up\" ]\nthen\n    echo \"$INTERFACE down\"\n    echo \"$INTERFACE down\"\n    echo \"#FF0000\"\n    exit 0\nfi\n\n# path to store the old results in\npath=\"/dev/shm/$(basename $0)-${INTERFACE}\"\n\n# grabbing data for each adapter.\nread rx < \"/sys/class/net/${INTERFACE}/statistics/rx_bytes\"\nread tx < \"/sys/class/net/${INTERFACE}/statistics/tx_bytes\"\n\n# get time\ntime=$(date +%s)\n\n# write current data if file does not exist. Do not exit, this will cause\n# problems if this file is sourced instead of executed as another process.\nif ! [[ -f \"${path}\" ]]; then\n  echo \"${time} ${rx} ${tx}\" > \"${path}\"\n  chmod 0666 \"${path}\"\nfi\n\n# read previous state and update data storage\nread old < \"${path}\"\necho \"${time} ${rx} ${tx}\" > \"${path}\"\n\n# parse old data and calc time passed\nold=(${old//;/ })\ntime_diff=$(( $time - ${old[0]} ))\n\n# sanity check: has a positive amount of time passed\n[[ \"${time_diff}\" -gt 0 ]] || exit\n\n# calc bytes transferred, and their rate in byte/s\nrx_diff=$(( $rx - ${old[1]} ))\ntx_diff=$(( $tx - ${old[2]} ))\nrx_rate=$(( $rx_diff / $time_diff ))\ntx_rate=$(( $tx_diff / $time_diff ))\n\n# shift by 10 bytes to get KiB/s. If the value is larger than\n# 1024^2 = 1048576, then display MiB/s instead\n\n# incoming\necho -n \"$INLABEL\"\nrx_kib=$(( $rx_rate >> 10 ))\nif [[ \"$rx_rate\" -gt 1048576 ]]; then\n  printf '%sM' \"`echo \"scale=1; $rx_kib / 1024\" | bc`\"\nelse\n  echo -n \"${rx_kib}K\"\nfi\n\necho -n \" \"\n\n# outgoing\necho -n \"$OUTLABEL\"\ntx_kib=$(( $tx_rate >> 10 ))\nif [[ \"$tx_rate\" -gt 1048576 ]]; then\n  printf '%sM' \"`echo \"scale=1; $tx_kib / 1024\" | bc`\"\nelse\n  echo -n \"${tx_kib}K\"\nfi\n\n"
  },
  {
    "path": ".config/polybar/scripts/spotify",
    "content": "#!/usr/bin/env sh\n#Spotify\nspotify_status(){\n\tcurrent_track=$(playerctl -p spotifyd metadata xesam:title)\n\talbum=$(playerctl -p spotifyd metadata xesam:artist)\n\techo \" \" $album\" - \" $current_track \" \"\n}\n\nspotify_control(){\n\tcurrent_status=$(playerctl -p spotifyd status)\n    echo \"%{A:playerctl -p spotifyd previous:}  %{A}%{A:playerctl -p spotifyd play-pause:} $(spotify_status) %{A}%{A:playerctl -p spotifyd next:}  %{A}\"\n}\n\nspotify_control\n"
  },
  {
    "path": ".config/polybar/side",
    "content": "[colors]\n    accent = #EDD080\n    bckgrd = #121212\n    select = #161A1B\n\n    background =            ${xrdb:color0:self.bckgrd}\n    background-alt =        ${self.select}\n    foreground =            ${xrdb:color6:#A5ffffff}\n    foreground-alt =        ${xrdb:color7:#222}\n    primary =               ${xrdb:color1:self.accent}\n    secondary =             ${xrdb:color2:#222}\n    alert =                 ${xrdb:color3:#bd2c40}\n    white =                 #FFFFFF\n    grey =                  #AAAAAA\n    transparent =           #00000000\n\n\n[global/wm]\n    margin-top = 0\n    margin-bottom = 0\n\n\n[settings]\n    throttle-output = 5\n    throttle-output-for = 10\n    throttle-input-for = 30\n    screenchange-reload = true\n    radius = 10\n    font = Iosevka Term SS01:size=12;4\n    bargapp= 10\n    barwidth = 100%\n    barheigh = 40\n\n\n[bar/left]\n    monitor = ${env:MONITOR}\n    monitor-strict = true\n    fixed-center = true\n    dpi = 96\n    bottom = false\n    width = 800\n    height = ${settings.barheigh}\n    offset-x = 4\n    offset-y = 4\n    background = ${colors.background}\n    foreground = ${colors.foreground}\n    overline-size = 0\n    overline-color = #f00\n    underline-size = 2\n    underline-color = #00f\n    border-top-size = ${settings.bargapp}\n    border-left-size = ${settings.bargapp}\n    border-right-size = ${settings.bargapp}\n    border-bottom-size = 0\n    border-color = ${colors.transparent}\n    radius-top = ${settings.radius}\n    radius-bottom = ${settings.radius}\n    spacing = 2\n    padding-left = 2\n    padding-right = 2\n    module-margin-left = 2\n    module-margin-right = 2\n    font-0 = ${settings.font}\n    font-1 = unifont:size=12;1\n    font-2 = FontAwesome:size=12;3\n    font-3 = NotoSans-Regular:size=12;-1\n    font-4 = MaterialIcons:size=16;5\n    tray-position = left\n    tray-padding = 4\n    modules-center = time volume wlan signal speed\n\n\n[bar/right]\n    monitor = ${env:MONITOR}\n    monitor-strict = true\n    fixed-center = true\n    dpi = 96\n    bottom = false\n    width = 800\n    height = ${settings.barheigh}\n    offset-x = 3036\n    offset-y = 4\n    background = ${colors.background}\n    foreground = ${colors.foreground}\n    overline-size = 0\n    overline-color = #f00\n    underline-size = 2\n    underline-color = #00f\n    border-top-size = ${settings.bargapp}\n    border-left-size = ${settings.bargapp}\n    border-right-size = ${settings.bargapp}\n    border-bottom-size = 0\n    border-color = ${colors.transparent}\n    radius-top = ${settings.radius}\n    radius-bottom = ${settings.radius}\n    spacing = 2\n    padding-left = 2\n    padding-right = 2\n    module-margin-left = 2\n    module-margin-right = 2\n    font-0 = ${settings.font}\n    font-1 = unifont:size=12;1\n    font-2 = FontAwesome:size=12;3\n    font-3 = NotoSans-Regular:size=12;-1\n    font-4 = MaterialIcons:size=16;5\n    tray-position = right\n    tray-padding = 4\n    modules-center = cpu memory filesystem docdisk light battery date\n\n\n[module/title]\n    type = internal/xwindow\n    format = <label>\n    ;format-foreground = ${colors.foreground}\n\n\n[module/cpu]\n    format-label = internal/cpu\n    format = <label>\n    type = internal/cpu\n    interval = 2\n    label = \" %percentage%%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/memory]\n    type = internal/memory\n    interval = 2\n    label = \" %percentage_used%%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/temperature]\n    type = internal/temperature\n    warn-temperature = 65\n    format = <label>\n    format-warn = <label-warn>\n    label = %temperature%\n    label-warn = %temperature%!!!\n\n\n[module/wlan]\n    type = internal/network\n    interface = wlp2s0\n    interval = 5.0\n    label-connected =  %essid%\n    format-connected = <label-connected>\n    label-disconnected = \"%{A1:connman-gtk &:}%{A}\"\n    label-disconnected-foreground = #5b\n    ramp-signal-0 = \n    ramp-signal-1 = \n    ramp-signal-2 = \n    ramp-signal-3 = \n    ramp-signal-4 = \n    ramp-signal-foreground = ${colors.foreground}\n    format-connected-foreground = ${colors.foreground}\n\n[module/signal]\n    type = internal/network\n    interface = wlp2s0\n    interval = 5.0\n    label-connected =  %signal%\n    format-connected = <label-connected>\n    ramp-signal-foreground = ${colors.foreground}\n    format-connected-foreground = ${colors.foreground}\n\n\n[module/speed]\n    type = internal/network\n    interface = wlp2s0\n    interval = 5.0\n    format-connected = <label-connected>\n    label-connected = %upspeed%     %downspeed%\n    ramp-signal-foreground = ${colors.foreground}\n    format-connected-foreground = ${colors.foreground}\n\n\n[module/date]\n    type = internal/date\n    interval = 1.0\n    date = %d/%m/%Y\n    time = %H:%M\n    label = %date%\n    format = <label>\n    format-foreground = ${colors.foreground}\n\n[module/time]\n    type = internal/date\n    interval = 1.0\n    time = %H:%M\n    label = %time%\n    format = <label>\n    format-foreground = ${colors.foreground}\n\n\n[module/volume]\n    type = internal/alsa\n    format-volume = <ramp-volume><label-volume>\n    format-muted = <label-muted>\n    format-volume-foreground = ${colors.foreground}\n    label-volume = %percentage%\n    label-muted =   M\n    label-muted-foreground = #aaa\n    ramp-volume-0 = \n    ramp-volume-1 = \n    ramp-volume-2 = \n    ramp-headphones-0 = \n\n\n[module/pomo]\n    type = custom/script\n    interval = 1\n    exec = pomo status | awk '{print substr($3,1,6)}' | grep -o '[0-9]\\+' | sed 'N;s/\\n/ : /'\n    label = \"  %output%\"\n    format-foreground = ${colors.foreground}\n\n\n[module/light]\n    type = internal/backlight\n    card = intel_backlight\n    enable-scroll = true\n    format = <label>\n    label =  %percentage%%\n    label-foreground = ${colors.foreground}\n\n\n[module/battery]\n    type = internal/battery\n    battery = BAT0\n    adapter = AC\n    full-at = 98\n    time-format = %H:%M\n    label-charging = %percentage%%\n    label-discharging = %percentage%%\n    format-charging = <animation-charging><label-charging>\n    format-discharging = <animation-discharging><label-discharging>\n    format-charging-foreground = ${colors.foreground}\n    label-charging-foreground = ${colors.foreground}\n    format-discharging-foreground = ${colors.foreground}\n    label-discharging-foreground = ${colors.foreground}\n    format-full-prefix = \" \"\n    format-full-prefix-foreground = ${colors.foreground}\n    label-full-foreground = ${colors.foreground}\n    animation-charging-0 = \n    animation-charging-1 = \n    animation-charging-2 = \n    animation-charging-3 = \n    animation-charging-4 = \n    animation-charging-foreground = ${colors.foreground}\n    animation-charging-framerate = 500\n    animation-discharging-0 = \n    animation-discharging-1 = \n    animation-discharging-2 = \n    animation-discharging-3 = \n    animation-discharging-4 = \n    animation-discharging-framerate = 1000\n    animation-discharging-foreground = ${colors.foreground}\n    click-left = bash ~/.startup -r\n\n\n[module/jgmenu]\n    type = custom/text\n    content-padding = 2\n    content = menu\n    click-left = \"jgmenu_run >/dev/null 2>&1 &\"\n\n[module/filesystem]\n    type = internal/fs\n    mount-0 = /\n    interval = 10\n    fixed-values = true\n    spacing = 4\n    format-mounted = <label-mounted>\n    format-unmounted = <label-unmounted>\n    label-mounted =  %percentage_used%%\n    label-mounted-foreground = ${colors.foreground}\n    label-unmounted = %mountpoint%: not mounted\n    label-unmounted-foreground = ${colors.foreground}\n\n\n[module/docdisk]\n    type = internal/fs\n    mount-0 = /home/bresilla/DATA\n    interval = 10\n    fixed-values = true\n    spacing = 4\n    format-mounted = <label-mounted>\n    format-unmounted = <label-unmounted>\n    label-mounted =  %percentage_used%%\n    label-mounted-foreground = ${colors.foreground}\n    label-unmounted = %mountpoint%: not mounted\n    label-unmounted-foreground = ${colors.foreground}\n"
  },
  {
    "path": ".config/proji/config.toml",
    "content": "title = \"proji main config\"\n\n[examples]\npath = \"examples/proji-class.toml\"\n\n[sqlite3]\npath = \"db/proji.sqlite3\"\n"
  },
  {
    "path": ".config/proji/examples/default.toml",
    "content": "name = \"default\"\nlabel = \"dev\"\n\n[[folder]]\n  destination = \"src/\"\n  template = \"\"\n\n[[file]]\n    destination = \"shell.nix\"\n    template = \"dev/nixshell\"\n\n[[file]]\n    destination = \".envrc\"\n    template = \"dev/envrc\"\n\n[[file]]\n    destination = \"README.md\"\n    template = \"\"\n\n[[script]]\n  name = \"init_git.sh\"\n  type = \"post\"\n  execNumber = 2\n  runAsSudo = false\n  args = []\n"
  },
  {
    "path": ".config/proji/examples/proji-class.toml",
    "content": "# Proji class template file.\n#\n# Import config files like this to proji with 'proji class import <file>'.\n# Proji will create a class based on this config file. The class can then be used over\n# and over again to create your new projects.\n# Export an existing class with 'proji class export <class-label>'. Proji will create\n# a config file of your class.\n#\n# Classes are like blueprints for the structure and behavior of projects. A class is created\n# once and can be used at any time to easily create new projects. This is what will save you\n# a lot of time in the future and make your projects evenly structured.\n#\n# NAME\n# The name is a long string describing the class' purpose. Not a text but a descriptive string.\n# name = \"myTestClass\" <- Good\n# name = \"t1\"          <- Bad, too short and not expressive\nname = \"my-example\"\n\n# LABEL\n# The label is a very short string which is used to quickly and eaily use your class. It would\n# be annoying to always type the whole name when you want to use your class. Typically labels\n# are an abbreviation of the name or somthing in general that lets you quickly identifies your class.\n# A label has to be unique in proji. You can't have two identical labels.\n# e.g.: proji create YOUR-LABEL your-new-project1 your-new-project2\n# label = \"mtc\"                <- Good\n# label = \"myTestClassLabel\"   <- Bad - too long\n# label = \"ilt\"                <- Bad - unrelated to class name\nlabel = \"mex\"\n\n# FOLDERS\n# Folders to create in or copy to your projects base folder.\n# 'destination' is a relative path inside the project folder.\n# 'template' is a relative path to a folder in the templates folder (~/.config/proji/templates/).\n# If you don't want to create a folder by copying a template, just leave\n# out the template field and only specify the Destination. This will create an empty folder.\n\n# No template, just create an empty folder.\n[[folder]]\n  destination = \"src/\"\n  template = \"\"\n\n[[folder]]\n  destination = \"docs/\"\n  template = \"\"\n\n[[folder]]\n  destination = \"tests/\"\n  template = \"\"\n\n# This is what a folder with a template would look like.\n# Proji would copy the template folder which must be located at ~/.config/proji/templates/\n# to the destination.\n# Copy template folder to destination and rename it.\n# [[folder]]\n#   destination = \".vscode\"\n#   template = \"vscode-py\"\n\n# FILES\n# Files to create in or copy to your projects base folder.\n# See folders section above for more informations.\n\n# Create an empty file called README.md.\n[[file]]\n  destination = \"src/main.py\"\n  template = \"\"\n\n[[file]]\n  destination = \"README.md\"\n  template = \"\"\n\n# Copy the template main.py to src/main.py inside the new project folder.\n# [[file]]\n#   destination = \"src/main.py\"\n#   template = \"main.py\"\n\n# SCRIPTS\n# Scripts you want to be executed after the project folders and files were created.\n# 'name' should be a script that lies inside the scripts folder (~/.config/proji/scripts/).\n# 'type' determines if the script will be executed before or after the creation of subfolders and files.\n#  Possible values: pre, post\n# 'execNumber' is an integer and determines the position of the script in the execution list.\n#  The script with the smallest exec number will be executed first and the script with the largest number will be executed last.\n# 'runAsSudo' is of type boolean and determines if you want the script to be executed with sudo or not.\n# 'args' is a string array which can hold arguments that you want to pass to your script. You can use the keyword __PROJECT_NAME__\n#  in order to pass the name of the current project to the script.\n\n[[script]]\n  name = \"init_virtualenv.sh\"\n  type = \"post\"\n  execNumber = 1\n  runAsSudo = false\n  args = []\n\n[[script]]\n  name = \"init_git.sh\"\n  type = \"post\"\n  execNumber = 2\n  runAsSudo = false\n  args = []"
  },
  {
    "path": ".config/proji/scripts/anaconda.sh",
    "content": "#!/bin/sh\n[[ ! -d \"/opt/conda/bin\" ]] && exit\nPATH=\"/opt/conda/bin:$PATH\"\nconda create -n \"$(basename $PWD)\" python=3.7\n"
  },
  {
    "path": ".config/proji/scripts/direnv.sh",
    "content": "#!/usr/bin/env sh\ndirenv allow\n"
  },
  {
    "path": ".config/proji/scripts/init_git.sh",
    "content": "#!/bin/sh\n\n# Git init, add and commit project\necho \"> Initializing git-repo\"\n\nif [ -d \".git\" ]; then\n    echo \"> Warning: Existing git repo was found.\"\n    exit\nfi\n\ngit init . >/dev/null\nadded_remote=0\nremote_name=\"\"\n\n# Ask if user wants to add a git-remote\nwhile true; do\n    echo -n \"> Add git-remote? [y/N] \"\n    read yn\n\n    # Evaluate input\n    if [ ! -n \"$yn\" ] || [ \"$yn\" = \"N\" ] || [ \"$yn\" = \"n\" ]; then\n        break\n    elif [ \"$yn\" = \"Y\" ] || [ \"$yn\" = \"y\" ]; then\n        # Read and validate remote-name\n        echo -n \"> Remote-name: \"\n        read remote_name\n\n        if [ -z \"$remote_name\" -o \"$remote_name\" = \" \" ]; then\n            echo \"> Remote-name can't be empty\"\n            return 4\n        fi\n\n        # Read and validate remote-url\n        echo -n \"> Remote-URL: \"\n        read remote_url\n\n        if [ -z \"$remote_url\" -o \"$remote_url\" = \" \" ]; then\n            echo \"> Remote-URL can't be empty\"\n            return 5\n        fi\n\n        # Append .git if missing\n        if [[ ! $remote_url =~ ^.*\\.git$ ]]; then\n            remote_url=\"${remote_url}.git\"\n        fi\n\n        # Add remote\n        git remote add \"$remote_name\" \"$remote_url\" >/dev/null\n        added_remote=1\n        break\n    else\n        echo \"> Invalid input\"\n        continue\n    fi\ndone\n\n# Git add and commit\ngit add . >/dev/null\ngit commit -m \"Create project\" >/dev/null\ngit tag -a v0.1.0 -m \"Version 0.1.0\" >/dev/null\n# git checkout --quiet -b develop >/dev/null\n\n# Push if remote was added\nif [ $added_remote -eq 1 ]; then\n    git push --quiet \"$remote_name\" master >/dev/null\n    # git push --quiet -u \"$remote_name\" develop >/dev/null\nfi\n\nwhile true; do\n    echo -n \"> Initialize git flow? [Y/n] \"\n    read yn\n\n    # Evaluate input\n    if [ ! -n \"$yn\" ] || [ \"$yn\" = \"Y\" ] || [ \"$yn\" = \"y\" ]; then\n        git flow init\n        break\n    elif [ \"$yn\" = \"N\" ] || [ \"$yn\" = \"n\" ]; then\n        break\n    else\n        echo \"> Invalid input\"\n        continue\n    fi\ndone\n"
  },
  {
    "path": ".config/proji/templates/AUTHORS.md",
    "content": "Trim Bresilla <trim.bresilla@gmail.com>\n"
  },
  {
    "path": ".config/proji/templates/LICENSE.md",
    "content": "Copyright (c) 2013 Kushtrim Bresilla\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": ".config/proji/templates/README.md",
    "content": "# A simple CMAKE template\n"
  },
  {
    "path": ".config/proji/templates/cmake/.clang-format",
    "content": "﻿---\nBasedOnStyle: WebKit\nAlignAfterOpenBracket: Align\nAlignConsecutiveAssignments: 'false'\nAlignConsecutiveDeclarations: 'false'\nAlignEscapedNewlines: Left\nAlignOperands: 'true'\nAlignTrailingComments: 'true'\nAllowShortBlocksOnASingleLine: 'true'\nAllowShortCaseLabelsOnASingleLine: 'true'\nAllowShortFunctionsOnASingleLine: All\nAllowShortIfStatementsOnASingleLine: 'true'\nAllowShortLoopsOnASingleLine: 'true'\nBreakBeforeBraces: Attach\nIndentCaseLabels: 'true'\nKeepEmptyLinesAtTheStartOfBlocks: 'true'\nLanguage: Cpp\nNamespaceIndentation: All\nPointerAlignment: Left\nSpaceBeforeAssignmentOperators: 'true'\nSpaceBeforeParens: Never\nSpaceInEmptyParentheses: 'false'\nSpacesBeforeTrailingComments: '4'\nSpacesInAngles: 'true'\nSpacesInCStyleCastParentheses: 'true'\nSpacesInContainerLiterals: 'true'\nSpacesInParentheses: 'true'\nSpacesInSquareBrackets: 'false'\nStandard: Cpp11\nTabWidth: '4'\nUseTab: Never\n\n...\n"
  },
  {
    "path": ".config/proji/templates/cmake/.clang-tidy",
    "content": "---\nChecks:          '*,-clang-analyzer-alpha.*,-llvm-include-order,*,-clang-analyzer-alpha.*,-llvm-include-order'\nHeaderFilterRegex: ''\nAnalyzeTemporaryDtors: true\nUser:            perror\nCheckOptions:\n  - key:             google-readability-braces-around-statements.ShortStatementLines\n    value:           '1'\n  - key:             google-readability-function-size.BranchThreshold\n    value:           '4294967295'\n  - key:             google-readability-function-size.LineThreshold\n    value:           '4294967295'\n  - key:             google-readability-function-size.StatementThreshold\n    value:           '800'\n  - key:             google-readability-namespace-comments.ShortNamespaceLines\n    value:           '10'\n  - key:             google-readability-namespace-comments.SpacesBeforeComments\n    value:           '2'\n  - key:             llvm-namespace-comment.ShortNamespaceLines\n    value:           '1'\n  - key:             llvm-namespace-comment.SpacesBeforeComments\n    value:           '1'\n  - key:             readability-braces-around-statements.ShortStatementLines\n    value:           '0'\n  - key:             readability-function-size.BranchThreshold\n    value:           '4294967295'\n  - key:             readability-function-size.LineThreshold\n    value:           '4294967295'\n  - key:             readability-function-size.StatementThreshold\n    value:           '800'\n...\n"
  },
  {
    "path": ".config/proji/templates/cmake/.editorconfig",
    "content": "# top-most EditorConfig file\nroot = true\n\n# Unix-style newlines with a newline ending every file\n[*]\ncharset = utf-8\ntrim_trailing_whitespace = true\nend_of_line = lf\ninsert_final_newline = true\n\n# Tab indentation (no size specified)\n[Makefile]\nindent_style = tab\n\n[*.{c,h,cpp,hpp}]\nindent_size = 4\n"
  },
  {
    "path": ".config/proji/templates/cmake/.envrc",
    "content": "tidyup\nuse nix\n\nexport ENVNAME=cmake\n"
  },
  {
    "path": ".config/proji/templates/cmake/.github/workflows/main.yml",
    "content": "name: C/C++ CI\n\non:\n  push:\n    branches:\n    - master\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v1\n    - name: packges\n      run: sudo apt install -y libcurl3 g++7 cppcheck iwyu valgrind clang-tidy-6.0 libclang-6.0-dev libboost-all-dev\n    - name: kcov\n      run: wget https://github.com/SimonKagstrom/kcov/archive/v36.tar.gz && tar xzf v36.tar.gz && cd kcov-36 && mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.kcov -DCMAKE_BUILD_TYPE=Release && make -j2 &&  make install\n    - name: cmake\n      run: cmake -H. -Bbuild -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=FastDebug\n    - name: make\n      run: cmake --build build/ --target\n    - name: test\n      run: cd build && ctest\n"
  },
  {
    "path": ".config/proji/templates/cmake/.gitignore",
    "content": "/build/\n/bin/\n/lib/\n\n.cs_files\n.notifier\n/.undodir/\n/.direnv/\n/.clangd/\n.gdb_history\n"
  },
  {
    "path": ".config/proji/templates/cmake/.gitmodules",
    "content": "[submodule \"external/fmt\"]\n\tpath = external/fmt\n\turl = https://github.com/fmtlib/fmt\n"
  },
  {
    "path": ".config/proji/templates/cmake/.travis.yml",
    "content": "language: cpp\ndist: xenial\nnotifications:\n  email: false\n\n# Define builds on mulitple OS/compiler combinations.\n# Feel free to add/remove entries from this list.\nmatrix:\n  include:\n    - os: linux\n      addons:\n        apt:\n          sources:\n            - ubuntu-toolchain-r-test\n          packages:\n            - g++-7\n            - kcov\n            - cppcheck\n            - iwyu\n            - valgrind\n            - clang-tidy\n            - libclang-dev\n            - libboost-all-dev\n            - doxygen\n      # env:\n        # - MATRIX_EVAL=\"CXX_COMPILER=g++-7; sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-7 90\"\nbefore_install:\n  - PARENTDIR=$(pwd)\n  - cd /tmp && git clone --recursive https://github.com/foonathan/standardese && cd standardese && mkdir build && cd build && cmake .. && make && sudo cp tool/standardese /usr/local/bin\n  - cd $PARENTDIR && mkdir $PARENTDIR/build\n\n# before_script:\n  # - etc/./standardese\n\ninstall:\n  - cd $PARENTDIR/build\n  - cmake $PARENTDIR -DCMAKE_BUILD_TYPE=Debug\n  - make\n\nscript:\n  - make\n  # - make test\n\nafter_success:\n  - cd $PARENTDIR/build\n  - ctest\n  - bash <(curl -s https://codecov.io/bash) -s cover/\n"
  },
  {
    "path": ".config/proji/templates/cmake/.vscode/c_cpp_properties.json",
    "content": "{\n    \"configurations\": [\n        {\n            \"name\": \"Linux\",\n            \"includePath\": [\n                \"${workspaceFolder}/**\"\n            ],\n            \"defines\": [],\n            \"compilerPath\": \"/nix/store/qy6rb8p4fg1p3xfw0g6wz6iirxbdxizp-gcc-wrapper-8.3.0/bin/gcc\",\n            \"cStandard\": \"c11\",\n            \"cppStandard\": \"c++17\",\n            \"intelliSenseMode\": \"clang-x64\",\n            \"compileCommands\": \"${workspaceFolder}/build/compile_commands.json\",\n            \"configurationProvider\": \"vector-of-bool.cmake-tools\"\n        }\n    ],\n    \"version\": 4\n}"
  },
  {
    "path": ".config/proji/templates/cmake/CMakeLists.txt",
    "content": "# -------------------------------------------------------------------------------------------------------------------------------------------\n#                 GLOBAL\n# -------------------------------------------------------------------------------------------------------------------------------------------\n# HUNTER PACKAGE MANAGER\ninclude(\"cmake/HunterGate.cmake\")\nHunterGate(\n    URL \"https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz\"\n    SHA1 \"e14bc153a7f16d6a5eeec845fb0283c8fad8c358\" )\n\n# VERSION AND NAME\ncmake_minimum_required(VERSION 3.10)\nset(CMAKE_EXPORT_COMPILE_COMMANDS 1)\nget_filename_component(NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME_WE)\nset(PROJECT_NAME ${NAME})\nproject(${PROJECT_NAME})\nif((NOT PROJECT_NAME))\n    message(FATAL_ERROR \"Project name must be specified!\")\nendif ((NOT PROJECT_NAME))\nmessage (\"\\nPROJECT: ${CMAKE_PROJECT_NAME}\")\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#               VARIABLES\n# -------------------------------------------------------------------------------------------------------------------------------------------\nset(${CMAKE_PROJECT_NAME}_SUMMARY               \"The ${PROJECT_NAME} project\")\nset(${CMAKE_PROJECT_NAME}_VENDOR_NAME           \"bresilla\")\nset(${CMAKE_PROJECT_NAME}_VENDOR_CONTACT        \"trim.bresilla@gmail.com\")\nset(${CMAKE_PROJECT_NAME}_VERSION_MAJOR         0)\nset(${CMAKE_PROJECT_NAME}_VERSION_MINOR         1)\nset(${CMAKE_PROJECT_NAME}_VERSION_PATCH         0)\nset(BUILD_EXECUTABLE                           \"ON\")\noption(BUILD_MAIN      \"Build main function\"    ON)\nset(PROJECT_VERSION                             \"${${CMAKE_PROJECT_NAME}_VERSION_MAJOR}.${${CMAKE_PROJECT_NAME}_VERSION_MINOR}.${${CMAKE_PROJECT_NAME}_VERSION_PATCH}\")\nset(CMAKE_MODULE_PATH                          \"${CMAKE_CURRENT_SOURCE_DIR}/cmake\")\nset(PROJECT_PATH                               \"${CMAKE_CURRENT_SOURCE_DIR}\")\nset(PROJECT_BUILD                              \"${PROJECT_PATH}/build\")\n\nset(SRC_SRC                                    \"${PROJECT_PATH}/source\")\nset(INC_SRC                                    \"${PROJECT_PATH}/include\")\nset(EXT_SRC                                    \"${PROJECT_PATH}/external\")\nset(UTL_SRC                                    \"${EXT_SRC}/headers\")\nset(TEST_SRC                                   \"${PROJECT_PATH}/tests\")\n\nset(LIB_BUILD                                  \"${PROJECT_BUILD}/lib\")\nset(BIN_BUILD                                  \"${PROJECT_BUILD}/bin\")\nset(DOCS_BUILD                                 \"${PROJECT_BUILD}/docs\")\nset(EXECUTABLE_OUTPUT_PATH                     ${BIN_BUILD})\nset(LIBRARY_OUTPUT_PATH                        ${LIB_BUILD})\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                 BUILD\n# -------------------------------------------------------------------------------------------------------------------------------------------\nstring(TOLOWER \"${CMAKE_BUILD_TYPE}\" cmake_build_type_tolower)\nif(NOT cmake_build_type_tolower STREQUAL \"debug\" AND NOT cmake_build_type_tolower STREQUAL \"release\" AND NOT cmake_build_type_tolower STREQUAL \"fastdebug\" AND NOT cmake_build_type_tolower STREQUAL \"fastrelease\")\n    message(FATAL_ERROR \"Unknown build type \\\"${CMAKE_BUILD_TYPE}\\\". Allowed values are Debug, Release, FastDebug, and FastRelease (case-insensitive).\")\nendif()\n\nif(NOT CMAKE_BUILD_TYPE)\n    set(CMAKE_BUILD_TYPE \"Release\")\nendif()\n\nfind_program(CCACHE_BIN ccache)\nif(CCACHE_BIN)\n    message(\"CCACHE_BIN\")\n    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_BIN})\n    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_BIN})\nendif(CCACHE_BIN)\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                 COMPILER\n# -------------------------------------------------------------------------------------------------------------------------------------------\ninclude(Warnings)\n#CPP STANDARD OPTIONS\nset(CMAKE_CXX_STANDARD 14)\nset(CMAKE_CXX_STANDARD_REQUIRED ON)\nset(CMAKE_CXX_EXTENSIONS OFF)\nset(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} \\\n                    -Wall \\\n                    -Wno-unknown-pragmas \\\n                    -Wno-sign-compare \\\n                    -Woverloaded-virtual \\\n                    -Wwrite-strings \\\n                    -Wno-unused\")\n\nif((cmake_build_type_tolower STREQUAL \"release\") OR (cmake_build_type_tolower STREQUAL \"fastrelease\"))\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} -O3\")\n    include(LTO)\n    include(Packaging)\n    if(cmake_build_type_tolower STREQUAL \"release\")\n        option(ENABLE_DOCUMENT         \"Enable documentation\"           ON)\n    endif()\nelseif((cmake_build_type_tolower STREQUAL \"debug\") OR (cmake_build_type_tolower STREQUAL \"fastdebug\"))\n    set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage -O0 -g3\")\n    option(BUILD_TESTS             \"Build test units\"                   ON)\n    option(ENABLE_COVERAGE         \"Enable testing coverage\"            ON)\n    if(cmake_build_type_tolower STREQUAL \"debug\")\n        option(ENABLE_SANITIZERS       \"Enable langtidy and cppcheck\"   ON)\n        option(ENABLE_DOCUMENT         \"Enable documentation\"           ON)\n        option(ENABLE_MEMCHECK         \"Enable memory leak check\"       ON)\n    endif()\nendif()\nmessage (\"BUILD TYPE: ${CMAKE_BUILD_TYPE}\\n\")\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   SYSTEM LIB\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#environment CPLUS_INCLUDE_PATH and default headers /usr/include\nif (NOT $ENV{CPLUS_INCLUDE_PATH}  STREQUAL \"\")\n    string (REPLACE \":\" \" \" SYS_INCLUDES $ENV{CPLUS_INCLUDE_PATH})\n    string (REPLACE \"//\" \"/\" SYS_INCLUDES ${SYS_INCLUDES})\n    string(REGEX MATCHALL \"[^ ]+\" DEFINC ${SYS_INCLUDES})\nendif (NOT $ENV{CPLUS_INCLUDE_PATH}  STREQUAL \"\")\nlist(APPEND DEFINC \"/usr/include\")\nlist(REMOVE_DUPLICATES DEFINC)\nforeach(LOC ${DEFINC})\n    message(\"directory ${LOC} included\")\nendforeach()\ninclude_directories(SYSTEM ${DEFINC})\n\n#environment LD_LIBRARY_PATH and default linker /usr/lib/\nif (NOT $ENV{LD_LIBRARY_PATH}  STREQUAL \"\")\n    string (REPLACE \";\" \" \" SYS_LIBRARIES $ENV{LD_LIBRARY_PATH})\n    string (REPLACE \"//\" \"/\" SYS_LIBRARIES ${SYS_LIBRARIES})\n    string(REGEX MATCHALL \"[^ ]+\" DEFLIB ${SYS_LIBRARIES})\nendif (NOT $ENV{LD_LIBRARY_PATH}  STREQUAL \"\")\nlist(APPEND DEFLIB \"/usr/lib\")\nlist(REMOVE_DUPLICATES DEFLIB)\nforeach(LOC ${DEFLIB})\n    message(\"directory ${LOC} linked\")\nendforeach()\nlink_directories(${DEFLIB})\n\n\n# FIND-PACKAGES and HUNTER\nfind_package(Curses REQUIRED)\nif(NOT CURSES_FOUND)\n    message (\"CURSES_NOT_FOUND\")\nendif()\n\n#grouping local libraries\nset(SYSLIB ncurses)\nforeach(LOC ${SYSLIB})\n    message(\"system library ${LOC} added\")\nendforeach()\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   EXTERNAL LIB\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#Use fmtlib for formatting\nadd_subdirectory(${EXT_SRC}/fmt EXCLUDE_FROM_ALL)\ntarget_set_warnings(fmt DISABLE ALL) # Treat fmtlib as a system include as to ignore the warnings\nset_target_properties(fmt PROPERTIES FOLDER \"external\")\nset_target_properties(fmt PROPERTIES COMPILE_OPTIONS \"-O2\")\n\nset(EXTLIB fmt)\nforeach(EXT ${EXTLIB})\n    message(\"external library ${EXT} added\")\nendforeach()\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   LOCAL LIB\n# -------------------------------------------------------------------------------------------------------------------------------------------\nadd_library(UTILS INTERFACE)\ntarget_include_directories(UTILS INTERFACE ${UTL_SRC}/)\n\nfunction (add_source_lib NAME)\n    file(GLOB HEAD_FILES \"${INC_SRC}/${NAME}/*.h\" \"${INC_SRC}/${NAME}/*.hpp\")\n    file(GLOB CODE_FILES \"${SRC_SRC}/${NAME}/*.c\" \"${SRC_SRC}/${NAME}/*.cpp\")\n    add_library(${NAME} ${HEAD_FILES} ${CODE_FILES})\n    target_include_directories(${NAME} PRIVATE ${INC_SRC} SYSTEM INTERFACE ${INC_SRC})\n    target_include_directories(${NAME} PRIVATE ${UTL_SRC} SYSTEM INTERFACE ${UTL_SRC})\n    target_link_libraries(${NAME}\n        PRIVATE\n            ${EXTLIB}\n            ${SYSLIB}\n    )\n    foreach(FILE ${CODE_FILES})\n        if(ENABLE_SANITIZERS)\n            # add_custom_command(TARGET ${NAME} POST_BUILD COMMAND clang-tidy ${FILE})\n            add_custom_command(TARGET ${NAME} POST_BUILD COMMAND cppcheck --enable=all ${FILE})\n        endif()\n    endforeach()\nendfunction(add_source_lib)\n\nset(LIBRARIES cplate second)\n\nforeach(LIB ${LIBRARIES})\n    add_source_lib(${LIB})\n    message(\"local library ${LIB} added\")\nendforeach()\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   EXECUTABLE\n# -------------------------------------------------------------------------------------------------------------------------------------------\nif(BUILD_MAIN)\n    add_executable(${PROJECT_NAME}_bin ${SRC_SRC}/main.cpp)\n    set_target_properties(${PROJECT_NAME}_bin PROPERTIES OUTPUT_NAME ${PROJECT_NAME})\n    target_include_directories(${PROJECT_NAME}_bin PRIVATE ${UTL_SRC} INTERFACE ${UTL_SRC})\n    target_link_libraries(${PROJECT_NAME}_bin\n        PUBLIC\n            ${LIBRARIES}\n        PRIVATE\n            ${EXTLIB}\n            ${SYSLIB}\n    )\n    if(ENABLE_SANITIZERS)\n        # add_custom_command(TARGET ${PROJECT_NAME}_bin POST_BUILD COMMAND clang-tidy ${SRC_SRC}/main.cpp)\n        add_custom_command(TARGET ${PROJECT_NAME}_bin POST_BUILD COMMAND cppcheck --enable=all ${SRC_SRC}/main.cpp)\n    endif()\nendif()\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   TESTS\n# -------------------------------------------------------------------------------------------------------------------------------------------\nif(BUILD_TESTS)\n    include(CTest)\n    enable_testing()\n    set(BUILD_TESTING_BCKP ${BUILD_TESTING})\n    set(BUILD_TESTING OFF CACHE BOOL \"Force disable of tests for external dependencies\" FORCE)\n\n    function (add_testing PATH)\n        get_filename_component(NAME ${PATH} NAME_WE)\n        set(NAME ${PROJECT_NAME}_${NAME})\n        add_executable(${NAME} ${PATH})\n        target_link_libraries(${NAME} ${LIBRARIES})\n        target_include_directories(${NAME} PRIVATE ${UTL_SRC} INTERFACE ${UTL_SRC})\n        add_test(NAME ${NAME} COMMAND ${EXECUTABLE_OUTPUT_PATH}/${NAME})\n        if(ENABLE_COVERAGE)\n            add_custom_command(TARGET ${NAME} POST_BUILD COMMAND kcov --include-pattern=${SRC_SRC} ${PROJECT_BINARY_DIR}/cover ${PROJECT_BINARY_DIR}/bin/${NAME})\n        endif()\n        if(ENABLE_MEMCHECK)\n            find_program( MEMORYCHECK_COMMAND valgrind )\n            set( MEMORYCHECK_COMMAND_OPTIONS \"--trace-children=yes --leak-check=full\" )\n            add_custom_command(TARGET ${NAME} POST_BUILD COMMAND valgrind --leak-check=yes ${PROJECT_BINARY_DIR}/bin/${NAME})\n        endif()\n    endfunction(add_testing)\n\n    file(GLOB TEST_FILES \"${TEST_SRC}/*.c\" \"${TEST_SRC}/*.cpp\")\n    if(BUILD_TESTS)\n        foreach(A_FILE ${TEST_FILES})\n            add_testing(${A_FILE})\n        endforeach()\n    endif()\nendif()\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   DOCUMENTATION\n# -------------------------------------------------------------------------------------------------------------------------------------------\nfile(MAKE_DIRECTORY \"${DOCS_BUILD}\")\nif(ENABLE_DOCUMENT)\n    # add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND standardese --output-format=html --input.blacklist_file=CMakeLists.txt ${SRC_SRC} WORKING_DIRECTORY ${DOCS_BUILD})\nendif()\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   INSTALLATION\n# -------------------------------------------------------------------------------------------------------------------------------------------\n# Install files.\nif(BUILD_MAIN)\n    install(TARGETS ${PROJECT_NAME}_bin DESTINATION /usr/local/bin)\nendif()\nforeach(LIB ${LIBRARIES})\n    install(TARGETS ${LIB} DESTINATION /usr/local/lib)\nendforeach()\ninstall(DIRECTORY \"${INC_SRC}/\" DESTINATION /usr/local/include)\n# Uninstall files.\nif(NOT TARGET uninstall)\n    configure_file(\n        \"${CMAKE_MODULE_PATH}/Uninstall.cmake\"\n        \"${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake\"\n        IMMEDIATE @ONLY)\n    add_custom_target(uninstall\n        COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake)\nendif()\n\n\n\n# -------------------------------------------------------------------------------------------------------------------------------------------\n#                   PACKAGING\n# -------------------------------------------------------------------------------------------------------------------------------------------\nset(CPACK_PACKAGE_VENDOR                \"${${CMAKE_PROJECT_NAME}_VENDOR_NAME}\")\nset(CPACK_PACKAGE_CONTACT               \"${${CMAKE_PROJECT_NAME}_VENDOR_CONTACT}\")\nset(CPACK_PACKAGE_DESCRIPTION_SUMMARY   \"${${CMAKE_PROJECT_NAME}_SUMMARY}\")\nset(CPACK_PACKAGE_DESCRIPTION_FILE      \"${PROJECT_PATH}/README.md\")\nset(CPACK_RESOURCE_FILE_LICENSE         \"${PROJECT_PATH}/LICENSE.md\")\nset(CPACK_PACKAGE_VERSION_MAJOR         \"${${CMAKE_PROJECT_NAME}_VERSION_MAJOR}\")\nset(CPACK_PACKAGE_VERSION_MINOR         \"${${CMAKE_PROJECT_NAME}_VERSION_MINOR}\")\nset(CPACK_PACKAGE_VERSION_PATCH         \"${${CMAKE_PROJECT_NAME}_VERSION_PATCH}\")\nset(CPACK_PACKAGE_INSTALL_DIRECTORY     \"${CMAKE_PROJECT_NAME}\")\n\nset(CPACK_SET_DESTDIR                   \"on\")\nset(CPACK_PACKAGING_INSTALL_PREFIX      \"/tmp\")\nset(CPACK_PACKAGE_FILE_NAME             \"${CMAKE_PROJECT_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\")\nset(CPACK_SOURCE_PACKAGE_FILE_NAME      \"${CMAKE_PROJECT_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\")\n\nset(CPACK_DEBIAN_PACKAGE_MAINTAINER     \"${${CMAKE_PROJECT_NAME}_VENDOR_NAME}\")\nset(CPACK_DEBIAN_PACKAGE_DEPENDS        \"libc6 (>= 2.1.3), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.2.1)\")\nset(CPACK_DEBIAN_PACKAGE_PRIORITY       \"optional\")\nset(CPACK_DEBIAN_ARCHITECTURE           ${CMAKE_SYSTEM_PROCESSOR})\n\nSET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)\nset(CPACK_GENERATOR \"DEB;TGZ\")\n\ninclude(CPack)\n"
  },
  {
    "path": ".config/proji/templates/cmake/cmake/ExternalProject.cmake",
    "content": "# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying\n# file Copyright.txt or https://cmake.org/licensing for details.\n\n#[=======================================================================[.rst:\nExternalProject\n---------------\n\n.. only:: html\n\n   .. contents::\n\nExternal Project Definition\n^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. command:: ExternalProject_Add\n\n  The ``ExternalProject_Add()`` function creates a custom target to drive\n  download, update/patch, configure, build, install and test steps of an\n  external project:\n\n  .. code-block:: cmake\n\n    ExternalProject_Add(<name> [<option>...])\n\n  The individual steps within the process can be driven independently if\n  required (e.g. for CDash submission) and extra custom steps can be defined,\n  along with the ability to control the step dependencies. The directory\n  structure used for the management of the external project can also be\n  customized. The function supports a large number of options which can be used\n  to tailor the external project behavior.\n\n  **Directory Options:**\n    Most of the time, the default directory layout is sufficient. It is largely\n    an implementation detail that the main project usually doesn't need to\n    change. In some circumstances, however, control over the directory layout\n    can be useful or necessary. The directory options are potentially more\n    useful from the point of view that the main build can use the\n    :command:`ExternalProject_Get_Property` command to retrieve their values,\n    thereby allowing the main project to refer to build artifacts of the\n    external project.\n\n    ``PREFIX <dir>``\n      Root directory for the external project. Unless otherwise noted below,\n      all other directories associated with the external project will be\n      created under here.\n\n    ``TMP_DIR <dir>``\n      Directory in which to store temporary files.\n\n    ``STAMP_DIR <dir>``\n      Directory in which to store the timestamps of each step. Log files from\n      individual steps are also created in here unless overridden by LOG_DIR\n      (see *Logging Options* below).\n\n    ``LOG_DIR <dir>``\n      Directory in which to store the logs of each step.\n\n    ``DOWNLOAD_DIR <dir>``\n      Directory in which to store downloaded files before unpacking them. This\n      directory is only used by the URL download method, all other download\n      methods use ``SOURCE_DIR`` directly instead.\n\n    ``SOURCE_DIR <dir>``\n      Source directory into which downloaded contents will be unpacked, or for\n      non-URL download methods, the directory in which the repository should be\n      checked out, cloned, etc. If no download method is specified, this must\n      point to an existing directory where the external project has already\n      been unpacked or cloned/checked out.\n\n      .. note::\n         If a download method is specified, any existing contents of the source\n         directory may be deleted. Only the URL download method checks whether\n         this directory is either missing or empty before initiating the\n         download, stopping with an error if it is not empty. All other\n         download methods silently discard any previous contents of the source\n         directory.\n\n    ``BINARY_DIR <dir>``\n      Specify the build directory location. This option is ignored if\n      ``BUILD_IN_SOURCE`` is enabled.\n\n    ``INSTALL_DIR <dir>``\n      Installation prefix to be placed in the ``<INSTALL_DIR>`` placeholder.\n      This does not actually configure the external project to install to\n      the given prefix. That must be done by passing appropriate arguments\n      to the external project configuration step, e.g. using ``<INSTALL_DIR>``.\n\n    If any of the above ``..._DIR`` options are not specified, their defaults\n    are computed as follows. If the ``PREFIX`` option is given or the\n    ``EP_PREFIX`` directory property is set, then an external project is built\n    and installed under the specified prefix::\n\n      TMP_DIR      = <prefix>/tmp\n      STAMP_DIR    = <prefix>/src/<name>-stamp\n      DOWNLOAD_DIR = <prefix>/src\n      SOURCE_DIR   = <prefix>/src/<name>\n      BINARY_DIR   = <prefix>/src/<name>-build\n      INSTALL_DIR  = <prefix>\n      LOG_DIR      = <STAMP_DIR>\n\n    Otherwise, if the ``EP_BASE`` directory property is set then components\n    of an external project are stored under the specified base::\n\n      TMP_DIR      = <base>/tmp/<name>\n      STAMP_DIR    = <base>/Stamp/<name>\n      DOWNLOAD_DIR = <base>/Download/<name>\n      SOURCE_DIR   = <base>/Source/<name>\n      BINARY_DIR   = <base>/Build/<name>\n      INSTALL_DIR  = <base>/Install/<name>\n      LOG_DIR      = <STAMP_DIR>\n\n    If no ``PREFIX``, ``EP_PREFIX``, or ``EP_BASE`` is specified, then the\n    default is to set ``PREFIX`` to ``<name>-prefix``. Relative paths are\n    interpreted with respect to :variable:`CMAKE_CURRENT_BINARY_DIR` at the\n    point where ``ExternalProject_Add()`` is called.\n\n  **Download Step Options:**\n    A download method can be omitted if the ``SOURCE_DIR`` option is used to\n    point to an existing non-empty directory. Otherwise, one of the download\n    methods below must be specified (multiple download methods should not be\n    given) or a custom ``DOWNLOAD_COMMAND`` provided.\n\n    ``DOWNLOAD_COMMAND <cmd>...``\n      Overrides the command used for the download step\n      (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n      supported). If this option is specified, all other download options will\n      be ignored. Providing an empty string for ``<cmd>`` effectively disables\n      the download step.\n\n    *URL Download*\n      ``URL <url1> [<url2>...]``\n        List of paths and/or URL(s) of the external project's source. When more\n        than one URL is given, they are tried in turn until one succeeds. A URL\n        may be an ordinary path in the local file system (in which case it\n        must be the only URL provided) or any downloadable URL supported by the\n        :command:`file(DOWNLOAD)` command. A local filesystem path may refer to\n        either an existing directory or to an archive file, whereas a URL is\n        expected to point to a file which can be treated as an archive. When an\n        archive is used, it will be unpacked automatically unless the\n        ``DOWNLOAD_NO_EXTRACT`` option is set to prevent it. The archive type\n        is determined by inspecting the actual content rather than using logic\n        based on the file extension.\n\n      ``URL_HASH <algo>=<hashValue>``\n        Hash of the archive file to be downloaded. The argument should be of\n        the form ``<algo>=<hashValue>`` where ``algo`` can be any of the hashing\n        algorithms supported by the :command:`file()` command. Specifying this\n        option is strongly recommended for URL downloads, as it ensures the\n        integrity of the downloaded content. It is also used as a check for a\n        previously downloaded file, allowing connection to the remote location\n        to be avoided altogether if the local directory already has a file from\n        an earlier download that matches the specified hash.\n\n      ``URL_MD5 <md5>``\n        Equivalent to ``URL_HASH MD5=<md5>``.\n\n      ``DOWNLOAD_NAME <fname>``\n        File name to use for the downloaded file. If not given, the end of the\n        URL is used to determine the file name. This option is rarely needed,\n        the default name is generally suitable and is not normally used outside\n        of code internal to the ``ExternalProject`` module.\n\n      ``DOWNLOAD_NO_EXTRACT <bool>``\n        Allows the extraction part of the download step to be disabled by\n        passing a boolean true value for this option. If this option is not\n        given, the downloaded contents will be unpacked automatically if\n        required. If extraction has been disabled, the full path to the\n        downloaded file is available as ``<DOWNLOADED_FILE>`` in subsequent\n        steps or as the property ``DOWNLOADED_FILE`` with the\n        :command:`ExternalProject_Get_Property` command.\n\n      ``DOWNLOAD_NO_PROGRESS <bool>``\n        Can be used to disable logging the download progress. If this option is\n        not given, download progress messages will be logged.\n\n      ``TIMEOUT <seconds>``\n        Maximum time allowed for file download operations.\n\n      ``HTTP_USERNAME <username>``\n        Username for the download operation if authentication is required.\n\n      ``HTTP_PASSWORD <password>``\n        Password for the download operation if authentication is required.\n\n      ``HTTP_HEADER <header1> [<header2>...]``\n        Provides an arbitrary list of HTTP headers for the download operation.\n        This can be useful for accessing content in systems like AWS, etc.\n\n      ``TLS_VERIFY <bool>``\n        Specifies whether certificate verification should be performed for\n        https URLs. If this option is not provided, the default behavior is\n        determined by the ``CMAKE_TLS_VERIFY`` variable (see\n        :command:`file(DOWNLOAD)`). If that is also not set, certificate\n        verification will not be performed. In situations where ``URL_HASH``\n        cannot be provided, this option can be an alternative verification\n        measure.\n\n      ``TLS_CAINFO <file>``\n        Specify a custom certificate authority file to use if ``TLS_VERIFY``\n        is enabled. If this option is not specified, the value of the\n        ``CMAKE_TLS_CAINFO`` variable will be used instead (see\n        :command:`file(DOWNLOAD)`)\n\n      ``NETRC <level>``\n        Specify whether the ``.netrc`` file is to be used for operation.\n        If this option is not specified, the value of the ``CMAKE_NETRC``\n        variable will be used instead (see :command:`file(DOWNLOAD)`)\n        Valid levels are:\n\n        ``IGNORED``\n          The ``.netrc`` file is ignored.\n          This is the default.\n        ``OPTIONAL``\n          The ``.netrc`` file is optional, and information in the URL\n          is preferred.  The file will be scanned to find which ever\n          information is not specified in the URL.\n        ``REQUIRED``\n          The ``.netrc`` file is required, and information in the URL\n          is ignored.\n\n      ``NETRC_FILE <file>``\n        Specify an alternative ``.netrc`` file to the one in your home directory\n        if the ``NETRC`` level is ``OPTIONAL`` or ``REQUIRED``. If this option\n        is not specified, the value of the ``CMAKE_NETRC_FILE`` variable will\n        be used instead (see :command:`file(DOWNLOAD)`)\n\n    *Git*\n      NOTE: A git version of 1.6.5 or later is required if this download method\n      is used.\n\n      ``GIT_REPOSITORY <url>``\n        URL of the git repository. Any URL understood by the ``git`` command\n        may be used.\n\n      ``GIT_TAG <tag>``\n        Git branch name, tag or commit hash. Note that branch names and tags\n        should generally be specified as remote names (i.e. ``origin/myBranch``\n        rather than simply ``myBranch``). This ensures that if the remote end\n        has its tag moved or branch rebased or history rewritten, the local\n        clone will still be updated correctly. In general, however, specifying\n        a commit hash should be preferred for a number of reasons:\n\n        - If the local clone already has the commit corresponding to the hash,\n          no ``git fetch`` needs to be performed to check for changes each time\n          CMake is re-run. This can result in a significant speed up if many\n          external projects are being used.\n        - Using a specific git hash ensures that the main project's own history\n          is fully traceable to a specific point in the external project's\n          evolution. If a branch or tag name is used instead, then checking out\n          a specific commit of the main project doesn't necessarily pin the\n          whole build to a specific point in the life of the external project.\n          The lack of such deterministic behavior makes the main project lose\n          traceability and repeatability.\n\n        If ``GIT_SHALLOW`` is enabled then ``GIT_TAG`` works only with\n        branch names and tags.  A commit hash is not allowed.\n\n      ``GIT_REMOTE_NAME <name>``\n        The optional name of the remote. If this option is not specified, it\n        defaults to ``origin``.\n\n      ``GIT_SUBMODULES <module>...``\n        Specific git submodules that should also be updated. If this option is\n        not provided, all git submodules will be updated. When :policy:`CMP0097`\n        is set to ``NEW`` if this value is set to an empty string then no submodules\n        are initialized or updated.\n\n      ``GIT_SHALLOW <bool>``\n        When this option is enabled, the ``git clone`` operation will be given\n        the ``--depth 1`` option. This performs a shallow clone, which avoids\n        downloading the whole history and instead retrieves just the commit\n        denoted by the ``GIT_TAG`` option.\n\n      ``GIT_PROGRESS <bool>``\n        When enabled, this option instructs the ``git clone`` operation to\n        report its progress by passing it the ``--progress`` option. Without\n        this option, the clone step for large projects may appear to make the\n        build stall, since nothing will be logged until the clone operation\n        finishes. While this option can be used to provide progress to prevent\n        the appearance of the build having stalled, it may also make the build\n        overly noisy if lots of external projects are used.\n\n      ``GIT_CONFIG <option1> [<option2>...]``\n        Specify a list of config options to pass to ``git clone``. Each option\n        listed will be transformed into its own ``--config <option>`` on the\n        ``git clone`` command line, with each option required to be in the\n        form ``key=value``.\n\n    *Subversion*\n      ``SVN_REPOSITORY <url>``\n        URL of the Subversion repository.\n\n      ``SVN_REVISION -r<rev>``\n        Revision to checkout from the Subversion repository.\n\n      ``SVN_USERNAME <username>``\n        Username for the Subversion checkout and update.\n\n      ``SVN_PASSWORD <password>``\n        Password for the Subversion checkout and update.\n\n      ``SVN_TRUST_CERT <bool>``\n        Specifies whether to trust the Subversion server site certificate. If\n        enabled, the ``--trust-server-cert`` option is passed to the ``svn``\n        checkout and update commands.\n\n    *Mercurial*\n      ``HG_REPOSITORY <url>``\n        URL of the mercurial repository.\n\n      ``HG_TAG <tag>``\n        Mercurial branch name, tag or commit id.\n\n    *CVS*\n      ``CVS_REPOSITORY <cvsroot>``\n        CVSROOT of the CVS repository.\n\n      ``CVS_MODULE <mod>``\n        Module to checkout from the CVS repository.\n\n      ``CVS_TAG <tag>``\n        Tag to checkout from the CVS repository.\n\n  **Update/Patch Step Options:**\n    Whenever CMake is re-run, by default the external project's sources will be\n    updated if the download method supports updates (e.g. a git repository\n    would be checked if the ``GIT_TAG`` does not refer to a specific commit).\n\n    ``UPDATE_COMMAND <cmd>...``\n      Overrides the download method's update step with a custom command.\n      The command may use\n      :manual:`generator expressions <cmake-generator-expressions(7)>`.\n\n    ``UPDATE_DISCONNECTED <bool>``\n      When enabled, this option causes the update step to be skipped. It does\n      not, however, prevent the download step. The update step can still be\n      added as a step target (see :command:`ExternalProject_Add_StepTargets`)\n      and called manually. This is useful if you want to allow developers to\n      build the project when disconnected from the network (the network may\n      still be needed for the download step though).\n\n      When this option is present, it is generally advisable to make the value\n      a cache variable under the developer's control rather than hard-coding\n      it. If this option is not present, the default value is taken from the\n      ``EP_UPDATE_DISCONNECTED`` directory property. If that is also not\n      defined, updates are performed as normal. The ``EP_UPDATE_DISCONNECTED``\n      directory property is intended as a convenience for controlling the\n      ``UPDATE_DISCONNECTED`` behavior for an entire section of a project's\n      directory hierarchy and may be a more convenient method of giving\n      developers control over whether or not to perform updates (assuming the\n      project also provides a cache variable or some other convenient method\n      for setting the directory property).\n\n    ``PATCH_COMMAND <cmd>...``\n      Specifies a custom command to patch the sources after an update. By\n      default, no patch command is defined. Note that it can be quite difficult\n      to define an appropriate patch command that performs robustly, especially\n      for download methods such as git where changing the ``GIT_TAG`` will not\n      discard changes from a previous patch, but the patch command will be\n      called again after updating to the new tag.\n\n  **Configure Step Options:**\n    The configure step is run after the download and update steps. By default,\n    the external project is assumed to be a CMake project, but this can be\n    overridden if required.\n\n    ``CONFIGURE_COMMAND <cmd>...``\n      The default configure command runs CMake with options based on the main\n      project. For non-CMake external projects, the ``CONFIGURE_COMMAND``\n      option must be used to override this behavior\n      (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n      supported). For projects that require no configure step, specify this\n      option with an empty string as the command to execute.\n\n    ``CMAKE_COMMAND /.../cmake``\n      Specify an alternative cmake executable for the configure step (use an\n      absolute path). This is generally not recommended, since it is\n      usually desirable to use the same CMake version throughout the whole\n      build. This option is ignored if a custom configure command has been\n      specified with ``CONFIGURE_COMMAND``.\n\n    ``CMAKE_GENERATOR <gen>``\n      Override the CMake generator used for the configure step. Without this\n      option, the same generator as the main build will be used. This option is\n      ignored if a custom configure command has been specified with the\n      ``CONFIGURE_COMMAND`` option.\n\n    ``CMAKE_GENERATOR_PLATFORM <platform>``\n      Pass a generator-specific platform name to the CMake command (see\n      :variable:`CMAKE_GENERATOR_PLATFORM`). It is an error to provide this\n      option without the ``CMAKE_GENERATOR`` option.\n\n    ``CMAKE_GENERATOR_TOOLSET <toolset>``\n      Pass a generator-specific toolset name to the CMake command (see\n      :variable:`CMAKE_GENERATOR_TOOLSET`). It is an error to provide this\n      option without the ``CMAKE_GENERATOR`` option.\n\n    ``CMAKE_GENERATOR_INSTANCE <instance>``\n      Pass a generator-specific instance selection to the CMake command (see\n      :variable:`CMAKE_GENERATOR_INSTANCE`). It is an error to provide this\n      option without the ``CMAKE_GENERATOR`` option.\n\n    ``CMAKE_ARGS <arg>...``\n      The specified arguments are passed to the ``cmake`` command line. They\n      can be any argument the ``cmake`` command understands, not just cache\n      values defined by ``-D...`` arguments (see also\n      :manual:`CMake Options <cmake(1)>`). In addition, arguments may use\n      :manual:`generator expressions <cmake-generator-expressions(7)>`.\n\n    ``CMAKE_CACHE_ARGS <arg>...``\n      This is an alternate way of specifying cache variables where command line\n      length issues may become a problem. The arguments are expected to be in\n      the form ``-Dvar:STRING=value``, which are then transformed into\n      CMake :command:`set` commands with the ``FORCE`` option used. These\n      ``set()`` commands are written to a pre-load script which is then applied\n      using the :manual:`cmake -C <cmake(1)>` command line option. Arguments\n      may use :manual:`generator expressions <cmake-generator-expressions(7)>`.\n\n    ``CMAKE_CACHE_DEFAULT_ARGS <arg>...``\n      This is the same as the ``CMAKE_CACHE_ARGS`` option except the ``set()``\n      commands do not include the ``FORCE`` keyword. This means the values act\n      as initial defaults only and will not override any variables already set\n      from a previous run. Use this option with care, as it can lead to\n      different behavior depending on whether the build starts from a fresh\n      build directory or re-uses previous build contents.\n\n      If the CMake generator is the ``Green Hills MULTI`` and not overridden then\n      the original project's settings for the GHS toolset and target system\n      customization cache variables are propagated into the external project.\n\n    ``SOURCE_SUBDIR <dir>``\n      When no ``CONFIGURE_COMMAND`` option is specified, the configure step\n      assumes the external project has a ``CMakeLists.txt`` file at the top of\n      its source tree (i.e. in ``SOURCE_DIR``). The ``SOURCE_SUBDIR`` option\n      can be used to point to an alternative directory within the source tree\n      to use as the top of the CMake source tree instead. This must be a\n      relative path and it will be interpreted as being relative to\n      ``SOURCE_DIR``.  When ``BUILD_IN_SOURCE 1`` is specified, the\n      ``BUILD_COMMAND`` is used to point to an alternative directory within the\n      source tree.\n\n  **Build Step Options:**\n    If the configure step assumed the external project uses CMake as its build\n    system, the build step will also. Otherwise, the build step will assume a\n    Makefile-based build and simply run ``make`` with no arguments as the\n    default build step. This can be overridden with custom build commands if\n    required.\n\n    ``BUILD_COMMAND <cmd>...``\n      Overrides the default build command\n      (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n      supported). If this option is not given, the default build command will\n      be chosen to integrate with the main build in the most appropriate way\n      (e.g. using recursive ``make`` for Makefile generators or\n      ``cmake --build`` if the project uses a CMake build). This option can be\n      specified with an empty string as the command to make the build step do\n      nothing.\n\n    ``BUILD_IN_SOURCE <bool>``\n      When this option is enabled, the build will be done directly within the\n      external project's source tree. This should generally be avoided, the use\n      of a separate build directory is usually preferred, but it can be useful\n      when the external project assumes an in-source build. The ``BINARY_DIR``\n      option should not be specified if building in-source.\n\n    ``BUILD_ALWAYS <bool>``\n      Enabling this option forces the build step to always be run. This can be\n      the easiest way to robustly ensure that the external project's own build\n      dependencies are evaluated rather than relying on the default\n      success timestamp-based method. This option is not normally needed unless\n      developers are expected to modify something the external project's build\n      depends on in a way that is not detectable via the step target\n      dependencies (e.g. ``SOURCE_DIR`` is used without a download method and\n      developers might modify the sources in ``SOURCE_DIR``).\n\n    ``BUILD_BYPRODUCTS <file>...``\n      Specifies files that will be generated by the build command but which\n      might or might not have their modification time updated by subsequent\n      builds. These ultimately get passed through as ``BYPRODUCTS`` to the\n      build step's own underlying call to :command:`add_custom_command`.\n\n  **Install Step Options:**\n    If the configure step assumed the external project uses CMake as its build\n    system, the install step will also. Otherwise, the install step will assume\n    a Makefile-based build and simply run ``make install`` as the default build\n    step. This can be overridden with custom install commands if required.\n\n    ``INSTALL_COMMAND <cmd>...``\n      The external project's own install step is invoked as part of the main\n      project's *build*. It is done after the external project's build step\n      and may be before or after the external project's test step (see the\n      ``TEST_BEFORE_INSTALL`` option below). The external project's install\n      rules are not part of the main project's install rules, so if anything\n      from the external project should be installed as part of the main build,\n      these need to be specified in the main build as additional\n      :command:`install` commands. The default install step builds the\n      ``install`` target of the external project, but this can be overridden\n      with a custom command using this option\n      (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n      supported). Passing an empty string as the ``<cmd>`` makes the install\n      step do nothing.\n\n  **Test Step Options:**\n    The test step is only defined if at least one of the following ``TEST_...``\n    options are provided.\n\n    ``TEST_COMMAND <cmd>...``\n      Overrides the default test command\n      (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n      supported). If this option is not given, the default behavior of the test\n      step is to build the external project's own ``test`` target. This option\n      can be specified with ``<cmd>`` as an empty string, which allows the test\n      step to still be defined, but it will do nothing. Do not specify any of\n      the other ``TEST_...`` options if providing an empty string as the test\n      command, but prefer to omit all ``TEST_...`` options altogether if the\n      test step target is not needed.\n\n    ``TEST_BEFORE_INSTALL <bool>``\n      When this option is enabled, the test step will be executed before the\n      install step. The default behavior is for the test step to run after the\n      install step.\n\n    ``TEST_AFTER_INSTALL <bool>``\n      This option is mainly useful as a way to indicate that the test step is\n      desired but all default behavior is sufficient. Specifying this option\n      with a boolean true value ensures the test step is defined and that it\n      comes after the install step. If both ``TEST_BEFORE_INSTALL`` and\n      ``TEST_AFTER_INSTALL`` are enabled, the latter is silently ignored.\n\n    ``TEST_EXCLUDE_FROM_MAIN <bool>``\n      If enabled, the main build's default ALL target will not depend on the\n      test step. This can be a useful way of ensuring the test step is defined\n      but only gets invoked when manually requested.\n\n  **Output Logging Options:**\n    Each of the following ``LOG_...`` options can be used to wrap the relevant\n    step in a script to capture its output to files. The log files will be\n    created in ``LOG_DIR`` if supplied or otherwise the ``STAMP_DIR``\n    directory with step-specific file names.\n\n    ``LOG_DOWNLOAD <bool>``\n      When enabled, the output of the download step is logged to files.\n\n    ``LOG_UPDATE <bool>``\n      When enabled, the output of the update step is logged to files.\n\n    ``LOG_PATCH <bool>``\n      When enabled, the output of the patch step is logged to files.\n\n    ``LOG_CONFIGURE <bool>``\n      When enabled, the output of the configure step is logged to files.\n\n    ``LOG_BUILD <bool>``\n      When enabled, the output of the build step is logged to files.\n\n    ``LOG_INSTALL <bool>``\n      When enabled, the output of the install step is logged to files.\n\n    ``LOG_TEST <bool>``\n      When enabled, the output of the test step is logged to files.\n\n    ``LOG_MERGED_STDOUTERR <bool>``\n      When enabled, stdout and stderr will be merged for any step whose\n      output is being logged to files.\n\n    ``LOG_OUTPUT_ON_FAILURE <bool>``\n      This option only has an effect if at least one of the other ``LOG_<step>``\n      options is enabled.  If an error occurs for a step which has logging to\n      file enabled, that step's output will be printed to the console if\n      ``LOG_OUTPUT_ON_FAILURE`` is set to true.  For cases where a large amount\n      of output is recorded, just the end of that output may be printed to the\n      console.\n\n  **Terminal Access Options:**\n    Steps can be given direct access to the terminal in some cases. Giving a\n    step access to the terminal may allow it to receive terminal input if\n    required, such as for authentication details not provided by other options.\n    With the :generator:`Ninja` generator, these options place the steps in the\n    ``console`` :prop_gbl:`job pool <JOB_POOLS>`. Each step can be given access\n    to the terminal individually via the following options:\n\n    ``USES_TERMINAL_DOWNLOAD <bool>``\n      Give the download step access to the terminal.\n\n    ``USES_TERMINAL_UPDATE <bool>``\n      Give the update step access to the terminal.\n\n    ``USES_TERMINAL_CONFIGURE <bool>``\n      Give the configure step access to the terminal.\n\n    ``USES_TERMINAL_BUILD <bool>``\n      Give the build step access to the terminal.\n\n    ``USES_TERMINAL_INSTALL <bool>``\n      Give the install step access to the terminal.\n\n    ``USES_TERMINAL_TEST <bool>``\n      Give the test step access to the terminal.\n\n  **Target Options:**\n    ``DEPENDS <targets>...``\n      Specify other targets on which the external project depends. The other\n      targets will be brought up to date before any of the external project's\n      steps are executed. Because the external project uses additional custom\n      targets internally for each step, the ``DEPENDS`` option is the most\n      convenient way to ensure all of those steps depend on the other targets.\n      Simply doing\n      :command:`add_dependencies(\\<name\\> \\<targets\\>) <add_dependencies>` will\n      not make any of the steps dependent on ``<targets>``.\n\n    ``EXCLUDE_FROM_ALL <bool>``\n      When enabled, this option excludes the external project from the default\n      ALL target of the main build.\n\n    ``STEP_TARGETS <step-target>...``\n      Generate custom targets for the specified steps. This is required if the\n      steps need to be triggered manually or if they need to be used as\n      dependencies of other targets. If this option is not specified, the\n      default value is taken from the ``EP_STEP_TARGETS`` directory property.\n      See :command:`ExternalProject_Add_Step` below for further discussion of\n      the effects of this option.\n\n    ``INDEPENDENT_STEP_TARGETS <step-target>...``\n      Generate custom targets for the specified steps and prevent these targets\n      from having the usual dependencies applied to them. If this option is not\n      specified, the default value is taken from the\n      ``EP_INDEPENDENT_STEP_TARGETS`` directory property. This option is mostly\n      useful for allowing individual steps to be driven independently, such as\n      for a CDash setup where each step should be initiated and reported\n      individually rather than as one whole build. See\n      :command:`ExternalProject_Add_Step` below for further discussion of the\n      effects of this option.\n\n  **Miscellaneous Options:**\n    ``LIST_SEPARATOR <sep>``\n      For any of the various ``..._COMMAND`` options, replace ``;`` with\n      ``<sep>`` in the specified command lines. This can be useful where list\n      variables may be given in commands where they should end up as\n      space-separated arguments (``<sep>`` would be a single space character\n      string in this case).\n\n    ``COMMAND <cmd>...``\n      Any of the other ``..._COMMAND`` options can have additional commands\n      appended to them by following them with as many ``COMMAND ...`` options\n      as needed\n      (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n      supported). For example:\n\n      .. code-block:: cmake\n\n        ExternalProject_Add(example\n          ... # Download options, etc.\n          BUILD_COMMAND ${CMAKE_COMMAND} -E echo \"Starting $<CONFIG> build\"\n          COMMAND       ${CMAKE_COMMAND} --build <BINARY_DIR> --config $<CONFIG>\n          COMMAND       ${CMAKE_COMMAND} -E echo \"$<CONFIG> build complete\"\n        )\n\n  It should also be noted that each build step is created via a call to\n  :command:`ExternalProject_Add_Step`. See that command's documentation for the\n  automatic substitutions that are supported for some options.\n\nObtaining Project Properties\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. command:: ExternalProject_Get_Property\n\n  The ``ExternalProject_Get_Property()`` function retrieves external project\n  target properties:\n\n  .. code-block:: cmake\n\n    ExternalProject_Get_Property(<name> <prop1> [<prop2>...])\n\n  The function stores property values in variables of the same name. Property\n  names correspond to the keyword argument names of ``ExternalProject_Add()``.\n  For example, the source directory might be retrieved like so:\n\n  .. code-block:: cmake\n\n    ExternalProject_Get_property(myExtProj SOURCE_DIR)\n    message(\"Source dir of myExtProj = ${SOURCE_DIR}\")\n\nExplicit Step Management\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe ``ExternalProject_Add()`` function on its own is often sufficient for\nincorporating an external project into the main build. Certain scenarios\nrequire additional work to implement desired behavior, such as adding in a\ncustom step or making steps available as manually triggerable targets. The\n``ExternalProject_Add_Step()``, ``ExternalProject_Add_StepTargets()`` and\n``ExternalProject_Add_StepDependencies`` functions provide the lower level\ncontrol needed to implement such step-level capabilities.\n\n.. command:: ExternalProject_Add_Step\n\n  The ``ExternalProject_Add_Step()`` function specifies an additional custom\n  step for an external project defined by an earlier call to\n  :command:`ExternalProject_Add`:\n\n  .. code-block:: cmake\n\n    ExternalProject_Add_Step(<name> <step> [<option>...])\n\n  ``<name>`` is the same as the name passed to the original call to\n  :command:`ExternalProject_Add`. The specified ``<step>`` must not be one of\n  the pre-defined steps (``mkdir``, ``download``, ``update``, ``skip-update``,\n  ``patch``, ``configure``, ``build``, ``install`` or ``test``). The supported\n  options are:\n\n  ``COMMAND <cmd>...``\n    The command line to be executed by this custom step\n    (:manual:`generator expressions <cmake-generator-expressions(7)>` are\n    supported). This option can be repeated multiple times to specify multiple\n    commands to be executed in order.\n\n  ``COMMENT \"<text>...\"``\n    Text to be printed when the custom step executes.\n\n  ``DEPENDEES <step>...``\n    Other steps (custom or pre-defined) on which this step depends.\n\n  ``DEPENDERS <step>...``\n    Other steps (custom or pre-defined) that depend on this new custom step.\n\n  ``DEPENDS <file>...``\n    Files on which this custom step depends.\n\n  ``BYPRODUCTS <file>...``\n    Files that will be generated by this custom step but which might or might\n    not have their modification time updated by subsequent builds. This list of\n    files will ultimately be passed through as the ``BYPRODUCTS`` option to the\n    :command:`add_custom_command` used to implement the custom step internally.\n\n  ``ALWAYS <bool>``\n    When enabled, this option specifies that the custom step should always be\n    run (i.e. that it is always considered out of date).\n\n  ``EXCLUDE_FROM_MAIN <bool>``\n    When enabled, this option specifies that the external project's main target\n    does not depend on the custom step.\n\n  ``WORKING_DIRECTORY <dir>``\n    Specifies the working directory to set before running the custom step's\n    command. If this option is not specified, the directory will be the value\n    of the :variable:`CMAKE_CURRENT_BINARY_DIR` at the point where\n    ``ExternalProject_Add_Step()`` was called.\n\n  ``LOG <bool>``\n    If set, this causes the output from the custom step to be captured to files\n    in the external project's ``LOG_DIR`` if supplied or ``STAMP_DIR``.\n\n  ``USES_TERMINAL <bool>``\n    If enabled, this gives the custom step direct access to the terminal if\n    possible.\n\n  The command line, comment, working directory and byproducts of every\n  standard and custom step are processed to replace the tokens\n  ``<SOURCE_DIR>``, ``<SOURCE_SUBDIR>``, ``<BINARY_DIR>``, ``<INSTALL_DIR>``\n  ``<TMP_DIR>``, ``<DOWNLOAD_DIR>`` and ``<DOWNLOADED_FILE>`` with their\n  corresponding property values defined in the original call to\n  :command:`ExternalProject_Add`.\n\n.. command:: ExternalProject_Add_StepTargets\n\n  The ``ExternalProject_Add_StepTargets()`` function generates targets for the\n  steps listed. The name of each created target will be of the form\n  ``<name>-<step>``:\n\n  .. code-block:: cmake\n\n    ExternalProject_Add_StepTargets(<name> [NO_DEPENDS] <step1> [<step2>...])\n\n  Creating a target for a step allows it to be used as a dependency of another\n  target or to be triggered manually. Having targets for specific steps also\n  allows them to be driven independently of each other by specifying targets on\n  build command lines. For example, you may be submitting to a sub-project\n  based dashboard where you want to drive the configure portion of the build,\n  then submit to the dashboard, followed by the build portion, followed\n  by tests. If you invoke a custom target that depends on a step halfway\n  through the step dependency chain, then all the previous steps will also run\n  to ensure everything is up to date.\n\n  If the ``NO_DEPENDS`` option is specified, the step target will not depend on\n  the dependencies of the external project (i.e. on any dependencies of the\n  ``<name>`` custom target created by :command:`ExternalProject_Add`). This is\n  usually safe for the ``download``, ``update`` and ``patch`` steps, since they\n  do not typically require that the dependencies are updated and built. Using\n  ``NO_DEPENDS`` for any of the other pre-defined steps, however, may break\n  parallel builds. Only use ``NO_DEPENDS`` where it is certain that the named\n  steps genuinely do not have dependencies. For custom steps, consider whether\n  or not the custom commands require the dependencies to be configured, built\n  and installed.\n\n  Internally, :command:`ExternalProject_Add` calls\n  :command:`ExternalProject_Add_Step` to create each step. If any\n  ``STEP_TARGETS`` or ``INDEPENDENT_STEP_TARGETS`` were specified, then\n  ``ExternalProject_Add_StepTargets()`` will also be called after\n  :command:`ExternalProject_Add_Step`. ``INDEPENDENT_STEP_TARGETS`` have the\n  ``NO_DEPENDS`` option set, whereas ``STEP_TARGETS`` do not. Other than that,\n  the two options result in ``ExternalProject_Add_StepTargets()`` being called\n  in the same way. Even if a step is not mentioned in either of those two\n  options, ``ExternalProject_Add_StepTargets()`` can still be called later to\n  manually define a target for the step.\n\n  The ``STEP_TARGETS`` and ``INDEPENDENT_STEP_TARGETS`` options for\n  :command:`ExternalProject_Add` are generally the easiest way to ensure\n  targets are created for specific steps of interest. For custom steps,\n  ``ExternalProject_Add_StepTargets()`` must be called explicitly if a target\n  should also be created for that custom step. An alternative to these two\n  options is to populate the ``EP_STEP_TARGETS`` and\n  ``EP_INDEPENDENT_STEP_TARGETS`` directory properties. These act as defaults\n  for the step target options and can save having to repeatedly specify the\n  same set of step targets when multiple external projects are being defined.\n\n.. command:: ExternalProject_Add_StepDependencies\n\n  The ``ExternalProject_Add_StepDependencies()`` function can be used to add\n  dependencies to a step. The dependencies added must be targets CMake already\n  knows about (these can be ordinary executable or library targets, custom\n  targets or even step targets of another external project):\n\n  .. code-block:: cmake\n\n    ExternalProject_Add_StepDependencies(<name> <step> <target1> [<target2>...])\n\n  This function takes care to set both target and file level dependencies and\n  will ensure that parallel builds will not break. It should be used instead of\n  :command:`add_dependencies` whenever adding a dependency for some of the step\n  targets generated by the ``ExternalProject`` module.\n\nExamples\n^^^^^^^^\n\nThe following example shows how to download and build a hypothetical project\ncalled *FooBar* from github:\n\n.. code-block:: cmake\n\n  include(ExternalProject)\n  ExternalProject_Add(foobar\n    GIT_REPOSITORY    git@github.com:FooCo/FooBar.git\n    GIT_TAG           origin/release/1.2.3\n  )\n\nFor the sake of the example, also define a second hypothetical external project\ncalled *SecretSauce*, which is downloaded from a web server. Two URLs are given\nto take advantage of a faster internal network if available, with a fallback to\na slower external server. The project is a typical ``Makefile`` project with no\nconfigure step, so some of the default commands are overridden. The build is\nonly required to build the *sauce* target:\n\n.. code-block:: cmake\n\n  find_program(MAKE_EXE NAMES gmake nmake make)\n  ExternalProject_Add(secretsauce\n    URL               http://intranet.somecompany.com/artifacts/sauce-2.7.tgz\n                      https://www.somecompany.com/downloads/sauce-2.7.zip\n    URL_HASH          MD5=d41d8cd98f00b204e9800998ecf8427e\n    CONFIGURE_COMMAND \"\"\n    BUILD_COMMAND     ${MAKE_EXE} sauce\n  )\n\nSuppose the build step of ``secretsauce`` requires that ``foobar`` must already\nbe built. This could be enforced like so:\n\n.. code-block:: cmake\n\n  ExternalProject_Add_StepDependencies(secretsauce build foobar)\n\nAnother alternative would be to create a custom target for ``foobar``'s build\nstep and make ``secretsauce`` depend on that rather than the whole ``foobar``\nproject. This would mean ``foobar`` only needs to be built, it doesn't need to\nrun its install or test steps before ``secretsauce`` can be built. The\ndependency can also be defined along with the ``secretsauce`` project:\n\n.. code-block:: cmake\n\n  ExternalProject_Add_StepTargets(foobar build)\n  ExternalProject_Add(secretsauce\n    URL               http://intranet.somecompany.com/artifacts/sauce-2.7.tgz\n                      https://www.somecompany.com/downloads/sauce-2.7.zip\n    URL_HASH          MD5=d41d8cd98f00b204e9800998ecf8427e\n    CONFIGURE_COMMAND \"\"\n    BUILD_COMMAND     ${MAKE_EXE} sauce\n    DEPENDS           foobar-build\n  )\n\nInstead of calling :command:`ExternalProject_Add_StepTargets`, the target could\nbe defined along with the ``foobar`` project itself:\n\n.. code-block:: cmake\n\n  ExternalProject_Add(foobar\n    GIT_REPOSITORY git@github.com:FooCo/FooBar.git\n    GIT_TAG        origin/release/1.2.3\n    STEP_TARGETS   build\n  )\n\nIf many external projects should have the same set of step targets, setting a\ndirectory property may be more convenient. The ``build`` step target could be\ncreated automatically by setting the ``EP_STEP_TARGETS`` directory property\nbefore creating the external projects with :command:`ExternalProject_Add`:\n\n.. code-block:: cmake\n\n  set_property(DIRECTORY PROPERTY EP_STEP_TARGETS build)\n\nLastly, suppose that ``secretsauce`` provides a script called ``makedoc`` which\ncan be used to generate its own documentation. Further suppose that the script\nexpects the output directory to be provided as the only parameter and that it\nshould be run from the ``secretsauce`` source directory. A custom step and a\ncustom target to trigger the script can be defined like so:\n\n.. code-block:: cmake\n\n  ExternalProject_Add_Step(secretsauce docs\n    COMMAND           <SOURCE_DIR>/makedoc <BINARY_DIR>\n    WORKING_DIRECTORY <SOURCE_DIR>\n    COMMENT           \"Building secretsauce docs\"\n    ALWAYS            TRUE\n    EXCLUDE_FROM_MAIN TRUE\n  )\n  ExternalProject_Add_StepTargets(secretsauce docs)\n\nThe custom step could then be triggered from the main build like so::\n\n  cmake --build . --target secretsauce-docs\n\n#]=======================================================================]\n\ncmake_policy(PUSH)\ncmake_policy(SET CMP0054 NEW) # if() quoted variables not dereferenced\n\n# Pre-compute a regex to match documented keywords for each command.\nmath(EXPR _ep_documentation_line_count \"${CMAKE_CURRENT_LIST_LINE} - 4\")\nfile(STRINGS \"${CMAKE_CURRENT_LIST_FILE}\" lines\n     LIMIT_COUNT ${_ep_documentation_line_count}\n     REGEX \"^\\\\.\\\\. command:: [A-Za-z0-9_]+|^ +``[A-Z0-9_]+ [^`]*``$\")\nforeach(line IN LISTS lines)\n  if(\"${line}\" MATCHES \"^\\\\.\\\\. command:: ([A-Za-z0-9_]+)\")\n    if(_ep_func)\n      string(APPEND _ep_keywords_${_ep_func} \")$\")\n    endif()\n    set(_ep_func \"${CMAKE_MATCH_1}\")\n    #message(\"function [${_ep_func}]\")\n    set(_ep_keywords_${_ep_func} \"^(\")\n    set(_ep_keyword_sep)\n  elseif(\"${line}\" MATCHES \"^ +``([A-Z0-9_]+) [^`]*``$\")\n    set(_ep_key \"${CMAKE_MATCH_1}\")\n    # COMMAND should never be included as a keyword,\n    # for ExternalProject_Add(), as it is treated as a\n    # special case by argument parsing as an extension\n    # of a previous ..._COMMAND\n    if(\"x${_ep_key}x\" STREQUAL \"xCOMMANDx\" AND\n       \"x${_ep_func}x\" STREQUAL \"xExternalProject_Addx\")\n      continue()\n    endif()\n    #message(\"  keyword [${_ep_key}]\")\n    string(APPEND _ep_keywords_${_ep_func}\n      \"${_ep_keyword_sep}${_ep_key}\")\n    set(_ep_keyword_sep \"|\")\n  endif()\nendforeach()\nif(_ep_func)\n  string(APPEND _ep_keywords_${_ep_func} \")$\")\nendif()\n\n# Save regex matching supported hash algorithm names.\nset(_ep_hash_algos \"MD5|SHA1|SHA224|SHA256|SHA384|SHA512|SHA3_224|SHA3_256|SHA3_384|SHA3_512\")\nset(_ep_hash_regex \"^(${_ep_hash_algos})=([0-9A-Fa-f]+)$\")\n\nset(_ExternalProject_SELF \"${CMAKE_CURRENT_LIST_FILE}\")\nget_filename_component(_ExternalProject_SELF_DIR \"${_ExternalProject_SELF}\" PATH)\n\nfunction(_ep_parse_arguments f name ns args)\n  # Transfer the arguments to this function into target properties for the\n  # new custom target we just added so that we can set up all the build steps\n  # correctly based on target properties.\n  #\n  # We loop through ARGN and consider the namespace starting with an\n  # upper-case letter followed by at least two more upper-case letters,\n  # numbers or underscores to be keywords.\n\n  if(NOT DEFINED _ExternalProject_SELF)\n    message(FATAL_ERROR \"error: ExternalProject module must be explicitly included before using ${f} function\")\n  endif()\n\n  set(key)\n\n  foreach(arg IN LISTS args)\n    set(is_value 1)\n\n    if(arg MATCHES \"^[A-Z][A-Z0-9_][A-Z0-9_]+$\" AND\n        NOT ((\"x${arg}x\" STREQUAL \"x${key}x\") AND (\"x${key}x\" STREQUAL \"xCOMMANDx\")) AND\n        NOT arg MATCHES \"^(TRUE|FALSE)$\")\n      if(_ep_keywords_${f} AND arg MATCHES \"${_ep_keywords_${f}}\")\n        set(is_value 0)\n      endif()\n    endif()\n\n    if(is_value)\n      if(key)\n        # Value\n        if(NOT arg STREQUAL \"\")\n          set_property(TARGET ${name} APPEND PROPERTY ${ns}${key} \"${arg}\")\n        else()\n          get_property(have_key TARGET ${name} PROPERTY ${ns}${key} SET)\n          if(have_key)\n            get_property(value TARGET ${name} PROPERTY ${ns}${key})\n            set_property(TARGET ${name} PROPERTY ${ns}${key} \"${value};${arg}\")\n          else()\n            set_property(TARGET ${name} PROPERTY ${ns}${key} \"${arg}\")\n          endif()\n        endif()\n      else()\n        # Missing Keyword\n        message(AUTHOR_WARNING \"value '${arg}' with no previous keyword in ${f}\")\n      endif()\n    else()\n      set(key \"${arg}\")\n      if(key MATCHES GIT)\n       get_property(have_key TARGET ${name} PROPERTY ${ns}${key} SET)\n      endif()\n    endif()\n  endforeach()\nendfunction()\n\n\ndefine_property(DIRECTORY PROPERTY \"EP_BASE\" INHERITED\n  BRIEF_DOCS \"Base directory for External Project storage.\"\n  FULL_DOCS\n  \"See documentation of the ExternalProject_Add() function in the \"\n  \"ExternalProject module.\"\n  )\n\ndefine_property(DIRECTORY PROPERTY \"EP_PREFIX\" INHERITED\n  BRIEF_DOCS \"Top prefix for External Project storage.\"\n  FULL_DOCS\n  \"See documentation of the ExternalProject_Add() function in the \"\n  \"ExternalProject module.\"\n  )\n\ndefine_property(DIRECTORY PROPERTY \"EP_STEP_TARGETS\" INHERITED\n  BRIEF_DOCS\n  \"List of ExternalProject steps that automatically get corresponding targets\"\n  FULL_DOCS\n  \"These targets will be dependent on the main target dependencies. \"\n  \"See documentation of the ExternalProject_Add_StepTargets() function in the \"\n  \"ExternalProject module.\"\n  )\n\ndefine_property(DIRECTORY PROPERTY \"EP_INDEPENDENT_STEP_TARGETS\" INHERITED\n  BRIEF_DOCS\n  \"List of ExternalProject steps that automatically get corresponding targets\"\n  FULL_DOCS\n  \"These targets will not be dependent on the main target dependencies. \"\n  \"See documentation of the ExternalProject_Add_StepTargets() function in the \"\n  \"ExternalProject module.\"\n  )\n\ndefine_property(DIRECTORY PROPERTY \"EP_UPDATE_DISCONNECTED\" INHERITED\n  BRIEF_DOCS \"Never update automatically from the remote repo.\"\n  FULL_DOCS\n  \"See documentation of the ExternalProject_Add() function in the \"\n  \"ExternalProject module.\"\n  )\n\nfunction(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git_repository git_tag git_remote_name init_submodules git_submodules git_shallow git_progress git_config src_name work_dir gitclone_infofile gitclone_stampfile tls_verify)\n  if(NOT GIT_VERSION_STRING VERSION_LESS 1.8.5)\n    # Use `git checkout <tree-ish> --` to avoid ambiguity with a local path.\n    set(git_checkout_explicit-- \"--\")\n  else()\n    # Use `git checkout <branch>` even though this risks ambiguity with a\n    # local path.  Unfortunately we cannot use `git checkout <tree-ish> --`\n    # because that will not search for remote branch names, a common use case.\n    set(git_checkout_explicit-- \"\")\n  endif()\n  if(\"${git_tag}\" STREQUAL \"\")\n    message(FATAL_ERROR \"Tag for git checkout should not be empty.\")\n  endif()\n\n  set(git_clone_options \"--no-checkout\")\n  if(git_shallow)\n    if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.10)\n      list(APPEND git_clone_options \"--depth 1 --no-single-branch\")\n    else()\n      list(APPEND git_clone_options \"--depth 1\")\n    endif()\n  endif()\n  if(git_progress)\n    list(APPEND git_clone_options --progress)\n  endif()\n  foreach(config IN LISTS git_config)\n    list(APPEND git_clone_options --config ${config})\n  endforeach()\n  if(NOT ${git_remote_name} STREQUAL \"origin\")\n    list(APPEND git_clone_options --origin \\\"${git_remote_name}\\\")\n  endif()\n\n  string (REPLACE \";\" \" \" git_clone_options \"${git_clone_options}\")\n\n  set(git_options)\n  # disable cert checking if explicitly told not to do it\n  if(NOT \"x${tls_verify}\" STREQUAL \"x\" AND NOT tls_verify)\n    set(git_options\n      -c http.sslVerify=false)\n  endif()\n  string (REPLACE \";\" \" \" git_options \"${git_options}\")\n\n  file(WRITE ${script_filename}\n\"\nif(NOT \\\"${gitclone_infofile}\\\" IS_NEWER_THAN \\\"${gitclone_stampfile}\\\")\n  message(STATUS \\\"Avoiding repeated git clone, stamp file is up to date: '${gitclone_stampfile}'\\\")\n  return()\nendif()\n\nexecute_process(\n  COMMAND \\${CMAKE_COMMAND} -E remove_directory \\\"${source_dir}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to remove directory: '${source_dir}'\\\")\nendif()\n\n# try the clone 3 times in case there is an odd git clone issue\nset(error_code 1)\nset(number_of_tries 0)\nwhile(error_code AND number_of_tries LESS 3)\n  execute_process(\n    COMMAND \\\"${git_EXECUTABLE}\\\" ${git_options} clone ${git_clone_options} \\\"${git_repository}\\\" \\\"${src_name}\\\"\n    WORKING_DIRECTORY \\\"${work_dir}\\\"\n    RESULT_VARIABLE error_code\n    )\n  math(EXPR number_of_tries \\\"\\${number_of_tries} + 1\\\")\nendwhile()\nif(number_of_tries GREATER 1)\n  message(STATUS \\\"Had to git clone more than once:\n          \\${number_of_tries} times.\\\")\nendif()\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to clone repository: '${git_repository}'\\\")\nendif()\n\nexecute_process(\n  COMMAND \\\"${git_EXECUTABLE}\\\" ${git_options} checkout ${git_tag} ${git_checkout_explicit--}\n  WORKING_DIRECTORY \\\"${work_dir}/${src_name}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to checkout tag: '${git_tag}'\\\")\nendif()\n\nset(init_submodules ${init_submodules})\nif(init_submodules)\n  execute_process(\n    COMMAND \\\"${git_EXECUTABLE}\\\" ${git_options} submodule update --recursive --init ${git_submodules}\n    WORKING_DIRECTORY \\\"${work_dir}/${src_name}\\\"\n    RESULT_VARIABLE error_code\n    )\nendif()\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to update submodules in: '${work_dir}/${src_name}'\\\")\nendif()\n\n# Complete success, update the script-last-run stamp file:\n#\nexecute_process(\n  COMMAND \\${CMAKE_COMMAND} -E copy\n    \\\"${gitclone_infofile}\\\"\n    \\\"${gitclone_stampfile}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to copy script-last-run stamp file: '${gitclone_stampfile}'\\\")\nendif()\n\n\"\n)\n\nendfunction()\n\nfunction(_ep_write_hgclone_script script_filename source_dir hg_EXECUTABLE hg_repository hg_tag src_name work_dir hgclone_infofile hgclone_stampfile)\n  if(\"${hg_tag}\" STREQUAL \"\")\n    message(FATAL_ERROR \"Tag for hg checkout should not be empty.\")\n  endif()\n  file(WRITE ${script_filename}\n\"\nif(NOT \\\"${hgclone_infofile}\\\" IS_NEWER_THAN \\\"${hgclone_stampfile}\\\")\n  message(STATUS \\\"Avoiding repeated hg clone, stamp file is up to date: '${hgclone_stampfile}'\\\")\n  return()\nendif()\n\nexecute_process(\n  COMMAND \\${CMAKE_COMMAND} -E remove_directory \\\"${source_dir}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to remove directory: '${source_dir}'\\\")\nendif()\n\nexecute_process(\n  COMMAND \\\"${hg_EXECUTABLE}\\\" clone -U \\\"${hg_repository}\\\" \\\"${src_name}\\\"\n  WORKING_DIRECTORY \\\"${work_dir}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to clone repository: '${hg_repository}'\\\")\nendif()\n\nexecute_process(\n  COMMAND \\\"${hg_EXECUTABLE}\\\" update ${hg_tag}\n  WORKING_DIRECTORY \\\"${work_dir}/${src_name}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to checkout tag: '${hg_tag}'\\\")\nendif()\n\n# Complete success, update the script-last-run stamp file:\n#\nexecute_process(\n  COMMAND \\${CMAKE_COMMAND} -E copy\n    \\\"${hgclone_infofile}\\\"\n    \\\"${hgclone_stampfile}\\\"\n  RESULT_VARIABLE error_code\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to copy script-last-run stamp file: '${hgclone_stampfile}'\\\")\nendif()\n\n\"\n)\n\nendfunction()\n\n\nfunction(_ep_write_gitupdate_script script_filename git_EXECUTABLE git_tag git_remote_name init_submodules git_submodules git_repository work_dir)\n  if(\"${git_tag}\" STREQUAL \"\")\n    message(FATAL_ERROR \"Tag for git checkout should not be empty.\")\n  endif()\n  if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.6)\n    set(git_stash_save_options --all --quiet)\n  else()\n    set(git_stash_save_options --quiet)\n  endif()\n  file(WRITE ${script_filename}\n\"\nexecute_process(\n  COMMAND \\\"${git_EXECUTABLE}\\\" rev-list --max-count=1 HEAD\n  WORKING_DIRECTORY \\\"${work_dir}\\\"\n  RESULT_VARIABLE error_code\n  OUTPUT_VARIABLE head_sha\n  OUTPUT_STRIP_TRAILING_WHITESPACE\n  )\nif(error_code)\n  message(FATAL_ERROR \\\"Failed to get the hash for HEAD\\\")\nendif()\n\nexecute_process(\n  COMMAND \\\"${git_EXECUTABLE}\\\" show-ref ${git_tag}\n  WORKING_DIRECTORY \\\"${work_dir}\\\"\n  OUTPUT_VARIABLE show_ref_output\n  )\n# If a remote ref is asked for, which can possibly move around,\n# we must always do a fetch and checkout.\nif(\\\"\\${show_ref_output}\\\" MATCHES \\\"remotes\\\")\n  set(is_remote_ref 1)\nelse()\n  set(is_remote_ref 0)\nendif()\n\n# Tag is in the form <remote>/<tag> (i.e. origin/master) we must strip\n# the remote from the tag.\nif(\\\"\\${show_ref_output}\\\" MATCHES \\\"refs/remotes/${git_tag}\\\")\n  string(REGEX MATCH \\\"^([^/]+)/(.+)$\\\" _unused \\\"${git_tag}\\\")\n  set(git_remote \\\"\\${CMAKE_MATCH_1}\\\")\n  set(git_tag \\\"\\${CMAKE_MATCH_2}\\\")\nelse()\n  set(git_remote \\\"${git_remote_name}\\\")\n  set(git_tag \\\"${git_tag}\\\")\nendif()\n\n# This will fail if the tag does not exist (it probably has not been fetched\n# yet).\nexecute_process(\n  COMMAND \\\"${git_EXECUTABLE}\\\" rev-list --max-count=1 ${git_tag}\n  WORKING_DIRECTORY \\\"${work_dir}\\\"\n  RESULT_VARIABLE error_code\n  OUTPUT_VARIABLE tag_sha\n  OUTPUT_STRIP_TRAILING_WHITESPACE\n  )\n\n# Is the hash checkout out that we want?\nif(error_code OR is_remote_ref OR NOT (\\\"\\${tag_sha}\\\" STREQUAL \\\"\\${head_sha}\\\"))\n  execute_process(\n    COMMAND \\\"${git_EXECUTABLE}\\\" fetch\n    WORKING_DIRECTORY \\\"${work_dir}\\\"\n    RESULT_VARIABLE error_code\n    )\n  if(error_code)\n    message(FATAL_ERROR \\\"Failed to fetch repository '${git_repository}'\\\")\n  endif()\n\n  if(is_remote_ref)\n    # Check if stash is needed\n    execute_process(\n      COMMAND \\\"${git_EXECUTABLE}\\\" status --porcelain\n      WORKING_DIRECTORY \\\"${work_dir}\\\"\n      RESULT_VARIABLE error_code\n      OUTPUT_VARIABLE repo_status\n      )\n    if(error_code)\n      message(FATAL_ERROR \\\"Failed to get the status\\\")\n    endif()\n    string(LENGTH \\\"\\${repo_status}\\\" need_stash)\n\n    # If not in clean state, stash changes in order to be able to be able to\n    # perform git pull --rebase\n    if(need_stash)\n      execute_process(\n        COMMAND \\\"${git_EXECUTABLE}\\\" stash save ${git_stash_save_options}\n        WORKING_DIRECTORY \\\"${work_dir}\\\"\n        RESULT_VARIABLE error_code\n        )\n      if(error_code)\n        message(FATAL_ERROR \\\"Failed to stash changes\\\")\n      endif()\n    endif()\n\n    # Pull changes from the remote branch\n    execute_process(\n      COMMAND \\\"${git_EXECUTABLE}\\\" rebase \\${git_remote}/\\${git_tag}\n      WORKING_DIRECTORY \\\"${work_dir}\\\"\n      RESULT_VARIABLE error_code\n      )\n    if(error_code)\n      # Rebase failed: Restore previous state.\n      execute_process(\n        COMMAND \\\"${git_EXECUTABLE}\\\" rebase --abort\n        WORKING_DIRECTORY \\\"${work_dir}\\\"\n      )\n      if(need_stash)\n        execute_process(\n          COMMAND \\\"${git_EXECUTABLE}\\\" stash pop --index --quiet\n          WORKING_DIRECTORY \\\"${work_dir}\\\"\n          )\n      endif()\n      message(FATAL_ERROR \\\"\\\\nFailed to rebase in: '${work_dir}/${src_name}'.\\\\nYou will have to resolve the conflicts manually\\\")\n    endif()\n\n    if(need_stash)\n      execute_process(\n        COMMAND \\\"${git_EXECUTABLE}\\\" stash pop --index --quiet\n        WORKING_DIRECTORY \\\"${work_dir}\\\"\n        RESULT_VARIABLE error_code\n        )\n      if(error_code)\n        # Stash pop --index failed: Try again dropping the index\n        execute_process(\n          COMMAND \\\"${git_EXECUTABLE}\\\" reset --hard --quiet\n          WORKING_DIRECTORY \\\"${work_dir}\\\"\n          RESULT_VARIABLE error_code\n          )\n        execute_process(\n          COMMAND \\\"${git_EXECUTABLE}\\\" stash pop --quiet\n          WORKING_DIRECTORY \\\"${work_dir}\\\"\n          RESULT_VARIABLE error_code\n          )\n        if(error_code)\n          # Stash pop failed: Restore previous state.\n          execute_process(\n            COMMAND \\\"${git_EXECUTABLE}\\\" reset --hard --quiet \\${head_sha}\n            WORKING_DIRECTORY \\\"${work_dir}\\\"\n          )\n          execute_process(\n            COMMAND \\\"${git_EXECUTABLE}\\\" stash pop --index --quiet\n            WORKING_DIRECTORY \\\"${work_dir}\\\"\n          )\n          message(FATAL_ERROR \\\"\\\\nFailed to unstash changes in: '${work_dir}/${src_name}'.\\\\nYou will have to resolve the conflicts manually\\\")\n        endif()\n      endif()\n    endif()\n  else()\n    execute_process(\n      COMMAND \\\"${git_EXECUTABLE}\\\" checkout ${git_tag}\n      WORKING_DIRECTORY \\\"${work_dir}\\\"\n      RESULT_VARIABLE error_code\n      )\n    if(error_code)\n      message(FATAL_ERROR \\\"Failed to checkout tag: '${git_tag}'\\\")\n    endif()\n  endif()\n\n  set(init_submodules ${init_submodules})\n  if(init_submodules)\n    execute_process(\n      COMMAND \\\"${git_EXECUTABLE}\\\" submodule update --recursive --init ${git_submodules}\n      WORKING_DIRECTORY \\\"${work_dir}/${src_name}\\\"\n      RESULT_VARIABLE error_code\n      )\n  endif()\n  if(error_code)\n    message(FATAL_ERROR \\\"Failed to update submodules in: '${work_dir}/${src_name}'\\\")\n  endif()\nendif()\n\n\"\n)\n\nendfunction(_ep_write_gitupdate_script)\n\nfunction(_ep_write_downloadfile_script script_filename REMOTE LOCAL timeout no_progress hash tls_verify tls_cainfo userpwd http_headers netrc netrc_file)\n  if(timeout)\n    set(TIMEOUT_ARGS TIMEOUT ${timeout})\n    set(TIMEOUT_MSG \"${timeout} seconds\")\n  else()\n    set(TIMEOUT_ARGS \"# no TIMEOUT\")\n    set(TIMEOUT_MSG \"none\")\n  endif()\n\n  if(no_progress)\n    set(SHOW_PROGRESS \"\")\n  else()\n    set(SHOW_PROGRESS \"SHOW_PROGRESS\")\n  endif()\n\n  if(\"${hash}\" MATCHES \"${_ep_hash_regex}\")\n    set(ALGO \"${CMAKE_MATCH_1}\")\n    string(TOLOWER \"${CMAKE_MATCH_2}\" EXPECT_VALUE)\n  else()\n    set(ALGO \"\")\n    set(EXPECT_VALUE \"\")\n  endif()\n\n  set(TLS_VERIFY_CODE \"\")\n  set(TLS_CAINFO_CODE \"\")\n  set(NETRC_CODE \"\")\n  set(NETRC_FILE_CODE \"\")\n\n  # check for curl globals in the project\n  if(DEFINED CMAKE_TLS_VERIFY)\n    set(TLS_VERIFY_CODE \"set(CMAKE_TLS_VERIFY ${CMAKE_TLS_VERIFY})\")\n  endif()\n  if(DEFINED CMAKE_TLS_CAINFO)\n    set(TLS_CAINFO_CODE \"set(CMAKE_TLS_CAINFO \\\"${CMAKE_TLS_CAINFO}\\\")\")\n  endif()\n  if(DEFINED CMAKE_NETRC)\n    set(NETRC_CODE \"set(CMAKE_NETRC \\\"${CMAKE_NETRC}\\\")\")\n  endif()\n  if(DEFINED CMAKE_NETRC_FILE)\n    set(NETRC_FILE_CODE \"set(CMAKE_NETRC_FILE \\\"${CMAKE_NETRC_FILE}\\\")\")\n  endif()\n\n  # now check for curl locals so that the local values\n  # will override the globals\n\n  # check for tls_verify argument\n  string(LENGTH \"${tls_verify}\" tls_verify_len)\n  if(tls_verify_len GREATER 0)\n    set(TLS_VERIFY_CODE \"set(CMAKE_TLS_VERIFY ${tls_verify})\")\n  endif()\n  # check for tls_cainfo argument\n  string(LENGTH \"${tls_cainfo}\" tls_cainfo_len)\n  if(tls_cainfo_len GREATER 0)\n    set(TLS_CAINFO_CODE \"set(CMAKE_TLS_CAINFO \\\"${tls_cainfo}\\\")\")\n  endif()\n  # check for netrc argument\n  string(LENGTH \"${netrc}\" netrc_len)\n  if(netrc_len GREATER 0)\n    set(NETRC_CODE \"set(CMAKE_NETRC \\\"${netrc}\\\")\")\n  endif()\n  # check for netrc_file argument\n  string(LENGTH \"${netrc_file}\" netrc_file_len)\n  if(netrc_file_len GREATER 0)\n    set(NETRC_FILE_CODE \"set(CMAKE_NETRC_FILE \\\"${netrc_file}\\\")\")\n  endif()\n\n  if(userpwd STREQUAL \":\")\n    set(USERPWD_ARGS)\n  else()\n    set(USERPWD_ARGS USERPWD \"${userpwd}\")\n  endif()\n\n  set(HTTP_HEADERS_ARGS \"\")\n  if(NOT http_headers STREQUAL \"\")\n    foreach(header ${http_headers})\n      set(\n          HTTP_HEADERS_ARGS\n          \"HTTPHEADER \\\"${header}\\\"\\n        ${HTTP_HEADERS_ARGS}\"\n      )\n    endforeach()\n  endif()\n\n  # Used variables:\n  # * TLS_VERIFY_CODE\n  # * TLS_CAINFO_CODE\n  # * ALGO\n  # * EXPECT_VALUE\n  # * REMOTE\n  # * LOCAL\n  # * SHOW_PROGRESS\n  # * TIMEOUT_ARGS\n  # * TIMEOUT_MSG\n  # * USERPWD_ARGS\n  # * HTTP_HEADERS_ARGS\n  configure_file(\n      \"${_ExternalProject_SELF_DIR}/ExternalProject-download.cmake.in\"\n      \"${script_filename}\"\n      @ONLY\n  )\nendfunction()\n\nfunction(_ep_write_verifyfile_script script_filename LOCAL hash)\n  if(\"${hash}\" MATCHES \"${_ep_hash_regex}\")\n    set(ALGO \"${CMAKE_MATCH_1}\")\n    string(TOLOWER \"${CMAKE_MATCH_2}\" EXPECT_VALUE)\n  else()\n    set(ALGO \"\")\n    set(EXPECT_VALUE \"\")\n  endif()\n\n  # Used variables:\n  # * ALGO\n  # * EXPECT_VALUE\n  # * LOCAL\n  configure_file(\n      \"${_ExternalProject_SELF_DIR}/ExternalProject-verify.cmake.in\"\n      \"${script_filename}\"\n      @ONLY\n  )\nendfunction()\n\n\nfunction(_ep_write_extractfile_script script_filename name filename directory)\n  set(args \"\")\n\n  if(filename MATCHES \"(\\\\.|=)(7z|tar\\\\.bz2|tar\\\\.gz|tar\\\\.xz|tbz2|tgz|txz|zip)$\")\n    set(args xfz)\n  endif()\n\n  if(filename MATCHES \"(\\\\.|=)tar$\")\n    set(args xf)\n  endif()\n\n  if(args STREQUAL \"\")\n    message(SEND_ERROR \"error: do not know how to extract '${filename}' -- known types are .7z, .tar, .tar.bz2, .tar.gz, .tar.xz, .tbz2, .tgz, .txz and .zip\")\n    return()\n  endif()\n\n  file(WRITE ${script_filename}\n\"# Make file names absolute:\n#\nget_filename_component(filename \\\"${filename}\\\" ABSOLUTE)\nget_filename_component(directory \\\"${directory}\\\" ABSOLUTE)\n\nmessage(STATUS \\\"extracting...\n     src='\\${filename}'\n     dst='\\${directory}'\\\")\n\nif(NOT EXISTS \\\"\\${filename}\\\")\n  message(FATAL_ERROR \\\"error: file to extract does not exist: '\\${filename}'\\\")\nendif()\n\n# Prepare a space for extracting:\n#\nset(i 1234)\nwhile(EXISTS \\\"\\${directory}/../ex-${name}\\${i}\\\")\n  math(EXPR i \\\"\\${i} + 1\\\")\nendwhile()\nset(ut_dir \\\"\\${directory}/../ex-${name}\\${i}\\\")\nfile(MAKE_DIRECTORY \\\"\\${ut_dir}\\\")\n\n# Extract it:\n#\nmessage(STATUS \\\"extracting... [tar ${args}]\\\")\nexecute_process(COMMAND \\${CMAKE_COMMAND} -E tar ${args} \\${filename}\n  WORKING_DIRECTORY \\${ut_dir}\n  RESULT_VARIABLE rv)\n\nif(NOT rv EQUAL 0)\n  message(STATUS \\\"extracting... [error clean up]\\\")\n  file(REMOVE_RECURSE \\\"\\${ut_dir}\\\")\n  message(FATAL_ERROR \\\"error: extract of '\\${filename}' failed\\\")\nendif()\n\n# Analyze what came out of the tar file:\n#\nmessage(STATUS \\\"extracting... [analysis]\\\")\nfile(GLOB contents \\\"\\${ut_dir}/*\\\")\nlist(REMOVE_ITEM contents \\\"\\${ut_dir}/.DS_Store\\\")\nlist(LENGTH contents n)\nif(NOT n EQUAL 1 OR NOT IS_DIRECTORY \\\"\\${contents}\\\")\n  set(contents \\\"\\${ut_dir}\\\")\nendif()\n\n# Move \\\"the one\\\" directory to the final directory:\n#\nmessage(STATUS \\\"extracting... [rename]\\\")\nfile(REMOVE_RECURSE \\${directory})\nget_filename_component(contents \\${contents} ABSOLUTE)\nfile(RENAME \\${contents} \\${directory})\n\n# Clean up:\n#\nmessage(STATUS \\\"extracting... [clean up]\\\")\nfile(REMOVE_RECURSE \\\"\\${ut_dir}\\\")\n\nmessage(STATUS \\\"extracting... done\\\")\n\"\n)\n\nendfunction()\n\n\nfunction(_ep_set_directories name)\n  get_property(prefix TARGET ${name} PROPERTY _EP_PREFIX)\n  if(NOT prefix)\n    get_property(prefix DIRECTORY PROPERTY EP_PREFIX)\n    if(NOT prefix)\n      get_property(base DIRECTORY PROPERTY EP_BASE)\n      if(NOT base)\n        set(prefix \"${name}-prefix\")\n      endif()\n    endif()\n  endif()\n  if(prefix)\n    set(tmp_default \"${prefix}/tmp\")\n    set(download_default \"${prefix}/src\")\n    set(source_default \"${prefix}/src/${name}\")\n    set(binary_default \"${prefix}/src/${name}-build\")\n    set(stamp_default \"${prefix}/src/${name}-stamp\")\n    set(install_default \"${prefix}\")\n  else()\n    set(tmp_default \"${base}/tmp/${name}\")\n    set(download_default \"${base}/Download/${name}\")\n    set(source_default \"${base}/Source/${name}\")\n    set(binary_default \"${base}/Build/${name}\")\n    set(stamp_default \"${base}/Stamp/${name}\")\n    set(install_default \"${base}/Install/${name}\")\n  endif()\n  get_property(build_in_source TARGET ${name} PROPERTY _EP_BUILD_IN_SOURCE)\n  if(build_in_source)\n    get_property(have_binary_dir TARGET ${name} PROPERTY _EP_BINARY_DIR SET)\n    if(have_binary_dir)\n      message(FATAL_ERROR\n        \"External project ${name} has both BINARY_DIR and BUILD_IN_SOURCE!\")\n    endif()\n  endif()\n  set(top \"${CMAKE_CURRENT_BINARY_DIR}\")\n\n  # Apply defaults and convert to absolute paths.\n  set(places stamp download source binary install tmp)\n  foreach(var ${places})\n    string(TOUPPER \"${var}\" VAR)\n    get_property(${var}_dir TARGET ${name} PROPERTY _EP_${VAR}_DIR)\n    if(NOT ${var}_dir)\n      set(${var}_dir \"${${var}_default}\")\n    endif()\n    if(NOT IS_ABSOLUTE \"${${var}_dir}\")\n      get_filename_component(${var}_dir \"${top}/${${var}_dir}\" ABSOLUTE)\n    endif()\n    set_property(TARGET ${name} PROPERTY _EP_${VAR}_DIR \"${${var}_dir}\")\n  endforeach()\n\n  # Special case for default log directory based on stamp directory.\n  get_property(log_dir TARGET ${name} PROPERTY _EP_LOG_DIR)\n  if(NOT log_dir)\n    get_property(log_dir TARGET ${name} PROPERTY _EP_STAMP_DIR)\n  endif()\n  if(NOT IS_ABSOLUTE \"${log_dir}\")\n    get_filename_component(log_dir \"${top}/${log_dir}\" ABSOLUTE)\n  endif()\n  set_property(TARGET ${name} PROPERTY _EP_LOG_DIR \"${log_dir}\")\n\n  get_property(source_subdir TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR)\n  if(NOT source_subdir)\n    set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR \"\")\n  elseif(IS_ABSOLUTE \"${source_subdir}\")\n    message(FATAL_ERROR\n      \"External project ${name} has non-relative SOURCE_SUBDIR!\")\n  else()\n    # Prefix with a slash so that when appended to the source directory, it\n    # behaves as expected.\n    set_property(TARGET ${name} PROPERTY _EP_SOURCE_SUBDIR \"/${source_subdir}\")\n  endif()\n  if(build_in_source)\n    get_property(source_dir TARGET ${name} PROPERTY _EP_SOURCE_DIR)\n    if(source_subdir)\n      set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR \"${source_dir}/${source_subdir}\")\n    else()\n      set_property(TARGET ${name} PROPERTY _EP_BINARY_DIR \"${source_dir}\")\n    endif()\n  endif()\n\n  # Make the directories at CMake configure time *and* add a custom command\n  # to make them at build time. They need to exist at makefile generation\n  # time for Borland make and wmake so that CMake may generate makefiles\n  # with \"cd C:\\short\\paths\\with\\no\\spaces\" commands in them.\n  #\n  # Additionally, the add_custom_command is still used in case somebody\n  # removes one of the necessary directories and tries to rebuild without\n  # re-running cmake.\n  foreach(var ${places})\n    string(TOUPPER \"${var}\" VAR)\n    get_property(dir TARGET ${name} PROPERTY _EP_${VAR}_DIR)\n    file(MAKE_DIRECTORY \"${dir}\")\n    if(NOT EXISTS \"${dir}\")\n      message(FATAL_ERROR \"dir '${dir}' does not exist after file(MAKE_DIRECTORY)\")\n    endif()\n  endforeach()\nendfunction()\n\n\n# IMPORTANT: this MUST be a macro and not a function because of the\n# in-place replacements that occur in each ${var}\n#\nmacro(_ep_replace_location_tags target_name)\n  set(vars ${ARGN})\n  foreach(var ${vars})\n    if(${var})\n      foreach(dir SOURCE_DIR SOURCE_SUBDIR BINARY_DIR INSTALL_DIR TMP_DIR DOWNLOAD_DIR DOWNLOADED_FILE LOG_DIR)\n        get_property(val TARGET ${target_name} PROPERTY _EP_${dir})\n        string(REPLACE \"<${dir}>\" \"${val}\" ${var} \"${${var}}\")\n      endforeach()\n    endif()\n  endforeach()\nendmacro()\n\n\nfunction(_ep_command_line_to_initial_cache var args force)\n  set(script_initial_cache \"\")\n  set(regex \"^([^:]+):([^=]+)=(.*)$\")\n  set(setArg \"\")\n  set(forceArg \"\")\n  if(force)\n    set(forceArg \"FORCE\")\n  endif()\n  foreach(line ${args})\n    if(\"${line}\" MATCHES \"^-D(.*)\")\n      set(line \"${CMAKE_MATCH_1}\")\n      if(NOT \"${setArg}\" STREQUAL \"\")\n        # This is required to build up lists in variables, or complete an entry\n        string(APPEND setArg \"${accumulator}\\\" CACHE ${type} \\\"Initial cache\\\" ${forceArg})\")\n        string(APPEND script_initial_cache \"\\n${setArg}\")\n        set(accumulator \"\")\n        set(setArg \"\")\n      endif()\n      if(\"${line}\" MATCHES \"${regex}\")\n        set(name \"${CMAKE_MATCH_1}\")\n        set(type \"${CMAKE_MATCH_2}\")\n        set(value \"${CMAKE_MATCH_3}\")\n        set(setArg \"set(${name} \\\"${value}\")\n      else()\n        message(WARNING \"Line '${line}' does not match regex. Ignoring.\")\n      endif()\n    else()\n      # Assume this is a list to append to the last var\n      string(APPEND accumulator \";${line}\")\n    endif()\n  endforeach()\n  # Catch the final line of the args\n  if(NOT \"${setArg}\" STREQUAL \"\")\n    string(APPEND setArg \"${accumulator}\\\" CACHE ${type} \\\"Initial cache\\\" ${forceArg})\")\n    string(APPEND script_initial_cache \"\\n${setArg}\")\n  endif()\n  set(${var} ${script_initial_cache} PARENT_SCOPE)\nendfunction()\n\n\nfunction(_ep_write_initial_cache target_name script_filename script_initial_cache)\n  # Write out values into an initial cache, that will be passed to CMake with -C\n  # Replace location tags.\n  _ep_replace_location_tags(${target_name} script_initial_cache)\n  _ep_replace_location_tags(${target_name} script_filename)\n  # Write out the initial cache file to the location specified.\n  file(GENERATE OUTPUT \"${script_filename}\" CONTENT \"${script_initial_cache}\")\nendfunction()\n\n\nfunction(ExternalProject_Get_Property name)\n  foreach(var ${ARGN})\n    string(TOUPPER \"${var}\" VAR)\n    get_property(is_set TARGET ${name} PROPERTY _EP_${VAR} SET)\n    if(NOT is_set)\n      message(FATAL_ERROR \"External project \\\"${name}\\\" has no ${var}\")\n    endif()\n    get_property(${var} TARGET ${name} PROPERTY _EP_${VAR})\n    set(${var} \"${${var}}\" PARENT_SCOPE)\n  endforeach()\nendfunction()\n\n\nfunction(_ep_get_configure_command_id name cfg_cmd_id_var)\n  get_target_property(cmd ${name} _EP_CONFIGURE_COMMAND)\n\n  if(cmd STREQUAL \"\")\n    # Explicit empty string means no configure step for this project\n    set(${cfg_cmd_id_var} \"none\" PARENT_SCOPE)\n  else()\n    if(NOT cmd)\n      # Default is \"use cmake\":\n      set(${cfg_cmd_id_var} \"cmake\" PARENT_SCOPE)\n    else()\n      # Otherwise we have to analyze the value:\n      if(cmd MATCHES \"^[^;]*/configure\")\n        set(${cfg_cmd_id_var} \"configure\" PARENT_SCOPE)\n      elseif(cmd MATCHES \"^[^;]*/cmake\" AND NOT cmd MATCHES \";-[PE];\")\n        set(${cfg_cmd_id_var} \"cmake\" PARENT_SCOPE)\n      elseif(cmd MATCHES \"config\")\n        set(${cfg_cmd_id_var} \"configure\" PARENT_SCOPE)\n      else()\n        set(${cfg_cmd_id_var} \"unknown:${cmd}\" PARENT_SCOPE)\n      endif()\n    endif()\n  endif()\nendfunction()\n\n\nfunction(_ep_get_build_command name step cmd_var)\n  set(cmd \"\")\n  set(args)\n  _ep_get_configure_command_id(${name} cfg_cmd_id)\n  if(cfg_cmd_id STREQUAL \"cmake\")\n    # CMake project.  Select build command based on generator.\n    get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)\n    if(\"${CMAKE_GENERATOR}\" MATCHES \"Make\" AND\n       (\"${cmake_generator}\" MATCHES \"Make\" OR NOT cmake_generator))\n      # The project uses the same Makefile generator.  Use recursive make.\n      set(cmd \"$(MAKE)\")\n      if(step STREQUAL \"INSTALL\")\n        set(args install)\n      endif()\n      if(\"x${step}x\" STREQUAL \"xTESTx\")\n        set(args test)\n      endif()\n    else()\n      # Drive the project with \"cmake --build\".\n      get_target_property(cmake_command ${name} _EP_CMAKE_COMMAND)\n      if(cmake_command)\n        set(cmd \"${cmake_command}\")\n      else()\n        set(cmd \"${CMAKE_COMMAND}\")\n      endif()\n      set(args --build \".\")\n      get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\n      if(_isMultiConfig)\n        if (CMAKE_CFG_INTDIR AND\n            NOT CMAKE_CFG_INTDIR STREQUAL \".\" AND\n            NOT CMAKE_CFG_INTDIR MATCHES \"\\\\$\")\n          # CMake 3.4 and below used the CMAKE_CFG_INTDIR placeholder value\n          # provided by multi-configuration generators.  Some projects were\n          # taking advantage of that undocumented implementation detail to\n          # specify a specific configuration here.  They should use\n          # BUILD_COMMAND to change the default command instead, but for\n          # compatibility honor the value.\n          set(config ${CMAKE_CFG_INTDIR})\n          message(AUTHOR_WARNING \"CMAKE_CFG_INTDIR should not be set by project code.\\n\"\n            \"To get a non-default build command, use the BUILD_COMMAND option.\")\n        else()\n          set(config $<CONFIG>)\n        endif()\n        list(APPEND args --config ${config})\n      endif()\n      if(step STREQUAL \"INSTALL\")\n        list(APPEND args --target install)\n      endif()\n      # But for \"TEST\" drive the project with corresponding \"ctest\".\n      if(\"x${step}x\" STREQUAL \"xTESTx\")\n        string(REGEX REPLACE \"^(.*/)cmake([^/]*)$\" \"\\\\1ctest\\\\2\" cmd \"${cmd}\")\n        set(args \"\")\n        if(_isMultiConfig)\n          list(APPEND args -C ${config})\n        endif()\n      endif()\n    endif()\n  else()\n    # Non-CMake project.  Guess \"make\" and \"make install\" and \"make test\".\n    if(\"${CMAKE_GENERATOR}\" MATCHES \"Makefiles\")\n      # Try to get the parallel arguments\n      set(cmd \"$(MAKE)\")\n    else()\n      set(cmd \"make\")\n    endif()\n    if(step STREQUAL \"INSTALL\")\n      set(args install)\n    endif()\n    if(\"x${step}x\" STREQUAL \"xTESTx\")\n      set(args test)\n    endif()\n  endif()\n\n  # Use user-specified arguments instead of default arguments, if any.\n  get_property(have_args TARGET ${name} PROPERTY _EP_${step}_ARGS SET)\n  if(have_args)\n    get_target_property(args ${name} _EP_${step}_ARGS)\n  endif()\n\n  list(APPEND cmd ${args})\n  set(${cmd_var} \"${cmd}\" PARENT_SCOPE)\nendfunction()\n\nfunction(_ep_write_log_script name step cmd_var)\n  ExternalProject_Get_Property(${name} log_dir)\n  ExternalProject_Get_Property(${name} stamp_dir)\n  set(command \"${${cmd_var}}\")\n\n  set(make \"\")\n  set(code_cygpath_make \"\")\n  if(command MATCHES \"^\\\\$\\\\(MAKE\\\\)\")\n    # GNU make recognizes the string \"$(MAKE)\" as recursive make, so\n    # ensure that it appears directly in the makefile.\n    string(REGEX REPLACE \"^\\\\$\\\\(MAKE\\\\)\" \"\\${make}\" command \"${command}\")\n    set(make \"-Dmake=$(MAKE)\")\n\n    if(WIN32 AND NOT CYGWIN)\n      set(code_cygpath_make \"\nif(\\${make} MATCHES \\\"^/\\\")\n  execute_process(\n    COMMAND cygpath -w \\${make}\n    OUTPUT_VARIABLE cygpath_make\n    ERROR_VARIABLE cygpath_make\n    RESULT_VARIABLE cygpath_error\n    OUTPUT_STRIP_TRAILING_WHITESPACE\n  )\n  if(NOT cygpath_error)\n    set(make \\${cygpath_make})\n  endif()\nendif()\n\")\n    endif()\n  endif()\n\n  set(config \"\")\n  if(\"${CMAKE_CFG_INTDIR}\" MATCHES \"^\\\\$\")\n    string(REPLACE \"${CMAKE_CFG_INTDIR}\" \"\\${config}\" command \"${command}\")\n    set(config \"-Dconfig=${CMAKE_CFG_INTDIR}\")\n  endif()\n\n  # Wrap multiple 'COMMAND' lines up into a second-level wrapper\n  # script so all output can be sent to one log file.\n  if(command MATCHES \"(^|;)COMMAND;\")\n    set(code_execute_process \"\n${code_cygpath_make}\nexecute_process(COMMAND \\${command} RESULT_VARIABLE result)\nif(result)\n  set(msg \\\"Command failed (\\${result}):\\\\n\\\")\n  foreach(arg IN LISTS command)\n    set(msg \\\"\\${msg} '\\${arg}'\\\")\n  endforeach()\n  message(FATAL_ERROR \\\"\\${msg}\\\")\nendif()\n\")\n    set(code \"\")\n    set(cmd \"\")\n    set(sep \"\")\n    foreach(arg IN LISTS command)\n      if(\"x${arg}\" STREQUAL \"xCOMMAND\")\n        if(NOT \"x${cmd}\" STREQUAL \"x\")\n          string(APPEND code \"set(command \\\"${cmd}\\\")${code_execute_process}\")\n        endif()\n        set(cmd \"\")\n        set(sep \"\")\n      else()\n        string(APPEND cmd \"${sep}${arg}\")\n        set(sep \";\")\n      endif()\n    endforeach()\n    string(APPEND code \"set(command \\\"${cmd}\\\")${code_execute_process}\")\n    file(GENERATE OUTPUT \"${stamp_dir}/${name}-${step}-$<CONFIG>-impl.cmake\" CONTENT \"${code}\")\n    set(command ${CMAKE_COMMAND} \"-Dmake=\\${make}\" \"-Dconfig=\\${config}\" -P ${stamp_dir}/${name}-${step}-$<CONFIG>-impl.cmake)\n  endif()\n\n  # Wrap the command in a script to log output to files.\n  set(script ${stamp_dir}/${name}-${step}-$<CONFIG>.cmake)\n  set(logbase ${log_dir}/${name}-${step})\n  get_property(log_merged TARGET ${name} PROPERTY _EP_LOG_MERGED_STDOUTERR)\n  get_property(log_output_on_failure TARGET ${name} PROPERTY _EP_LOG_OUTPUT_ON_FAILURE)\n  if (log_merged)\n    set(stdout_log \"${logbase}.log\")\n    set(stderr_log \"${logbase}.log\")\n  else()\n    set(stdout_log \"${logbase}-out.log\")\n    set(stderr_log \"${logbase}-err.log\")\n  endif()\n  set(code \"\ncmake_minimum_required(VERSION 3.15)\n${code_cygpath_make}\nset(command \\\"${command}\\\")\nset(log_merged \\\"${log_merged}\\\")\nset(log_output_on_failure \\\"${log_output_on_failure}\\\")\nset(stdout_log \\\"${stdout_log}\\\")\nset(stderr_log \\\"${stderr_log}\\\")\nexecute_process(\n  COMMAND \\${command}\n  RESULT_VARIABLE result\n  OUTPUT_FILE \\\"\\${stdout_log}\\\"\n  ERROR_FILE \\\"\\${stderr_log}\\\"\n  )\nmacro(read_up_to_max_size log_file output_var)\n  file(SIZE \\${log_file} determined_size)\n  set(max_size 10240)\n  if (determined_size GREATER max_size)\n    math(EXPR seek_position \\\"\\${determined_size} - \\${max_size}\\\")\n    file(READ \\${log_file} \\${output_var} OFFSET \\${seek_position})\n    set(\\${output_var} \\\"...skipping to end...\\\\n\\${\\${output_var}}\\\")\n  else()\n    file(READ \\${log_file} \\${output_var})\n  endif()\nendmacro()\nif(result)\n  set(msg \\\"Command failed: \\${result}\\\\n\\\")\n  foreach(arg IN LISTS command)\n    set(msg \\\"\\${msg} '\\${arg}'\\\")\n  endforeach()\n  if (\\${log_merged})\n    set(msg \\\"\\${msg}\\\\nSee also\\\\n  \\${stderr_log}\\\")\n  else()\n    set(msg \\\"\\${msg}\\\\nSee also\\\\n  ${logbase}-*.log\\\")\n  endif()\n  if (\\${log_output_on_failure})\n    message(SEND_ERROR \\\"\\${msg}\\\")\n    if (\\${log_merged})\n      read_up_to_max_size(\\\"\\${stderr_log}\\\" error_log_contents)\n      message(STATUS \\\"Log output is:\\\\n\\${error_log_contents}\\\")\n    else()\n      read_up_to_max_size(\\\"\\${stdout_log}\\\" out_log_contents)\n      read_up_to_max_size(\\\"\\${stderr_log}\\\" err_log_contents)\n      message(STATUS \\\"stdout output is:\\\\n\\${out_log_contents}\\\")\n      message(STATUS \\\"stderr output is:\\\\n\\${err_log_contents}\\\")\n    endif()\n    message(FATAL_ERROR \\\"Stopping after outputting logs.\\\")\n  else()\n    message(FATAL_ERROR \\\"\\${msg}\\\")\n  endif()\nelse()\n  set(msg \\\"${name} ${step} command succeeded.  See also ${logbase}-*.log\\\")\n  message(STATUS \\\"\\${msg}\\\")\nendif()\n\")\n  file(GENERATE OUTPUT \"${script}\" CONTENT \"${code}\")\n  set(command ${CMAKE_COMMAND} ${make} ${config} -P ${script})\n  set(${cmd_var} \"${command}\" PARENT_SCOPE)\nendfunction()\n\n# This module used to use \"/${CMAKE_CFG_INTDIR}\" directly and produced\n# makefiles with \"/./\" in paths for custom command dependencies. Which\n# resulted in problems with parallel make -j invocations.\n#\n# This function was added so that the suffix (search below for ${cfgdir}) is\n# only set to \"/${CMAKE_CFG_INTDIR}\" when ${CMAKE_CFG_INTDIR} is not going to\n# be \".\" (multi-configuration build systems like Visual Studio and Xcode...)\n#\nfunction(_ep_get_configuration_subdir_suffix suffix_var)\n  set(suffix \"\")\n  get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\n  if(_isMultiConfig)\n    set(suffix \"/${CMAKE_CFG_INTDIR}\")\n  endif()\n  set(${suffix_var} \"${suffix}\" PARENT_SCOPE)\nendfunction()\n\n\nfunction(_ep_get_step_stampfile name step stampfile_var)\n  ExternalProject_Get_Property(${name} stamp_dir)\n\n  _ep_get_configuration_subdir_suffix(cfgdir)\n  set(stampfile \"${stamp_dir}${cfgdir}/${name}-${step}\")\n\n  set(${stampfile_var} \"${stampfile}\" PARENT_SCOPE)\nendfunction()\n\n\nfunction(_ep_get_complete_stampfile name stampfile_var)\n  set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)\n  _ep_get_configuration_subdir_suffix(cfgdir)\n  set(stampfile \"${cmf_dir}${cfgdir}/${name}-complete\")\n\n  set(${stampfile_var} ${stampfile} PARENT_SCOPE)\nendfunction()\n\n\nfunction(ExternalProject_Add_StepTargets name)\n  set(steps ${ARGN})\n  if(ARGC GREATER 1 AND \"${ARGV1}\" STREQUAL \"NO_DEPENDS\")\n    set(no_deps 1)\n    list(REMOVE_AT steps 0)\n  endif()\n  foreach(step ${steps})\n    if(no_deps  AND  \"${step}\" MATCHES \"^(configure|build|install|test)$\")\n      message(AUTHOR_WARNING \"Using NO_DEPENDS for \\\"${step}\\\" step  might break parallel builds\")\n    endif()\n    _ep_get_step_stampfile(${name} ${step} stamp_file)\n    add_custom_target(${name}-${step}\n      DEPENDS ${stamp_file})\n    set_property(TARGET ${name}-${step} PROPERTY _EP_IS_EXTERNAL_PROJECT_STEP 1)\n    set_property(TARGET ${name}-${step} PROPERTY LABELS ${name})\n    set_property(TARGET ${name}-${step} PROPERTY FOLDER \"ExternalProjectTargets/${name}\")\n\n    # Depend on other external projects (target-level).\n    if(NOT no_deps)\n      get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)\n      foreach(arg IN LISTS deps)\n        add_dependencies(${name}-${step} ${arg})\n      endforeach()\n    endif()\n  endforeach()\nendfunction()\n\n\nfunction(ExternalProject_Add_Step name step)\n  _ep_get_complete_stampfile(${name} complete_stamp_file)\n  _ep_get_step_stampfile(${name} ${step} stamp_file)\n\n  _ep_parse_arguments(ExternalProject_Add_Step\n                      ${name} _EP_${step}_ \"${ARGN}\")\n\n  get_property(exclude_from_main TARGET ${name} PROPERTY _EP_${step}_EXCLUDE_FROM_MAIN)\n  if(NOT exclude_from_main)\n    add_custom_command(APPEND\n      OUTPUT ${complete_stamp_file}\n      DEPENDS ${stamp_file}\n      )\n  endif()\n\n  # Steps depending on this step.\n  get_property(dependers TARGET ${name} PROPERTY _EP_${step}_DEPENDERS)\n  foreach(depender IN LISTS dependers)\n    _ep_get_step_stampfile(${name} ${depender} depender_stamp_file)\n    add_custom_command(APPEND\n      OUTPUT ${depender_stamp_file}\n      DEPENDS ${stamp_file}\n      )\n  endforeach()\n\n  # Dependencies on files.\n  get_property(depends TARGET ${name} PROPERTY _EP_${step}_DEPENDS)\n\n  # Byproducts of the step.\n  get_property(byproducts TARGET ${name} PROPERTY _EP_${step}_BYPRODUCTS)\n\n  # Dependencies on steps.\n  get_property(dependees TARGET ${name} PROPERTY _EP_${step}_DEPENDEES)\n  foreach(dependee IN LISTS dependees)\n    _ep_get_step_stampfile(${name} ${dependee} dependee_stamp_file)\n    list(APPEND depends ${dependee_stamp_file})\n  endforeach()\n\n  # The command to run.\n  get_property(command TARGET ${name} PROPERTY _EP_${step}_COMMAND)\n  if(command)\n    set(comment \"Performing ${step} step for '${name}'\")\n  else()\n    set(comment \"No ${step} step for '${name}'\")\n  endif()\n  get_property(work_dir TARGET ${name} PROPERTY _EP_${step}_WORKING_DIRECTORY)\n\n  # Replace list separators.\n  get_property(sep TARGET ${name} PROPERTY _EP_LIST_SEPARATOR)\n  if(sep AND command)\n    string(REPLACE \"${sep}\" \"\\\\;\" command \"${command}\")\n  endif()\n\n  # Replace location tags.\n  _ep_replace_location_tags(${name} comment command work_dir byproducts)\n\n  # Custom comment?\n  get_property(comment_set TARGET ${name} PROPERTY _EP_${step}_COMMENT SET)\n  if(comment_set)\n    get_property(comment TARGET ${name} PROPERTY _EP_${step}_COMMENT)\n  endif()\n\n  # Uses terminal?\n  get_property(uses_terminal TARGET ${name} PROPERTY _EP_${step}_USES_TERMINAL)\n  if(uses_terminal)\n    set(uses_terminal USES_TERMINAL)\n  else()\n    set(uses_terminal \"\")\n  endif()\n\n  # Run every time?\n  get_property(always TARGET ${name} PROPERTY _EP_${step}_ALWAYS)\n  if(always)\n    set_property(SOURCE ${stamp_file} PROPERTY SYMBOLIC 1)\n    set(touch)\n    # Remove any existing stamp in case the option changed in an existing tree.\n    get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)\n    if(_isMultiConfig)\n      foreach(cfg ${CMAKE_CONFIGURATION_TYPES})\n        string(REPLACE \"/${CMAKE_CFG_INTDIR}\" \"/${cfg}\" stamp_file_config \"${stamp_file}\")\n        file(REMOVE ${stamp_file_config})\n      endforeach()\n    else()\n      file(REMOVE ${stamp_file})\n    endif()\n  else()\n    set(touch ${CMAKE_COMMAND} -E touch ${stamp_file})\n  endif()\n\n  # Wrap with log script?\n  get_property(log TARGET ${name} PROPERTY _EP_${step}_LOG)\n  if(command AND log)\n    _ep_write_log_script(${name} ${step} command)\n  endif()\n\n  if(\"${command}\" STREQUAL \"\")\n    # Some generators (i.e. Xcode) will not generate a file level target\n    # if no command is set, and therefore the dependencies on this\n    # target will be broken.\n    # The empty command is replaced by an echo command here in order to\n    # avoid this issue.\n    set(command ${CMAKE_COMMAND} -E echo_append)\n  endif()\n\n  add_custom_command(\n    OUTPUT ${stamp_file}\n    BYPRODUCTS ${byproducts}\n    COMMENT ${comment}\n    COMMAND ${command}\n    COMMAND ${touch}\n    DEPENDS ${depends}\n    WORKING_DIRECTORY ${work_dir}\n    VERBATIM\n    ${uses_terminal}\n    )\n  set_property(TARGET ${name} APPEND PROPERTY _EP_STEPS ${step})\n\n  # Add custom \"step target\"?\n  get_property(step_targets TARGET ${name} PROPERTY _EP_STEP_TARGETS)\n  if(NOT step_targets)\n    get_property(step_targets DIRECTORY PROPERTY EP_STEP_TARGETS)\n  endif()\n  foreach(st ${step_targets})\n    if(\"${st}\" STREQUAL \"${step}\")\n      ExternalProject_Add_StepTargets(${name} ${step})\n      break()\n    endif()\n  endforeach()\n\n  get_property(independent_step_targets TARGET ${name} PROPERTY _EP_INDEPENDENT_STEP_TARGETS)\n  if(NOT independent_step_targets)\n    get_property(independent_step_targets DIRECTORY PROPERTY EP_INDEPENDENT_STEP_TARGETS)\n  endif()\n  foreach(st ${independent_step_targets})\n    if(\"${st}\" STREQUAL \"${step}\")\n      ExternalProject_Add_StepTargets(${name} NO_DEPENDS ${step})\n      break()\n    endif()\n  endforeach()\nendfunction()\n\n\nfunction(ExternalProject_Add_StepDependencies name step)\n  set(dependencies ${ARGN})\n\n  # Sanity checks on \"name\" and \"step\".\n  if(NOT TARGET ${name})\n    message(FATAL_ERROR \"Cannot find target \\\"${name}\\\". Perhaps it has not yet been created using ExternalProject_Add.\")\n  endif()\n\n  get_property(type TARGET ${name} PROPERTY TYPE)\n  if(NOT type STREQUAL \"UTILITY\")\n    message(FATAL_ERROR \"Target \\\"${name}\\\" was not generated by ExternalProject_Add.\")\n  endif()\n\n  get_property(is_ep TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT)\n  if(NOT is_ep)\n    message(FATAL_ERROR \"Target \\\"${name}\\\" was not generated by ExternalProject_Add.\")\n  endif()\n\n  get_property(steps TARGET ${name} PROPERTY _EP_STEPS)\n  list(FIND steps ${step} is_step)\n  if(NOT is_step)\n    message(FATAL_ERROR \"External project \\\"${name}\\\" does not have a step \\\"${step}\\\".\")\n  endif()\n\n  if(TARGET ${name}-${step})\n    get_property(type TARGET ${name}-${step} PROPERTY TYPE)\n    if(NOT type STREQUAL \"UTILITY\")\n      message(FATAL_ERROR \"Target \\\"${name}-${step}\\\" was not generated by ExternalProject_Add_StepTargets.\")\n    endif()\n    get_property(is_ep_step TARGET ${name}-${step} PROPERTY _EP_IS_EXTERNAL_PROJECT_STEP)\n    if(NOT is_ep_step)\n      message(FATAL_ERROR \"Target \\\"${name}-${step}\\\" was not generated by ExternalProject_Add_StepTargets.\")\n    endif()\n  endif()\n\n  # Always add file-level dependency, but add target-level dependency\n  # only if the target exists for that step.\n  _ep_get_step_stampfile(${name} ${step} stamp_file)\n  foreach(dep ${dependencies})\n    add_custom_command(APPEND\n      OUTPUT ${stamp_file}\n      DEPENDS ${dep})\n    if(TARGET ${name}-${step})\n      foreach(dep ${dependencies})\n        add_dependencies(${name}-${step} ${dep})\n      endforeach()\n    endif()\n  endforeach()\n\nendfunction()\n\n\nfunction(_ep_add_mkdir_command name)\n  ExternalProject_Get_Property(${name}\n    source_dir binary_dir install_dir stamp_dir download_dir tmp_dir log_dir)\n\n  _ep_get_configuration_subdir_suffix(cfgdir)\n\n  ExternalProject_Add_Step(${name} mkdir\n    COMMENT \"Creating directories for '${name}'\"\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${source_dir}\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${binary_dir}\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${install_dir}\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${tmp_dir}\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${stamp_dir}${cfgdir}\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${download_dir}\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${log_dir}\n    )\nendfunction()\n\n\nfunction(_ep_is_dir_empty dir empty_var)\n  file(GLOB gr \"${dir}/*\")\n  if(\"${gr}\" STREQUAL \"\")\n    set(${empty_var} 1 PARENT_SCOPE)\n  else()\n    set(${empty_var} 0 PARENT_SCOPE)\n  endif()\nendfunction()\n\n\nfunction(_ep_add_download_command name)\n  ExternalProject_Get_Property(${name} source_dir stamp_dir download_dir tmp_dir)\n\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_DOWNLOAD_COMMAND SET)\n  get_property(cmd TARGET ${name} PROPERTY _EP_DOWNLOAD_COMMAND)\n  get_property(cvs_repository TARGET ${name} PROPERTY _EP_CVS_REPOSITORY)\n  get_property(svn_repository TARGET ${name} PROPERTY _EP_SVN_REPOSITORY)\n  get_property(git_repository TARGET ${name} PROPERTY _EP_GIT_REPOSITORY)\n  get_property(hg_repository  TARGET ${name} PROPERTY _EP_HG_REPOSITORY )\n  get_property(url TARGET ${name} PROPERTY _EP_URL)\n  get_property(fname TARGET ${name} PROPERTY _EP_DOWNLOAD_NAME)\n\n  # TODO: Perhaps file:// should be copied to download dir before extraction.\n  string(REGEX REPLACE \"file://\" \"\" url \"${url}\")\n\n  set(depends)\n  set(comment)\n  set(work_dir)\n\n  if(cmd_set)\n    set(work_dir ${download_dir})\n  elseif(cvs_repository)\n    find_package(CVS QUIET)\n    if(NOT CVS_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find cvs for checkout of ${name}\")\n    endif()\n\n    get_target_property(cvs_module ${name} _EP_CVS_MODULE)\n    if(NOT cvs_module)\n      message(FATAL_ERROR \"error: no CVS_MODULE\")\n    endif()\n\n    get_property(cvs_tag TARGET ${name} PROPERTY _EP_CVS_TAG)\n\n    set(repository ${cvs_repository})\n    set(module ${cvs_module})\n    set(tag ${cvs_tag})\n    configure_file(\n      \"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in\"\n      \"${stamp_dir}/${name}-cvsinfo.txt\"\n      @ONLY\n      )\n\n    get_filename_component(src_name \"${source_dir}\" NAME)\n    get_filename_component(work_dir \"${source_dir}\" PATH)\n    set(comment \"Performing download step (CVS checkout) for '${name}'\")\n    set(cmd ${CVS_EXECUTABLE} -d ${cvs_repository} -q co ${cvs_tag} -d ${src_name} ${cvs_module})\n    list(APPEND depends ${stamp_dir}/${name}-cvsinfo.txt)\n  elseif(svn_repository)\n    find_package(Subversion QUIET)\n    if(NOT Subversion_SVN_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find svn for checkout of ${name}\")\n    endif()\n\n    get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)\n    get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)\n    get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)\n    get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)\n\n    set(repository \"${svn_repository} user=${svn_username} password=${svn_password}\")\n    set(module)\n    set(tag ${svn_revision})\n    configure_file(\n      \"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in\"\n      \"${stamp_dir}/${name}-svninfo.txt\"\n      @ONLY\n      )\n\n    get_filename_component(src_name \"${source_dir}\" NAME)\n    get_filename_component(work_dir \"${source_dir}\" PATH)\n    set(comment \"Performing download step (SVN checkout) for '${name}'\")\n    set(svn_user_pw_args \"\")\n    if(DEFINED svn_username)\n      set(svn_user_pw_args ${svn_user_pw_args} \"--username=${svn_username}\")\n    endif()\n    if(DEFINED svn_password)\n      set(svn_user_pw_args ${svn_user_pw_args} \"--password=${svn_password}\")\n    endif()\n    if(svn_trust_cert)\n      set(svn_trust_cert_args --trust-server-cert)\n    endif()\n    set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}\n      --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name})\n    list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)\n  elseif(git_repository)\n    unset(CMAKE_MODULE_PATH) # Use CMake builtin find module\n    find_package(Git QUIET)\n    if(NOT GIT_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find git for clone of ${name}\")\n    endif()\n\n    # The git submodule update '--recursive' flag requires git >= v1.6.5\n    #\n    if(GIT_VERSION_STRING VERSION_LESS 1.6.5)\n      message(FATAL_ERROR \"error: git version 1.6.5 or later required for 'git submodule update --recursive': GIT_VERSION_STRING='${GIT_VERSION_STRING}'\")\n    endif()\n\n    get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG)\n    if(NOT git_tag)\n      set(git_tag \"master\")\n    endif()\n\n    set(git_init_submodules TRUE)\n    get_property(git_submodules_set TARGET ${name} PROPERTY _EP_GIT_SUBMODULES SET)\n    if(git_submodules_set)\n      get_property(git_submodules TARGET ${name} PROPERTY _EP_GIT_SUBMODULES)\n      if(git_submodules  STREQUAL \"\" AND _EP_CMP0097 STREQUAL \"NEW\")\n        set(git_init_submodules FALSE)\n      endif()\n    endif()\n\n    get_property(git_remote_name TARGET ${name} PROPERTY _EP_GIT_REMOTE_NAME)\n    if(NOT git_remote_name)\n      set(git_remote_name \"origin\")\n    endif()\n\n    get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY)\n    if(\"x${tls_verify}\" STREQUAL \"x\" AND DEFINED CMAKE_TLS_VERIFY)\n      set(tls_verify \"${CMAKE_TLS_VERIFY}\")\n    endif()\n    get_property(git_shallow TARGET ${name} PROPERTY _EP_GIT_SHALLOW)\n    get_property(git_progress TARGET ${name} PROPERTY _EP_GIT_PROGRESS)\n    get_property(git_config TARGET ${name} PROPERTY _EP_GIT_CONFIG)\n\n    # For the download step, and the git clone operation, only the repository\n    # should be recorded in a configured RepositoryInfo file. If the repo\n    # changes, the clone script should be run again. But if only the tag\n    # changes, avoid running the clone script again. Let the 'always' running\n    # update step checkout the new tag.\n    #\n    set(repository ${git_repository})\n    set(module)\n    set(tag ${git_remote_name})\n    configure_file(\n      \"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in\"\n      \"${stamp_dir}/${name}-gitinfo.txt\"\n      @ONLY\n      )\n\n    get_filename_component(src_name \"${source_dir}\" NAME)\n    get_filename_component(work_dir \"${source_dir}\" PATH)\n\n    # Since git clone doesn't succeed if the non-empty source_dir exists,\n    # create a cmake script to invoke as download command.\n    # The script will delete the source directory and then call git clone.\n    #\n    _ep_write_gitclone_script(${tmp_dir}/${name}-gitclone.cmake ${source_dir}\n      ${GIT_EXECUTABLE} ${git_repository} ${git_tag} ${git_remote_name} ${git_init_submodules} \"${git_submodules}\" \"${git_shallow}\" \"${git_progress}\" \"${git_config}\" ${src_name} ${work_dir}\n      ${stamp_dir}/${name}-gitinfo.txt ${stamp_dir}/${name}-gitclone-lastrun.txt \"${tls_verify}\"\n      )\n    set(comment \"Performing download step (git clone) for '${name}'\")\n    set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitclone.cmake)\n    list(APPEND depends ${stamp_dir}/${name}-gitinfo.txt)\n  elseif(hg_repository)\n    find_package(Hg QUIET)\n    if(NOT HG_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find hg for clone of ${name}\")\n    endif()\n\n    get_property(hg_tag TARGET ${name} PROPERTY _EP_HG_TAG)\n    if(NOT hg_tag)\n      set(hg_tag \"tip\")\n    endif()\n\n    # For the download step, and the hg clone operation, only the repository\n    # should be recorded in a configured RepositoryInfo file. If the repo\n    # changes, the clone script should be run again. But if only the tag\n    # changes, avoid running the clone script again. Let the 'always' running\n    # update step checkout the new tag.\n    #\n    set(repository ${hg_repository})\n    set(module)\n    set(tag)\n    configure_file(\n      \"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in\"\n      \"${stamp_dir}/${name}-hginfo.txt\"\n      @ONLY\n      )\n\n    get_filename_component(src_name \"${source_dir}\" NAME)\n    get_filename_component(work_dir \"${source_dir}\" PATH)\n\n    # Since hg clone doesn't succeed if the non-empty source_dir exists,\n    # create a cmake script to invoke as download command.\n    # The script will delete the source directory and then call hg clone.\n    #\n    _ep_write_hgclone_script(${tmp_dir}/${name}-hgclone.cmake ${source_dir}\n      ${HG_EXECUTABLE} ${hg_repository} ${hg_tag} ${src_name} ${work_dir}\n      ${stamp_dir}/${name}-hginfo.txt ${stamp_dir}/${name}-hgclone-lastrun.txt\n      )\n    set(comment \"Performing download step (hg clone) for '${name}'\")\n    set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-hgclone.cmake)\n    list(APPEND depends ${stamp_dir}/${name}-hginfo.txt)\n  elseif(url)\n    get_filename_component(work_dir \"${source_dir}\" PATH)\n    get_property(hash TARGET ${name} PROPERTY _EP_URL_HASH)\n    if(hash AND NOT \"${hash}\" MATCHES \"${_ep_hash_regex}\")\n      message(FATAL_ERROR \"URL_HASH is set to\\n  ${hash}\\n\"\n        \"but must be ALGO=value where ALGO is\\n  ${_ep_hash_algos}\\n\"\n        \"and value is a hex string.\")\n    endif()\n    get_property(md5 TARGET ${name} PROPERTY _EP_URL_MD5)\n    if(md5 AND NOT \"MD5=${md5}\" MATCHES \"${_ep_hash_regex}\")\n      message(FATAL_ERROR \"URL_MD5 is set to\\n  ${md5}\\nbut must be a hex string.\")\n    endif()\n    if(md5 AND NOT hash)\n      set(hash \"MD5=${md5}\")\n    endif()\n    set(repository \"external project URL\")\n    set(module \"${url}\")\n    set(tag \"${hash}\")\n    configure_file(\n      \"${CMAKE_ROOT}/Modules/RepositoryInfo.txt.in\"\n      \"${stamp_dir}/${name}-urlinfo.txt\"\n      @ONLY\n      )\n    list(APPEND depends ${stamp_dir}/${name}-urlinfo.txt)\n\n    list(LENGTH url url_list_length)\n    if(NOT \"${url_list_length}\" STREQUAL \"1\")\n      foreach(entry ${url})\n        if(NOT \"${entry}\" MATCHES \"^[a-z]+://\")\n          message(FATAL_ERROR \"At least one entry of URL is a path (invalid in a list)\")\n        endif()\n      endforeach()\n      if(\"x${fname}\" STREQUAL \"x\")\n        list(GET url 0 fname)\n      endif()\n    endif()\n\n    if(IS_DIRECTORY \"${url}\")\n      get_filename_component(abs_dir \"${url}\" ABSOLUTE)\n      set(comment \"Performing download step (DIR copy) for '${name}'\")\n      set(cmd   ${CMAKE_COMMAND} -E remove_directory ${source_dir}\n        COMMAND ${CMAKE_COMMAND} -E copy_directory ${abs_dir} ${source_dir})\n    else()\n      get_property(no_extract TARGET \"${name}\" PROPERTY _EP_DOWNLOAD_NO_EXTRACT SET)\n      if(\"${url}\" MATCHES \"^[a-z]+://\")\n        # TODO: Should download and extraction be different steps?\n        if(\"x${fname}\" STREQUAL \"x\")\n          set(fname \"${url}\")\n        endif()\n        if(\"${fname}\" MATCHES [[([^/\\?#]+(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip))([/?#].*)?$]])\n          set(fname \"${CMAKE_MATCH_1}\")\n        elseif(no_extract)\n          get_filename_component(fname \"${fname}\" NAME)\n        else()\n          # Fall back to a default file name.  The actual file name does not\n          # matter because it is used only internally and our extraction tool\n          # inspects the file content directly.  If it turns out the wrong URL\n          # was given that will be revealed during the build which is an easier\n          # place for users to diagnose than an error here anyway.\n          set(fname \"archive.tar\")\n        endif()\n        string(REPLACE \";\" \"-\" fname \"${fname}\")\n        set(file ${download_dir}/${fname})\n        get_property(timeout TARGET ${name} PROPERTY _EP_TIMEOUT)\n        get_property(no_progress TARGET ${name} PROPERTY _EP_DOWNLOAD_NO_PROGRESS)\n        get_property(tls_verify TARGET ${name} PROPERTY _EP_TLS_VERIFY)\n        get_property(tls_cainfo TARGET ${name} PROPERTY _EP_TLS_CAINFO)\n        get_property(netrc TARGET ${name} PROPERTY _EP_NETRC)\n        get_property(netrc_file TARGET ${name} PROPERTY _EP_NETRC_FILE)\n        get_property(http_username TARGET ${name} PROPERTY _EP_HTTP_USERNAME)\n        get_property(http_password TARGET ${name} PROPERTY _EP_HTTP_PASSWORD)\n        get_property(http_headers TARGET ${name} PROPERTY _EP_HTTP_HEADER)\n        set(download_script \"${stamp_dir}/download-${name}.cmake\")\n        _ep_write_downloadfile_script(\"${download_script}\" \"${url}\" \"${file}\" \"${timeout}\" \"${no_progress}\" \"${hash}\" \"${tls_verify}\" \"${tls_cainfo}\" \"${http_username}:${http_password}\" \"${http_headers}\" \"${netrc}\" \"${netrc_file}\")\n        set(cmd ${CMAKE_COMMAND} -P \"${download_script}\"\n          COMMAND)\n        if (no_extract)\n          set(steps \"download and verify\")\n        else ()\n          set(steps \"download, verify and extract\")\n        endif ()\n        set(comment \"Performing download step (${steps}) for '${name}'\")\n        file(WRITE \"${stamp_dir}/verify-${name}.cmake\" \"\") # already verified by 'download_script'\n      else()\n        set(file \"${url}\")\n        if (no_extract)\n          set(steps \"verify\")\n        else ()\n          set(steps \"verify and extract\")\n        endif ()\n        set(comment \"Performing download step (${steps}) for '${name}'\")\n        _ep_write_verifyfile_script(\"${stamp_dir}/verify-${name}.cmake\" \"${file}\" \"${hash}\")\n      endif()\n      list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/verify-${name}.cmake)\n      if (NOT no_extract)\n        _ep_write_extractfile_script(\"${stamp_dir}/extract-${name}.cmake\" \"${name}\" \"${file}\" \"${source_dir}\")\n        list(APPEND cmd COMMAND ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)\n      else ()\n        set_property(TARGET ${name} PROPERTY _EP_DOWNLOADED_FILE ${file})\n      endif ()\n    endif()\n  else()\n    _ep_is_dir_empty(\"${source_dir}\" empty)\n    if(${empty})\n      message(SEND_ERROR\n        \"No download info given for '${name}' and its source directory:\\n\"\n        \" ${source_dir}\\n\"\n        \"is not an existing non-empty directory.  Please specify one of:\\n\"\n        \" * SOURCE_DIR with an existing non-empty directory\\n\"\n        \" * DOWNLOAD_COMMAND\\n\"\n        \" * URL\\n\"\n        \" * GIT_REPOSITORY\\n\"\n        \" * SVN_REPOSITORY\\n\"\n        \" * HG_REPOSITORY\\n\"\n        \" * CVS_REPOSITORY and CVS_MODULE\"\n        )\n    endif()\n  endif()\n\n  get_property(log TARGET ${name} PROPERTY _EP_LOG_DOWNLOAD)\n  if(log)\n    set(log LOG 1)\n  else()\n    set(log \"\")\n  endif()\n\n  get_property(uses_terminal TARGET ${name} PROPERTY\n    _EP_USES_TERMINAL_DOWNLOAD)\n  if(uses_terminal)\n    set(uses_terminal USES_TERMINAL 1)\n  else()\n    set(uses_terminal \"\")\n  endif()\n\n  ExternalProject_Add_Step(${name} download\n    COMMENT ${comment}\n    COMMAND ${cmd}\n    WORKING_DIRECTORY ${work_dir}\n    DEPENDS ${depends}\n    DEPENDEES mkdir\n    ${log}\n    ${uses_terminal}\n    )\nendfunction()\n\n\nfunction(_ep_add_update_command name)\n  ExternalProject_Get_Property(${name} source_dir tmp_dir)\n\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_UPDATE_COMMAND SET)\n  get_property(cmd TARGET ${name} PROPERTY _EP_UPDATE_COMMAND)\n  get_property(cvs_repository TARGET ${name} PROPERTY _EP_CVS_REPOSITORY)\n  get_property(svn_repository TARGET ${name} PROPERTY _EP_SVN_REPOSITORY)\n  get_property(git_repository TARGET ${name} PROPERTY _EP_GIT_REPOSITORY)\n  get_property(hg_repository  TARGET ${name} PROPERTY _EP_HG_REPOSITORY )\n  get_property(update_disconnected_set TARGET ${name} PROPERTY _EP_UPDATE_DISCONNECTED SET)\n  if(update_disconnected_set)\n    get_property(update_disconnected TARGET ${name} PROPERTY _EP_UPDATE_DISCONNECTED)\n  else()\n    get_property(update_disconnected DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED)\n  endif()\n\n  set(work_dir)\n  set(comment)\n  set(always)\n\n  if(cmd_set)\n    set(work_dir ${source_dir})\n    if(NOT \"x${cmd}\" STREQUAL \"x\")\n      set(always 1)\n    endif()\n  elseif(cvs_repository)\n    if(NOT CVS_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find cvs for update of ${name}\")\n    endif()\n    set(work_dir ${source_dir})\n    set(comment \"Performing update step (CVS update) for '${name}'\")\n    get_property(cvs_tag TARGET ${name} PROPERTY _EP_CVS_TAG)\n    set(cmd ${CVS_EXECUTABLE} -d ${cvs_repository} -q up -dP ${cvs_tag})\n    set(always 1)\n  elseif(svn_repository)\n    if(NOT Subversion_SVN_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find svn for update of ${name}\")\n    endif()\n    set(work_dir ${source_dir})\n    set(comment \"Performing update step (SVN update) for '${name}'\")\n    get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)\n    get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)\n    get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)\n    get_property(svn_trust_cert TARGET ${name} PROPERTY _EP_SVN_TRUST_CERT)\n    set(svn_user_pw_args \"\")\n    if(DEFINED svn_username)\n      set(svn_user_pw_args ${svn_user_pw_args} \"--username=${svn_username}\")\n    endif()\n    if(DEFINED svn_password)\n      set(svn_user_pw_args ${svn_user_pw_args} \"--password=${svn_password}\")\n    endif()\n    if(svn_trust_cert)\n      set(svn_trust_cert_args --trust-server-cert)\n    endif()\n    set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}\n      --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args})\n    set(always 1)\n  elseif(git_repository)\n    unset(CMAKE_MODULE_PATH) # Use CMake builtin find module\n    find_package(Git QUIET)\n    if(NOT GIT_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find git for fetch of ${name}\")\n    endif()\n    set(work_dir ${source_dir})\n    set(comment \"Performing update step for '${name}'\")\n    get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG)\n    if(NOT git_tag)\n      set(git_tag \"master\")\n    endif()\n    get_property(git_remote_name TARGET ${name} PROPERTY _EP_GIT_REMOTE_NAME)\n    if(NOT git_remote_name)\n      set(git_remote_name \"origin\")\n    endif()\n\n    set(git_init_submodules TRUE)\n    get_property(git_submodules_set TARGET ${name} PROPERTY _EP_GIT_SUBMODULES SET)\n    if(git_submodules_set)\n      get_property(git_submodules TARGET ${name} PROPERTY _EP_GIT_SUBMODULES)\n      if(git_submodules  STREQUAL \"\" AND _EP_CMP0097 STREQUAL \"NEW\")\n        set(git_init_submodules FALSE)\n      endif()\n    endif()\n\n    _ep_write_gitupdate_script(${tmp_dir}/${name}-gitupdate.cmake\n      ${GIT_EXECUTABLE} ${git_tag} ${git_remote_name} ${git_init_submodules} \"${git_submodules}\" ${git_repository} ${work_dir}\n      )\n    set(cmd ${CMAKE_COMMAND} -P ${tmp_dir}/${name}-gitupdate.cmake)\n    set(always 1)\n  elseif(hg_repository)\n    if(NOT HG_EXECUTABLE)\n      message(FATAL_ERROR \"error: could not find hg for pull of ${name}\")\n    endif()\n    set(work_dir ${source_dir})\n    set(comment \"Performing update step (hg pull) for '${name}'\")\n    get_property(hg_tag TARGET ${name} PROPERTY _EP_HG_TAG)\n    if(NOT hg_tag)\n      set(hg_tag \"tip\")\n    endif()\n    if(\"${HG_VERSION_STRING}\" STREQUAL \"2.1\")\n      message(WARNING \"Mercurial 2.1 does not distinguish an empty pull from a failed pull:\n http://mercurial.selenic.com/wiki/UpgradeNotes#A2.1.1:_revert_pull_return_code_change.2C_compile_issue_on_OS_X\n http://thread.gmane.org/gmane.comp.version-control.mercurial.devel/47656\nUpdate to Mercurial >= 2.1.1.\n\")\n    endif()\n    set(cmd ${HG_EXECUTABLE} pull\n      COMMAND ${HG_EXECUTABLE} update ${hg_tag}\n      )\n    set(always 1)\n  endif()\n\n  get_property(log TARGET ${name} PROPERTY _EP_LOG_UPDATE)\n  if(log)\n    set(log LOG 1)\n  else()\n    set(log \"\")\n  endif()\n\n  get_property(uses_terminal TARGET ${name} PROPERTY\n    _EP_USES_TERMINAL_UPDATE)\n  if(uses_terminal)\n    set(uses_terminal USES_TERMINAL 1)\n  else()\n    set(uses_terminal \"\")\n  endif()\n\n  ExternalProject_Add_Step(${name} update\n    COMMENT ${comment}\n    COMMAND ${cmd}\n    ALWAYS ${always}\n    EXCLUDE_FROM_MAIN ${update_disconnected}\n    WORKING_DIRECTORY ${work_dir}\n    DEPENDEES download\n    ${log}\n    ${uses_terminal}\n    )\n\n  if(update_disconnected)\n    _ep_get_step_stampfile(${name} skip-update skip-update_stamp_file)\n    string(REPLACE \"Performing\" \"Skipping\" comment \"${comment}\")\n    ExternalProject_Add_Step(${name} skip-update\n      COMMENT ${comment}\n      ALWAYS ${always}\n      EXCLUDE_FROM_MAIN 1\n      WORKING_DIRECTORY ${work_dir}\n      DEPENDEES download\n      ${log}\n      ${uses_terminal}\n    )\n    set_property(SOURCE ${skip-update_stamp_file} PROPERTY SYMBOLIC 1)\n  endif()\n\nendfunction()\n\n\nfunction(_ep_add_patch_command name)\n  ExternalProject_Get_Property(${name} source_dir)\n\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_PATCH_COMMAND SET)\n  get_property(cmd TARGET ${name} PROPERTY _EP_PATCH_COMMAND)\n\n  set(work_dir)\n\n  if(cmd_set)\n    set(work_dir ${source_dir})\n  endif()\n\n  get_property(log TARGET ${name} PROPERTY _EP_LOG_PATCH)\n  if(log)\n    set(log LOG 1)\n  else()\n    set(log \"\")\n  endif()\n\n  ExternalProject_Add_Step(${name} patch\n    COMMAND ${cmd}\n    WORKING_DIRECTORY ${work_dir}\n    DEPENDEES download\n    ${log}\n    )\nendfunction()\n\n\nfunction(_ep_extract_configure_command var name)\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND SET)\n  if(cmd_set)\n    get_property(cmd TARGET ${name} PROPERTY _EP_CONFIGURE_COMMAND)\n  else()\n    get_target_property(cmake_command ${name} _EP_CMAKE_COMMAND)\n    if(cmake_command)\n      set(cmd \"${cmake_command}\")\n    else()\n      set(cmd \"${CMAKE_COMMAND}\")\n    endif()\n\n    get_property(cmake_args TARGET ${name} PROPERTY _EP_CMAKE_ARGS)\n    list(APPEND cmd ${cmake_args})\n\n    # If there are any CMAKE_CACHE_ARGS or CMAKE_CACHE_DEFAULT_ARGS,\n    # write an initial cache and use it\n    get_property(cmake_cache_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_ARGS)\n    get_property(cmake_cache_default_args TARGET ${name} PROPERTY _EP_CMAKE_CACHE_DEFAULT_ARGS)\n\n    set(has_cmake_cache_args 0)\n    if(NOT \"${cmake_cache_args}\" STREQUAL \"\")\n      set(has_cmake_cache_args 1)\n    endif()\n\n    set(has_cmake_cache_default_args 0)\n    if(NOT \"${cmake_cache_default_args}\" STREQUAL \"\")\n      set(has_cmake_cache_default_args 1)\n    endif()\n\n    get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)\n    get_target_property(cmake_generator_instance ${name} _EP_CMAKE_GENERATOR_INSTANCE)\n    get_target_property(cmake_generator_platform ${name} _EP_CMAKE_GENERATOR_PLATFORM)\n    get_target_property(cmake_generator_toolset ${name} _EP_CMAKE_GENERATOR_TOOLSET)\n    if(cmake_generator)\n      list(APPEND cmd \"-G${cmake_generator}\")\n      if(cmake_generator_platform)\n        list(APPEND cmd \"-A${cmake_generator_platform}\")\n      endif()\n      if(cmake_generator_toolset)\n        list(APPEND cmd \"-T${cmake_generator_toolset}\")\n      endif()\n      if(cmake_generator_instance)\n        list(APPEND cmd \"-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${cmake_generator_instance}\")\n      endif()\n    else()\n      if(CMAKE_EXTRA_GENERATOR)\n        list(APPEND cmd \"-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}\")\n      else()\n        list(APPEND cmd \"-G${CMAKE_GENERATOR}\")\n        if(\"${CMAKE_GENERATOR}\" MATCHES \"Green Hills MULTI\")\n          set(has_cmake_cache_default_args 1)\n          set(cmake_cache_default_args ${cmake_cache_default_args}\n            \"-DGHS_TARGET_PLATFORM:STRING=${GHS_TARGET_PLATFORM}\"\n            \"-DGHS_PRIMARY_TARGET:STRING=${GHS_PRIMARY_TARGET}\"\n            \"-DGHS_TOOLSET_ROOT:STRING=${GHS_TOOLSET_ROOT}\"\n            \"-DGHS_OS_ROOT:STRING=${GHS_OS_ROOT}\"\n            \"-DGHS_OS_DIR:STRING=${GHS_OS_DIR}\"\n            \"-DGHS_BSP_NAME:STRING=${GHS_BSP_NAME}\")\n        endif()\n      endif()\n      if(cmake_generator_platform)\n        message(FATAL_ERROR \"Option CMAKE_GENERATOR_PLATFORM not allowed without CMAKE_GENERATOR.\")\n      endif()\n      if(CMAKE_GENERATOR_PLATFORM)\n        list(APPEND cmd \"-A${CMAKE_GENERATOR_PLATFORM}\")\n      endif()\n      if(cmake_generator_toolset)\n        message(FATAL_ERROR \"Option CMAKE_GENERATOR_TOOLSET not allowed without CMAKE_GENERATOR.\")\n      endif()\n      if(CMAKE_GENERATOR_TOOLSET)\n        list(APPEND cmd \"-T${CMAKE_GENERATOR_TOOLSET}\")\n      endif()\n      if(cmake_generator_instance)\n        message(FATAL_ERROR \"Option CMAKE_GENERATOR_INSTANCE not allowed without CMAKE_GENERATOR.\")\n      endif()\n      if(CMAKE_GENERATOR_INSTANCE)\n        list(APPEND cmd \"-DCMAKE_GENERATOR_INSTANCE:INTERNAL=${CMAKE_GENERATOR_INSTANCE}\")\n      endif()\n    endif()\n\n    if(has_cmake_cache_args OR has_cmake_cache_default_args)\n      set(_ep_cache_args_script \"<TMP_DIR>/${name}-cache-$<CONFIG>.cmake\")\n      if(has_cmake_cache_args)\n        _ep_command_line_to_initial_cache(script_initial_cache_force \"${cmake_cache_args}\" 1)\n      endif()\n      if(has_cmake_cache_default_args)\n        _ep_command_line_to_initial_cache(script_initial_cache_default \"${cmake_cache_default_args}\" 0)\n      endif()\n      _ep_write_initial_cache(${name} \"${_ep_cache_args_script}\" \"${script_initial_cache_force}${script_initial_cache_default}\")\n      list(APPEND cmd \"-C${_ep_cache_args_script}\")\n    endif()\n\n    list(APPEND cmd \"<SOURCE_DIR><SOURCE_SUBDIR>\")\n  endif()\n\n  set(\"${var}\" \"${cmd}\" PARENT_SCOPE)\nendfunction()\n\n# TODO: Make sure external projects use the proper compiler\nfunction(_ep_add_configure_command name)\n  ExternalProject_Get_Property(${name} binary_dir tmp_dir)\n\n  # Depend on other external projects (file-level).\n  set(file_deps)\n  get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)\n  foreach(dep IN LISTS deps)\n    get_property(dep_type TARGET ${dep} PROPERTY TYPE)\n    if(dep_type STREQUAL \"UTILITY\")\n      get_property(is_ep TARGET ${dep} PROPERTY _EP_IS_EXTERNAL_PROJECT)\n      if(is_ep)\n        _ep_get_step_stampfile(${dep} \"done\" done_stamp_file)\n        list(APPEND file_deps ${done_stamp_file})\n      endif()\n    endif()\n  endforeach()\n\n  _ep_extract_configure_command(cmd ${name})\n\n  # If anything about the configure command changes, (command itself, cmake\n  # used, cmake args or cmake generator) then re-run the configure step.\n  # Fixes issue https://gitlab.kitware.com/cmake/cmake/issues/10258\n  #\n  if(NOT EXISTS ${tmp_dir}/${name}-cfgcmd.txt.in)\n    file(WRITE ${tmp_dir}/${name}-cfgcmd.txt.in \"cmd='\\@cmd\\@'\\n\")\n  endif()\n  configure_file(${tmp_dir}/${name}-cfgcmd.txt.in ${tmp_dir}/${name}-cfgcmd.txt)\n  list(APPEND file_deps ${tmp_dir}/${name}-cfgcmd.txt)\n  list(APPEND file_deps ${_ep_cache_args_script})\n\n  get_property(log TARGET ${name} PROPERTY _EP_LOG_CONFIGURE)\n  if(log)\n    set(log LOG 1)\n  else()\n    set(log \"\")\n  endif()\n\n  get_property(uses_terminal TARGET ${name} PROPERTY\n    _EP_USES_TERMINAL_CONFIGURE)\n  if(uses_terminal)\n    set(uses_terminal USES_TERMINAL 1)\n  else()\n    set(uses_terminal \"\")\n  endif()\n\n  get_property(update_disconnected_set TARGET ${name} PROPERTY _EP_UPDATE_DISCONNECTED SET)\n  if(update_disconnected_set)\n    get_property(update_disconnected TARGET ${name} PROPERTY _EP_UPDATE_DISCONNECTED)\n  else()\n    get_property(update_disconnected DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED)\n  endif()\n  if(update_disconnected)\n    set(update_dep skip-update)\n  else()\n    set(update_dep update)\n  endif()\n\n  ExternalProject_Add_Step(${name} configure\n    COMMAND ${cmd}\n    WORKING_DIRECTORY ${binary_dir}\n    DEPENDEES ${update_dep} patch\n    DEPENDS ${file_deps}\n    ${log}\n    ${uses_terminal}\n    )\nendfunction()\n\n\nfunction(_ep_add_build_command name)\n  ExternalProject_Get_Property(${name} binary_dir)\n\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_BUILD_COMMAND SET)\n  if(cmd_set)\n    get_property(cmd TARGET ${name} PROPERTY _EP_BUILD_COMMAND)\n  else()\n    _ep_get_build_command(${name} BUILD cmd)\n  endif()\n\n  get_property(log TARGET ${name} PROPERTY _EP_LOG_BUILD)\n  if(log)\n    set(log LOG 1)\n  else()\n    set(log \"\")\n  endif()\n\n  get_property(uses_terminal TARGET ${name} PROPERTY\n    _EP_USES_TERMINAL_BUILD)\n  if(uses_terminal)\n    set(uses_terminal USES_TERMINAL 1)\n  else()\n    set(uses_terminal \"\")\n  endif()\n\n  get_property(build_always TARGET ${name} PROPERTY _EP_BUILD_ALWAYS)\n  if(build_always)\n    set(always 1)\n  else()\n    set(always 0)\n  endif()\n\n  get_property(build_byproducts TARGET ${name} PROPERTY _EP_BUILD_BYPRODUCTS)\n\n  ExternalProject_Add_Step(${name} build\n    COMMAND ${cmd}\n    BYPRODUCTS ${build_byproducts}\n    WORKING_DIRECTORY ${binary_dir}\n    DEPENDEES configure\n    ALWAYS ${always}\n    ${log}\n    ${uses_terminal}\n    )\nendfunction()\n\n\nfunction(_ep_add_install_command name)\n  ExternalProject_Get_Property(${name} binary_dir)\n\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_INSTALL_COMMAND SET)\n  if(cmd_set)\n    get_property(cmd TARGET ${name} PROPERTY _EP_INSTALL_COMMAND)\n  else()\n    _ep_get_build_command(${name} INSTALL cmd)\n  endif()\n\n  get_property(log TARGET ${name} PROPERTY _EP_LOG_INSTALL)\n  if(log)\n    set(log LOG 1)\n  else()\n    set(log \"\")\n  endif()\n\n  get_property(uses_terminal TARGET ${name} PROPERTY\n    _EP_USES_TERMINAL_INSTALL)\n  if(uses_terminal)\n    set(uses_terminal USES_TERMINAL 1)\n  else()\n    set(uses_terminal \"\")\n  endif()\n\n  ExternalProject_Add_Step(${name} install\n    COMMAND ${cmd}\n    WORKING_DIRECTORY ${binary_dir}\n    DEPENDEES build\n    ${log}\n    ${uses_terminal}\n    )\nendfunction()\n\n\nfunction(_ep_add_test_command name)\n  ExternalProject_Get_Property(${name} binary_dir)\n\n  get_property(before TARGET ${name} PROPERTY _EP_TEST_BEFORE_INSTALL)\n  get_property(after TARGET ${name} PROPERTY _EP_TEST_AFTER_INSTALL)\n  get_property(exclude TARGET ${name} PROPERTY _EP_TEST_EXCLUDE_FROM_MAIN)\n  get_property(cmd_set TARGET ${name} PROPERTY _EP_TEST_COMMAND SET)\n\n  # Only actually add the test step if one of the test related properties is\n  # explicitly set. (i.e. the test step is omitted unless requested...)\n  #\n  if(cmd_set OR before OR after OR exclude)\n    if(cmd_set)\n      get_property(cmd TARGET ${name} PROPERTY _EP_TEST_COMMAND)\n    else()\n      _ep_get_build_command(${name} TEST cmd)\n    endif()\n\n    if(before)\n      set(dependees_args DEPENDEES build)\n    else()\n      set(dependees_args DEPENDEES install)\n    endif()\n\n    if(exclude)\n      set(dependers_args \"\")\n      set(exclude_args EXCLUDE_FROM_MAIN 1)\n    else()\n      if(before)\n        set(dependers_args DEPENDERS install)\n      else()\n        set(dependers_args \"\")\n      endif()\n      set(exclude_args \"\")\n    endif()\n\n    get_property(log TARGET ${name} PROPERTY _EP_LOG_TEST)\n    if(log)\n      set(log LOG 1)\n    else()\n      set(log \"\")\n    endif()\n\n    get_property(uses_terminal TARGET ${name} PROPERTY\n      _EP_USES_TERMINAL_TEST)\n    if(uses_terminal)\n      set(uses_terminal USES_TERMINAL 1)\n    else()\n      set(uses_terminal \"\")\n    endif()\n\n    ExternalProject_Add_Step(${name} test\n      COMMAND ${cmd}\n      WORKING_DIRECTORY ${binary_dir}\n      ${dependees_args}\n      ${dependers_args}\n      ${exclude_args}\n      ${log}\n      ${uses_terminal}\n      )\n  endif()\nendfunction()\n\n\nfunction(ExternalProject_Add name)\n  cmake_policy(GET CMP0097 _EP_CMP0097\n    PARENT_SCOPE # undocumented, do not use outside of CMake\n    )\n\n  _ep_get_configuration_subdir_suffix(cfgdir)\n\n  # Add a custom target for the external project.\n  set(cmf_dir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles)\n  _ep_get_complete_stampfile(${name} complete_stamp_file)\n\n  # The \"ALL\" option to add_custom_target just tells it to not set the\n  # EXCLUDE_FROM_ALL target property. Later, if the EXCLUDE_FROM_ALL\n  # argument was passed, we explicitly set it for the target.\n  add_custom_target(${name} ALL DEPENDS ${complete_stamp_file})\n  set_property(TARGET ${name} PROPERTY _EP_IS_EXTERNAL_PROJECT 1)\n  set_property(TARGET ${name} PROPERTY LABELS ${name})\n  set_property(TARGET ${name} PROPERTY FOLDER \"ExternalProjectTargets/${name}\")\n\n  _ep_parse_arguments(ExternalProject_Add ${name} _EP_ \"${ARGN}\")\n  _ep_set_directories(${name})\n  _ep_get_step_stampfile(${name} \"done\" done_stamp_file)\n  _ep_get_step_stampfile(${name} \"install\" install_stamp_file)\n\n  # Set the EXCLUDE_FROM_ALL target property if required.\n  get_property(exclude_from_all TARGET ${name} PROPERTY _EP_EXCLUDE_FROM_ALL)\n  if(exclude_from_all)\n    set_property(TARGET ${name} PROPERTY EXCLUDE_FROM_ALL TRUE)\n  endif()\n\n  # The 'complete' step depends on all other steps and creates a\n  # 'done' mark.  A dependent external project's 'configure' step\n  # depends on the 'done' mark so that it rebuilds when this project\n  # rebuilds.  It is important that 'done' is not the output of any\n  # custom command so that CMake does not propagate build rules to\n  # other external project targets, which may cause problems during\n  # parallel builds.  However, the Ninja generator needs to see the entire\n  # dependency graph, and can cope with custom commands belonging to\n  # multiple targets, so we add the 'done' mark as an output for Ninja only.\n  set(complete_outputs ${complete_stamp_file})\n  if(${CMAKE_GENERATOR} MATCHES \"Ninja\")\n    set(complete_outputs ${complete_outputs} ${done_stamp_file})\n  endif()\n\n  add_custom_command(\n    OUTPUT ${complete_outputs}\n    COMMENT \"Completed '${name}'\"\n    COMMAND ${CMAKE_COMMAND} -E make_directory ${cmf_dir}${cfgdir}\n    COMMAND ${CMAKE_COMMAND} -E touch ${complete_stamp_file}\n    COMMAND ${CMAKE_COMMAND} -E touch ${done_stamp_file}\n    DEPENDS ${install_stamp_file}\n    VERBATIM\n    )\n\n\n  # Depend on other external projects (target-level).\n  get_property(deps TARGET ${name} PROPERTY _EP_DEPENDS)\n  foreach(arg IN LISTS deps)\n    add_dependencies(${name} ${arg})\n  endforeach()\n\n  # Set up custom build steps based on the target properties.\n  # Each step depends on the previous one.\n  #\n  # The target depends on the output of the final step.\n  # (Already set up above in the DEPENDS of the add_custom_target command.)\n  #\n  _ep_add_mkdir_command(${name})\n  _ep_add_download_command(${name})\n  _ep_add_update_command(${name})\n  _ep_add_patch_command(${name})\n  _ep_add_configure_command(${name})\n  _ep_add_build_command(${name})\n  _ep_add_install_command(${name})\n\n  # Test is special in that it might depend on build, or it might depend\n  # on install.\n  #\n  _ep_add_test_command(${name})\nendfunction()\n\ncmake_policy(POP)\n"
  },
  {
    "path": ".config/proji/templates/cmake/cmake/HunterGate.cmake",
    "content": "# Copyright (c) 2013-2019, Ruslan Baratov\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n#   list of conditions and the following disclaimer.\n#\n# * Redistributions in binary form must reproduce the above copyright notice,\n#   this list of conditions and the following disclaimer in the documentation\n#   and/or other materials provided with the distribution.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n# This is a gate file to Hunter package manager.\n# Include this file using `include` command and add package you need, example:\n#\n#     cmake_minimum_required(VERSION 3.2)\n#\n#     include(\"cmake/HunterGate.cmake\")\n#     HunterGate(\n#         URL \"https://github.com/path/to/hunter/archive.tar.gz\"\n#         SHA1 \"798501e983f14b28b10cda16afa4de69eee1da1d\"\n#     )\n#\n#     project(MyProject)\n#\n#     hunter_add_package(Foo)\n#     hunter_add_package(Boo COMPONENTS Bar Baz)\n#\n# Projects:\n#     * https://github.com/hunter-packages/gate/\n#     * https://github.com/ruslo/hunter\n\noption(HUNTER_ENABLED \"Enable Hunter package manager support\" ON)\n\nif(HUNTER_ENABLED)\n  if(CMAKE_VERSION VERSION_LESS \"3.2\")\n    message(\n        FATAL_ERROR\n        \"At least CMake version 3.2 required for Hunter dependency management.\"\n        \" Update CMake or set HUNTER_ENABLED to OFF.\"\n    )\n  endif()\nendif()\n\ninclude(CMakeParseArguments) # cmake_parse_arguments\n\noption(HUNTER_STATUS_PRINT \"Print working status\" ON)\noption(HUNTER_STATUS_DEBUG \"Print a lot info\" OFF)\noption(HUNTER_TLS_VERIFY \"Enable/disable TLS certificate checking on downloads\" ON)\n\nset(HUNTER_ERROR_PAGE \"https://docs.hunter.sh/en/latest/reference/errors\")\n\nfunction(hunter_gate_status_print)\n  if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)\n    foreach(print_message ${ARGV})\n      message(STATUS \"[hunter] ${print_message}\")\n    endforeach()\n  endif()\nendfunction()\n\nfunction(hunter_gate_status_debug)\n  if(HUNTER_STATUS_DEBUG)\n    foreach(print_message ${ARGV})\n      string(TIMESTAMP timestamp)\n      message(STATUS \"[hunter *** DEBUG *** ${timestamp}] ${print_message}\")\n    endforeach()\n  endif()\nendfunction()\n\nfunction(hunter_gate_error_page error_page)\n  message(\"------------------------------ ERROR ------------------------------\")\n  message(\"    ${HUNTER_ERROR_PAGE}/${error_page}.html\")\n  message(\"-------------------------------------------------------------------\")\n  message(\"\")\n  message(FATAL_ERROR \"\")\nendfunction()\n\nfunction(hunter_gate_internal_error)\n  message(\"\")\n  foreach(print_message ${ARGV})\n    message(\"[hunter ** INTERNAL **] ${print_message}\")\n  endforeach()\n  message(\"[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]\")\n  message(\"\")\n  hunter_gate_error_page(\"error.internal\")\nendfunction()\n\nfunction(hunter_gate_fatal_error)\n  cmake_parse_arguments(hunter \"\" \"ERROR_PAGE\" \"\" \"${ARGV}\")\n  if(\"${hunter_ERROR_PAGE}\" STREQUAL \"\")\n    hunter_gate_internal_error(\"Expected ERROR_PAGE\")\n  endif()\n  message(\"\")\n  foreach(x ${hunter_UNPARSED_ARGUMENTS})\n    message(\"[hunter ** FATAL ERROR **] ${x}\")\n  endforeach()\n  message(\"[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]\")\n  message(\"\")\n  hunter_gate_error_page(\"${hunter_ERROR_PAGE}\")\nendfunction()\n\nfunction(hunter_gate_user_error)\n  hunter_gate_fatal_error(${ARGV} ERROR_PAGE \"error.incorrect.input.data\")\nendfunction()\n\nfunction(hunter_gate_self root version sha1 result)\n  string(COMPARE EQUAL \"${root}\" \"\" is_bad)\n  if(is_bad)\n    hunter_gate_internal_error(\"root is empty\")\n  endif()\n\n  string(COMPARE EQUAL \"${version}\" \"\" is_bad)\n  if(is_bad)\n    hunter_gate_internal_error(\"version is empty\")\n  endif()\n\n  string(COMPARE EQUAL \"${sha1}\" \"\" is_bad)\n  if(is_bad)\n    hunter_gate_internal_error(\"sha1 is empty\")\n  endif()\n\n  string(SUBSTRING \"${sha1}\" 0 7 archive_id)\n\n  set(\n      hunter_self\n      \"${root}/_Base/Download/Hunter/${version}/${archive_id}/Unpacked\"\n  )\n\n  set(\"${result}\" \"${hunter_self}\" PARENT_SCOPE)\nendfunction()\n\n# Set HUNTER_GATE_ROOT cmake variable to suitable value.\nfunction(hunter_gate_detect_root)\n  # Check CMake variable\n  string(COMPARE NOTEQUAL \"${HUNTER_ROOT}\" \"\" not_empty)\n  if(not_empty)\n    set(HUNTER_GATE_ROOT \"${HUNTER_ROOT}\" PARENT_SCOPE)\n    hunter_gate_status_debug(\"HUNTER_ROOT detected by cmake variable\")\n    return()\n  endif()\n\n  # Check environment variable\n  string(COMPARE NOTEQUAL \"$ENV{HUNTER_ROOT}\" \"\" not_empty)\n  if(not_empty)\n    set(HUNTER_GATE_ROOT \"$ENV{HUNTER_ROOT}\" PARENT_SCOPE)\n    hunter_gate_status_debug(\"HUNTER_ROOT detected by environment variable\")\n    return()\n  endif()\n\n  # Check HOME environment variable\n  string(COMPARE NOTEQUAL \"$ENV{HOME}\" \"\" result)\n  if(result)\n    set(HUNTER_GATE_ROOT \"$ENV{HOME}/.hunter\" PARENT_SCOPE)\n    hunter_gate_status_debug(\"HUNTER_ROOT set using HOME environment variable\")\n    return()\n  endif()\n\n  # Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)\n  if(WIN32)\n    string(COMPARE NOTEQUAL \"$ENV{SYSTEMDRIVE}\" \"\" result)\n    if(result)\n      set(HUNTER_GATE_ROOT \"$ENV{SYSTEMDRIVE}/.hunter\" PARENT_SCOPE)\n      hunter_gate_status_debug(\n          \"HUNTER_ROOT set using SYSTEMDRIVE environment variable\"\n      )\n      return()\n    endif()\n\n    string(COMPARE NOTEQUAL \"$ENV{USERPROFILE}\" \"\" result)\n    if(result)\n      set(HUNTER_GATE_ROOT \"$ENV{USERPROFILE}/.hunter\" PARENT_SCOPE)\n      hunter_gate_status_debug(\n          \"HUNTER_ROOT set using USERPROFILE environment variable\"\n      )\n      return()\n    endif()\n  endif()\n\n  hunter_gate_fatal_error(\n      \"Can't detect HUNTER_ROOT\"\n      ERROR_PAGE \"error.detect.hunter.root\"\n  )\nendfunction()\n\nfunction(hunter_gate_download dir)\n  string(\n      COMPARE\n      NOTEQUAL\n      \"$ENV{HUNTER_DISABLE_AUTOINSTALL}\"\n      \"\"\n      disable_autoinstall\n  )\n  if(disable_autoinstall AND NOT HUNTER_RUN_INSTALL)\n    hunter_gate_fatal_error(\n        \"Hunter not found in '${dir}'\"\n        \"Set HUNTER_RUN_INSTALL=ON to auto-install it from '${HUNTER_GATE_URL}'\"\n        \"Settings:\"\n        \"  HUNTER_ROOT: ${HUNTER_GATE_ROOT}\"\n        \"  HUNTER_SHA1: ${HUNTER_GATE_SHA1}\"\n        ERROR_PAGE \"error.run.install\"\n    )\n  endif()\n  string(COMPARE EQUAL \"${dir}\" \"\" is_bad)\n  if(is_bad)\n    hunter_gate_internal_error(\"Empty 'dir' argument\")\n  endif()\n\n  string(COMPARE EQUAL \"${HUNTER_GATE_SHA1}\" \"\" is_bad)\n  if(is_bad)\n    hunter_gate_internal_error(\"HUNTER_GATE_SHA1 empty\")\n  endif()\n\n  string(COMPARE EQUAL \"${HUNTER_GATE_URL}\" \"\" is_bad)\n  if(is_bad)\n    hunter_gate_internal_error(\"HUNTER_GATE_URL empty\")\n  endif()\n\n  set(done_location \"${dir}/DONE\")\n  set(sha1_location \"${dir}/SHA1\")\n\n  set(build_dir \"${dir}/Build\")\n  set(cmakelists \"${dir}/CMakeLists.txt\")\n\n  hunter_gate_status_debug(\"Locking directory: ${dir}\")\n  file(LOCK \"${dir}\" DIRECTORY GUARD FUNCTION)\n  hunter_gate_status_debug(\"Lock done\")\n\n  if(EXISTS \"${done_location}\")\n    # while waiting for lock other instance can do all the job\n    hunter_gate_status_debug(\"File '${done_location}' found, skip install\")\n    return()\n  endif()\n\n  file(REMOVE_RECURSE \"${build_dir}\")\n  file(REMOVE_RECURSE \"${cmakelists}\")\n\n  file(MAKE_DIRECTORY \"${build_dir}\") # check directory permissions\n\n  # Disabling languages speeds up a little bit, reduces noise in the output\n  # and avoids path too long windows error\n  file(\n      WRITE\n      \"${cmakelists}\"\n      \"cmake_minimum_required(VERSION 3.2)\\n\"\n      \"project(HunterDownload LANGUAGES NONE)\\n\"\n      \"include(ExternalProject)\\n\"\n      \"ExternalProject_Add(\\n\"\n      \"    Hunter\\n\"\n      \"    URL\\n\"\n      \"    \\\"${HUNTER_GATE_URL}\\\"\\n\"\n      \"    URL_HASH\\n\"\n      \"    SHA1=${HUNTER_GATE_SHA1}\\n\"\n      \"    DOWNLOAD_DIR\\n\"\n      \"    \\\"${dir}\\\"\\n\"\n      \"    TLS_VERIFY\\n\"\n      \"    ${HUNTER_TLS_VERIFY}\\n\"\n      \"    SOURCE_DIR\\n\"\n      \"    \\\"${dir}/Unpacked\\\"\\n\"\n      \"    CONFIGURE_COMMAND\\n\"\n      \"    \\\"\\\"\\n\"\n      \"    BUILD_COMMAND\\n\"\n      \"    \\\"\\\"\\n\"\n      \"    INSTALL_COMMAND\\n\"\n      \"    \\\"\\\"\\n\"\n      \")\\n\"\n  )\n\n  if(HUNTER_STATUS_DEBUG)\n    set(logging_params \"\")\n  else()\n    set(logging_params OUTPUT_QUIET)\n  endif()\n\n  hunter_gate_status_debug(\"Run generate\")\n\n  # Need to add toolchain file too.\n  # Otherwise on Visual Studio + MDD this will fail with error:\n  # \"Could not find an appropriate version of the Windows 10 SDK installed on this machine\"\n  if(EXISTS \"${CMAKE_TOOLCHAIN_FILE}\")\n    get_filename_component(absolute_CMAKE_TOOLCHAIN_FILE \"${CMAKE_TOOLCHAIN_FILE}\" ABSOLUTE)\n    set(toolchain_arg \"-DCMAKE_TOOLCHAIN_FILE=${absolute_CMAKE_TOOLCHAIN_FILE}\")\n  else()\n    # 'toolchain_arg' can't be empty\n    set(toolchain_arg \"-DCMAKE_TOOLCHAIN_FILE=\")\n  endif()\n\n  string(COMPARE EQUAL \"${CMAKE_MAKE_PROGRAM}\" \"\" no_make)\n  if(no_make)\n    set(make_arg \"\")\n  else()\n    # Test case: remove Ninja from PATH but set it via CMAKE_MAKE_PROGRAM\n    set(make_arg \"-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}\")\n  endif()\n\n  execute_process(\n      COMMAND\n      \"${CMAKE_COMMAND}\"\n      \"-H${dir}\"\n      \"-B${build_dir}\"\n      \"-G${CMAKE_GENERATOR}\"\n      \"${toolchain_arg}\"\n      ${make_arg}\n      WORKING_DIRECTORY \"${dir}\"\n      RESULT_VARIABLE download_result\n      ${logging_params}\n  )\n\n  if(NOT download_result EQUAL 0)\n    hunter_gate_internal_error(\n        \"Configure project failed.\"\n        \"To reproduce the error run: ${CMAKE_COMMAND} -H${dir} -B${build_dir} -G${CMAKE_GENERATOR} ${toolchain_arg} ${make_arg}\"\n        \"In directory ${dir}\"\n    )\n  endif()\n\n  hunter_gate_status_print(\n      \"Initializing Hunter workspace (${HUNTER_GATE_SHA1})\"\n      \"  ${HUNTER_GATE_URL}\"\n      \"  -> ${dir}\"\n  )\n  execute_process(\n      COMMAND \"${CMAKE_COMMAND}\" --build \"${build_dir}\"\n      WORKING_DIRECTORY \"${dir}\"\n      RESULT_VARIABLE download_result\n      ${logging_params}\n  )\n\n  if(NOT download_result EQUAL 0)\n    hunter_gate_internal_error(\"Build project failed\")\n  endif()\n\n  file(REMOVE_RECURSE \"${build_dir}\")\n  file(REMOVE_RECURSE \"${cmakelists}\")\n\n  file(WRITE \"${sha1_location}\" \"${HUNTER_GATE_SHA1}\")\n  file(WRITE \"${done_location}\" \"DONE\")\n\n  hunter_gate_status_debug(\"Finished\")\nendfunction()\n\n# Must be a macro so master file 'cmake/Hunter' can\n# apply all variables easily just by 'include' command\n# (otherwise PARENT_SCOPE magic needed)\nmacro(HunterGate)\n  if(HUNTER_GATE_DONE)\n    # variable HUNTER_GATE_DONE set explicitly for external project\n    # (see `hunter_download`)\n    set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)\n  endif()\n\n  # First HunterGate command will init Hunter, others will be ignored\n  get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)\n\n  if(NOT HUNTER_ENABLED)\n    # Empty function to avoid error \"unknown function\"\n    function(hunter_add_package)\n    endfunction()\n\n    set(\n        _hunter_gate_disabled_mode_dir\n        \"${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/disabled-mode\"\n    )\n    if(EXISTS \"${_hunter_gate_disabled_mode_dir}\")\n      hunter_gate_status_debug(\n          \"Adding \\\"disabled-mode\\\" modules: ${_hunter_gate_disabled_mode_dir}\"\n      )\n      list(APPEND CMAKE_PREFIX_PATH \"${_hunter_gate_disabled_mode_dir}\")\n    endif()\n  elseif(_hunter_gate_done)\n    hunter_gate_status_debug(\"Secondary HunterGate (use old settings)\")\n    hunter_gate_self(\n        \"${HUNTER_CACHED_ROOT}\"\n        \"${HUNTER_VERSION}\"\n        \"${HUNTER_SHA1}\"\n        _hunter_self\n    )\n    include(\"${_hunter_self}/cmake/Hunter\")\n  else()\n    set(HUNTER_GATE_LOCATION \"${CMAKE_CURRENT_SOURCE_DIR}\")\n\n    string(COMPARE NOTEQUAL \"${PROJECT_NAME}\" \"\" _have_project_name)\n    if(_have_project_name)\n      hunter_gate_fatal_error(\n          \"Please set HunterGate *before* 'project' command. \"\n          \"Detected project: ${PROJECT_NAME}\"\n          ERROR_PAGE \"error.huntergate.before.project\"\n      )\n    endif()\n\n    cmake_parse_arguments(\n        HUNTER_GATE \"LOCAL\" \"URL;SHA1;GLOBAL;FILEPATH\" \"\" ${ARGV}\n    )\n\n    string(COMPARE EQUAL \"${HUNTER_GATE_SHA1}\" \"\" _empty_sha1)\n    string(COMPARE EQUAL \"${HUNTER_GATE_URL}\" \"\" _empty_url)\n    string(\n        COMPARE\n        NOTEQUAL\n        \"${HUNTER_GATE_UNPARSED_ARGUMENTS}\"\n        \"\"\n        _have_unparsed\n    )\n    string(COMPARE NOTEQUAL \"${HUNTER_GATE_GLOBAL}\" \"\" _have_global)\n    string(COMPARE NOTEQUAL \"${HUNTER_GATE_FILEPATH}\" \"\" _have_filepath)\n\n    if(_have_unparsed)\n      hunter_gate_user_error(\n          \"HunterGate unparsed arguments: ${HUNTER_GATE_UNPARSED_ARGUMENTS}\"\n      )\n    endif()\n    if(_empty_sha1)\n      hunter_gate_user_error(\"SHA1 suboption of HunterGate is mandatory\")\n    endif()\n    if(_empty_url)\n      hunter_gate_user_error(\"URL suboption of HunterGate is mandatory\")\n    endif()\n    if(_have_global)\n      if(HUNTER_GATE_LOCAL)\n        hunter_gate_user_error(\"Unexpected LOCAL (already has GLOBAL)\")\n      endif()\n      if(_have_filepath)\n        hunter_gate_user_error(\"Unexpected FILEPATH (already has GLOBAL)\")\n      endif()\n    endif()\n    if(HUNTER_GATE_LOCAL)\n      if(_have_global)\n        hunter_gate_user_error(\"Unexpected GLOBAL (already has LOCAL)\")\n      endif()\n      if(_have_filepath)\n        hunter_gate_user_error(\"Unexpected FILEPATH (already has LOCAL)\")\n      endif()\n    endif()\n    if(_have_filepath)\n      if(_have_global)\n        hunter_gate_user_error(\"Unexpected GLOBAL (already has FILEPATH)\")\n      endif()\n      if(HUNTER_GATE_LOCAL)\n        hunter_gate_user_error(\"Unexpected LOCAL (already has FILEPATH)\")\n      endif()\n    endif()\n\n    hunter_gate_detect_root() # set HUNTER_GATE_ROOT\n\n    # Beautify path, fix probable problems with windows path slashes\n    get_filename_component(\n        HUNTER_GATE_ROOT \"${HUNTER_GATE_ROOT}\" ABSOLUTE\n    )\n    hunter_gate_status_debug(\"HUNTER_ROOT: ${HUNTER_GATE_ROOT}\")\n    if(NOT HUNTER_ALLOW_SPACES_IN_PATH)\n      string(FIND \"${HUNTER_GATE_ROOT}\" \" \" _contain_spaces)\n      if(NOT _contain_spaces EQUAL -1)\n        hunter_gate_fatal_error(\n            \"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces.\"\n            \"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error\"\n            \"(Use at your own risk!)\"\n            ERROR_PAGE \"error.spaces.in.hunter.root\"\n        )\n      endif()\n    endif()\n\n    string(\n        REGEX\n        MATCH\n        \"[0-9]+\\\\.[0-9]+\\\\.[0-9]+[-_a-z0-9]*\"\n        HUNTER_GATE_VERSION\n        \"${HUNTER_GATE_URL}\"\n    )\n    string(COMPARE EQUAL \"${HUNTER_GATE_VERSION}\" \"\" _is_empty)\n    if(_is_empty)\n      set(HUNTER_GATE_VERSION \"unknown\")\n    endif()\n\n    hunter_gate_self(\n        \"${HUNTER_GATE_ROOT}\"\n        \"${HUNTER_GATE_VERSION}\"\n        \"${HUNTER_GATE_SHA1}\"\n        _hunter_self\n    )\n\n    set(_master_location \"${_hunter_self}/cmake/Hunter\")\n    get_filename_component(_archive_id_location \"${_hunter_self}/..\" ABSOLUTE)\n    set(_done_location \"${_archive_id_location}/DONE\")\n    set(_sha1_location \"${_archive_id_location}/SHA1\")\n\n    # Check Hunter already downloaded by HunterGate\n    if(NOT EXISTS \"${_done_location}\")\n      hunter_gate_download(\"${_archive_id_location}\")\n    endif()\n\n    if(NOT EXISTS \"${_done_location}\")\n      hunter_gate_internal_error(\"hunter_gate_download failed\")\n    endif()\n\n    if(NOT EXISTS \"${_sha1_location}\")\n      hunter_gate_internal_error(\"${_sha1_location} not found\")\n    endif()\n    file(READ \"${_sha1_location}\" _sha1_value)\n    string(COMPARE EQUAL \"${_sha1_value}\" \"${HUNTER_GATE_SHA1}\" _is_equal)\n    if(NOT _is_equal)\n      hunter_gate_internal_error(\n          \"Short SHA1 collision:\"\n          \"  ${_sha1_value} (from ${_sha1_location})\"\n          \"  ${HUNTER_GATE_SHA1} (HunterGate)\"\n      )\n    endif()\n    if(NOT EXISTS \"${_master_location}\")\n      hunter_gate_user_error(\n          \"Master file not found:\"\n          \"  ${_master_location}\"\n          \"try to update Hunter/HunterGate\"\n      )\n    endif()\n    include(\"${_master_location}\")\n    set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)\n  endif()\nendmacro()\n"
  },
  {
    "path": ".config/proji/templates/cmake/cmake/LTO.cmake",
    "content": "# Usage :\n#\n# Variable : ENABLE_LTO | Enable or disable LTO support for this build\n#\n# find_lto(lang)\n# - lang is C or CXX (the language to test LTO for)\n# - call it after project() so that the compiler is already detected\n#\n# This will check for LTO support and create a target_enable_lto(target [debug,optimized,general]) macro.\n# The 2nd parameter has the same meaning as in target_link_libraries, and is used to enable LTO only for those build configurations\n# 'debug' is by default the Debug configuration, and 'optimized' all the other configurations\n#\n# if ENABLE_LTO is set to false, an empty macro will be generated\n#\n# Then to enable LTO for your target use\n#\n#       target_enable_lto(mytarget general)\n#\n# It is however recommended to use it only for non debug builds the following way :\n#\n#       target_enable_lto(mytarget optimized)\n#\n# Note : For CMake versions < 3.9, target_link_library is used in it's non plain version.\n#        You will need to specify PUBLIC/PRIVATE/INTERFACE to all your other target_link_library calls for the target\n#\n# WARNING for cmake versions older than 3.9 :\n# This module will override CMAKE_AR CMAKE_RANLIB and CMAKE_NM by the gcc versions if found when building with gcc\n\n\n# License:\n#\n# Copyright (C) 2016 Lectem <lectem@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation files\n# (the 'Software') deal in the Software without restriction,\n# including without limitation the rights to use, copy, modify, merge,\n# publish, distribute, sublicense, and/or sell copies of the Software,\n# and to permit persons to whom the Software is furnished to do so,\n# subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n\ncmake_minimum_required(VERSION 3.1)\n\noption(ENABLE_LTO \"enable link time optimization\" ON)\n\nmacro(find_lto lang)\n    if(ENABLE_LTO AND NOT LTO_${lang}_CHECKED)\n\n      #LTO support was added for clang/gcc in 3.9\n      if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.9)\n          cmake_policy(SET CMP0054 NEW)\n\t\t  message(STATUS \"Checking for LTO Compatibility\")\n          # Since GCC 4.9 we need to use gcc-ar / gcc-ranlib / gcc-nm\n          if(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\" OR CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n              if(CMAKE_CXX_COMPILER_ID STREQUAL \"GNU\" AND NOT CMAKE_GCC_AR OR NOT CMAKE_GCC_RANLIB OR NOT CMAKE_GCC_NM)\n                  find_program(CMAKE_GCC_AR NAMES\n                    \"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar\"\n                    \"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ar-${_version}\"\n                    DOC \"gcc provided wrapper for ar which adds the --plugin option\"\n                  )\n                  find_program(CMAKE_GCC_RANLIB NAMES\n                    \"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib\"\n                    \"${_CMAKE_TOOLCHAIN_PREFIX}gcc-ranlib-${_version}\"\n                    DOC \"gcc provided wrapper for ranlib which adds the --plugin option\"\n                  )\n                  # Not needed, but at least stay coherent\n                  find_program(CMAKE_GCC_NM NAMES\n                    \"${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm\"\n                    \"${_CMAKE_TOOLCHAIN_PREFIX}gcc-nm-${_version}\"\n                    DOC \"gcc provided wrapper for nm which adds the --plugin option\"\n                  )\n                  mark_as_advanced(CMAKE_GCC_AR CMAKE_GCC_RANLIB CMAKE_GCC_NM)\n                  set(CMAKE_LTO_AR ${CMAKE_GCC_AR})\n                  set(CMAKE_LTO_RANLIB ${CMAKE_GCC_RANLIB})\n                  set(CMAKE_LTO_NM ${CMAKE_GCC_NM})\n              endif()\n              if(\"${CMAKE_CXX_COMPILER_ID}\" MATCHES \"Clang\")\n                  set(CMAKE_LTO_AR ${CMAKE_AR})\n                  set(CMAKE_LTO_RANLIB ${CMAKE_RANLIB})\n                  set(CMAKE_LTO_NM ${CMAKE_NM})\n              endif()\n\n              if(CMAKE_LTO_AR AND CMAKE_LTO_RANLIB)\n                set(__lto_flags -flto)\n\n                if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4.7)\n                  list(APPEND __lto_flags -fno-fat-lto-objects)\n                endif()\n\n                if(NOT DEFINED CMAKE_${lang}_PASSED_LTO_TEST)\n                  set(__output_dir \"${CMAKE_PLATFORM_INFO_DIR}/LtoTest1${lang}\")\n                  file(MAKE_DIRECTORY \"${__output_dir}\")\n                  set(__output_base \"${__output_dir}/lto-test-${lang}\")\n\n                  execute_process(\n                    COMMAND ${CMAKE_COMMAND} -E echo \"void foo() {}\"\n                    COMMAND ${CMAKE_${lang}_COMPILER} ${__lto_flags} -c -xc -\n                      -o \"${__output_base}.o\"\n                    RESULT_VARIABLE __result\n                    ERROR_QUIET\n                    OUTPUT_QUIET\n                  )\n\n                  if(\"${__result}\" STREQUAL \"0\")\n                    execute_process(\n                      COMMAND ${CMAKE_LTO_AR} cr \"${__output_base}.a\" \"${__output_base}.o\"\n                      RESULT_VARIABLE __result\n                      ERROR_QUIET\n                      OUTPUT_QUIET\n                    )\n                  endif()\n\n                  if(\"${__result}\" STREQUAL \"0\")\n                    execute_process(\n                      COMMAND ${CMAKE_LTO_RANLIB} \"${__output_base}.a\"\n                      RESULT_VARIABLE __result\n                      ERROR_QUIET\n                      OUTPUT_QUIET\n                    )\n                  endif()\n\n                  if(\"${__result}\" STREQUAL \"0\")\n                    execute_process(\n                      COMMAND ${CMAKE_COMMAND} -E echo \"void foo(); int main() {foo();}\"\n                      COMMAND ${CMAKE_${lang}_COMPILER} ${__lto_flags} -xc -\n                        -x none \"${__output_base}.a\" -o \"${__output_base}\"\n                      RESULT_VARIABLE __result\n                      ERROR_QUIET\n                      OUTPUT_QUIET\n                    )\n                  endif()\n\n                  if(\"${__result}\" STREQUAL \"0\")\n                    set(__lto_found TRUE)\n                  endif()\n\n                  set(CMAKE_${lang}_PASSED_LTO_TEST\n                    ${__lto_found} CACHE INTERNAL\n                    \"If the compiler passed a simple LTO test compile\")\n                endif()\n                if(CMAKE_${lang}_PASSED_LTO_TEST)\n                  message(STATUS \"Checking for LTO Compatibility - works\")\n                  set(LTO_${lang}_SUPPORT TRUE CACHE BOOL \"Do we have LTO support ?\")\n                  set(LTO_COMPILE_FLAGS -flto CACHE STRING \"Link Time Optimization compile flags\")\n                  set(LTO_LINK_FLAGS -flto CACHE STRING \"Link Time Optimization link flags\")\n                else()\n                  message(STATUS \"Checking for LTO Compatibility - not working\")\n                endif()\n\n              endif()\n            elseif(CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n                message(STATUS \"Checking for LTO Compatibility - works (assumed for clang)\")\n                set(LTO_${lang}_SUPPORT TRUE CACHE BOOL \"Do we have LTO support ?\")\n                set(LTO_COMPILE_FLAGS -flto CACHE STRING \"Link Time Optimization compile flags\")\n                set(LTO_LINK_FLAGS -flto CACHE STRING \"Link Time Optimization link flags\")\n            elseif(CMAKE_CXX_COMPILER_ID STREQUAL \"MSVC\")\n                message(STATUS \"Checking for LTO Compatibility - works\")\n                set(LTO_${lang}_SUPPORT TRUE CACHE BOOL \"Do we have LTO support ?\")\n                set(LTO_COMPILE_FLAGS /GL CACHE STRING \"Link Time Optimization compile flags\")\n                set(LTO_LINK_FLAGS -LTCG:INCREMENTAL CACHE STRING \"Link Time Optimization link flags\")\n            else()\n                message(STATUS \"Checking for LTO Compatibility - compiler not handled by module\")\n            endif()\n            mark_as_advanced(LTO_${lang}_SUPPORT LTO_COMPILE_FLAGS LTO_LINK_FLAGS)\n\n\n            set(LTO_${lang}_CHECKED TRUE CACHE INTERNAL \"\" )\n\n            if(CMAKE_GCC_AR AND CMAKE_GCC_RANLIB AND CMAKE_GCC_NM)\n                # THIS IS HACKY BUT THERE IS NO OTHER SOLUTION ATM\n                set(CMAKE_AR ${CMAKE_GCC_AR} CACHE FILEPATH \"Forcing gcc-ar instead of ar\" FORCE)\n                set(CMAKE_NM ${CMAKE_GCC_NM} CACHE FILEPATH \"Forcing gcc-nm instead of nm\" FORCE)\n                set(CMAKE_RANLIB ${CMAKE_GCC_RANLIB} CACHE FILEPATH \"Forcing gcc-ranlib instead of ranlib\" FORCE)\n            endif()\n      endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.9)\n    endif(ENABLE_LTO AND NOT LTO_${lang}_CHECKED)\n\n\n    if(ENABLE_LTO)\n      #Special case for cmake older than 3.9, using a library for gcc/clang, but could setup the flags directly.\n      #Taking advantage of the [debug,optimized] parameter of target_link_libraries\n      if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.9)\n        if(LTO_${lang}_SUPPORT)\n            if(NOT TARGET __enable_lto_tgt)\n                add_library(__enable_lto_tgt INTERFACE)\n            endif()\n            target_compile_options(__enable_lto_tgt INTERFACE ${LTO_COMPILE_FLAGS})\n            #this might not work for all platforms... in which case we'll have to set the link flags on the target directly\n            target_link_libraries(__enable_lto_tgt INTERFACE ${LTO_LINK_FLAGS} )\n            macro(target_enable_lto _target _build_configuration)\n                if(${_build_configuration} STREQUAL \"optimized\" OR ${_build_configuration} STREQUAL \"debug\" )\n                    target_link_libraries(${_target} PRIVATE ${_build_configuration} __enable_lto_tgt)\n                else()\n                    target_link_libraries(${_target} PRIVATE __enable_lto_tgt)\n                endif()\n            endmacro()\n        else()\n            #In old cmake versions, we can set INTERPROCEDURAL_OPTIMIZATION even if not supported by the compiler\n            #So if we didn't detect it, let cmake give it a try\n            set(__IPO_SUPPORTED TRUE)\n        endif()\n      else()\n          cmake_policy(SET CMP0069 NEW)\n          include(CheckIPOSupported)\n          # Optional IPO. Do not use IPO if it's not supported by compiler.\n          check_ipo_supported(RESULT __IPO_SUPPORTED OUTPUT output)\n          if(NOT __IPO_SUPPORTED)\n            message(STATUS \"IPO is not supported or broken.\")\n          else()\n            message(STATUS \"IPO is supported !\")\n          endif()\n      endif()\n      if(__IPO_SUPPORTED)\n        macro(target_enable_lto _target _build_configuration)\n            if(NOT ${_build_configuration} STREQUAL \"debug\" )\n                #enable for all configurations\n                set_target_properties(${_target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)\n            endif()\n            if(${_build_configuration} STREQUAL \"optimized\" )\n                #blacklist debug configurations\n                set(__enable_debug_lto FALSE)\n            else()\n                #enable only for debug configurations\n                set(__enable_debug_lto TRUE)\n            endif()\n            get_property(DEBUG_CONFIGURATIONS GLOBAL PROPERTY DEBUG_CONFIGURATIONS)\n            if(NOT DEBUG_CONFIGURATIONS)\n                set(DEBUG_CONFIGURATIONS DEBUG) # This is what is done by CMAKE internally... since DEBUG_CONFIGURATIONS is empty by default\n            endif()\n            foreach(config IN LISTS DEBUG_CONFIGURATIONS)\n                set_target_properties(${_target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_${config} ${__enable_debug_lto})\n            endforeach()\n        endmacro()\n      endif()\n    endif()\n    if(NOT COMMAND target_enable_lto)\n        macro(target_enable_lto _target _build_configuration)\n        endmacro()\n    endif()\nendmacro()\n"
  },
  {
    "path": ".config/proji/templates/cmake/cmake/Packaging.cmake",
    "content": "include(CPack)\ninclude(GNUInstallDirs)\n###### CPACK PACKAGING SYSTEM ######\n# Set up packager.\nset(CPACK_PROJECT_NAME                  ${PROJECT_NAME})\nset(CPACK_PACKAGE_DESCRIPTION_SUMMARY   \"${CMAKE_PROJECT_NAME}\")\nset(CPACK_PACKAGE_VENDOR                \"${CMAKE_PROJECT_NAME}_VENDOR_NAME\")\nset(CPACK_PACKAGE_DESCRIPTION_FILE      \"${PROJECT_PATH}/README.md\")\nset(CPACK_RESOURCE_FILE_LICENSE         \"${PROJECT_PATH}/LICENSE.md\")\nset(CPACK_PACKAGE_VERSION_MAJOR         \"${${CMAKE_PROJECT_NAME}_VERSION_MAJOR}\")\nset(CPACK_PACKAGE_VERSION_MINOR         \"${${CMAKE_PROJECT_NAME}_VERSION_MINOR}\")\nset(CPACK_PACKAGE_VERSION_PATCH         \"${${CMAKE_PROJECT_NAME}_VERSION_PATCH}\")\nset(CPACK_PACKAGE_INSTALL_DIRECTORY     \"${CMAKE_PROJECT_NAME}\")\nset(CPACK_MONOLITHIC_INSTALL            1)\n\n\n"
  },
  {
    "path": ".config/proji/templates/cmake/cmake/Uninstall.cmake",
    "content": "# Source: https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake\n\nif(NOT EXISTS \"@CMAKE_BINARY_DIR@/install_manifest.txt\")\n  message(FATAL_ERROR \"Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt\")\nendif(NOT EXISTS \"@CMAKE_BINARY_DIR@/install_manifest.txt\")\n\nfile(READ \"@CMAKE_BINARY_DIR@/install_manifest.txt\" files)\nstring(REGEX REPLACE \"\\n\" \";\" files \"${files}\")\nforeach(file ${files})\n  message(STATUS \"Uninstalling $ENV{DESTDIR}${file}\")\n  if(IS_SYMLINK \"$ENV{DESTDIR}${file}\" OR EXISTS \"$ENV{DESTDIR}${file}\")\n    exec_program(\n      \"@CMAKE_COMMAND@\" ARGS \"-E remove \\\"$ENV{DESTDIR}${file}\\\"\"\n      OUTPUT_VARIABLE rm_out\n      RETURN_VALUE rm_retval\n      )\n    if(NOT \"${rm_retval}\" STREQUAL 0)\n      message(FATAL_ERROR \"Problem when removing $ENV{DESTDIR}${file}\")\n    endif(NOT \"${rm_retval}\" STREQUAL 0)\n  else(IS_SYMLINK \"$ENV{DESTDIR}${file}\" OR EXISTS \"$ENV{DESTDIR}${file}\")\n    message(STATUS \"File $ENV{DESTDIR}${file} does not exist.\")\n  endif(IS_SYMLINK \"$ENV{DESTDIR}${file}\" OR EXISTS \"$ENV{DESTDIR}${file}\")\nendforeach(file)\n"
  },
  {
    "path": ".config/proji/templates/cmake/cmake/Warnings.cmake",
    "content": "# Helper script to set warnings\n# Usage :\n#  target_set_warnings(target\n#    [ENABLE [ALL] [list of warning names]]\n#    [DISABLE [ALL/Annoying] [list of warning names]]\n#    [AS_ERROR ALL]\n#  )\n#\n#  ENABLE\n#    * ALL: means all the warnings possible to enable through a one parameter switch.\n#      Note that for some compilers, this does not mean every single warning will be enabled (GCC for instance).\n#    * Any other name: enable the warning with the given name\n#\n#  DISABLE\n#    * ALL: will override any other settings and this target INTERFACE includes will be considered as system includes by targets linking it.\n#    * Annoying: Warnings that the author thinks should only be used as static analysis tools not in production. On MSVC, also sets _CRT_SECURE_NO_WARNINGS.\n#    * Any other name: disable the warning with the given name\n#\n#  AS_ERROR\n#    * ALL: is the only option available as not all compilers let us set specific warnings as error from command line (MSVC).\n#\n#\n# License:\n#\n# Copyright (C) 2019 Lectem <lectem@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation files\n# (the 'Software') deal in the Software without restriction,\n# including without limitation the rights to use, copy, modify, merge,\n# publish, distribute, sublicense, and/or sell copies of the Software,\n# and to permit persons to whom the Software is furnished to do so,\n# subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n\ncmake_minimum_required(VERSION 3.1)\n\noption(ENABLE_WARNINGS_SETTINGS \"Allow target_set_warnings to add flags and defines. Set this to OFF if you want to provide your own warning parameters.\" ON)\n\nfunction(target_set_warnings)\n    if(NOT ENABLE_WARNINGS_SETTINGS)\n        return()\n    endif()\n    if (\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"MSVC\")\n      set(WMSVC TRUE)\n      set(WARNING_ENABLE_PREFIX \"/w1\") # Means the warning will be available at all levels that do emit warnings\n      set(WARNING_DISABLE_PREFIX \"/wd\")\n    elseif (\"${CMAKE_CXX_COMPILER_ID}\" STREQUAL \"GNU\")\n      set(WGCC TRUE)\n      set(WARNING_ENABLE_PREFIX \"-W\")\n      set(WARNING_DISABLE_PREFIX \"-Wno-\")\n    elseif (\"${CMAKE_CXX_COMPILER_ID}\" MATCHES \"Clang\")\n      set(WCLANG TRUE)\n      set(WARNING_ENABLE_PREFIX \"-W\")\n      set(WARNING_DISABLE_PREFIX \"-Wno-\")\n    endif()\n    set(multiValueArgs ENABLE DISABLE AS_ERROR)\n    cmake_parse_arguments(this \"\" \"\" \"${multiValueArgs}\" ${ARGN})\n    list(FIND this_ENABLE \"ALL\" enable_all)\n    list(FIND this_DISABLE \"ALL\" disable_all)\n    list(FIND this_AS_ERROR \"ALL\" as_error_all)\n    if(NOT ${enable_all} EQUAL -1)\n      if(WMSVC)\n        # Not all the warnings, but WAll is unusable when using libraries\n        # Unless you'd like to support MSVC in the code with pragmas, this is probably the best option\n        list(APPEND WarningFlags \"/W4\")\n      elseif(WGCC)\n        list(APPEND WarningFlags \"-Wall\" \"-Wextra\" \"-Wpedantic\")\n      elseif(WCLANG)\n        list(APPEND WarningFlags \"-Wall\" \"-Weverything\" \"-Wpedantic\")\n      endif()\n    elseif(NOT ${disable_all} EQUAL -1)\n      set(SystemIncludes TRUE) # Treat includes as if coming from system\n      if(WMSVC)\n        list(APPEND WarningFlags \"/w\" \"/W0\")\n      elseif(WGCC OR WCLANG)\n        list(APPEND WarningFlags \"-w\")\n      endif()\n    endif()\n\n    list(FIND this_DISABLE \"Annoying\" disable_annoying)\n    if(NOT ${disable_annoying} EQUAL -1)\n      if(WMSVC)\n        # bounds-checked functions require to set __STDC_WANT_LIB_EXT1__ which we usually don't need/want\n        list(APPEND WarningDefinitions -D_CRT_SECURE_NO_WARNINGS)\n        # disable C4514 C4710 C4711... Those are useless to add most of the time\n        #list(APPEND WarningFlags \"/wd4514\" \"/wd4710\" \"/wd4711\")\n        #list(APPEND WarningFlags \"/wd4365\") #signed/unsigned mismatch\n        #list(APPEND WarningFlags \"/wd4668\") # is not defined as a preprocessor macro, replacing with '0' for\n      elseif(WGCC OR WCLANG)\n        list(APPEND WarningFlags -Wno-switch-enum)\n        if(WCLANG)\n          list(APPEND WarningFlags -Wno-unknown-warning-option -Wno-padded -Wno-undef -Wno-reserved-id-macro -Wno-inconsistent-missing-destructor-override -fcomment-block-commands=test,retval)\n          if(NOT CMAKE_CXX_STANDARD EQUAL 98)\n              list(APPEND WarningFlags -Wno-c++98-compat -Wno-c++98-compat-pedantic)\n          endif()\n          if (\"${CMAKE_CXX_SIMULATE_ID}\" STREQUAL \"MSVC\") # clang-cl has some VCC flags by default that it will not recognize...\n              list(APPEND WarningFlags -Wno-unused-command-line-argument)\n          endif()\n        endif(WCLANG)\n      endif()\n    endif()\n\n    if(NOT ${as_error_all} EQUAL -1)\n      if(WMSVC)\n        list(APPEND WarningFlags \"/WX\")\n      elseif(WGCC OR WCLANG)\n        list(APPEND WarningFlags \"-Werror\")\n      endif()\n    endif()\n\n    if(this_ENABLE)\n      list(REMOVE_ITEM this_ENABLE ALL)\n      foreach(warning-name IN LISTS this_ENABLE)\n        list(APPEND WarningFlags \"${WARNING_ENABLE_PREFIX}${warning-name}\")\n      endforeach()\n    endif()\n\n\n    if(this_DISABLE)\n      list(REMOVE_ITEM this_DISABLE ALL Annoying)\n      foreach(warning-name IN LISTS this_DISABLE)\n        list(APPEND WarningFlags \"${WARNING_DISABLE_PREFIX}${warning-name}\")\n      endforeach()\n    endif()\n\n    foreach(target IN LISTS this_UNPARSED_ARGUMENTS)\n      if(WarningFlags)\n        target_compile_options(${target} PRIVATE ${WarningFlags})\n      endif()\n      if(WarningDefinitions)\n        target_compile_definitions(${target} PRIVATE ${WarningDefinitions})\n      endif()\n      if(SystemIncludes)\n        set_target_properties(${target} PROPERTIES\n            INTERFACE_SYSTEM_INCLUDE_DIRECTORIES $<TARGET_PROPERTY:${target},INTERFACE_INCLUDE_DIRECTORIES>)\n      endif()\n    endforeach()\nendfunction(target_set_warnings)\n"
  },
  {
    "path": ".config/proji/templates/cmake/external/headers/args.hpp",
    "content": "/* A simple header-only C++ argument parser library.\n *\n * https://github.com/Taywee/args\n *\n * Copyright (c) 2016-2019 Taylor C. Richberger <taywee@gmx.com> and Pavel\n * Belikov\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/** \\file args.hxx\n * \\brief this single-header lets you use all of the args functionality\n *\n * The important stuff is done inside the args namespace\n */\n\n#ifndef ARGS_HXX\n#define ARGS_HXX\n\n#include <algorithm>\n#include <iterator>\n#include <exception>\n#include <functional>\n#include <sstream>\n#include <string>\n#include <tuple>\n#include <vector>\n#include <unordered_map>\n#include <unordered_set>\n#include <type_traits>\n#include <cstddef>\n\n#ifdef ARGS_TESTNAMESPACE\nnamespace argstest\n{\n#else\n\n/** \\namespace args\n * \\brief contains all the functionality of the args library\n */\nnamespace args\n{\n#endif\n    /** Getter to grab the value from the argument type.\n     *\n     * If the Get() function of the type returns a reference, so does this, and\n     * the value will be modifiable.\n     */\n    template <typename Option>\n    auto get(Option &option_) -> decltype(option_.Get())\n    {\n        return option_.Get();\n    }\n\n    /** (INTERNAL) Count UTF-8 glyphs\n     *\n     * This is not reliable, and will fail for combinatory glyphs, but it's\n     * good enough here for now.\n     *\n     * \\param string The string to count glyphs from\n     * \\return The UTF-8 glyphs in the string\n     */\n    inline std::string::size_type Glyphs(const std::string &string_)\n    {\n        std::string::size_type length = 0;\n        for (const char c: string_)\n        {\n            if ((c & 0xc0) != 0x80)\n            {\n                ++length;\n            }\n        }\n        return length;\n    }\n\n    /** (INTERNAL) Wrap a vector of words into a vector of lines\n     *\n     * Empty words are skipped. Word \"\\n\" forces wrapping.\n     *\n     * \\param begin The begin iterator\n     * \\param end The end iterator\n     * \\param width The width of the body\n     * \\param firstlinewidth the width of the first line, defaults to the width of the body\n     * \\param firstlineindent the indent of the first line, defaults to 0\n     * \\return the vector of lines\n     */\n    template <typename It>\n    inline std::vector<std::string> Wrap(It begin,\n                                         It end,\n                                         const std::string::size_type width,\n                                         std::string::size_type firstlinewidth = 0,\n                                         std::string::size_type firstlineindent = 0)\n    {\n        std::vector<std::string> output;\n        std::string line(firstlineindent, ' ');\n        bool empty = true;\n\n        if (firstlinewidth == 0)\n        {\n            firstlinewidth = width;\n        }\n\n        auto currentwidth = firstlinewidth;\n\n        for (auto it = begin; it != end; ++it)\n        {\n            if (it->empty())\n            {\n                continue;\n            }\n\n            if (*it == \"\\n\")\n            {\n                if (!empty)\n                {\n                    output.push_back(line);\n                    line.clear();\n                    empty = true;\n                    currentwidth = width;\n                }\n\n                continue;\n            }\n\n            auto itemsize = Glyphs(*it);\n            if ((line.length() + 1 + itemsize) > currentwidth)\n            {\n                if (!empty)\n                {\n                    output.push_back(line);\n                    line.clear();\n                    empty = true;\n                    currentwidth = width;\n                }\n            }\n\n            if (itemsize > 0)\n            {\n                if (!empty)\n                {\n                    line += ' ';\n                }\n\n                line += *it;\n                empty = false;\n            }\n        }\n\n        if (!empty)\n        {\n            output.push_back(line);\n        }\n\n        return output;\n    }\n\n    namespace detail\n    {\n        template <typename T>\n        std::string Join(const T& array, const std::string &delimiter)\n        {\n            std::string res;\n            for (auto &element : array)\n            {\n                if (!res.empty())\n                {\n                    res += delimiter;\n                }\n\n                res += element;\n            }\n\n            return res;\n        }\n    }\n\n    /** (INTERNAL) Wrap a string into a vector of lines\n     *\n     * This is quick and hacky, but works well enough.  You can specify a\n     * different width for the first line\n     *\n     * \\param width The width of the body\n     * \\param firstlinewid the width of the first line, defaults to the width of the body\n     * \\return the vector of lines\n     */\n    inline std::vector<std::string> Wrap(const std::string &in, const std::string::size_type width, std::string::size_type firstlinewidth = 0)\n    {\n        // Preserve existing line breaks\n        const auto newlineloc = in.find('\\n');\n        if (newlineloc != in.npos)\n        {\n            auto first = Wrap(std::string(in, 0, newlineloc), width);\n            auto second = Wrap(std::string(in, newlineloc + 1), width);\n            first.insert(\n                std::end(first),\n                std::make_move_iterator(std::begin(second)),\n                std::make_move_iterator(std::end(second)));\n            return first;\n        }\n\n        std::istringstream stream(in);\n        std::string::size_type indent = 0;\n\n        for (char c : in)\n        {\n            if (!isspace(c))\n            {\n                break;\n            }\n            ++indent;\n        }\n\n        return Wrap(std::istream_iterator<std::string>(stream), std::istream_iterator<std::string>(),\n                    width, firstlinewidth, indent);\n    }\n\n#ifdef ARGS_NOEXCEPT\n    /// Error class, for when ARGS_NOEXCEPT is defined\n    enum class Error\n    {\n        None,\n        Usage,\n        Parse,\n        Validation,\n        Required,\n        Map,\n        Extra,\n        Help,\n        Subparser,\n        Completion,\n    };\n#else\n    /** Base error class\n     */\n    class Error : public std::runtime_error\n    {\n        public:\n            Error(const std::string &problem) : std::runtime_error(problem) {}\n            virtual ~Error() {}\n    };\n\n    /** Errors that occur during usage\n     */\n    class UsageError : public Error\n    {\n        public:\n            UsageError(const std::string &problem) : Error(problem) {}\n            virtual ~UsageError() {}\n    };\n\n    /** Errors that occur during regular parsing\n     */\n    class ParseError : public Error\n    {\n        public:\n            ParseError(const std::string &problem) : Error(problem) {}\n            virtual ~ParseError() {}\n    };\n\n    /** Errors that are detected from group validation after parsing finishes\n     */\n    class ValidationError : public Error\n    {\n        public:\n            ValidationError(const std::string &problem) : Error(problem) {}\n            virtual ~ValidationError() {}\n    };\n\n    /** Errors that when a required flag is omitted\n     */\n    class RequiredError : public ValidationError\n    {\n        public:\n            RequiredError(const std::string &problem) : ValidationError(problem) {}\n            virtual ~RequiredError() {}\n    };\n\n    /** Errors in map lookups\n     */\n    class MapError : public ParseError\n    {\n        public:\n            MapError(const std::string &problem) : ParseError(problem) {}\n            virtual ~MapError() {}\n    };\n\n    /** Error that occurs when a singular flag is specified multiple times\n     */\n    class ExtraError : public ParseError\n    {\n        public:\n            ExtraError(const std::string &problem) : ParseError(problem) {}\n            virtual ~ExtraError() {}\n    };\n\n    /** An exception that indicates that the user has requested help\n     */\n    class Help : public Error\n    {\n        public:\n            Help(const std::string &flag) : Error(flag) {}\n            virtual ~Help() {}\n    };\n\n    /** (INTERNAL) An exception that emulates coroutine-like control flow for subparsers.\n     */\n    class SubparserError : public Error\n    {\n        public:\n            SubparserError() : Error(\"\") {}\n            virtual ~SubparserError() {}\n    };\n\n    /** An exception that contains autocompletion reply\n     */\n    class Completion : public Error\n    {\n        public:\n            Completion(const std::string &flag) : Error(flag) {}\n            virtual ~Completion() {}\n    };\n#endif\n\n    /** A simple unified option type for unified initializer lists for the Matcher class.\n     */\n    struct EitherFlag\n    {\n        const bool isShort;\n        const char shortFlag;\n        const std::string longFlag;\n        EitherFlag(const std::string &flag) : isShort(false), shortFlag(), longFlag(flag) {}\n        EitherFlag(const char *flag) : isShort(false), shortFlag(), longFlag(flag) {}\n        EitherFlag(const char flag) : isShort(true), shortFlag(flag), longFlag() {}\n\n        /** Get just the long flags from an initializer list of EitherFlags\n         */\n        static std::unordered_set<std::string> GetLong(std::initializer_list<EitherFlag> flags)\n        {\n            std::unordered_set<std::string>  longFlags;\n            for (const EitherFlag &flag: flags)\n            {\n                if (!flag.isShort)\n                {\n                    longFlags.insert(flag.longFlag);\n                }\n            }\n            return longFlags;\n        }\n\n        /** Get just the short flags from an initializer list of EitherFlags\n         */\n        static std::unordered_set<char> GetShort(std::initializer_list<EitherFlag> flags)\n        {\n            std::unordered_set<char>  shortFlags;\n            for (const EitherFlag &flag: flags)\n            {\n                if (flag.isShort)\n                {\n                    shortFlags.insert(flag.shortFlag);\n                }\n            }\n            return shortFlags;\n        }\n\n        std::string str() const\n        {\n            return isShort ? std::string(1, shortFlag) : longFlag;\n        }\n\n        std::string str(const std::string &shortPrefix, const std::string &longPrefix) const\n        {\n            return isShort ? shortPrefix + std::string(1, shortFlag) : longPrefix + longFlag;\n        }\n    };\n\n\n\n    /** A class of \"matchers\", specifying short and flags that can possibly be\n     * matched.\n     *\n     * This is supposed to be constructed and then passed in, not used directly\n     * from user code.\n     */\n    class Matcher\n    {\n        private:\n            const std::unordered_set<char> shortFlags;\n            const std::unordered_set<std::string> longFlags;\n\n        public:\n            /** Specify short and long flags separately as iterators\n             *\n             * ex: `args::Matcher(shortFlags.begin(), shortFlags.end(), longFlags.begin(), longFlags.end())`\n             */\n            template <typename ShortIt, typename LongIt>\n            Matcher(ShortIt shortFlagsStart, ShortIt shortFlagsEnd, LongIt longFlagsStart, LongIt longFlagsEnd) :\n                shortFlags(shortFlagsStart, shortFlagsEnd),\n                longFlags(longFlagsStart, longFlagsEnd)\n            {\n                if (shortFlags.empty() && longFlags.empty())\n                {\n#ifndef ARGS_NOEXCEPT\n                    throw UsageError(\"empty Matcher\");\n#endif\n                }\n            }\n\n#ifdef ARGS_NOEXCEPT\n            /// Only for ARGS_NOEXCEPT\n            Error GetError() const noexcept\n            {\n                return shortFlags.empty() && longFlags.empty() ? Error::Usage : Error::None;\n            }\n#endif\n\n            /** Specify short and long flags separately as iterables\n             *\n             * ex: `args::Matcher(shortFlags, longFlags)`\n             */\n            template <typename Short, typename Long>\n            Matcher(Short &&shortIn, Long &&longIn) :\n                Matcher(std::begin(shortIn), std::end(shortIn), std::begin(longIn), std::end(longIn))\n            {}\n\n            /** Specify a mixed single initializer-list of both short and long flags\n             *\n             * This is the fancy one.  It takes a single initializer list of\n             * any number of any mixed kinds of flags.  Chars are\n             * automatically interpreted as short flags, and strings are\n             * automatically interpreted as long flags:\n             *\n             *     args::Matcher{'a'}\n             *     args::Matcher{\"foo\"}\n             *     args::Matcher{'h', \"help\"}\n             *     args::Matcher{\"foo\", 'f', 'F', \"FoO\"}\n             */\n            Matcher(std::initializer_list<EitherFlag> in) :\n                Matcher(EitherFlag::GetShort(in), EitherFlag::GetLong(in)) {}\n\n            Matcher(Matcher &&other) : shortFlags(std::move(other.shortFlags)), longFlags(std::move(other.longFlags))\n            {}\n\n            ~Matcher() {}\n\n            /** (INTERNAL) Check if there is a match of a short flag\n             */\n            bool Match(const char flag) const\n            {\n                return shortFlags.find(flag) != shortFlags.end();\n            }\n\n            /** (INTERNAL) Check if there is a match of a long flag\n             */\n            bool Match(const std::string &flag) const\n            {\n                return longFlags.find(flag) != longFlags.end();\n            }\n\n            /** (INTERNAL) Check if there is a match of a flag\n             */\n            bool Match(const EitherFlag &flag) const\n            {\n                return flag.isShort ? Match(flag.shortFlag) : Match(flag.longFlag);\n            }\n\n            /** (INTERNAL) Get all flag strings as a vector, with the prefixes embedded\n             */\n            std::vector<EitherFlag> GetFlagStrings() const\n            {\n                std::vector<EitherFlag> flagStrings;\n                flagStrings.reserve(shortFlags.size() + longFlags.size());\n                for (const char flag: shortFlags)\n                {\n                    flagStrings.emplace_back(flag);\n                }\n                for (const std::string &flag: longFlags)\n                {\n                    flagStrings.emplace_back(flag);\n                }\n                return flagStrings;\n            }\n\n            /** (INTERNAL) Get long flag if it exists or any short flag\n             */\n            EitherFlag GetLongOrAny() const\n            {\n                if (!longFlags.empty())\n                {\n                    return *longFlags.begin();\n                }\n\n                if (!shortFlags.empty())\n                {\n                    return *shortFlags.begin();\n                }\n\n                // should be unreachable\n                return ' ';\n            }\n\n            /** (INTERNAL) Get short flag if it exists or any long flag\n             */\n            EitherFlag GetShortOrAny() const\n            {\n                if (!shortFlags.empty())\n                {\n                    return *shortFlags.begin();\n                }\n\n                if (!longFlags.empty())\n                {\n                    return *longFlags.begin();\n                }\n\n                // should be unreachable\n                return ' ';\n            }\n    };\n\n    /** Attributes for flags.\n     */\n    enum class Options\n    {\n        /** Default options.\n         */\n        None = 0x0,\n\n        /** Flag can't be passed multiple times.\n         */\n        Single = 0x01,\n\n        /** Flag can't be omitted.\n         */\n        Required = 0x02,\n\n        /** Flag is excluded from usage line.\n         */\n        HiddenFromUsage = 0x04,\n\n        /** Flag is excluded from options help.\n         */\n        HiddenFromDescription = 0x08,\n\n        /** Flag is global and can be used in any subcommand.\n         */\n        Global = 0x10,\n\n        /** Flag stops a parser.\n         */\n        KickOut = 0x20,\n\n        /** Flag is excluded from auto completion.\n         */\n        HiddenFromCompletion = 0x40,\n\n        /** Flag is excluded from options help and usage line\n         */\n        Hidden = HiddenFromUsage | HiddenFromDescription | HiddenFromCompletion,\n    };\n\n    inline Options operator | (Options lhs, Options rhs)\n    {\n        return static_cast<Options>(static_cast<int>(lhs) | static_cast<int>(rhs));\n    }\n\n    inline Options operator & (Options lhs, Options rhs)\n    {\n        return static_cast<Options>(static_cast<int>(lhs) & static_cast<int>(rhs));\n    }\n\n    class FlagBase;\n    class PositionalBase;\n    class Command;\n    class ArgumentParser;\n\n    /** A simple structure of parameters for easy user-modifyable help menus\n     */\n    struct HelpParams\n    {\n        /** The width of the help menu\n         */\n        unsigned int width = 80;\n        /** The indent of the program line\n         */\n        unsigned int progindent = 2;\n        /** The indent of the program trailing lines for long parameters\n         */\n        unsigned int progtailindent = 4;\n        /** The indent of the description and epilogs\n         */\n        unsigned int descriptionindent = 4;\n        /** The indent of the flags\n         */\n        unsigned int flagindent = 6;\n        /** The indent of the flag descriptions\n         */\n        unsigned int helpindent = 40;\n        /** The additional indent each group adds\n         */\n        unsigned int eachgroupindent = 2;\n\n        /** The minimum gutter between each flag and its help\n         */\n        unsigned int gutter = 1;\n\n        /** Show the terminator when both options and positional parameters are present\n         */\n        bool showTerminator = true;\n\n        /** Show the {OPTIONS} on the prog line when this is true\n         */\n        bool showProglineOptions = true;\n\n        /** Show the positionals on the prog line when this is true\n         */\n        bool showProglinePositionals = true;\n\n        /** The prefix for short flags\n         */\n        std::string shortPrefix;\n\n        /** The prefix for long flags\n         */\n        std::string longPrefix;\n\n        /** The separator for short flags\n         */\n        std::string shortSeparator;\n\n        /** The separator for long flags\n         */\n        std::string longSeparator;\n\n        /** The program name for help generation\n         */\n        std::string programName;\n\n        /** Show command's flags\n         */\n        bool showCommandChildren = false;\n\n        /** Show command's descriptions and epilog\n         */\n        bool showCommandFullHelp = false;\n\n        /** The postfix for progline when showProglineOptions is true and command has any flags\n         */\n        std::string proglineOptions = \"{OPTIONS}\";\n\n        /** The prefix for progline when command has any subcommands\n         */\n        std::string proglineCommand = \"COMMAND\";\n\n        /** The prefix for progline value\n         */\n        std::string proglineValueOpen = \" <\";\n\n        /** The postfix for progline value\n         */\n        std::string proglineValueClose = \">\";\n\n        /** The prefix for progline required argument\n         */\n        std::string proglineRequiredOpen = \"\";\n\n        /** The postfix for progline required argument\n         */\n        std::string proglineRequiredClose = \"\";\n\n        /** The prefix for progline non-required argument\n         */\n        std::string proglineNonrequiredOpen = \"[\";\n\n        /** The postfix for progline non-required argument\n         */\n        std::string proglineNonrequiredClose = \"]\";\n\n        /** Show flags in program line\n         */\n        bool proglineShowFlags = false;\n\n        /** Use short flags in program lines when possible\n         */\n        bool proglinePreferShortFlags = false;\n\n        /** Program line prefix\n         */\n        std::string usageString;\n\n        /** String shown in help before flags descriptions\n         */\n        std::string optionsString = \"OPTIONS:\";\n\n        /** Display value name after all the long and short flags\n         */\n        bool useValueNameOnce = false;\n\n        /** Show value name\n         */\n        bool showValueName = true;\n\n        /** Add newline before flag description\n         */\n        bool addNewlineBeforeDescription = false;\n\n        /** The prefix for option value\n         */\n        std::string valueOpen = \"[\";\n\n        /** The postfix for option value\n         */\n        std::string valueClose = \"]\";\n\n        /** Add choices to argument description\n         */\n        bool addChoices = false;\n\n        /** The prefix for choices\n         */\n        std::string choiceString = \"\\nOne of: \";\n\n        /** Add default values to argument description\n         */\n        bool addDefault = false;\n\n        /** The prefix for default values\n         */\n        std::string defaultString = \"\\nDefault: \";\n    };\n\n    /** A number of arguments which can be consumed by an option.\n     *\n     * Represents a closed interval [min, max].\n     */\n    struct Nargs\n    {\n        const size_t min;\n        const size_t max;\n\n        Nargs(size_t min_, size_t max_) : min{min_}, max{max_}\n        {\n#ifndef ARGS_NOEXCEPT\n            if (max < min)\n            {\n                throw UsageError(\"Nargs: max > min\");\n            }\n#endif\n        }\n\n        Nargs(size_t num_) : min{num_}, max{num_}\n        {\n        }\n\n        friend bool operator == (const Nargs &lhs, const Nargs &rhs)\n        {\n            return lhs.min == rhs.min && lhs.max == rhs.max;\n        }\n\n        friend bool operator != (const Nargs &lhs, const Nargs &rhs)\n        {\n            return !(lhs == rhs);\n        }\n    };\n\n    /** Base class for all match types\n     */\n    class Base\n    {\n        private:\n            Options options = {};\n\n        protected:\n            bool matched = false;\n            const std::string help;\n#ifdef ARGS_NOEXCEPT\n            /// Only for ARGS_NOEXCEPT\n            mutable Error error = Error::None;\n            mutable std::string errorMsg;\n#endif\n\n        public:\n            Base(const std::string &help_, Options options_ = {}) : options(options_), help(help_) {}\n            virtual ~Base() {}\n\n            Options GetOptions() const noexcept\n            {\n                return options;\n            }\n\n            bool IsRequired() const noexcept\n            {\n                return (GetOptions() & Options::Required) != Options::None;\n            }\n\n            virtual bool Matched() const noexcept\n            {\n                return matched;\n            }\n\n            virtual void Validate(const std::string &, const std::string &) const\n            {\n            }\n\n            operator bool() const noexcept\n            {\n                return Matched();\n            }\n\n            virtual std::vector<std::tuple<std::string, std::string, unsigned>> GetDescription(const HelpParams &, const unsigned indentLevel) const\n            {\n                std::tuple<std::string, std::string, unsigned> description;\n                std::get<1>(description) = help;\n                std::get<2>(description) = indentLevel;\n                return { std::move(description) };\n            }\n\n            virtual std::vector<Command*> GetCommands()\n            {\n                return {};\n            }\n\n            virtual bool IsGroup() const\n            {\n                return false;\n            }\n\n            virtual FlagBase *Match(const EitherFlag &)\n            {\n                return nullptr;\n            }\n\n            virtual PositionalBase *GetNextPositional()\n            {\n                return nullptr;\n            }\n\n            virtual std::vector<FlagBase*> GetAllFlags()\n            {\n                return {};\n            }\n\n            virtual bool HasFlag() const\n            {\n                return false;\n            }\n\n            virtual bool HasPositional() const\n            {\n                return false;\n            }\n\n            virtual bool HasCommand() const\n            {\n                return false;\n            }\n\n            virtual std::vector<std::string> GetProgramLine(const HelpParams &) const\n            {\n                return {};\n            }\n\n            /// Sets a kick-out value for building subparsers\n            void KickOut(bool kickout_) noexcept\n            {\n                if (kickout_)\n                {\n                    options = options | Options::KickOut;\n                }\n                else\n                {\n                    options = static_cast<Options>(static_cast<int>(options) & ~static_cast<int>(Options::KickOut));\n                }\n            }\n\n            /// Gets the kick-out value for building subparsers\n            bool KickOut() const noexcept\n            {\n                return (options & Options::KickOut) != Options::None;\n            }\n\n            virtual void Reset() noexcept\n            {\n                matched = false;\n#ifdef ARGS_NOEXCEPT\n                error = Error::None;\n                errorMsg.clear();\n#endif\n            }\n\n#ifdef ARGS_NOEXCEPT\n            /// Only for ARGS_NOEXCEPT\n            virtual Error GetError() const\n            {\n                return error;\n            }\n\n            /// Only for ARGS_NOEXCEPT\n            std::string GetErrorMsg() const\n            {\n                return errorMsg;\n            }\n#endif\n    };\n\n    /** Base class for all match types that have a name\n     */\n    class NamedBase : public Base\n    {\n        protected:\n            const std::string name;\n            bool kickout = false;\n            std::string defaultString;\n            bool defaultStringManual = false;\n            std::vector<std::string> choicesStrings;\n            bool choicesStringManual = false;\n\n            virtual std::string GetDefaultString(const HelpParams&) const { return {}; }\n\n            virtual std::vector<std::string> GetChoicesStrings(const HelpParams&) const { return {}; }\n\n            virtual std::string GetNameString(const HelpParams&) const { return Name(); }\n\n            void AddDescriptionPostfix(std::string &dest, const bool isManual, const std::string &manual, bool isGenerated, const std::string &generated, const std::string &str) const\n            {\n                if (isManual && !manual.empty())\n                {\n                    dest += str;\n                    dest += manual;\n                }\n                else if (!isManual && isGenerated && !generated.empty())\n                {\n                    dest += str;\n                    dest += generated;\n                }\n            }\n\n        public:\n            NamedBase(const std::string &name_, const std::string &help_, Options options_ = {}) : Base(help_, options_), name(name_) {}\n            virtual ~NamedBase() {}\n\n            /** Sets default value string that will be added to argument description.\n             *  Use empty string to disable it for this argument.\n             */\n            void HelpDefault(const std::string &str)\n            {\n                defaultStringManual = true;\n                defaultString = str;\n            }\n\n            /** Gets default value string that will be added to argument description.\n             */\n            std::string HelpDefault(const HelpParams &params) const\n            {\n                return defaultStringManual ? defaultString : GetDefaultString(params);\n            }\n\n            /** Sets choices strings that will be added to argument description.\n             *  Use empty vector to disable it for this argument.\n             */\n            void HelpChoices(const std::vector<std::string> &array)\n            {\n                choicesStringManual = true;\n                choicesStrings = array;\n            }\n\n            /** Gets choices strings that will be added to argument description.\n             */\n            std::vector<std::string> HelpChoices(const HelpParams &params) const\n            {\n                return choicesStringManual ? choicesStrings : GetChoicesStrings(params);\n            }\n\n            virtual std::vector<std::tuple<std::string, std::string, unsigned>> GetDescription(const HelpParams &params, const unsigned indentLevel) const override\n            {\n                std::tuple<std::string, std::string, unsigned> description;\n                std::get<0>(description) = GetNameString(params);\n                std::get<1>(description) = help;\n                std::get<2>(description) = indentLevel;\n\n                AddDescriptionPostfix(std::get<1>(description), choicesStringManual, detail::Join(choicesStrings, \", \"), params.addChoices, detail::Join(GetChoicesStrings(params), \", \"), params.choiceString);\n                AddDescriptionPostfix(std::get<1>(description), defaultStringManual, defaultString, params.addDefault, GetDefaultString(params), params.defaultString);\n\n                return { std::move(description) };\n            }\n\n            virtual std::string Name() const\n            {\n                return name;\n            }\n    };\n\n    namespace detail\n    {\n        template <typename T, typename = int>\n        struct IsConvertableToString : std::false_type {};\n\n        template <typename T>\n        struct IsConvertableToString<T, decltype(std::declval<std::ostringstream&>() << std::declval<T>(), int())> : std::true_type {};\n\n        template <typename T>\n        typename std::enable_if<IsConvertableToString<T>::value, std::string>::type\n        ToString(const T &value)\n        {\n            std::ostringstream s;\n            s << value;\n            return s.str();\n        }\n\n        template <typename T>\n        typename std::enable_if<!IsConvertableToString<T>::value, std::string>::type\n        ToString(const T &)\n        {\n            return {};\n        }\n\n        template <typename T>\n        std::vector<std::string> MapKeysToStrings(const T &map)\n        {\n            std::vector<std::string> res;\n            using K = typename std::decay<decltype(std::begin(map)->first)>::type;\n            if (IsConvertableToString<K>::value)\n            {\n                for (const auto &p : map)\n                {\n                    res.push_back(detail::ToString(p.first));\n                }\n\n                std::sort(res.begin(), res.end());\n            }\n            return res;\n        }\n    }\n\n    /** Base class for all flag options\n     */\n    class FlagBase : public NamedBase\n    {\n        protected:\n            const Matcher matcher;\n\n            virtual std::string GetNameString(const HelpParams &params) const override\n            {\n                const std::string postfix = !params.showValueName || NumberOfArguments() == 0 ? std::string() : Name();\n                std::string flags;\n                const auto flagStrings = matcher.GetFlagStrings();\n                const bool useValueNameOnce = flagStrings.size() == 1 ? false : params.useValueNameOnce;\n                for (auto it = flagStrings.begin(); it != flagStrings.end(); ++it)\n                {\n                    auto &flag = *it;\n                    if (it != flagStrings.begin())\n                    {\n                        flags += \", \";\n                    }\n\n                    flags += flag.isShort ? params.shortPrefix : params.longPrefix;\n                    flags += flag.str();\n\n                    if (!postfix.empty() && (!useValueNameOnce || it + 1 == flagStrings.end()))\n                    {\n                        flags += flag.isShort ? params.shortSeparator : params.longSeparator;\n                        flags += params.valueOpen + postfix + params.valueClose;\n                    }\n                }\n\n                return flags;\n            }\n\n        public:\n            FlagBase(const std::string &name_, const std::string &help_, Matcher &&matcher_, const bool extraError_ = false) : NamedBase(name_, help_, extraError_ ? Options::Single : Options()), matcher(std::move(matcher_)) {}\n\n            FlagBase(const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_) : NamedBase(name_, help_, options_), matcher(std::move(matcher_)) {}\n\n            virtual ~FlagBase() {}\n\n            virtual FlagBase *Match(const EitherFlag &flag) override\n            {\n                if (matcher.Match(flag))\n                {\n                    if ((GetOptions() & Options::Single) != Options::None && matched)\n                    {\n                        std::ostringstream problem;\n                        problem << \"Flag '\" << flag.str() << \"' was passed multiple times, but is only allowed to be passed once\";\n#ifdef ARGS_NOEXCEPT\n                        error = Error::Extra;\n                        errorMsg = problem.str();\n#else\n                        throw ExtraError(problem.str());\n#endif\n                    }\n                    matched = true;\n                    return this;\n                }\n                return nullptr;\n            }\n\n            virtual std::vector<FlagBase*> GetAllFlags() override\n            {\n                return { this };\n            }\n\n            const Matcher &GetMatcher() const\n            {\n                return matcher;\n            }\n\n            virtual void Validate(const std::string &shortPrefix, const std::string &longPrefix) const override\n            {\n                if (!Matched() && IsRequired())\n                {\n                        std::ostringstream problem;\n                        problem << \"Flag '\" << matcher.GetLongOrAny().str(shortPrefix, longPrefix) << \"' is required\";\n#ifdef ARGS_NOEXCEPT\n                        error = Error::Required;\n                        errorMsg = problem.str();\n#else\n                        throw RequiredError(problem.str());\n#endif\n                }\n            }\n\n            virtual std::vector<std::string> GetProgramLine(const HelpParams &params) const override\n            {\n                if (!params.proglineShowFlags)\n                {\n                    return {};\n                }\n\n                const std::string postfix = NumberOfArguments() == 0 ? std::string() : Name();\n                const EitherFlag flag = params.proglinePreferShortFlags ? matcher.GetShortOrAny() : matcher.GetLongOrAny();\n                std::string res = flag.str(params.shortPrefix, params.longPrefix);\n                if (!postfix.empty())\n                {\n                    res += params.proglineValueOpen + postfix + params.proglineValueClose;\n                }\n\n                return { IsRequired() ? params.proglineRequiredOpen + res + params.proglineRequiredClose\n                                      : params.proglineNonrequiredOpen + res + params.proglineNonrequiredClose };\n            }\n\n            virtual bool HasFlag() const override\n            {\n                return true;\n            }\n\n#ifdef ARGS_NOEXCEPT\n            /// Only for ARGS_NOEXCEPT\n            virtual Error GetError() const override\n            {\n                const auto nargs = NumberOfArguments();\n                if (nargs.min > nargs.max)\n                {\n                    return Error::Usage;\n                }\n\n                const auto matcherError = matcher.GetError();\n                if (matcherError != Error::None)\n                {\n                    return matcherError;\n                }\n\n                return error;\n            }\n#endif\n\n            /** Defines how many values can be consumed by this option.\n             *\n             * \\return closed interval [min, max]\n             */\n            virtual Nargs NumberOfArguments() const noexcept = 0;\n\n            /** Parse values of this option.\n             *\n             * \\param value Vector of values. It's size must be in NumberOfArguments() interval.\n             */\n            virtual void ParseValue(const std::vector<std::string> &value) = 0;\n    };\n\n    /** Base class for value-accepting flag options\n     */\n    class ValueFlagBase : public FlagBase\n    {\n        public:\n            ValueFlagBase(const std::string &name_, const std::string &help_, Matcher &&matcher_, const bool extraError_ = false) : FlagBase(name_, help_, std::move(matcher_), extraError_) {}\n            ValueFlagBase(const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_) : FlagBase(name_, help_, std::move(matcher_), options_) {}\n            virtual ~ValueFlagBase() {}\n\n            virtual Nargs NumberOfArguments() const noexcept override\n            {\n                return 1;\n            }\n    };\n\n    class CompletionFlag : public ValueFlagBase\n    {\n        public:\n            std::vector<std::string> reply;\n            size_t cword = 0;\n            std::string syntax;\n\n            template <typename GroupClass>\n            CompletionFlag(GroupClass &group_, Matcher &&matcher_): ValueFlagBase(\"completion\", \"completion flag\", std::move(matcher_), Options::Hidden)\n            {\n                group_.AddCompletion(*this);\n            }\n\n            virtual ~CompletionFlag() {}\n\n            virtual Nargs NumberOfArguments() const noexcept override\n            {\n                return 2;\n            }\n\n            virtual void ParseValue(const std::vector<std::string> &value_) override\n            {\n                syntax = value_.at(0);\n                std::istringstream(value_.at(1)) >> cword;\n            }\n\n            /** Get the completion reply\n             */\n            std::string Get() noexcept\n            {\n                return detail::Join(reply, \"\\n\");\n            }\n\n            virtual void Reset() noexcept override\n            {\n                ValueFlagBase::Reset();\n                cword = 0;\n                syntax.clear();\n                reply.clear();\n            }\n    };\n\n\n    /** Base class for positional options\n     */\n    class PositionalBase : public NamedBase\n    {\n        protected:\n            bool ready;\n\n        public:\n            PositionalBase(const std::string &name_, const std::string &help_, Options options_ = {}) : NamedBase(name_, help_, options_), ready(true) {}\n            virtual ~PositionalBase() {}\n\n            bool Ready()\n            {\n                return ready;\n            }\n\n            virtual void ParseValue(const std::string &value_) = 0;\n\n            virtual void Reset() noexcept override\n            {\n                matched = false;\n                ready = true;\n#ifdef ARGS_NOEXCEPT\n                error = Error::None;\n                errorMsg.clear();\n#endif\n            }\n\n            virtual PositionalBase *GetNextPositional() override\n            {\n                return Ready() ? this : nullptr;\n            }\n\n            virtual bool HasPositional() const override\n            {\n                return true;\n            }\n\n            virtual std::vector<std::string> GetProgramLine(const HelpParams &params) const override\n            {\n                return { IsRequired() ? params.proglineRequiredOpen + Name() + params.proglineRequiredClose\n                                      : params.proglineNonrequiredOpen + Name() + params.proglineNonrequiredClose };\n            }\n\n            virtual void Validate(const std::string &, const std::string &) const override\n            {\n                if (IsRequired() && !Matched())\n                {\n                    std::ostringstream problem;\n                    problem << \"Option '\" << Name() << \"' is required\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Required;\n                    errorMsg = problem.str();\n#else\n                    throw RequiredError(problem.str());\n#endif\n                }\n            }\n    };\n\n    /** Class for all kinds of validating groups, including ArgumentParser\n     */\n    class Group : public Base\n    {\n        private:\n            std::vector<Base*> children;\n            std::function<bool(const Group &)> validator;\n\n        public:\n            /** Default validators\n             */\n            struct Validators\n            {\n                static bool Xor(const Group &group)\n                {\n                    return group.MatchedChildren() == 1;\n                }\n\n                static bool AtLeastOne(const Group &group)\n                {\n                    return group.MatchedChildren() >= 1;\n                }\n\n                static bool AtMostOne(const Group &group)\n                {\n                    return group.MatchedChildren() <= 1;\n                }\n\n                static bool All(const Group &group)\n                {\n                    return group.Children().size() == group.MatchedChildren();\n                }\n\n                static bool AllOrNone(const Group &group)\n                {\n                    return (All(group) || None(group));\n                }\n\n                static bool AllChildGroups(const Group &group)\n                {\n                    return std::none_of(std::begin(group.Children()), std::end(group.Children()), [](const Base* child) -> bool {\n                            return child->IsGroup() && !child->Matched();\n                            });\n                }\n\n                static bool DontCare(const Group &)\n                {\n                    return true;\n                }\n\n                static bool CareTooMuch(const Group &)\n                {\n                    return false;\n                }\n\n                static bool None(const Group &group)\n                {\n                    return group.MatchedChildren() == 0;\n                }\n            };\n            /// If help is empty, this group will not be printed in help output\n            Group(const std::string &help_ = std::string(), const std::function<bool(const Group &)> &validator_ = Validators::DontCare, Options options_ = {}) : Base(help_, options_), validator(validator_) {}\n            /// If help is empty, this group will not be printed in help output\n            Group(Group &group_, const std::string &help_ = std::string(), const std::function<bool(const Group &)> &validator_ = Validators::DontCare, Options options_ = {}) : Base(help_, options_), validator(validator_)\n            {\n                group_.Add(*this);\n            }\n            virtual ~Group() {}\n\n            /** Append a child to this Group.\n             */\n            void Add(Base &child)\n            {\n                children.emplace_back(&child);\n            }\n\n            /** Get all this group's children\n             */\n            const std::vector<Base *> &Children() const\n            {\n                return children;\n            }\n\n            /** Return the first FlagBase that matches flag, or nullptr\n             *\n             * \\param flag The flag with prefixes stripped\n             * \\return the first matching FlagBase pointer, or nullptr if there is no match\n             */\n            virtual FlagBase *Match(const EitherFlag &flag) override\n            {\n                for (Base *child: Children())\n                {\n                    if (FlagBase *match = child->Match(flag))\n                    {\n                        return match;\n                    }\n                }\n                return nullptr;\n            }\n\n            virtual std::vector<FlagBase*> GetAllFlags() override\n            {\n                std::vector<FlagBase*> res;\n                for (Base *child: Children())\n                {\n                    auto childRes = child->GetAllFlags();\n                    res.insert(res.end(), childRes.begin(), childRes.end());\n                }\n                return res;\n            }\n\n            virtual void Validate(const std::string &shortPrefix, const std::string &longPrefix) const override\n            {\n                for (Base *child: Children())\n                {\n                    child->Validate(shortPrefix, longPrefix);\n                }\n            }\n\n            /** Get the next ready positional, or nullptr if there is none\n             *\n             * \\return the first ready PositionalBase pointer, or nullptr if there is no match\n             */\n            virtual PositionalBase *GetNextPositional() override\n            {\n                for (Base *child: Children())\n                {\n                    if (auto next = child->GetNextPositional())\n                    {\n                        return next;\n                    }\n                }\n                return nullptr;\n            }\n\n            /** Get whether this has any FlagBase children\n             *\n             * \\return Whether or not there are any FlagBase children\n             */\n            virtual bool HasFlag() const override\n            {\n                return std::any_of(Children().begin(), Children().end(), [](Base *child) { return child->HasFlag(); });\n            }\n\n            /** Get whether this has any PositionalBase children\n             *\n             * \\return Whether or not there are any PositionalBase children\n             */\n            virtual bool HasPositional() const override\n            {\n                return std::any_of(Children().begin(), Children().end(), [](Base *child) { return child->HasPositional(); });\n            }\n\n            /** Get whether this has any Command children\n             *\n             * \\return Whether or not there are any Command children\n             */\n            virtual bool HasCommand() const override\n            {\n                return std::any_of(Children().begin(), Children().end(), [](Base *child) { return child->HasCommand(); });\n            }\n\n            /** Count the number of matched children this group has\n             */\n            std::vector<Base *>::size_type MatchedChildren() const\n            {\n                // Cast to avoid warnings from -Wsign-conversion\n                return static_cast<std::vector<Base *>::size_type>(\n                        std::count_if(std::begin(Children()), std::end(Children()), [](const Base *child){return child->Matched();}));\n            }\n\n            /** Whether or not this group matches validation\n             */\n            virtual bool Matched() const noexcept override\n            {\n                return validator(*this);\n            }\n\n            /** Get validation\n             */\n            bool Get() const\n            {\n                return Matched();\n            }\n\n            /** Get all the child descriptions for help generation\n             */\n            virtual std::vector<std::tuple<std::string, std::string, unsigned>> GetDescription(const HelpParams &params, const unsigned int indent) const override\n            {\n                std::vector<std::tuple<std::string, std::string, unsigned int>> descriptions;\n\n                // Push that group description on the back if not empty\n                unsigned addindent = 0;\n                if (!help.empty())\n                {\n                    descriptions.emplace_back(help, \"\", indent);\n                    addindent = 1;\n                }\n\n                for (Base *child: Children())\n                {\n                    if ((child->GetOptions() & Options::HiddenFromDescription) != Options::None)\n                    {\n                        continue;\n                    }\n\n                    auto groupDescriptions = child->GetDescription(params, indent + addindent);\n                    descriptions.insert(\n                        std::end(descriptions),\n                        std::make_move_iterator(std::begin(groupDescriptions)),\n                        std::make_move_iterator(std::end(groupDescriptions)));\n                }\n                return descriptions;\n            }\n\n            /** Get the names of positional parameters\n             */\n            virtual std::vector<std::string> GetProgramLine(const HelpParams &params) const override\n            {\n                std::vector <std::string> names;\n                for (Base *child: Children())\n                {\n                    if ((child->GetOptions() & Options::HiddenFromUsage) != Options::None)\n                    {\n                        continue;\n                    }\n\n                    auto groupNames = child->GetProgramLine(params);\n                    names.insert(\n                        std::end(names),\n                        std::make_move_iterator(std::begin(groupNames)),\n                        std::make_move_iterator(std::end(groupNames)));\n                }\n                return names;\n            }\n\n            virtual std::vector<Command*> GetCommands() override\n            {\n                std::vector<Command*> res;\n                for (const auto &child : Children())\n                {\n                    auto subparsers = child->GetCommands();\n                    res.insert(std::end(res), std::begin(subparsers), std::end(subparsers));\n                }\n                return res;\n            }\n\n            virtual bool IsGroup() const override\n            {\n                return true;\n            }\n\n            virtual void Reset() noexcept override\n            {\n                Base::Reset();\n\n                for (auto &child: Children())\n                {\n                    child->Reset();\n                }\n#ifdef ARGS_NOEXCEPT\n                error = Error::None;\n                errorMsg.clear();\n#endif\n            }\n\n#ifdef ARGS_NOEXCEPT\n            /// Only for ARGS_NOEXCEPT\n            virtual Error GetError() const override\n            {\n                if (error != Error::None)\n                {\n                    return error;\n                }\n\n                auto it = std::find_if(Children().begin(), Children().end(), [](const Base *child){return child->GetError() != Error::None;});\n                if (it == Children().end())\n                {\n                    return Error::None;\n                } else\n                {\n                    return (*it)->GetError();\n                }\n            }\n#endif\n\n    };\n\n    /** Class for using global options in ArgumentParser.\n     */\n    class GlobalOptions : public Group\n    {\n        public:\n            GlobalOptions(Group &base, Base &options_) : Group(base, {}, Group::Validators::DontCare, Options::Global)\n            {\n                Add(options_);\n            }\n    };\n\n    /** Utility class for building subparsers with coroutines/callbacks.\n     *\n     * Brief example:\n     * \\code\n     * Command command(argumentParser, \"command\", \"my command\", [](args::Subparser &s)\n     * {\n     *      // your command flags/positionals\n     *      s.Parse(); //required\n     *      //your command code\n     * });\n     * \\endcode\n     *\n     * For ARGS_NOEXCEPT mode don't forget to check `s.GetError()` after `s.Parse()`\n     * and return if it isn't equals to args::Error::None.\n     *\n     * \\sa Command\n     */\n    class Subparser : public Group\n    {\n        private:\n            std::vector<std::string> args;\n            std::vector<std::string> kicked;\n            ArgumentParser *parser = nullptr;\n            const HelpParams &helpParams;\n            const Command &command;\n            bool isParsed = false;\n\n        public:\n            Subparser(std::vector<std::string> args_, ArgumentParser &parser_, const Command &command_, const HelpParams &helpParams_)\n                : Group({}, Validators::AllChildGroups), args(std::move(args_)), parser(&parser_), helpParams(helpParams_), command(command_)\n            {\n            }\n\n            Subparser(const Command &command_, const HelpParams &helpParams_) : Group({}, Validators::AllChildGroups), helpParams(helpParams_), command(command_)\n            {\n            }\n\n            Subparser(const Subparser&) = delete;\n            Subparser(Subparser&&) = delete;\n            Subparser &operator = (const Subparser&) = delete;\n            Subparser &operator = (Subparser&&) = delete;\n\n            const Command &GetCommand()\n            {\n                return command;\n            }\n\n            /** (INTERNAL) Determines whether Parse was called or not.\n             */\n            bool IsParsed() const\n            {\n                return isParsed;\n            }\n\n            /** Continue parsing arguments for new command.\n             */\n            void Parse();\n\n            /** Returns a vector of kicked out arguments.\n             *\n             * \\sa Base::KickOut\n             */\n            const std::vector<std::string> &KickedOut() const noexcept\n            {\n                return kicked;\n            }\n    };\n\n    /** Main class for building subparsers.\n     *\n     * /sa Subparser\n     */\n    class Command : public Group\n    {\n        private:\n            friend class Subparser;\n\n            std::string name;\n            std::string help;\n            std::string description;\n            std::string epilog;\n            std::string proglinePostfix;\n\n            std::function<void(Subparser&)> parserCoroutine;\n            bool commandIsRequired = true;\n            Command *selectedCommand = nullptr;\n\n            mutable std::vector<std::tuple<std::string, std::string, unsigned>> subparserDescription;\n            mutable std::vector<std::string> subparserProgramLine;\n            mutable bool subparserHasFlag = false;\n            mutable bool subparserHasPositional = false;\n            mutable bool subparserHasCommand = false;\n#ifdef ARGS_NOEXCEPT\n            mutable Error subparserError = Error::None;\n#endif\n            mutable Subparser *subparser = nullptr;\n\n        protected:\n\n            class RaiiSubparser\n            {\n                public:\n                    RaiiSubparser(ArgumentParser &parser_, std::vector<std::string> args_);\n                    RaiiSubparser(const Command &command_, const HelpParams &params_);\n\n                    ~RaiiSubparser()\n                    {\n                        command.subparser = oldSubparser;\n                    }\n\n                    Subparser &Parser()\n                    {\n                        return parser;\n                    }\n\n                private:\n                    const Command &command;\n                    Subparser parser;\n                    Subparser *oldSubparser;\n            };\n\n            Command() = default;\n\n            std::function<void(Subparser&)> &GetCoroutine()\n            {\n                return selectedCommand != nullptr ? selectedCommand->GetCoroutine() : parserCoroutine;\n            }\n\n            Command &SelectedCommand()\n            {\n                Command *res = this;\n                while (res->selectedCommand != nullptr)\n                {\n                    res = res->selectedCommand;\n                }\n\n                return *res;\n            }\n\n            const Command &SelectedCommand() const\n            {\n                const Command *res = this;\n                while (res->selectedCommand != nullptr)\n                {\n                    res = res->selectedCommand;\n                }\n\n                return *res;\n            }\n\n            void UpdateSubparserHelp(const HelpParams &params) const\n            {\n                if (parserCoroutine)\n                {\n                    RaiiSubparser coro(*this, params);\n#ifndef ARGS_NOEXCEPT\n                    try\n                    {\n                        parserCoroutine(coro.Parser());\n                    }\n                    catch (args::SubparserError&)\n                    {\n                    }\n#else\n                    parserCoroutine(coro.Parser());\n#endif\n                }\n            }\n\n        public:\n            Command(Group &base_, std::string name_, std::string help_, std::function<void(Subparser&)> coroutine_ = {})\n                : name(std::move(name_)), help(std::move(help_)), parserCoroutine(std::move(coroutine_))\n            {\n                base_.Add(*this);\n            }\n\n            /** The description that appears on the prog line after options\n             */\n            const std::string &ProglinePostfix() const\n            { return proglinePostfix; }\n\n            /** The description that appears on the prog line after options\n             */\n            void ProglinePostfix(const std::string &proglinePostfix_)\n            { this->proglinePostfix = proglinePostfix_; }\n\n            /** The description that appears above options\n             */\n            const std::string &Description() const\n            { return description; }\n            /** The description that appears above options\n             */\n\n            void Description(const std::string &description_)\n            { this->description = description_; }\n\n            /** The description that appears below options\n             */\n            const std::string &Epilog() const\n            { return epilog; }\n\n            /** The description that appears below options\n             */\n            void Epilog(const std::string &epilog_)\n            { this->epilog = epilog_; }\n\n            /** The name of command\n             */\n            const std::string &Name() const\n            { return name; }\n\n            /** The description of command\n             */\n            const std::string &Help() const\n            { return help; }\n\n            /** If value is true, parser will fail if no command was parsed.\n             *\n             * Default: true.\n             */\n            void RequireCommand(bool value)\n            { commandIsRequired = value; }\n\n            virtual bool IsGroup() const override\n            { return false; }\n\n            virtual bool Matched() const noexcept override\n            { return Base::Matched(); }\n\n            operator bool() const noexcept\n            { return Matched(); }\n\n            void Match() noexcept\n            { matched = true; }\n\n            void SelectCommand(Command *c) noexcept\n            {\n                selectedCommand = c;\n\n                if (c != nullptr)\n                {\n                    c->Match();\n                }\n            }\n\n            virtual FlagBase *Match(const EitherFlag &flag) override\n            {\n                if (selectedCommand != nullptr)\n                {\n                    if (auto *res = selectedCommand->Match(flag))\n                    {\n                        return res;\n                    }\n\n                    for (auto *child: Children())\n                    {\n                        if ((child->GetOptions() & Options::Global) != Options::None)\n                        {\n                            if (auto *res = child->Match(flag))\n                            {\n                                return res;\n                            }\n                        }\n                    }\n\n                    return nullptr;\n                }\n\n                if (subparser != nullptr)\n                {\n                    return subparser->Match(flag);\n                }\n\n                return Matched() ? Group::Match(flag) : nullptr;\n            }\n\n            virtual std::vector<FlagBase*> GetAllFlags() override\n            {\n                std::vector<FlagBase*> res;\n\n                if (!Matched())\n                {\n                    return res;\n                }\n\n                for (auto *child: Children())\n                {\n                    if (selectedCommand == nullptr || (child->GetOptions() & Options::Global) != Options::None)\n                    {\n                        auto childFlags = child->GetAllFlags();\n                        res.insert(res.end(), childFlags.begin(), childFlags.end());\n                    }\n                }\n\n                if (selectedCommand != nullptr)\n                {\n                    auto childFlags = selectedCommand->GetAllFlags();\n                    res.insert(res.end(), childFlags.begin(), childFlags.end());\n                }\n\n                if (subparser != nullptr)\n                {\n                    auto childFlags = subparser->GetAllFlags();\n                    res.insert(res.end(), childFlags.begin(), childFlags.end());\n                }\n\n                return res;\n            }\n\n            virtual PositionalBase *GetNextPositional() override\n            {\n                if (selectedCommand != nullptr)\n                {\n                    if (auto *res = selectedCommand->GetNextPositional())\n                    {\n                        return res;\n                    }\n\n                    for (auto *child: Children())\n                    {\n                        if ((child->GetOptions() & Options::Global) != Options::None)\n                        {\n                            if (auto *res = child->GetNextPositional())\n                            {\n                                return res;\n                            }\n                        }\n                    }\n\n                    return nullptr;\n                }\n\n                if (subparser != nullptr)\n                {\n                    return subparser->GetNextPositional();\n                }\n\n                return Matched() ? Group::GetNextPositional() : nullptr;\n            }\n\n            virtual bool HasFlag() const override\n            {\n                return subparserHasFlag || Group::HasFlag();\n            }\n\n            virtual bool HasPositional() const override\n            {\n                return subparserHasPositional || Group::HasPositional();\n            }\n\n            virtual bool HasCommand() const override\n            {\n                return true;\n            }\n\n            std::vector<std::string> GetCommandProgramLine(const HelpParams &params) const\n            {\n                UpdateSubparserHelp(params);\n\n                auto res = Group::GetProgramLine(params);\n                res.insert(res.end(), subparserProgramLine.begin(), subparserProgramLine.end());\n\n                if (!params.proglineCommand.empty() && (Group::HasCommand() || subparserHasCommand))\n                {\n                    res.insert(res.begin(), commandIsRequired ? params.proglineCommand : \"[\" + params.proglineCommand + \"]\");\n                }\n\n                if (!Name().empty())\n                {\n                    res.insert(res.begin(), Name());\n                }\n\n                if ((subparserHasFlag || Group::HasFlag()) && params.showProglineOptions && !params.proglineShowFlags)\n                {\n                    res.push_back(params.proglineOptions);\n                }\n\n                if (!ProglinePostfix().empty())\n                {\n                    std::string line;\n                    for (char c : ProglinePostfix())\n                    {\n                        if (isspace(c))\n                        {\n                            if (!line.empty())\n                            {\n                                res.push_back(line);\n                                line.clear();\n                            }\n\n                            if (c == '\\n')\n                            {\n                                res.push_back(\"\\n\");\n                            }\n                        }\n                        else\n                        {\n                            line += c;\n                        }\n                    }\n\n                    if (!line.empty())\n                    {\n                        res.push_back(line);\n                    }\n                }\n\n                return res;\n            }\n\n            virtual std::vector<std::string> GetProgramLine(const HelpParams &params) const override\n            {\n                if (!Matched())\n                {\n                    return {};\n                }\n\n                return GetCommandProgramLine(params);\n            }\n\n            virtual std::vector<Command*> GetCommands() override\n            {\n                if (selectedCommand != nullptr)\n                {\n                    return selectedCommand->GetCommands();\n                }\n\n                if (Matched())\n                {\n                    return Group::GetCommands();\n                }\n\n                return { this };\n            }\n\n            virtual std::vector<std::tuple<std::string, std::string, unsigned>> GetDescription(const HelpParams &params, const unsigned int indent) const override\n            {\n                std::vector<std::tuple<std::string, std::string, unsigned>> descriptions;\n                unsigned addindent = 0;\n\n                UpdateSubparserHelp(params);\n\n                if (!Matched())\n                {\n                    if (params.showCommandFullHelp)\n                    {\n                        std::ostringstream s;\n                        bool empty = true;\n                        for (const auto &progline: GetCommandProgramLine(params))\n                        {\n                            if (!empty)\n                            {\n                                s << ' ';\n                            }\n                            else\n                            {\n                                empty = false;\n                            }\n\n                            s << progline;\n                        }\n\n                        descriptions.emplace_back(s.str(), \"\", indent);\n                    }\n                    else\n                    {\n                        descriptions.emplace_back(Name(), help, indent);\n                    }\n\n                    if (!params.showCommandChildren && !params.showCommandFullHelp)\n                    {\n                        return descriptions;\n                    }\n\n                    addindent = 1;\n                }\n\n                if (params.showCommandFullHelp && !Matched())\n                {\n                    descriptions.emplace_back(\"\", \"\", indent + addindent);\n                    descriptions.emplace_back(Description().empty() ? Help() : Description(), \"\", indent + addindent);\n                    descriptions.emplace_back(\"\", \"\", indent + addindent);\n                }\n\n                for (Base *child: Children())\n                {\n                    if ((child->GetOptions() & Options::HiddenFromDescription) != Options::None)\n                    {\n                        continue;\n                    }\n\n                    auto groupDescriptions = child->GetDescription(params, indent + addindent);\n                    descriptions.insert(\n                                        std::end(descriptions),\n                                        std::make_move_iterator(std::begin(groupDescriptions)),\n                                        std::make_move_iterator(std::end(groupDescriptions)));\n                }\n\n                for (auto childDescription: subparserDescription)\n                {\n                    std::get<2>(childDescription) += indent + addindent;\n                    descriptions.push_back(std::move(childDescription));\n                }\n\n                if (params.showCommandFullHelp && !Matched())\n                {\n                    descriptions.emplace_back(\"\", \"\", indent + addindent);\n                    if (!Epilog().empty())\n                    {\n                        descriptions.emplace_back(Epilog(), \"\", indent + addindent);\n                        descriptions.emplace_back(\"\", \"\", indent + addindent);\n                    }\n                }\n\n                return descriptions;\n            }\n\n            virtual void Validate(const std::string &shortprefix, const std::string &longprefix) const override\n            {\n                if (!Matched())\n                {\n                    return;\n                }\n\n                auto onValidationError = [&]\n                {\n                    std::ostringstream problem;\n                    problem << \"Group validation failed somewhere!\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Validation;\n                    errorMsg = problem.str();\n#else\n                    throw ValidationError(problem.str());\n#endif\n                };\n\n                for (Base *child: Children())\n                {\n                    if (child->IsGroup() && !child->Matched())\n                    {\n                        onValidationError();\n                    }\n\n                    child->Validate(shortprefix, longprefix);\n                }\n\n                if (subparser != nullptr)\n                {\n                    subparser->Validate(shortprefix, longprefix);\n                    if (!subparser->Matched())\n                    {\n                        onValidationError();\n                    }\n                }\n\n                if (selectedCommand == nullptr && commandIsRequired && (Group::HasCommand() || subparserHasCommand))\n                {\n                    std::ostringstream problem;\n                    problem << \"Command is required\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Validation;\n                    errorMsg = problem.str();\n#else\n                    throw ValidationError(problem.str());\n#endif\n                }\n            }\n\n            virtual void Reset() noexcept override\n            {\n                Group::Reset();\n                selectedCommand = nullptr;\n                subparserProgramLine.clear();\n                subparserDescription.clear();\n                subparserHasFlag = false;\n                subparserHasPositional = false;\n                subparserHasCommand = false;\n#ifdef ARGS_NOEXCEPT\n                subparserError = Error::None;\n#endif\n            }\n\n#ifdef ARGS_NOEXCEPT\n            /// Only for ARGS_NOEXCEPT\n            virtual Error GetError() const override\n            {\n                if (!Matched())\n                {\n                    return Error::None;\n                }\n\n                if (error != Error::None)\n                {\n                    return error;\n                }\n\n                if (subparserError != Error::None)\n                {\n                    return subparserError;\n                }\n\n                return Group::GetError();\n            }\n#endif\n    };\n\n    /** The main user facing command line argument parser class\n     */\n    class ArgumentParser : public Command\n    {\n        friend class Subparser;\n\n        private:\n            std::string longprefix;\n            std::string shortprefix;\n\n            std::string longseparator;\n\n            std::string terminator;\n\n            bool allowJoinedShortValue = true;\n            bool allowJoinedLongValue = true;\n            bool allowSeparateShortValue = true;\n            bool allowSeparateLongValue = true;\n\n            CompletionFlag *completion = nullptr;\n            bool readCompletion = false;\n\n        protected:\n            enum class OptionType\n            {\n                LongFlag,\n                ShortFlag,\n                Positional\n            };\n\n            OptionType ParseOption(const std::string &s, bool allowEmpty = false)\n            {\n                if (s.find(longprefix) == 0 && (allowEmpty || s.length() > longprefix.length()))\n                {\n                    return OptionType::LongFlag;\n                }\n\n                if (s.find(shortprefix) == 0 && (allowEmpty || s.length() > shortprefix.length()))\n                {\n                    return OptionType::ShortFlag;\n                }\n\n                return OptionType::Positional;\n            }\n\n            template <typename It>\n            bool Complete(FlagBase &flag, It it, It end)\n            {\n                auto nextIt = it;\n                if (!readCompletion || (++nextIt != end))\n                {\n                    return false;\n                }\n\n                const auto &chunk = *it;\n                for (auto &choice : flag.HelpChoices(helpParams))\n                {\n                    AddCompletionReply(chunk, choice);\n                }\n\n#ifndef ARGS_NOEXCEPT\n                throw Completion(completion->Get());\n#else\n                return true;\n#endif\n            }\n\n            /** (INTERNAL) Parse flag's values\n             *\n             * \\param arg The string to display in error message as a flag name\n             * \\param[in, out] it The iterator to first value. It will point to the last value\n             * \\param end The end iterator\n             * \\param joinedArg Joined value (e.g. bar in --foo=bar)\n             * \\param canDiscardJoined If true joined value can be parsed as flag not as a value (as in -abcd)\n             * \\param[out] values The vector to store parsed arg's values\n             */\n            template <typename It>\n            std::string ParseArgsValues(FlagBase &flag, const std::string &arg, It &it, It end,\n                                        const bool allowSeparate, const bool allowJoined,\n                                        const bool hasJoined, const std::string &joinedArg,\n                                        const bool canDiscardJoined, std::vector<std::string> &values)\n            {\n                values.clear();\n\n                Nargs nargs = flag.NumberOfArguments();\n\n                if (hasJoined && !allowJoined && nargs.min != 0)\n                {\n                    return \"Flag '\" + arg + \"' was passed a joined argument, but these are disallowed\";\n                }\n\n                if (hasJoined)\n                {\n                    if (!canDiscardJoined || nargs.max != 0)\n                    {\n                        values.push_back(joinedArg);\n                    }\n                } else if (!allowSeparate)\n                {\n                    if (nargs.min != 0)\n                    {\n                        return \"Flag '\" + arg + \"' was passed a separate argument, but these are disallowed\";\n                    }\n                } else\n                {\n                    auto valueIt = it;\n                    ++valueIt;\n\n                    while (valueIt != end &&\n                           values.size() < nargs.max &&\n                           (nargs.min == nargs.max || ParseOption(*valueIt) == OptionType::Positional))\n                    {\n                        if (Complete(flag, valueIt, end))\n                        {\n                            it = end;\n                            return \"\";\n                        }\n\n                        values.push_back(*valueIt);\n                        ++it;\n                        ++valueIt;\n                    }\n                }\n\n                if (values.size() > nargs.max)\n                {\n                    return \"Passed an argument into a non-argument flag: \" + arg;\n                } else if (values.size() < nargs.min)\n                {\n                    if (nargs.min == 1 && nargs.max == 1)\n                    {\n                        return \"Flag '\" + arg + \"' requires an argument but received none\";\n                    } else if (nargs.min == 1)\n                    {\n                        return \"Flag '\" + arg + \"' requires at least one argument but received none\";\n                    } else if (nargs.min != nargs.max)\n                    {\n                        return \"Flag '\" + arg + \"' requires at least \" + std::to_string(nargs.min) +\n                               \" arguments but received \" + std::to_string(values.size());\n                    } else\n                    {\n                        return \"Flag '\" + arg + \"' requires \" + std::to_string(nargs.min) +\n                               \" arguments but received \" + std::to_string(values.size());\n                    }\n                }\n\n                return {};\n            }\n\n            template <typename It>\n            bool ParseLong(It &it, It end)\n            {\n                const auto &chunk = *it;\n                const auto argchunk = chunk.substr(longprefix.size());\n                // Try to separate it, in case of a separator:\n                const auto separator = longseparator.empty() ? argchunk.npos : argchunk.find(longseparator);\n                // If the separator is in the argument, separate it.\n                const auto arg = (separator != argchunk.npos ?\n                    std::string(argchunk, 0, separator)\n                    : argchunk);\n                const auto joined = (separator != argchunk.npos ?\n                    argchunk.substr(separator + longseparator.size())\n                    : std::string());\n\n                if (auto flag = Match(arg))\n                {\n                    std::vector<std::string> values;\n                    const std::string errorMessage = ParseArgsValues(*flag, arg, it, end, allowSeparateLongValue, allowJoinedLongValue,\n                                                                     separator != argchunk.npos, joined, false, values);\n                    if (!errorMessage.empty())\n                    {\n#ifndef ARGS_NOEXCEPT\n                        throw ParseError(errorMessage);\n#else\n                        error = Error::Parse;\n                        errorMsg = errorMessage;\n                        return false;\n#endif\n                    }\n\n                    if (!readCompletion)\n                    {\n                        flag->ParseValue(values);\n                    }\n\n                    if (flag->KickOut())\n                    {\n                        ++it;\n                        return false;\n                    }\n                } else\n                {\n                    const std::string errorMessage(\"Flag could not be matched: \" + arg);\n#ifndef ARGS_NOEXCEPT\n                    throw ParseError(errorMessage);\n#else\n                    error = Error::Parse;\n                    errorMsg = errorMessage;\n                    return false;\n#endif\n                }\n\n                return true;\n            }\n\n            template <typename It>\n            bool ParseShort(It &it, It end)\n            {\n                const auto &chunk = *it;\n                const auto argchunk = chunk.substr(shortprefix.size());\n                for (auto argit = std::begin(argchunk); argit != std::end(argchunk); ++argit)\n                {\n                    const auto arg = *argit;\n\n                    if (auto flag = Match(arg))\n                    {\n                        const std::string value(argit + 1, std::end(argchunk));\n                        std::vector<std::string> values;\n                        const std::string errorMessage = ParseArgsValues(*flag, std::string(1, arg), it, end,\n                                                                         allowSeparateShortValue, allowJoinedShortValue,\n                                                                         !value.empty(), value, !value.empty(), values);\n\n                        if (!errorMessage.empty())\n                        {\n#ifndef ARGS_NOEXCEPT\n                            throw ParseError(errorMessage);\n#else\n                            error = Error::Parse;\n                            errorMsg = errorMessage;\n                            return false;\n#endif\n                        }\n\n                        if (!readCompletion)\n                        {\n                            flag->ParseValue(values);\n                        }\n\n                        if (flag->KickOut())\n                        {\n                            ++it;\n                            return false;\n                        }\n\n                        if (!values.empty())\n                        {\n                            break;\n                        }\n                    } else\n                    {\n                        const std::string errorMessage(\"Flag could not be matched: '\" + std::string(1, arg) + \"'\");\n#ifndef ARGS_NOEXCEPT\n                        throw ParseError(errorMessage);\n#else\n                        error = Error::Parse;\n                        errorMsg = errorMessage;\n                        return false;\n#endif\n                    }\n                }\n\n                return true;\n            }\n\n            bool AddCompletionReply(const std::string &cur, const std::string &choice)\n            {\n                if (cur.empty() || choice.find(cur) == 0)\n                {\n                    if (completion->syntax == \"bash\" && ParseOption(choice) == OptionType::LongFlag && choice.find(longseparator) != std::string::npos)\n                    {\n                        completion->reply.push_back(choice.substr(choice.find(longseparator) + 1));\n                    } else\n                    {\n                        completion->reply.push_back(choice);\n                    }\n                    return true;\n                }\n\n                return false;\n            }\n\n            template <typename It>\n            bool Complete(It it, It end)\n            {\n                auto nextIt = it;\n                if (!readCompletion || (++nextIt != end))\n                {\n                    return false;\n                }\n\n                const auto &chunk = *it;\n                auto pos = GetNextPositional();\n                std::vector<Command *> commands = GetCommands();\n                const auto optionType = ParseOption(chunk, true);\n\n                if (!commands.empty() && (chunk.empty() || optionType == OptionType::Positional))\n                {\n                    for (auto &cmd : commands)\n                    {\n                        if ((cmd->GetOptions() & Options::HiddenFromCompletion) == Options::None)\n                        {\n                            AddCompletionReply(chunk, cmd->Name());\n                        }\n                    }\n                } else\n                {\n                    bool hasPositionalCompletion = true;\n\n                    if (!commands.empty())\n                    {\n                        for (auto &cmd : commands)\n                        {\n                            if ((cmd->GetOptions() & Options::HiddenFromCompletion) == Options::None)\n                            {\n                                AddCompletionReply(chunk, cmd->Name());\n                            }\n                        }\n                    } else if (pos)\n                    {\n                        if ((pos->GetOptions() & Options::HiddenFromCompletion) == Options::None)\n                        {\n                            auto choices = pos->HelpChoices(helpParams);\n                            hasPositionalCompletion = !choices.empty() || optionType != OptionType::Positional;\n                            for (auto &choice : choices)\n                            {\n                                AddCompletionReply(chunk, choice);\n                            }\n                        }\n                    }\n\n                    if (hasPositionalCompletion)\n                    {\n                        auto flags = GetAllFlags();\n                        for (auto flag : flags)\n                        {\n                            if ((flag->GetOptions() & Options::HiddenFromCompletion) != Options::None)\n                            {\n                                continue;\n                            }\n\n                            auto &matcher = flag->GetMatcher();\n                            if (!AddCompletionReply(chunk, matcher.GetShortOrAny().str(shortprefix, longprefix)))\n                            {\n                                for (auto &flagName : matcher.GetFlagStrings())\n                                {\n                                    if (AddCompletionReply(chunk, flagName.str(shortprefix, longprefix)))\n                                    {\n                                        break;\n                                    }\n                                }\n                            }\n                        }\n\n                        if (optionType == OptionType::LongFlag && allowJoinedLongValue)\n                        {\n                            const auto separator = longseparator.empty() ? chunk.npos : chunk.find(longseparator);\n                            if (separator != chunk.npos)\n                            {\n                                std::string arg(chunk, 0, separator);\n                                if (auto flag = this->Match(arg.substr(longprefix.size())))\n                                {\n                                    for (auto &choice : flag->HelpChoices(helpParams))\n                                    {\n                                        AddCompletionReply(chunk, arg + longseparator + choice);\n                                    }\n                                }\n                            }\n                        } else if (optionType == OptionType::ShortFlag && allowJoinedShortValue)\n                        {\n                            if (chunk.size() > shortprefix.size() + 1)\n                            {\n                                auto arg = chunk.at(shortprefix.size());\n                                //TODO: support -abcVALUE where a and b take no value\n                                if (auto flag = this->Match(arg))\n                                {\n                                    for (auto &choice : flag->HelpChoices(helpParams))\n                                    {\n                                        AddCompletionReply(chunk, shortprefix + arg + choice);\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n\n#ifndef ARGS_NOEXCEPT\n                throw Completion(completion->Get());\n#else\n                return true;\n#endif\n            }\n\n            template <typename It>\n            It Parse(It begin, It end)\n            {\n                bool terminated = false;\n                std::vector<Command *> commands = GetCommands();\n\n                // Check all arg chunks\n                for (auto it = begin; it != end; ++it)\n                {\n                    if (Complete(it, end))\n                    {\n                        return end;\n                    }\n\n                    const auto &chunk = *it;\n\n                    if (!terminated && chunk == terminator)\n                    {\n                        terminated = true;\n                    } else if (!terminated && ParseOption(chunk) == OptionType::LongFlag)\n                    {\n                        if (!ParseLong(it, end))\n                        {\n                            return it;\n                        }\n                    } else if (!terminated && ParseOption(chunk) == OptionType::ShortFlag)\n                    {\n                        if (!ParseShort(it, end))\n                        {\n                            return it;\n                        }\n                    } else if (!terminated && !commands.empty())\n                    {\n                        auto itCommand = std::find_if(commands.begin(), commands.end(), [&chunk](Command *c) { return c->Name() == chunk; });\n                        if (itCommand == commands.end())\n                        {\n                            const std::string errorMessage(\"Unknown command: \" + chunk);\n#ifndef ARGS_NOEXCEPT\n                            throw ParseError(errorMessage);\n#else\n                            error = Error::Parse;\n                            errorMsg = errorMessage;\n                            return it;\n#endif\n                        }\n\n                        SelectCommand(*itCommand);\n\n                        if (const auto &coroutine = GetCoroutine())\n                        {\n                            ++it;\n                            RaiiSubparser coro(*this, std::vector<std::string>(it, end));\n                            coroutine(coro.Parser());\n#ifdef ARGS_NOEXCEPT\n                            error = GetError();\n                            if (error != Error::None)\n                            {\n                                return end;\n                            }\n\n                            if (!coro.Parser().IsParsed())\n                            {\n                                error = Error::Usage;\n                                return end;\n                            }\n#else\n                            if (!coro.Parser().IsParsed())\n                            {\n                                throw UsageError(\"Subparser::Parse was not called\");\n                            }\n#endif\n\n                            break;\n                        }\n\n                        commands = GetCommands();\n                    } else\n                    {\n                        auto pos = GetNextPositional();\n                        if (pos)\n                        {\n                            pos->ParseValue(chunk);\n\n                            if (pos->KickOut())\n                            {\n                                return ++it;\n                            }\n                        } else\n                        {\n                            const std::string errorMessage(\"Passed in argument, but no positional arguments were ready to receive it: \" + chunk);\n#ifndef ARGS_NOEXCEPT\n                            throw ParseError(errorMessage);\n#else\n                            error = Error::Parse;\n                            errorMsg = errorMessage;\n                            return it;\n#endif\n                        }\n                    }\n\n                    if (!readCompletion && completion != nullptr && completion->Matched())\n                    {\n#ifdef ARGS_NOEXCEPT\n                        error = Error::Completion;\n#endif\n                        readCompletion = true;\n                        ++it;\n                        const auto argsLeft = static_cast<size_t>(std::distance(it, end));\n                        if (completion->cword == 0 || argsLeft <= 1 || completion->cword >= argsLeft)\n                        {\n#ifndef ARGS_NOEXCEPT\n                            throw Completion(\"\");\n#endif\n                        }\n\n                        std::vector<std::string> curArgs(++it, end);\n                        curArgs.resize(completion->cword);\n\n                        if (completion->syntax == \"bash\")\n                        {\n                            // bash tokenizes --flag=value as --flag=value\n                            for (size_t idx = 0; idx < curArgs.size(); )\n                            {\n                                if (idx > 0 && curArgs[idx] == \"=\")\n                                {\n                                    curArgs[idx - 1] += \"=\";\n                                    // Avoid warnings from -Wsign-conversion\n                                    const auto signedIdx = static_cast<std::ptrdiff_t>(idx);\n                                    if (idx + 1 < curArgs.size())\n                                    {\n                                        curArgs[idx - 1] += curArgs[idx + 1];\n                                        curArgs.erase(curArgs.begin() + signedIdx, curArgs.begin() + signedIdx + 2);\n                                    } else\n                                    {\n                                        curArgs.erase(curArgs.begin() + signedIdx);\n                                    }\n                                } else\n                                {\n                                    ++idx;\n                                }\n                            }\n\n                        }\n#ifndef ARGS_NOEXCEPT\n                        try\n                        {\n                            Parse(curArgs.begin(), curArgs.end());\n                            throw Completion(\"\");\n                        }\n                        catch (Completion &)\n                        {\n                            throw;\n                        }\n                        catch (args::Error&)\n                        {\n                            throw Completion(\"\");\n                        }\n#else\n                        return Parse(curArgs.begin(), curArgs.end());\n#endif\n                    }\n                }\n\n                Validate(shortprefix, longprefix);\n                return end;\n            }\n\n        public:\n            HelpParams helpParams;\n\n            ArgumentParser(const std::string &description_, const std::string &epilog_ = std::string())\n            {\n                Description(description_);\n                Epilog(epilog_);\n                LongPrefix(\"--\");\n                ShortPrefix(\"-\");\n                LongSeparator(\"=\");\n                Terminator(\"--\");\n                SetArgumentSeparations(true, true, true, true);\n                matched = true;\n            }\n\n            void AddCompletion(CompletionFlag &completionFlag)\n            {\n                completion = &completionFlag;\n                Add(completionFlag);\n            }\n\n            /** The program name for help generation\n             */\n            const std::string &Prog() const\n            { return helpParams.programName; }\n            /** The program name for help generation\n             */\n            void Prog(const std::string &prog_)\n            { this->helpParams.programName = prog_; }\n\n            /** The prefix for long flags\n             */\n            const std::string &LongPrefix() const\n            { return longprefix; }\n            /** The prefix for long flags\n             */\n            void LongPrefix(const std::string &longprefix_)\n            {\n                this->longprefix = longprefix_;\n                this->helpParams.longPrefix = longprefix_;\n            }\n\n            /** The prefix for short flags\n             */\n            const std::string &ShortPrefix() const\n            { return shortprefix; }\n            /** The prefix for short flags\n             */\n            void ShortPrefix(const std::string &shortprefix_)\n            {\n                this->shortprefix = shortprefix_;\n                this->helpParams.shortPrefix = shortprefix_;\n            }\n\n            /** The separator for long flags\n             */\n            const std::string &LongSeparator() const\n            { return longseparator; }\n            /** The separator for long flags\n             */\n            void LongSeparator(const std::string &longseparator_)\n            {\n                if (longseparator_.empty())\n                {\n                    const std::string errorMessage(\"longseparator can not be set to empty\");\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Usage;\n                    errorMsg = errorMessage;\n#else\n                    throw UsageError(errorMessage);\n#endif\n                } else\n                {\n                    this->longseparator = longseparator_;\n                    this->helpParams.longSeparator = allowJoinedLongValue ? longseparator_ : \" \";\n                }\n            }\n\n            /** The terminator that forcibly separates flags from positionals\n             */\n            const std::string &Terminator() const\n            { return terminator; }\n            /** The terminator that forcibly separates flags from positionals\n             */\n            void Terminator(const std::string &terminator_)\n            { this->terminator = terminator_; }\n\n            /** Get the current argument separation parameters.\n             *\n             * See SetArgumentSeparations for details on what each one means.\n             */\n            void GetArgumentSeparations(\n                bool &allowJoinedShortValue_,\n                bool &allowJoinedLongValue_,\n                bool &allowSeparateShortValue_,\n                bool &allowSeparateLongValue_) const\n            {\n                allowJoinedShortValue_ = this->allowJoinedShortValue;\n                allowJoinedLongValue_ = this->allowJoinedLongValue;\n                allowSeparateShortValue_ = this->allowSeparateShortValue;\n                allowSeparateLongValue_ = this->allowSeparateLongValue;\n            }\n\n            /** Change allowed option separation.\n             *\n             * \\param allowJoinedShortValue_ Allow a short flag that accepts an argument to be passed its argument immediately next to it (ie. in the same argv field)\n             * \\param allowJoinedLongValue_ Allow a long flag that accepts an argument to be passed its argument separated by the longseparator (ie. in the same argv field)\n             * \\param allowSeparateShortValue_ Allow a short flag that accepts an argument to be passed its argument separated by whitespace (ie. in the next argv field)\n             * \\param allowSeparateLongValue_ Allow a long flag that accepts an argument to be passed its argument separated by whitespace (ie. in the next argv field)\n             */\n            void SetArgumentSeparations(\n                const bool allowJoinedShortValue_,\n                const bool allowJoinedLongValue_,\n                const bool allowSeparateShortValue_,\n                const bool allowSeparateLongValue_)\n            {\n                this->allowJoinedShortValue = allowJoinedShortValue_;\n                this->allowJoinedLongValue = allowJoinedLongValue_;\n                this->allowSeparateShortValue = allowSeparateShortValue_;\n                this->allowSeparateLongValue = allowSeparateLongValue_;\n\n                this->helpParams.longSeparator = allowJoinedLongValue ? longseparator : \" \";\n                this->helpParams.shortSeparator = allowJoinedShortValue ? \"\" : \" \";\n            }\n\n            /** Pass the help menu into an ostream\n             */\n            void Help(std::ostream &help_) const\n            {\n                auto &command = SelectedCommand();\n                const auto &commandDescription = command.Description().empty() ? command.Help() : command.Description();\n                const auto description_text = Wrap(commandDescription, helpParams.width - helpParams.descriptionindent);\n                const auto epilog_text = Wrap(command.Epilog(), helpParams.width - helpParams.descriptionindent);\n\n                const bool hasoptions = command.HasFlag();\n                const bool hasarguments = command.HasPositional();\n\n                std::vector<std::string> prognameline;\n                prognameline.push_back(helpParams.usageString);\n                prognameline.push_back(Prog());\n                auto commandProgLine = command.GetProgramLine(helpParams);\n                prognameline.insert(prognameline.end(), commandProgLine.begin(), commandProgLine.end());\n\n                const auto proglines = Wrap(prognameline.begin(), prognameline.end(),\n                                            helpParams.width - (helpParams.progindent + helpParams.progtailindent),\n                                            helpParams.width - helpParams.progindent);\n                auto progit = std::begin(proglines);\n                if (progit != std::end(proglines))\n                {\n                    help_ << std::string(helpParams.progindent, ' ') << *progit << '\\n';\n                    ++progit;\n                }\n                for (; progit != std::end(proglines); ++progit)\n                {\n                    help_ << std::string(helpParams.progtailindent, ' ') << *progit << '\\n';\n                }\n\n                help_ << '\\n';\n\n                if (!description_text.empty())\n                {\n                    for (const auto &line: description_text)\n                    {\n                        help_ << std::string(helpParams.descriptionindent, ' ') << line << \"\\n\";\n                    }\n                    help_ << \"\\n\";\n                }\n\n                bool lastDescriptionIsNewline = false;\n\n                if (!helpParams.optionsString.empty())\n                {\n                    help_ << std::string(helpParams.progindent, ' ') << helpParams.optionsString << \"\\n\\n\";\n                }\n\n                for (const auto &desc: command.GetDescription(helpParams, 0))\n                {\n                    lastDescriptionIsNewline = std::get<0>(desc).empty() && std::get<1>(desc).empty();\n                    const auto groupindent = std::get<2>(desc) * helpParams.eachgroupindent;\n                    const auto flags = Wrap(std::get<0>(desc), helpParams.width - (helpParams.flagindent + helpParams.helpindent + helpParams.gutter));\n                    const auto info = Wrap(std::get<1>(desc), helpParams.width - (helpParams.helpindent + groupindent));\n\n                    std::string::size_type flagssize = 0;\n                    for (auto flagsit = std::begin(flags); flagsit != std::end(flags); ++flagsit)\n                    {\n                        if (flagsit != std::begin(flags))\n                        {\n                            help_ << '\\n';\n                        }\n                        help_ << std::string(groupindent + helpParams.flagindent, ' ') << *flagsit;\n                        flagssize = Glyphs(*flagsit);\n                    }\n\n                    auto infoit = std::begin(info);\n                    // groupindent is on both sides of this inequality, and therefore can be removed\n                    if ((helpParams.flagindent + flagssize + helpParams.gutter) > helpParams.helpindent || infoit == std::end(info) || helpParams.addNewlineBeforeDescription)\n                    {\n                        help_ << '\\n';\n                    } else\n                    {\n                        // groupindent is on both sides of the minus sign, and therefore doesn't actually need to be in here\n                        help_ << std::string(helpParams.helpindent - (helpParams.flagindent + flagssize), ' ') << *infoit << '\\n';\n                        ++infoit;\n                    }\n                    for (; infoit != std::end(info); ++infoit)\n                    {\n                        help_ << std::string(groupindent + helpParams.helpindent, ' ') << *infoit << '\\n';\n                    }\n                }\n                if (hasoptions && hasarguments && helpParams.showTerminator)\n                {\n                    lastDescriptionIsNewline = false;\n                    for (const auto &item: Wrap(std::string(\"\\\"\") + terminator + \"\\\" can be used to terminate flag options and force all following arguments to be treated as positional options\", helpParams.width - helpParams.flagindent))\n                    {\n                        help_ << std::string(helpParams.flagindent, ' ') << item << '\\n';\n                    }\n                }\n\n                if (!lastDescriptionIsNewline)\n                {\n                    help_ << \"\\n\";\n                }\n\n                for (const auto &line: epilog_text)\n                {\n                    help_ << std::string(helpParams.descriptionindent, ' ') << line << \"\\n\";\n                }\n            }\n\n            /** Generate a help menu as a string.\n             *\n             * \\return the help text as a single string\n             */\n            std::string Help() const\n            {\n                std::ostringstream help_;\n                Help(help_);\n                return help_.str();\n            }\n\n            virtual void Reset() noexcept override\n            {\n                Command::Reset();\n                matched = true;\n                readCompletion = false;\n            }\n\n            /** Parse all arguments.\n             *\n             * \\param begin an iterator to the beginning of the argument list\n             * \\param end an iterator to the past-the-end element of the argument list\n             * \\return the iterator after the last parsed value.  Only useful for kick-out\n             */\n            template <typename It>\n            It ParseArgs(It begin, It end)\n            {\n                // Reset all Matched statuses and errors\n                Reset();\n#ifdef ARGS_NOEXCEPT\n                error = GetError();\n                if (error != Error::None)\n                {\n                    return end;\n                }\n#endif\n                return Parse(begin, end);\n            }\n\n            /** Parse all arguments.\n             *\n             * \\param args an iterable of the arguments\n             * \\return the iterator after the last parsed value.  Only useful for kick-out\n             */\n            template <typename T>\n            auto ParseArgs(const T &args) -> decltype(std::begin(args))\n            {\n                return ParseArgs(std::begin(args), std::end(args));\n            }\n\n            /** Convenience function to parse the CLI from argc and argv\n             *\n             * Just assigns the program name and vectorizes arguments for passing into ParseArgs()\n             *\n             * \\return whether or not all arguments were parsed.  This works for detecting kick-out, but is generally useless as it can't do anything with it.\n             */\n            bool ParseCLI(const int argc, const char * const * argv)\n            {\n                if (Prog().empty())\n                {\n                    Prog(argv[0]);\n                }\n                const std::vector<std::string> args(argv + 1, argv + argc);\n                return ParseArgs(args) == std::end(args);\n            }\n            \n            template <typename T>\n            bool ParseCLI(const T &args)\n            {\n                return ParseArgs(args) == std::end(args);\n            }\n    };\n\n    inline Command::RaiiSubparser::RaiiSubparser(ArgumentParser &parser_, std::vector<std::string> args_)\n        : command(parser_.SelectedCommand()), parser(std::move(args_), parser_, command, parser_.helpParams), oldSubparser(command.subparser)\n    {\n        command.subparser = &parser;\n    }\n\n    inline Command::RaiiSubparser::RaiiSubparser(const Command &command_, const HelpParams &params_): command(command_), parser(command, params_), oldSubparser(command.subparser)\n    {\n        command.subparser = &parser;\n    }\n\n    inline void Subparser::Parse()\n    {\n        isParsed = true;\n        Reset();\n        command.subparserDescription = GetDescription(helpParams, 0);\n        command.subparserHasFlag = HasFlag();\n        command.subparserHasPositional = HasPositional();\n        command.subparserHasCommand = HasCommand();\n        command.subparserProgramLine = GetProgramLine(helpParams);\n        if (parser == nullptr)\n        {\n#ifndef ARGS_NOEXCEPT\n            throw args::SubparserError();\n#else\n            error = Error::Subparser;\n            return;\n#endif\n        }\n\n        auto it = parser->Parse(args.begin(), args.end());\n        command.Validate(parser->ShortPrefix(), parser->LongPrefix());\n        kicked.assign(it, args.end());\n\n#ifdef ARGS_NOEXCEPT\n        command.subparserError = GetError();\n#endif\n    }\n\n    inline std::ostream &operator<<(std::ostream &os, const ArgumentParser &parser)\n    {\n        parser.Help(os);\n        return os;\n    }\n\n    /** Boolean argument matcher\n     */\n    class Flag : public FlagBase\n    {\n        public:\n            Flag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_): FlagBase(name_, help_, std::move(matcher_), options_)\n            {\n                group_.Add(*this);\n            }\n\n            Flag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const bool extraError_ = false): Flag(group_, name_, help_, std::move(matcher_), extraError_ ? Options::Single : Options::None)\n            {\n            }\n\n            virtual ~Flag() {}\n\n            /** Get whether this was matched\n             */\n            bool Get() const\n            {\n                return Matched();\n            }\n\n            virtual Nargs NumberOfArguments() const noexcept override\n            {\n                return 0;\n            }\n\n            virtual void ParseValue(const std::vector<std::string>&) override\n            {\n            }\n    };\n\n    /** Help flag class\n     *\n     * Works like a regular flag, but throws an instance of Help when it is matched\n     */\n    class HelpFlag : public Flag\n    {\n        public:\n            HelpFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_ = {}): Flag(group_, name_, help_, std::move(matcher_), options_) {}\n\n            virtual ~HelpFlag() {}\n\n            virtual void ParseValue(const std::vector<std::string> &)\n            {\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Help;\n                    errorMsg = Name();\n#else\n                    throw Help(Name());\n#endif\n            }\n\n            /** Get whether this was matched\n             */\n            bool Get() const noexcept\n            {\n                return Matched();\n            }\n    };\n\n    /** A flag class that simply counts the number of times it's matched\n     */\n    class CounterFlag : public Flag\n    {\n        private:\n            const int startcount;\n            int count;\n\n        public:\n            CounterFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const int startcount_ = 0, Options options_ = {}):\n                Flag(group_, name_, help_, std::move(matcher_), options_), startcount(startcount_), count(startcount_) {}\n\n            virtual ~CounterFlag() {}\n\n            virtual FlagBase *Match(const EitherFlag &arg) override\n            {\n                auto me = FlagBase::Match(arg);\n                if (me)\n                {\n                    ++count;\n                }\n                return me;\n            }\n\n            /** Get the count\n             */\n            int &Get() noexcept\n            {\n                return count;\n            }\n\n            virtual void Reset() noexcept override\n            {\n                FlagBase::Reset();\n                count = startcount;\n            }\n    };\n\n    /** A flag class that calls a function when it's matched\n     */\n    class ActionFlag : public FlagBase\n    {\n        private:\n            std::function<void(const std::vector<std::string> &)> action;\n            Nargs nargs;\n\n        public:\n            ActionFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Nargs nargs_, std::function<void(const std::vector<std::string> &)> action_, Options options_ = {}):\n                FlagBase(name_, help_, std::move(matcher_), options_), action(std::move(action_)), nargs(nargs_)\n            {\n                group_.Add(*this);\n            }\n\n            ActionFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, std::function<void(const std::string &)> action_, Options options_ = {}):\n                FlagBase(name_, help_, std::move(matcher_), options_), nargs(1)\n            {\n                group_.Add(*this);\n                action = [action_](const std::vector<std::string> &a) { return action_(a.at(0)); };\n            }\n\n            ActionFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, std::function<void()> action_, Options options_ = {}):\n                FlagBase(name_, help_, std::move(matcher_), options_), nargs(0)\n            {\n                group_.Add(*this);\n                action = [action_](const std::vector<std::string> &) { return action_(); };\n            }\n\n            virtual Nargs NumberOfArguments() const noexcept override\n            { return nargs; }\n\n            virtual void ParseValue(const std::vector<std::string> &value) override\n            { action(value); }\n    };\n\n    /** A default Reader class for argument classes\n     *\n     * If destination type is assignable to std::string it uses an assignment to std::string.\n     * Otherwise ValueReader simply uses a std::istringstream to read into the destination type, and\n     * raises a ParseError if there are any characters left.\n     */\n    struct ValueReader\n    {\n        template <typename T>\n        typename std::enable_if<!std::is_assignable<T, std::string>::value, bool>::type\n        operator ()(const std::string &name, const std::string &value, T &destination)\n        {\n            std::istringstream ss(value);\n            bool failed = !(ss >> destination);\n\n            if (!failed)\n            {\n                ss >> std::ws;\n            }\n\n            if (ss.rdbuf()->in_avail() > 0 || failed)\n            {\n#ifdef ARGS_NOEXCEPT\n                (void)name;\n                return false;\n#else\n                std::ostringstream problem;\n                problem << \"Argument '\" << name << \"' received invalid value type '\" << value << \"'\";\n                throw ParseError(problem.str());\n#endif\n            }\n            return true;\n        }\n\n        template <typename T>\n        typename std::enable_if<std::is_assignable<T, std::string>::value, bool>::type\n        operator()(const std::string &, const std::string &value, T &destination)\n        {\n            destination = value;\n            return true;\n        }\n    };\n\n    /** An argument-accepting flag class\n     * \n     * \\tparam T the type to extract the argument as\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     */\n    template <\n        typename T,\n        typename Reader = ValueReader>\n    class ValueFlag : public ValueFlagBase\n    {\n        protected:\n            T value;\n            T defaultValue;\n\n            virtual std::string GetDefaultString(const HelpParams&) const override\n            {\n                return detail::ToString(defaultValue);\n            }\n\n        private:\n            Reader reader;\n\n        public:\n\n            ValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const T &defaultValue_, Options options_): ValueFlagBase(name_, help_, std::move(matcher_), options_), value(defaultValue_), defaultValue(defaultValue_)\n            {\n                group_.Add(*this);\n            }\n\n            ValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const T &defaultValue_ = T(), const bool extraError_ = false): ValueFlag(group_, name_, help_, std::move(matcher_), defaultValue_, extraError_ ? Options::Single : Options::None)\n            {\n            }\n\n            ValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_): ValueFlag(group_, name_, help_, std::move(matcher_), T(), options_)\n            {\n            }\n\n            virtual ~ValueFlag() {}\n\n            virtual void ParseValue(const std::vector<std::string> &values_) override\n            {\n                const std::string &value_ = values_.at(0);\n\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, this->value))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, this->value);\n#endif\n            }\n\n            virtual void Reset() noexcept override\n            {\n                ValueFlagBase::Reset();\n                value = defaultValue;\n            }\n\n            /** Get the value\n             */\n            T &Get() noexcept\n            {\n                return value;\n            }\n\n            /** Get the default value\n             */\n            const T &GetDefault() noexcept\n            {\n                return defaultValue;\n            }\n    };\n\n    /** An optional argument-accepting flag class\n     *\n     * \\tparam T the type to extract the argument as\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     */\n    template <\n        typename T,\n        typename Reader = ValueReader>\n    class ImplicitValueFlag : public ValueFlag<T, Reader>\n    {\n        protected:\n            T implicitValue;\n\n        public:\n\n            ImplicitValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const T &implicitValue_, const T &defaultValue_ = T(), Options options_ = {})\n                : ValueFlag<T, Reader>(group_, name_, help_, std::move(matcher_), defaultValue_, options_), implicitValue(implicitValue_)\n            {\n            }\n\n            ImplicitValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const T &defaultValue_ = T(), Options options_ = {})\n                : ValueFlag<T, Reader>(group_, name_, help_, std::move(matcher_), defaultValue_, options_), implicitValue(defaultValue_)\n            {\n            }\n\n            ImplicitValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Options options_)\n                : ValueFlag<T, Reader>(group_, name_, help_, std::move(matcher_), {}, options_), implicitValue()\n            {\n            }\n\n            virtual ~ImplicitValueFlag() {}\n\n            virtual Nargs NumberOfArguments() const noexcept override\n            {\n                return {0, 1};\n            }\n\n            virtual void ParseValue(const std::vector<std::string> &value_) override\n            {\n                if (value_.empty())\n                {\n                    this->value = implicitValue;\n                } else\n                {\n                    ValueFlag<T, Reader>::ParseValue(value_);\n                }\n            }\n    };\n\n    /** A variadic arguments accepting flag class\n     *\n     * \\tparam T the type to extract the argument as\n     * \\tparam List the list type that houses the values\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     */\n    template <\n        typename T,\n        template <typename...> class List = std::vector,\n        typename Reader = ValueReader>\n    class NargsValueFlag : public FlagBase\n    {\n        protected:\n\n            List<T> values;\n            const List<T> defaultValues;\n            Nargs nargs;\n            Reader reader;\n\n        public:\n\n            typedef List<T> Container;\n            typedef T value_type;\n            typedef typename Container::allocator_type allocator_type;\n            typedef typename Container::pointer pointer;\n            typedef typename Container::const_pointer const_pointer;\n            typedef T& reference;\n            typedef const T& const_reference;\n            typedef typename Container::size_type size_type;\n            typedef typename Container::difference_type difference_type;\n            typedef typename Container::iterator iterator;\n            typedef typename Container::const_iterator const_iterator;\n            typedef std::reverse_iterator<iterator> reverse_iterator;\n            typedef std::reverse_iterator<const_iterator> const_reverse_iterator;\n\n            NargsValueFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, Nargs nargs_, const List<T> &defaultValues_ = {}, Options options_ = {})\n                : FlagBase(name_, help_, std::move(matcher_), options_), values(defaultValues_), defaultValues(defaultValues_),nargs(nargs_)\n            {\n                group_.Add(*this);\n            }\n\n            virtual ~NargsValueFlag() {}\n\n            virtual Nargs NumberOfArguments() const noexcept override\n            {\n                return nargs;\n            }\n\n            virtual void ParseValue(const std::vector<std::string> &values_) override\n            {\n                values.clear();\n\n                for (const std::string &value : values_)\n                {\n                    T v;\n#ifdef ARGS_NOEXCEPT\n                    if (!reader(name, value, v))\n                    {\n                        error = Error::Parse;\n                    }\n#else\n                    reader(name, value, v);\n#endif\n                    values.insert(std::end(values), v);\n                }\n            }\n\n            List<T> &Get() noexcept\n            {\n                return values;\n            }\n\n            iterator begin() noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator begin() const noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator cbegin() const noexcept\n            {\n                return values.cbegin();\n            }\n\n            iterator end() noexcept\n            {\n                return values.end();\n            }\n\n            const_iterator end() const noexcept \n            {\n                return values.end();\n            }\n\n            const_iterator cend() const noexcept\n            {\n                return values.cend();\n            }\n\n            virtual void Reset() noexcept override\n            {\n                FlagBase::Reset();\n                values = defaultValues;\n            }\n\n            virtual FlagBase *Match(const EitherFlag &arg) override\n            {\n                const bool wasMatched = Matched();\n                auto me = FlagBase::Match(arg);\n                if (me && !wasMatched)\n                {\n                    values.clear();\n                }\n                return me;\n            }\n    };\n\n    /** An argument-accepting flag class that pushes the found values into a list\n     * \n     * \\tparam T the type to extract the argument as\n     * \\tparam List the list type that houses the values\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     */\n    template <\n        typename T,\n        template <typename...> class List = std::vector,\n        typename Reader = ValueReader>\n    class ValueFlagList : public ValueFlagBase\n    {\n        private:\n            using Container = List<T>;\n            Container values;\n            const Container defaultValues;\n            Reader reader;\n\n        public:\n\n            typedef T value_type;\n            typedef typename Container::allocator_type allocator_type;\n            typedef typename Container::pointer pointer;\n            typedef typename Container::const_pointer const_pointer;\n            typedef T& reference;\n            typedef const T& const_reference;\n            typedef typename Container::size_type size_type;\n            typedef typename Container::difference_type difference_type;\n            typedef typename Container::iterator iterator;\n            typedef typename Container::const_iterator const_iterator;\n            typedef std::reverse_iterator<iterator> reverse_iterator;\n            typedef std::reverse_iterator<const_iterator> const_reverse_iterator;\n\n            ValueFlagList(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const Container &defaultValues_ = Container(), Options options_ = {}):\n                ValueFlagBase(name_, help_, std::move(matcher_), options_), values(defaultValues_), defaultValues(defaultValues_)\n            {\n                group_.Add(*this);\n            }\n\n            virtual ~ValueFlagList() {}\n\n            virtual void ParseValue(const std::vector<std::string> &values_) override\n            {\n                const std::string &value_ = values_.at(0);\n\n                T v;\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, v))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, v);\n#endif\n                values.insert(std::end(values), v);\n            }\n\n            /** Get the values\n             */\n            Container &Get() noexcept\n            {\n                return values;\n            }\n\n            virtual std::string Name() const override\n            {\n                return name + std::string(\"...\");\n            }\n\n            virtual void Reset() noexcept override\n            {\n                ValueFlagBase::Reset();\n                values = defaultValues;\n            }\n\n            virtual FlagBase *Match(const EitherFlag &arg) override\n            {\n                const bool wasMatched = Matched();\n                auto me = FlagBase::Match(arg);\n                if (me && !wasMatched)\n                {\n                    values.clear();\n                }\n                return me;\n            }\n\n            iterator begin() noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator begin() const noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator cbegin() const noexcept\n            {\n                return values.cbegin();\n            }\n\n            iterator end() noexcept\n            {\n                return values.end();\n            }\n\n            const_iterator end() const noexcept \n            {\n                return values.end();\n            }\n\n            const_iterator cend() const noexcept\n            {\n                return values.cend();\n            }\n    };\n\n    /** A mapping value flag class\n     * \n     * \\tparam K the type to extract the argument as\n     * \\tparam T the type to store the result as\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     * \\tparam Map The Map type.  Should operate like std::map or std::unordered_map\n     */\n    template <\n        typename K,\n        typename T,\n        typename Reader = ValueReader,\n        template <typename...> class Map = std::unordered_map>\n    class MapFlag : public ValueFlagBase\n    {\n        private:\n            const Map<K, T> map;\n            T value;\n            const T defaultValue;\n            Reader reader;\n\n        protected:\n            virtual std::vector<std::string> GetChoicesStrings(const HelpParams &) const override\n            {\n                return detail::MapKeysToStrings(map);\n            }\n\n        public:\n\n            MapFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const Map<K, T> &map_, const T &defaultValue_, Options options_): ValueFlagBase(name_, help_, std::move(matcher_), options_), map(map_), value(defaultValue_), defaultValue(defaultValue_)\n            {\n                group_.Add(*this);\n            }\n\n            MapFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const Map<K, T> &map_, const T &defaultValue_ = T(), const bool extraError_ = false): MapFlag(group_, name_, help_, std::move(matcher_), map_, defaultValue_, extraError_ ? Options::Single : Options::None)\n            {\n            }\n\n            MapFlag(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const Map<K, T> &map_, Options options_): MapFlag(group_, name_, help_, std::move(matcher_), map_, T(), options_)\n            {\n            }\n\n            virtual ~MapFlag() {}\n\n            virtual void ParseValue(const std::vector<std::string> &values_) override\n            {\n                const std::string &value_ = values_.at(0);\n\n                K key;\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, key))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, key);\n#endif\n                auto it = map.find(key);\n                if (it == std::end(map))\n                {\n                    std::ostringstream problem;\n                    problem << \"Could not find key '\" << key << \"' in map for arg '\" << name << \"'\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Map;\n                    errorMsg = problem.str();\n#else\n                    throw MapError(problem.str());\n#endif\n                } else\n                {\n                    this->value = it->second;\n                }\n            }\n\n            /** Get the value\n             */\n            T &Get() noexcept\n            {\n                return value;\n            }\n\n            virtual void Reset() noexcept override\n            {\n                ValueFlagBase::Reset();\n                value = defaultValue;\n            }\n    };\n\n    /** A mapping value flag list class\n     * \n     * \\tparam K the type to extract the argument as\n     * \\tparam T the type to store the result as\n     * \\tparam List the list type that houses the values\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     * \\tparam Map The Map type.  Should operate like std::map or std::unordered_map\n     */\n    template <\n        typename K,\n        typename T,\n        template <typename...> class List = std::vector,\n        typename Reader = ValueReader,\n        template <typename...> class Map = std::unordered_map>\n    class MapFlagList : public ValueFlagBase\n    {\n        private:\n            using Container = List<T>;\n            const Map<K, T> map;\n            Container values;\n            const Container defaultValues;\n            Reader reader;\n\n        protected:\n            virtual std::vector<std::string> GetChoicesStrings(const HelpParams &) const override\n            {\n                return detail::MapKeysToStrings(map);\n            }\n\n        public:\n            typedef T value_type;\n            typedef typename Container::allocator_type allocator_type;\n            typedef typename Container::pointer pointer;\n            typedef typename Container::const_pointer const_pointer;\n            typedef T& reference;\n            typedef const T& const_reference;\n            typedef typename Container::size_type size_type;\n            typedef typename Container::difference_type difference_type;\n            typedef typename Container::iterator iterator;\n            typedef typename Container::const_iterator const_iterator;\n            typedef std::reverse_iterator<iterator> reverse_iterator;\n            typedef std::reverse_iterator<const_iterator> const_reverse_iterator;\n\n            MapFlagList(Group &group_, const std::string &name_, const std::string &help_, Matcher &&matcher_, const Map<K, T> &map_, const Container &defaultValues_ = Container()): ValueFlagBase(name_, help_, std::move(matcher_)), map(map_), values(defaultValues_), defaultValues(defaultValues_)\n            {\n                group_.Add(*this);\n            }\n\n            virtual ~MapFlagList() {}\n\n            virtual void ParseValue(const std::vector<std::string> &values_) override\n            {\n                const std::string &value = values_.at(0);\n\n                K key;\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value, key))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value, key);\n#endif\n                auto it = map.find(key);\n                if (it == std::end(map))\n                {\n                    std::ostringstream problem;\n                    problem << \"Could not find key '\" << key << \"' in map for arg '\" << name << \"'\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Map;\n                    errorMsg = problem.str();\n#else\n                    throw MapError(problem.str());\n#endif\n                } else\n                {\n                    this->values.emplace_back(it->second);\n                }\n            }\n\n            /** Get the value\n             */\n            Container &Get() noexcept\n            {\n                return values;\n            }\n\n            virtual std::string Name() const override\n            {\n                return name + std::string(\"...\");\n            }\n\n            virtual void Reset() noexcept override\n            {\n                ValueFlagBase::Reset();\n                values = defaultValues;\n            }\n\n            virtual FlagBase *Match(const EitherFlag &arg) override\n            {\n                const bool wasMatched = Matched();\n                auto me = FlagBase::Match(arg);\n                if (me && !wasMatched)\n                {\n                    values.clear();\n                }\n                return me;\n            }\n\n            iterator begin() noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator begin() const noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator cbegin() const noexcept\n            {\n                return values.cbegin();\n            }\n\n            iterator end() noexcept\n            {\n                return values.end();\n            }\n\n            const_iterator end() const noexcept \n            {\n                return values.end();\n            }\n\n            const_iterator cend() const noexcept\n            {\n                return values.cend();\n            }\n    };\n\n    /** A positional argument class\n     *\n     * \\tparam T the type to extract the argument as\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     */\n    template <\n        typename T,\n        typename Reader = ValueReader>\n    class Positional : public PositionalBase\n    {\n        private:\n            T value;\n            const T defaultValue;\n            Reader reader;\n        public:\n            Positional(Group &group_, const std::string &name_, const std::string &help_, const T &defaultValue_ = T(), Options options_ = {}): PositionalBase(name_, help_, options_), value(defaultValue_), defaultValue(defaultValue_)\n            {\n                group_.Add(*this);\n            }\n\n            Positional(Group &group_, const std::string &name_, const std::string &help_, Options options_): Positional(group_, name_, help_, T(), options_)\n            {\n            }\n\n            virtual ~Positional() {}\n\n            virtual void ParseValue(const std::string &value_) override\n            {\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, this->value))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, this->value);\n#endif\n                ready = false;\n                matched = true;\n            }\n\n            /** Get the value\n             */\n            T &Get() noexcept\n            {\n                return value;\n            }\n\n            virtual void Reset() noexcept override\n            {\n                PositionalBase::Reset();\n                value = defaultValue;\n            }\n    };\n\n    /** A positional argument class that pushes the found values into a list\n     * \n     * \\tparam T the type to extract the argument as\n     * \\tparam List the list type that houses the values\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     */\n    template <\n        typename T,\n        template <typename...> class List = std::vector,\n        typename Reader = ValueReader>\n    class PositionalList : public PositionalBase\n    {\n        private:\n            using Container = List<T>;\n            Container values;\n            const Container defaultValues;\n            Reader reader;\n\n        public:\n            typedef T value_type;\n            typedef typename Container::allocator_type allocator_type;\n            typedef typename Container::pointer pointer;\n            typedef typename Container::const_pointer const_pointer;\n            typedef T& reference;\n            typedef const T& const_reference;\n            typedef typename Container::size_type size_type;\n            typedef typename Container::difference_type difference_type;\n            typedef typename Container::iterator iterator;\n            typedef typename Container::const_iterator const_iterator;\n            typedef std::reverse_iterator<iterator> reverse_iterator;\n            typedef std::reverse_iterator<const_iterator> const_reverse_iterator;\n\n            PositionalList(Group &group_, const std::string &name_, const std::string &help_, const Container &defaultValues_ = Container(), Options options_ = {}): PositionalBase(name_, help_, options_), values(defaultValues_), defaultValues(defaultValues_)\n            {\n                group_.Add(*this);\n            }\n\n            PositionalList(Group &group_, const std::string &name_, const std::string &help_, Options options_): PositionalList(group_, name_, help_, {}, options_)\n            {\n            }\n\n            virtual ~PositionalList() {}\n\n            virtual void ParseValue(const std::string &value_) override\n            {\n                T v;\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, v))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, v);\n#endif\n                values.insert(std::end(values), v);\n                matched = true;\n            }\n\n            virtual std::string Name() const override\n            {\n                return name + std::string(\"...\");\n            }\n\n            /** Get the values\n             */\n            Container &Get() noexcept\n            {\n                return values;\n            }\n\n            virtual void Reset() noexcept override\n            {\n                PositionalBase::Reset();\n                values = defaultValues;\n            }\n\n            virtual PositionalBase *GetNextPositional() override\n            {\n                const bool wasMatched = Matched();\n                auto me = PositionalBase::GetNextPositional();\n                if (me && !wasMatched)\n                {\n                    values.clear();\n                }\n                return me;\n            }\n\n            iterator begin() noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator begin() const noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator cbegin() const noexcept\n            {\n                return values.cbegin();\n            }\n\n            iterator end() noexcept\n            {\n                return values.end();\n            }\n\n            const_iterator end() const noexcept \n            {\n                return values.end();\n            }\n\n            const_iterator cend() const noexcept\n            {\n                return values.cend();\n            }\n    };\n\n    /** A positional argument mapping class\n     * \n     * \\tparam K the type to extract the argument as\n     * \\tparam T the type to store the result as\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     * \\tparam Map The Map type.  Should operate like std::map or std::unordered_map\n     */\n    template <\n        typename K,\n        typename T,\n        typename Reader = ValueReader,\n        template <typename...> class Map = std::unordered_map>\n    class MapPositional : public PositionalBase\n    {\n        private:\n            const Map<K, T> map;\n            T value;\n            const T defaultValue;\n            Reader reader;\n\n        protected:\n            virtual std::vector<std::string> GetChoicesStrings(const HelpParams &) const override\n            {\n                return detail::MapKeysToStrings(map);\n            }\n\n        public:\n\n            MapPositional(Group &group_, const std::string &name_, const std::string &help_, const Map<K, T> &map_, const T &defaultValue_ = T(), Options options_ = {}):\n                PositionalBase(name_, help_, options_), map(map_), value(defaultValue_), defaultValue(defaultValue_)\n            {\n                group_.Add(*this);\n            }\n\n            virtual ~MapPositional() {}\n\n            virtual void ParseValue(const std::string &value_) override\n            {\n                K key;\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, key))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, key);\n#endif\n                auto it = map.find(key);\n                if (it == std::end(map))\n                {\n                    std::ostringstream problem;\n                    problem << \"Could not find key '\" << key << \"' in map for arg '\" << name << \"'\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Map;\n                    errorMsg = problem.str();\n#else\n                    throw MapError(problem.str());\n#endif\n                } else\n                {\n                    this->value = it->second;\n                    ready = false;\n                    matched = true;\n                }\n            }\n\n            /** Get the value\n             */\n            T &Get() noexcept\n            {\n                return value;\n            }\n\n            virtual void Reset() noexcept override\n            {\n                PositionalBase::Reset();\n                value = defaultValue;\n            }\n    };\n\n    /** A positional argument mapping list class\n     * \n     * \\tparam K the type to extract the argument as\n     * \\tparam T the type to store the result as\n     * \\tparam List the list type that houses the values\n     * \\tparam Reader The functor type used to read the argument, taking the name, value, and destination reference with operator(), and returning a bool (if ARGS_NOEXCEPT is defined)\n     * \\tparam Map The Map type.  Should operate like std::map or std::unordered_map\n     */\n    template <\n        typename K,\n        typename T,\n        template <typename...> class List = std::vector,\n        typename Reader = ValueReader,\n        template <typename...> class Map = std::unordered_map>\n    class MapPositionalList : public PositionalBase\n    {\n        private:\n            using Container = List<T>;\n\n            const Map<K, T> map;\n            Container values;\n            const Container defaultValues;\n            Reader reader;\n\n        protected:\n            virtual std::vector<std::string> GetChoicesStrings(const HelpParams &) const override\n            {\n                return detail::MapKeysToStrings(map);\n            }\n\n        public:\n            typedef T value_type;\n            typedef typename Container::allocator_type allocator_type;\n            typedef typename Container::pointer pointer;\n            typedef typename Container::const_pointer const_pointer;\n            typedef T& reference;\n            typedef const T& const_reference;\n            typedef typename Container::size_type size_type;\n            typedef typename Container::difference_type difference_type;\n            typedef typename Container::iterator iterator;\n            typedef typename Container::const_iterator const_iterator;\n            typedef std::reverse_iterator<iterator> reverse_iterator;\n            typedef std::reverse_iterator<const_iterator> const_reverse_iterator;\n\n            MapPositionalList(Group &group_, const std::string &name_, const std::string &help_, const Map<K, T> &map_, const Container &defaultValues_ = Container(), Options options_ = {}):\n                PositionalBase(name_, help_, options_), map(map_), values(defaultValues_), defaultValues(defaultValues_)\n            {\n                group_.Add(*this);\n            }\n\n            virtual ~MapPositionalList() {}\n\n            virtual void ParseValue(const std::string &value_) override\n            {\n                K key;\n#ifdef ARGS_NOEXCEPT\n                if (!reader(name, value_, key))\n                {\n                    error = Error::Parse;\n                }\n#else\n                reader(name, value_, key);\n#endif\n                auto it = map.find(key);\n                if (it == std::end(map))\n                {\n                    std::ostringstream problem;\n                    problem << \"Could not find key '\" << key << \"' in map for arg '\" << name << \"'\";\n#ifdef ARGS_NOEXCEPT\n                    error = Error::Map;\n                    errorMsg = problem.str();\n#else\n                    throw MapError(problem.str());\n#endif\n                } else\n                {\n                    this->values.emplace_back(it->second);\n                    matched = true;\n                }\n            }\n\n            /** Get the value\n             */\n            Container &Get() noexcept\n            {\n                return values;\n            }\n\n            virtual std::string Name() const override\n            {\n                return name + std::string(\"...\");\n            }\n\n            virtual void Reset() noexcept override\n            {\n                PositionalBase::Reset();\n                values = defaultValues;\n            }\n\n            virtual PositionalBase *GetNextPositional() override\n            {\n                const bool wasMatched = Matched();\n                auto me = PositionalBase::GetNextPositional();\n                if (me && !wasMatched)\n                {\n                    values.clear();\n                }\n                return me;\n            }\n\n            iterator begin() noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator begin() const noexcept\n            {\n                return values.begin();\n            }\n\n            const_iterator cbegin() const noexcept\n            {\n                return values.cbegin();\n            }\n\n            iterator end() noexcept\n            {\n                return values.end();\n            }\n\n            const_iterator end() const noexcept \n            {\n                return values.end();\n            }\n\n            const_iterator cend() const noexcept\n            {\n                return values.cend();\n            }\n    };\n}\n\n#endif\n"
  },
  {
    "path": ".config/proji/templates/cmake/external/headers/crypt.hpp",
    "content": "#pragma once\n#include <iostream>\n#include <fstream>\n#include <string>\n#include <regex>\n#include <type_traits>\n\ntemplate <typename dummy>\nclass cryptor_static_base{\n    protected:\n        static const std::string m_base64_chars;\n        static std::string m_key;\n};\n\ntemplate <typename dummy>\nconst std::string cryptor_static_base<dummy>::m_base64_chars =\n\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n\ntemplate <typename dummy>\nstd::string cryptor_static_base<dummy>::m_key = \"default_key\";\n\nclass cryptor : public cryptor_static_base<void>{\n    public:\n        cryptor() = delete;\n        static std::string encrypt(const char* in, const std::string& key = m_key){\n            return base64_encode(do_xor(std::string(in), key));\n        }\n        template <typename buffer_type>\n            static buffer_type encrypt(const buffer_type& in, const std::string& key = m_key){\n                return base64_encode(do_xor(in, key));\n            }\n        static std::string decrypt(const char* in, const std::string& key = m_key){\n            return do_xor(base64_decode(std::string(in)), key);\n        }\n        template <typename buffer_type>\n            static buffer_type decrypt(const buffer_type& in, const std::string& key = m_key){\n                return do_xor(base64_decode(in), key);\n            }\n        static const std::string& get_key() { return m_key; }\n        static void set_key(const std::string& key) { m_key = key; }\n\n    static std::string originalFile(std::string filePath){\n        std::ifstream ifs(filePath);\n        auto fileStr =  std::string((std::istreambuf_iterator<char>(ifs)),(std::istreambuf_iterator<char>()));\n        return fileStr;\n    }\n\n    static bool isStringBase64(std::string input){\n        for (auto i : input) {\n            if (i == '-') {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    static std::string encryptFile(std::string filePath, const std::string& key = m_key){\n        std::ifstream ifs(filePath);\n        auto file = std::string((std::istreambuf_iterator<char>(ifs)),(std::istreambuf_iterator<char>()));\n        if (!isStringBase64(file)) {\n            file = encrypt(file, key);\n            std::ofstream fout(filePath);\n            fout << file;\n        }\n        return file;\n    }\n\n    static std::string decryptFile (std::string filePath, const std::string& key = m_key){\n        std::ifstream ifs(filePath);\n        auto file =  std::string((std::istreambuf_iterator<char>(ifs)),(std::istreambuf_iterator<char>()));\n        if (isStringBase64(file)) {\n            file = decrypt(file, key);\n            std::ofstream fout(filePath);\n            fout << file;\n        }\n        return file;\n    }\n\n    private:\n        static std::string do_xor(const char* data, const std::string& key){\n            return do_xor(std::string(data), key);\n        }\n        template <typename buffer_type>\n            static buffer_type do_xor(const buffer_type& data, const std::string& key){\n                buffer_type ret(data);\n                xor_impl(ret, key);\n                return ret;\n            }\n        template <typename buffer_type>\n            static void xor_impl(buffer_type& data, const std::string& key){\n                for (size_t i = 0; i < data.size(); ++i){\n                    data[i] ^= key.at(i % key.size());\n                }\n            }\n        static std::string base64_encode(const char* in){\n            return base64_encode_impl(std::string(in));\n        }\n        template <typename buffer_type>\n            static buffer_type base64_encode(const buffer_type& in){\n                return base64_encode_impl(in);\n            }\n        template <typename buffer_type>\n            static buffer_type base64_encode_impl(const buffer_type& in){\n                buffer_type ret;\n                auto bytes_to_encode = in.data();\n                auto in_len = in.size();\n                int i = 0;\n                int j = 0;\n                uint8_t char_array_3[3];\n                uint8_t char_array_4[4];\n                while (in_len--){\n                    char_array_3[i++] = *(bytes_to_encode++);\n                    if (i == 3){\n                        char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;\n                        char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);\n                        char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);\n                        char_array_4[3] = char_array_3[2] & 0x3f;\n                        for (i = 0; i < 4; ++i){\n                            ret.push_back(m_base64_chars.at(char_array_4[i]));\n                        }\n                        i = 0;\n                    }\n                }\n                if (i){\n                    for (j = i; j < 3; ++j){\n                        char_array_3[j] = '\\0';\n                    }\n                    char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;\n                    char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);\n                    char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);\n                    for (j = 0; j < i + 1; ++j){\n                        ret.push_back(m_base64_chars.at(char_array_4[j]));\n                    }\n                    while (i++ < 3){\n                        ret.push_back('=');\n                    }\n                }\n                return ret;\n            }\n        static std::string base64_decode(const char* encoded_data){\n            return base64_decode(std::string(encoded_data));\n        }\n        template <typename buffer_type>\n            static buffer_type base64_decode(const buffer_type& encoded_data){\n                buffer_type out;\n                base64_decode_impl(encoded_data, out);\n                return out;\n            }\n        template <typename buffer_type, typename out_type>\n            static void base64_decode_impl(buffer_type&& encoded_data, out_type& out){\n                auto in_len = encoded_data.size();\n                int i = 0;\n                int j = 0;\n                int in_ = 0;\n                uint8_t char_array_4[4], char_array_3[3];\n                while (in_len-- && (encoded_data[in_] != '=') && is_base64(encoded_data[in_])){\n                    char_array_4[i++] = encoded_data[in_]; in_++;\n                    if (i == 4){\n                        for (i = 0; i < 4; ++i){\n                            char_array_4[i] = static_cast<uint8_t>(m_base64_chars.find(char_array_4[i]));\n                        }\n                        char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);\n                        char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);\n                        char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];\n                        for (i = 0; i < 3; ++i){\n                            out.push_back(char_array_3[i]);\n                        }\n                        i = 0;\n                    }\n                }\n                if (i){\n                    for (j = 0; j < i; ++j){\n                        char_array_4[j] = static_cast<uint8_t>(m_base64_chars.find(char_array_4[j]));\n                    }\n                    char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);\n                    char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);\n                    for (j = 0; j < i - 1; ++j){\n                        out.push_back(char_array_3[j]);\n                    }\n                }\n            }\n        static bool is_base64(uint8_t c){\n            return (isalnum(c) || (c == '+') || (c == '/'));\n        }\n};\n\n"
  },
  {
    "path": ".config/proji/templates/cmake/external/headers/doctest.hpp",
    "content": "// ====================================================================== lgtm [cpp/missing-header-guard]\n// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! ==\n// ======================================================================\n//\n// doctest.h - the lightest feature-rich C++ single-header testing framework for unit tests and TDD\n//\n// Copyright (c) 2016-2019 Viktor Kirilov\n//\n// Distributed under the MIT Software License\n// See accompanying file LICENSE.txt or copy at\n// https://opensource.org/licenses/MIT\n//\n// The documentation can be found at the library's page:\n// https://github.com/onqtam/doctest/blob/master/doc/markdown/readme.md\n//\n// =================================================================================================\n// =================================================================================================\n// =================================================================================================\n//\n// The library is heavily influenced by Catch - https://github.com/catchorg/Catch2\n// which uses the Boost Software License - Version 1.0\n// see here - https://github.com/catchorg/Catch2/blob/master/LICENSE.txt\n//\n// The concept of subcases (sections in Catch) and expression decomposition are from there.\n// Some parts of the code are taken directly:\n// - stringification - the detection of \"ostream& operator<<(ostream&, const T&)\" and StringMaker<>\n// - the Approx() helper class for floating point comparison\n// - colors in the console\n// - breaking into a debugger\n// - signal / SEH handling\n// - timer\n// - XmlWriter class - thanks to Phil Nash for allowing the direct reuse (AKA copy/paste)\n//\n// The expression decomposing templates are taken from lest - https://github.com/martinmoene/lest\n// which uses the Boost Software License - Version 1.0\n// see here - https://github.com/martinmoene/lest/blob/master/LICENSE.txt\n//\n// =================================================================================================\n// =================================================================================================\n// =================================================================================================\n\n#ifndef DOCTEST_LIBRARY_INCLUDED\n#define DOCTEST_LIBRARY_INCLUDED\n\n// =================================================================================================\n// == VERSION ======================================================================================\n// =================================================================================================\n\n#define DOCTEST_VERSION_MAJOR 2\n#define DOCTEST_VERSION_MINOR 3\n#define DOCTEST_VERSION_PATCH 5\n#define DOCTEST_VERSION_STR \"2.3.5\"\n\n#define DOCTEST_VERSION                                                                            \\\n    (DOCTEST_VERSION_MAJOR * 10000 + DOCTEST_VERSION_MINOR * 100 + DOCTEST_VERSION_PATCH)\n\n// =================================================================================================\n// == COMPILER VERSION =============================================================================\n// =================================================================================================\n\n// ideas for the version stuff are taken from here: https://github.com/cxxstuff/cxx_detect\n\n#define DOCTEST_COMPILER(MAJOR, MINOR, PATCH) ((MAJOR)*10000000 + (MINOR)*100000 + (PATCH))\n\n// GCC/Clang and GCC/MSVC are mutually exclusive, but Clang/MSVC are not because of clang-cl...\n#if defined(_MSC_VER) && defined(_MSC_FULL_VER)\n#if _MSC_VER == _MSC_FULL_VER / 10000\n#define DOCTEST_MSVC DOCTEST_COMPILER(_MSC_VER / 100, _MSC_VER % 100, _MSC_FULL_VER % 10000)\n#else // MSVC\n#define DOCTEST_MSVC                                                                               \\\n    DOCTEST_COMPILER(_MSC_VER / 100, (_MSC_FULL_VER / 100000) % 100, _MSC_FULL_VER % 100000)\n#endif // MSVC\n#endif // MSVC\n#if defined(__clang__) && defined(__clang_minor__)\n#define DOCTEST_CLANG DOCTEST_COMPILER(__clang_major__, __clang_minor__, __clang_patchlevel__)\n#elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) &&              \\\n        !defined(__INTEL_COMPILER)\n#define DOCTEST_GCC DOCTEST_COMPILER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)\n#endif // GCC\n\n#ifndef DOCTEST_MSVC\n#define DOCTEST_MSVC 0\n#endif // DOCTEST_MSVC\n#ifndef DOCTEST_CLANG\n#define DOCTEST_CLANG 0\n#endif // DOCTEST_CLANG\n#ifndef DOCTEST_GCC\n#define DOCTEST_GCC 0\n#endif // DOCTEST_GCC\n\n// =================================================================================================\n// == COMPILER WARNINGS HELPERS ====================================================================\n// =================================================================================================\n\n#if DOCTEST_CLANG\n#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x)\n#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH _Pragma(\"clang diagnostic push\")\n#define DOCTEST_CLANG_SUPPRESS_WARNING(w) DOCTEST_PRAGMA_TO_STR(clang diagnostic ignored w)\n#define DOCTEST_CLANG_SUPPRESS_WARNING_POP _Pragma(\"clang diagnostic pop\")\n#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w)                                                \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_PUSH DOCTEST_CLANG_SUPPRESS_WARNING(w)\n#else // DOCTEST_CLANG\n#define DOCTEST_CLANG_SUPPRESS_WARNING_PUSH\n#define DOCTEST_CLANG_SUPPRESS_WARNING(w)\n#define DOCTEST_CLANG_SUPPRESS_WARNING_POP\n#define DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(w)\n#endif // DOCTEST_CLANG\n\n#if DOCTEST_GCC\n#define DOCTEST_PRAGMA_TO_STR(x) _Pragma(#x)\n#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH _Pragma(\"GCC diagnostic push\")\n#define DOCTEST_GCC_SUPPRESS_WARNING(w) DOCTEST_PRAGMA_TO_STR(GCC diagnostic ignored w)\n#define DOCTEST_GCC_SUPPRESS_WARNING_POP _Pragma(\"GCC diagnostic pop\")\n#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w)                                                  \\\n    DOCTEST_GCC_SUPPRESS_WARNING_PUSH DOCTEST_GCC_SUPPRESS_WARNING(w)\n#else // DOCTEST_GCC\n#define DOCTEST_GCC_SUPPRESS_WARNING_PUSH\n#define DOCTEST_GCC_SUPPRESS_WARNING(w)\n#define DOCTEST_GCC_SUPPRESS_WARNING_POP\n#define DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(w)\n#endif // DOCTEST_GCC\n\n#if DOCTEST_MSVC\n#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH __pragma(warning(push))\n#define DOCTEST_MSVC_SUPPRESS_WARNING(w) __pragma(warning(disable : w))\n#define DOCTEST_MSVC_SUPPRESS_WARNING_POP __pragma(warning(pop))\n#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w)                                                 \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH DOCTEST_MSVC_SUPPRESS_WARNING(w)\n#else // DOCTEST_MSVC\n#define DOCTEST_MSVC_SUPPRESS_WARNING_PUSH\n#define DOCTEST_MSVC_SUPPRESS_WARNING(w)\n#define DOCTEST_MSVC_SUPPRESS_WARNING_POP\n#define DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(w)\n#endif // DOCTEST_MSVC\n\n// =================================================================================================\n// == COMPILER WARNINGS ============================================================================\n// =================================================================================================\n\nDOCTEST_CLANG_SUPPRESS_WARNING_PUSH\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunknown-pragmas\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wnon-virtual-dtor\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wweak-vtables\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wpadded\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wdeprecated\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-prototypes\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunused-local-typedef\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wc++98-compat\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wc++98-compat-pedantic\")\n\nDOCTEST_GCC_SUPPRESS_WARNING_PUSH\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunknown-pragmas\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wpragmas\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Weffc++\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wstrict-overflow\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wstrict-aliasing\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wctor-dtor-privacy\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-declarations\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wnon-virtual-dtor\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunused-local-typedefs\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wuseless-cast\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wnoexcept\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-promo\")\n\nDOCTEST_MSVC_SUPPRESS_WARNING_PUSH\nDOCTEST_MSVC_SUPPRESS_WARNING(4616) // invalid compiler warning\nDOCTEST_MSVC_SUPPRESS_WARNING(4619) // invalid compiler warning\nDOCTEST_MSVC_SUPPRESS_WARNING(4996) // The compiler encountered a deprecated declaration\nDOCTEST_MSVC_SUPPRESS_WARNING(4706) // assignment within conditional expression\nDOCTEST_MSVC_SUPPRESS_WARNING(4512) // 'class' : assignment operator could not be generated\nDOCTEST_MSVC_SUPPRESS_WARNING(4127) // conditional expression is constant\nDOCTEST_MSVC_SUPPRESS_WARNING(4820) // padding\nDOCTEST_MSVC_SUPPRESS_WARNING(4625) // copy constructor was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(4626) // assignment operator was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(5027) // move assignment operator was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(5026) // move constructor was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(4623) // default constructor was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(4640) // construction of local static object is not thread-safe\n// static analysis\nDOCTEST_MSVC_SUPPRESS_WARNING(26439) // This kind of function may not throw. Declare it 'noexcept'\nDOCTEST_MSVC_SUPPRESS_WARNING(26495) // Always initialize a member variable\nDOCTEST_MSVC_SUPPRESS_WARNING(26451) // Arithmetic overflow ...\nDOCTEST_MSVC_SUPPRESS_WARNING(26444) // Avoid unnamed objects with custom construction and dtr...\n\n// 4548 - expression before comma has no effect; expected expression with side - effect\n// 4265 - class has virtual functions, but destructor is not virtual\n// 4986 - exception specification does not match previous declaration\n// 4350 - behavior change: 'member1' called instead of 'member2'\n// 4668 - 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'\n// 4365 - conversion from 'int' to 'unsigned long', signed/unsigned mismatch\n// 4774 - format string expected in argument 'x' is not a string literal\n// 4820 - padding in structs\n\n// only 4 should be disabled globally:\n// - 4514 # unreferenced inline function has been removed\n// - 4571 # SEH related\n// - 4710 # function not inlined\n// - 4711 # function 'x' selected for automatic inline expansion\n\n#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN                                 \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH                                                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4548)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4265)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4986)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4350)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4668)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4365)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4774)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4820)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4625)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4626)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5027)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5026)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(4623)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5039)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5045)                                                            \\\n    DOCTEST_MSVC_SUPPRESS_WARNING(5105)\n\n#define DOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n// =================================================================================================\n// == FEATURE DETECTION ============================================================================\n// =================================================================================================\n\n// general compiler feature support table: https://en.cppreference.com/w/cpp/compiler_support\n// MSVC C++11 feature support table: https://msdn.microsoft.com/en-us/library/hh567368.aspx\n// GCC C++11 feature support table: https://gcc.gnu.org/projects/cxx-status.html\n// MSVC version table:\n// https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering\n// MSVC++ 14.2 (16) _MSC_VER == 1920 (Visual Studio 2019)\n// MSVC++ 14.1 (15) _MSC_VER == 1910 (Visual Studio 2017)\n// MSVC++ 14.0      _MSC_VER == 1900 (Visual Studio 2015)\n// MSVC++ 12.0      _MSC_VER == 1800 (Visual Studio 2013)\n// MSVC++ 11.0      _MSC_VER == 1700 (Visual Studio 2012)\n// MSVC++ 10.0      _MSC_VER == 1600 (Visual Studio 2010)\n// MSVC++ 9.0       _MSC_VER == 1500 (Visual Studio 2008)\n// MSVC++ 8.0       _MSC_VER == 1400 (Visual Studio 2005)\n\n#if DOCTEST_MSVC && !defined(DOCTEST_CONFIG_WINDOWS_SEH)\n#define DOCTEST_CONFIG_WINDOWS_SEH\n#endif // MSVC\n#if defined(DOCTEST_CONFIG_NO_WINDOWS_SEH) && defined(DOCTEST_CONFIG_WINDOWS_SEH)\n#undef DOCTEST_CONFIG_WINDOWS_SEH\n#endif // DOCTEST_CONFIG_NO_WINDOWS_SEH\n\n#if !defined(_WIN32) && !defined(__QNX__) && !defined(DOCTEST_CONFIG_POSIX_SIGNALS) &&             \\\n        !defined(__EMSCRIPTEN__)\n#define DOCTEST_CONFIG_POSIX_SIGNALS\n#endif // _WIN32\n#if defined(DOCTEST_CONFIG_NO_POSIX_SIGNALS) && defined(DOCTEST_CONFIG_POSIX_SIGNALS)\n#undef DOCTEST_CONFIG_POSIX_SIGNALS\n#endif // DOCTEST_CONFIG_NO_POSIX_SIGNALS\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n#if !defined(__cpp_exceptions) && !defined(__EXCEPTIONS) && !defined(_CPPUNWIND)\n#define DOCTEST_CONFIG_NO_EXCEPTIONS\n#endif // no exceptions\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n#define DOCTEST_CONFIG_NO_EXCEPTIONS\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n\n#if defined(DOCTEST_CONFIG_NO_EXCEPTIONS) && !defined(DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS)\n#define DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS && !DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n\n#if defined(DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN) && !defined(DOCTEST_CONFIG_IMPLEMENT)\n#define DOCTEST_CONFIG_IMPLEMENT\n#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n\n#if defined(_WIN32) || defined(__CYGWIN__)\n#if DOCTEST_MSVC\n#define DOCTEST_SYMBOL_EXPORT __declspec(dllexport)\n#define DOCTEST_SYMBOL_IMPORT __declspec(dllimport)\n#else // MSVC\n#define DOCTEST_SYMBOL_EXPORT __attribute__((dllexport))\n#define DOCTEST_SYMBOL_IMPORT __attribute__((dllimport))\n#endif // MSVC\n#else  // _WIN32\n#define DOCTEST_SYMBOL_EXPORT __attribute__((visibility(\"default\")))\n#define DOCTEST_SYMBOL_IMPORT\n#endif // _WIN32\n\n#ifdef DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL\n#ifdef DOCTEST_CONFIG_IMPLEMENT\n#define DOCTEST_INTERFACE DOCTEST_SYMBOL_EXPORT\n#else // DOCTEST_CONFIG_IMPLEMENT\n#define DOCTEST_INTERFACE DOCTEST_SYMBOL_IMPORT\n#endif // DOCTEST_CONFIG_IMPLEMENT\n#else  // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL\n#define DOCTEST_INTERFACE\n#endif // DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL\n\n#define DOCTEST_EMPTY\n\n#if DOCTEST_MSVC\n#define DOCTEST_NOINLINE __declspec(noinline)\n#define DOCTEST_UNUSED\n#define DOCTEST_ALIGNMENT(x)\n#else // MSVC\n#define DOCTEST_NOINLINE __attribute__((noinline))\n#define DOCTEST_UNUSED __attribute__((unused))\n#define DOCTEST_ALIGNMENT(x) __attribute__((aligned(x)))\n#endif // MSVC\n\n// =================================================================================================\n// == FEATURE DETECTION END ========================================================================\n// =================================================================================================\n\n// internal macros for string concatenation and anonymous variable name generation\n#define DOCTEST_CAT_IMPL(s1, s2) s1##s2\n#define DOCTEST_CAT(s1, s2) DOCTEST_CAT_IMPL(s1, s2)\n#ifdef __COUNTER__ // not standard and may be missing for some compilers\n#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __COUNTER__)\n#else // __COUNTER__\n#define DOCTEST_ANONYMOUS(x) DOCTEST_CAT(x, __LINE__)\n#endif // __COUNTER__\n\n#define DOCTEST_TOSTR(x) #x\n\n#ifndef DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE\n#define DOCTEST_REF_WRAP(x) x&\n#else // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE\n#define DOCTEST_REF_WRAP(x) x\n#endif // DOCTEST_CONFIG_ASSERTION_PARAMETERS_BY_VALUE\n\n// not using __APPLE__ because... this is how Catch does it\n#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED\n#define DOCTEST_PLATFORM_MAC\n#elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)\n#define DOCTEST_PLATFORM_IPHONE\n#elif defined(_WIN32)\n#define DOCTEST_PLATFORM_WINDOWS\n#else // DOCTEST_PLATFORM\n#define DOCTEST_PLATFORM_LINUX\n#endif // DOCTEST_PLATFORM\n\n#define DOCTEST_GLOBAL_NO_WARNINGS(var)                                                            \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wglobal-constructors\")                              \\\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunused-variable\")                                            \\\n    static int var DOCTEST_UNUSED // NOLINT(fuchsia-statically-constructed-objects,cert-err58-cpp)\n#define DOCTEST_GLOBAL_NO_WARNINGS_END() DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n#ifndef DOCTEST_BREAK_INTO_DEBUGGER\n// should probably take a look at https://github.com/scottt/debugbreak\n#ifdef DOCTEST_PLATFORM_MAC\n#define DOCTEST_BREAK_INTO_DEBUGGER() __asm__(\"int $3\\n\" : :)\n#elif DOCTEST_MSVC\n#define DOCTEST_BREAK_INTO_DEBUGGER() __debugbreak()\n#elif defined(__MINGW32__)\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wredundant-decls\")\nextern \"C\" __declspec(dllimport) void __stdcall DebugBreak();\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n#define DOCTEST_BREAK_INTO_DEBUGGER() ::DebugBreak()\n#else // linux\n#define DOCTEST_BREAK_INTO_DEBUGGER() ((void)0)\n#endif // linux\n#endif // DOCTEST_BREAK_INTO_DEBUGGER\n\n// this is kept here for backwards compatibility since the config option was changed\n#ifdef DOCTEST_CONFIG_USE_IOSFWD\n#define DOCTEST_CONFIG_USE_STD_HEADERS\n#endif // DOCTEST_CONFIG_USE_IOSFWD\n\n#ifdef DOCTEST_CONFIG_USE_STD_HEADERS\n#include <iosfwd>\n#include <cstddef>\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183\n#include <ostream>\n#endif // VS 2019\n#else // DOCTEST_CONFIG_USE_STD_HEADERS\n\n#if DOCTEST_CLANG\n// to detect if libc++ is being used with clang (the _LIBCPP_VERSION identifier)\n#include <ciso646>\n#endif // clang\n\n#ifdef _LIBCPP_VERSION\n#define DOCTEST_STD_NAMESPACE_BEGIN _LIBCPP_BEGIN_NAMESPACE_STD\n#define DOCTEST_STD_NAMESPACE_END _LIBCPP_END_NAMESPACE_STD\n#else // _LIBCPP_VERSION\n#define DOCTEST_STD_NAMESPACE_BEGIN namespace std {\n#define DOCTEST_STD_NAMESPACE_END }\n#endif // _LIBCPP_VERSION\n\n// Forward declaring 'X' in namespace std is not permitted by the C++ Standard.\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4643)\n\nDOCTEST_STD_NAMESPACE_BEGIN // NOLINT (cert-dcl58-cpp)\ntypedef decltype(nullptr) nullptr_t;\ntemplate <class charT>\nstruct char_traits;\ntemplate <>\nstruct char_traits<char>;\ntemplate <class charT, class traits>\nclass basic_ostream;\ntypedef basic_ostream<char, char_traits<char>> ostream;\ntemplate <class... Types>\nclass tuple;\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183\ntemplate <class _Ty>\nclass allocator;\ntemplate <class _Elem, class _Traits, class _Alloc>\nclass basic_string;\nusing string = basic_string<char, char_traits<char>, allocator<char>>;\n#endif // VS 2019\nDOCTEST_STD_NAMESPACE_END\n\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_CONFIG_USE_STD_HEADERS\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n#include <type_traits>\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\nnamespace doctest {\n\nDOCTEST_INTERFACE extern bool is_running_in_test;\n\n// A 24 byte string class (can be as small as 17 for x64 and 13 for x86) that can hold strings with length\n// of up to 23 chars on the stack before going on the heap - the last byte of the buffer is used for:\n// - \"is small\" bit - the highest bit - if \"0\" then it is small - otherwise its \"1\" (128)\n// - if small - capacity left before going on the heap - using the lowest 5 bits\n// - if small - 2 bits are left unused - the second and third highest ones\n// - if small - acts as a null terminator if strlen() is 23 (24 including the null terminator)\n//              and the \"is small\" bit remains \"0\" (\"as well as the capacity left\") so its OK\n// Idea taken from this lecture about the string implementation of facebook/folly - fbstring\n// https://www.youtube.com/watch?v=kPR8h4-qZdk\n// TODO:\n// - optimizations - like not deleting memory unnecessarily in operator= and etc.\n// - resize/reserve/clear\n// - substr\n// - replace\n// - back/front\n// - iterator stuff\n// - find & friends\n// - push_back/pop_back\n// - assign/insert/erase\n// - relational operators as free functions - taking const char* as one of the params\nclass DOCTEST_INTERFACE String\n{\n    static const unsigned len  = 24;      //!OCLINT avoid private static members\n    static const unsigned last = len - 1; //!OCLINT avoid private static members\n\n    struct view // len should be more than sizeof(view) - because of the final byte for flags\n    {\n        char*    ptr;\n        unsigned size;\n        unsigned capacity;\n    };\n\n    union\n    {\n        char buf[len];\n        view data;\n    };\n\n    bool isOnStack() const { return (buf[last] & 128) == 0; }\n    void setOnHeap();\n    void setLast(unsigned in = last);\n\n    void copy(const String& other);\n\npublic:\n    String();\n    ~String();\n\n    // cppcheck-suppress noExplicitConstructor\n    String(const char* in);\n    String(const char* in, unsigned in_size);\n\n    String(const String& other);\n    String& operator=(const String& other);\n\n    String& operator+=(const String& other);\n    String  operator+(const String& other) const;\n\n    String(String&& other);\n    String& operator=(String&& other);\n\n    char  operator[](unsigned i) const;\n    char& operator[](unsigned i);\n\n    // the only functions I'm willing to leave in the interface - available for inlining\n    const char* c_str() const { return const_cast<String*>(this)->c_str(); } // NOLINT\n    char*       c_str() {\n        if(isOnStack())\n            return reinterpret_cast<char*>(buf);\n        return data.ptr;\n    }\n\n    unsigned size() const;\n    unsigned capacity() const;\n\n    int compare(const char* other, bool no_case = false) const;\n    int compare(const String& other, bool no_case = false) const;\n};\n\nDOCTEST_INTERFACE bool operator==(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator!=(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator<(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator>(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator<=(const String& lhs, const String& rhs);\nDOCTEST_INTERFACE bool operator>=(const String& lhs, const String& rhs);\n\nDOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, const String& in);\n\nnamespace Color {\n    enum Enum\n    {\n        None = 0,\n        White,\n        Red,\n        Green,\n        Blue,\n        Cyan,\n        Yellow,\n        Grey,\n\n        Bright = 0x10,\n\n        BrightRed   = Bright | Red,\n        BrightGreen = Bright | Green,\n        LightGrey   = Bright | Grey,\n        BrightWhite = Bright | White\n    };\n\n    DOCTEST_INTERFACE std::ostream& operator<<(std::ostream& s, Color::Enum code);\n} // namespace Color\n\nnamespace assertType {\n    enum Enum\n    {\n        // macro traits\n\n        is_warn    = 1,\n        is_check   = 2 * is_warn,\n        is_require = 2 * is_check,\n\n        is_normal      = 2 * is_require,\n        is_throws      = 2 * is_normal,\n        is_throws_as   = 2 * is_throws,\n        is_throws_with = 2 * is_throws_as,\n        is_nothrow     = 2 * is_throws_with,\n\n        is_false = 2 * is_nothrow,\n        is_unary = 2 * is_false, // not checked anywhere - used just to distinguish the types\n\n        is_eq = 2 * is_unary,\n        is_ne = 2 * is_eq,\n\n        is_lt = 2 * is_ne,\n        is_gt = 2 * is_lt,\n\n        is_ge = 2 * is_gt,\n        is_le = 2 * is_ge,\n\n        // macro types\n\n        DT_WARN    = is_normal | is_warn,\n        DT_CHECK   = is_normal | is_check,\n        DT_REQUIRE = is_normal | is_require,\n\n        DT_WARN_FALSE    = is_normal | is_false | is_warn,\n        DT_CHECK_FALSE   = is_normal | is_false | is_check,\n        DT_REQUIRE_FALSE = is_normal | is_false | is_require,\n\n        DT_WARN_THROWS    = is_throws | is_warn,\n        DT_CHECK_THROWS   = is_throws | is_check,\n        DT_REQUIRE_THROWS = is_throws | is_require,\n\n        DT_WARN_THROWS_AS    = is_throws_as | is_warn,\n        DT_CHECK_THROWS_AS   = is_throws_as | is_check,\n        DT_REQUIRE_THROWS_AS = is_throws_as | is_require,\n\n        DT_WARN_THROWS_WITH    = is_throws_with | is_warn,\n        DT_CHECK_THROWS_WITH   = is_throws_with | is_check,\n        DT_REQUIRE_THROWS_WITH = is_throws_with | is_require,\n        \n        DT_WARN_THROWS_WITH_AS    = is_throws_with | is_throws_as | is_warn,\n        DT_CHECK_THROWS_WITH_AS   = is_throws_with | is_throws_as | is_check,\n        DT_REQUIRE_THROWS_WITH_AS = is_throws_with | is_throws_as | is_require,\n\n        DT_WARN_NOTHROW    = is_nothrow | is_warn,\n        DT_CHECK_NOTHROW   = is_nothrow | is_check,\n        DT_REQUIRE_NOTHROW = is_nothrow | is_require,\n\n        DT_WARN_EQ    = is_normal | is_eq | is_warn,\n        DT_CHECK_EQ   = is_normal | is_eq | is_check,\n        DT_REQUIRE_EQ = is_normal | is_eq | is_require,\n\n        DT_WARN_NE    = is_normal | is_ne | is_warn,\n        DT_CHECK_NE   = is_normal | is_ne | is_check,\n        DT_REQUIRE_NE = is_normal | is_ne | is_require,\n\n        DT_WARN_GT    = is_normal | is_gt | is_warn,\n        DT_CHECK_GT   = is_normal | is_gt | is_check,\n        DT_REQUIRE_GT = is_normal | is_gt | is_require,\n\n        DT_WARN_LT    = is_normal | is_lt | is_warn,\n        DT_CHECK_LT   = is_normal | is_lt | is_check,\n        DT_REQUIRE_LT = is_normal | is_lt | is_require,\n\n        DT_WARN_GE    = is_normal | is_ge | is_warn,\n        DT_CHECK_GE   = is_normal | is_ge | is_check,\n        DT_REQUIRE_GE = is_normal | is_ge | is_require,\n\n        DT_WARN_LE    = is_normal | is_le | is_warn,\n        DT_CHECK_LE   = is_normal | is_le | is_check,\n        DT_REQUIRE_LE = is_normal | is_le | is_require,\n\n        DT_WARN_UNARY    = is_normal | is_unary | is_warn,\n        DT_CHECK_UNARY   = is_normal | is_unary | is_check,\n        DT_REQUIRE_UNARY = is_normal | is_unary | is_require,\n\n        DT_WARN_UNARY_FALSE    = is_normal | is_false | is_unary | is_warn,\n        DT_CHECK_UNARY_FALSE   = is_normal | is_false | is_unary | is_check,\n        DT_REQUIRE_UNARY_FALSE = is_normal | is_false | is_unary | is_require,\n    };\n} // namespace assertType\n\nDOCTEST_INTERFACE const char* assertString(assertType::Enum at);\nDOCTEST_INTERFACE const char* failureString(assertType::Enum at);\nDOCTEST_INTERFACE const char* skipPathFromFilename(const char* file);\n\nstruct DOCTEST_INTERFACE TestCaseData\n{\n    const char* m_file;       // the file in which the test was registered\n    unsigned    m_line;       // the line where the test was registered\n    const char* m_name;       // name of the test case\n    const char* m_test_suite; // the test suite in which the test was added\n    const char* m_description;\n    bool        m_skip;\n    bool        m_may_fail;\n    bool        m_should_fail;\n    int         m_expected_failures;\n    double      m_timeout;\n};\n\nstruct DOCTEST_INTERFACE AssertData\n{\n    // common - for all asserts\n    const TestCaseData* m_test_case;\n    assertType::Enum    m_at;\n    const char*         m_file;\n    int                 m_line;\n    const char*         m_expr;\n    bool                m_failed;\n\n    // exception-related - for all asserts\n    bool   m_threw;\n    String m_exception;\n\n    // for normal asserts\n    String m_decomp;\n\n    // for specific exception-related asserts\n    bool        m_threw_as;\n    const char* m_exception_type;\n    const char* m_exception_string;\n};\n\nstruct DOCTEST_INTERFACE MessageData\n{\n    String           m_string;\n    const char*      m_file;\n    int              m_line;\n    assertType::Enum m_severity;\n};\n\nstruct DOCTEST_INTERFACE SubcaseSignature\n{\n    const char* m_name;\n    const char* m_file;\n    int         m_line;\n\n    bool operator<(const SubcaseSignature& other) const;\n};\n\nstruct DOCTEST_INTERFACE IContextScope\n{\n    IContextScope();\n    virtual ~IContextScope();\n    virtual void stringify(std::ostream*) const = 0;\n};\n\nstruct ContextOptions //!OCLINT too many fields\n{\n    std::ostream* cout;        // stdout stream - std::cout by default\n    std::ostream* cerr;        // stderr stream - std::cerr by default\n    String        binary_name; // the test binary name\n\n    // == parameters from the command line\n    String   out;       // output filename\n    String   order_by;  // how tests should be ordered\n    unsigned rand_seed; // the seed for rand ordering\n\n    unsigned first; // the first (matching) test to be executed\n    unsigned last;  // the last (matching) test to be executed\n\n    int abort_after;           // stop tests after this many failed assertions\n    int subcase_filter_levels; // apply the subcase filters for the first N levels\n\n    bool success;              // include successful assertions in output\n    bool case_sensitive;       // if filtering should be case sensitive\n    bool exit;                 // if the program should be exited after the tests are ran/whatever\n    bool duration;             // print the time duration of each test case\n    bool no_throw;             // to skip exceptions-related assertion macros\n    bool no_exitcode;          // if the framework should return 0 as the exitcode\n    bool no_run;               // to not run the tests at all (can be done with an \"*\" exclude)\n    bool no_version;           // to not print the version of the framework\n    bool no_colors;            // if output to the console should be colorized\n    bool force_colors;         // forces the use of colors even when a tty cannot be detected\n    bool no_breaks;            // to not break into the debugger\n    bool no_skip;              // don't skip test cases which are marked to be skipped\n    bool gnu_file_line;        // if line numbers should be surrounded with :x: and not (x):\n    bool no_path_in_filenames; // if the path to files should be removed from the output\n    bool no_line_numbers;      // if source code line numbers should be omitted from the output\n    bool no_skipped_summary;   // don't print \"skipped\" in the summary !!! UNDOCUMENTED !!!\n\n    bool help;             // to print the help\n    bool version;          // to print the version\n    bool count;            // if only the count of matching tests is to be retrieved\n    bool list_test_cases;  // to list all tests matching the filters\n    bool list_test_suites; // to list all suites matching the filters\n    bool list_reporters;   // lists all registered reporters\n};\n\nnamespace detail {\n#if defined(DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING) || defined(DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS)\n    template <bool CONDITION, typename TYPE = void>\n    struct enable_if\n    {};\n\n    template <typename TYPE>\n    struct enable_if<true, TYPE>\n    { typedef TYPE type; };\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING) || DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    // clang-format off\n    template<class T> struct remove_reference      { typedef T type; };\n    template<class T> struct remove_reference<T&>  { typedef T type; };\n    template<class T> struct remove_reference<T&&> { typedef T type; };\n\n    template<class T> struct remove_const          { typedef T type; };\n    template<class T> struct remove_const<const T> { typedef T type; };\n    // clang-format on\n\n    template <typename T>\n    struct deferred_false\n    // cppcheck-suppress unusedStructMember\n    { static const bool value = false; };\n\n    namespace has_insertion_operator_impl {\n        typedef char no;\n        typedef char yes[2];\n\n        struct any_t\n        {\n            template <typename T>\n            // cppcheck-suppress noExplicitConstructor\n            any_t(const DOCTEST_REF_WRAP(T));\n        };\n\n        yes& testStreamable(std::ostream&);\n        no   testStreamable(no);\n\n        no operator<<(const std::ostream&, const any_t&);\n\n        template <typename T>\n        struct has_insertion_operator\n        {\n            static std::ostream& s;\n            static const DOCTEST_REF_WRAP(T) t;\n            static const bool value = sizeof(decltype(testStreamable(s << t))) == sizeof(yes);\n        };\n    } // namespace has_insertion_operator_impl\n\n    template <typename T>\n    struct has_insertion_operator : has_insertion_operator_impl::has_insertion_operator<T>\n    {};\n\n    DOCTEST_INTERFACE void my_memcpy(void* dest, const void* src, unsigned num);\n\n    DOCTEST_INTERFACE std::ostream* getTlsOss(); // returns a thread-local ostringstream\n    DOCTEST_INTERFACE String getTlsOssResult();\n\n    template <bool C>\n    struct StringMakerBase\n    {\n        template <typename T>\n        static String convert(const DOCTEST_REF_WRAP(T)) {\n            return \"{?}\";\n        }\n    };\n\n    template <>\n    struct StringMakerBase<true>\n    {\n        template <typename T>\n        static String convert(const DOCTEST_REF_WRAP(T) in) {\n            *getTlsOss() << in;\n            return getTlsOssResult();\n        }\n    };\n\n    DOCTEST_INTERFACE String rawMemoryToString(const void* object, unsigned size);\n\n    template <typename T>\n    String rawMemoryToString(const DOCTEST_REF_WRAP(T) object) {\n        return rawMemoryToString(&object, sizeof(object));\n    }\n\n    template <typename T>\n    const char* type_to_string() {\n        return \"<>\";\n    }\n} // namespace detail\n\ntemplate <typename T>\nstruct StringMaker : public detail::StringMakerBase<detail::has_insertion_operator<T>::value>\n{};\n\ntemplate <typename T>\nstruct StringMaker<T*>\n{\n    template <typename U>\n    static String convert(U* p) {\n        if(p)\n            return detail::rawMemoryToString(p);\n        return \"NULL\";\n    }\n};\n\ntemplate <typename R, typename C>\nstruct StringMaker<R C::*>\n{\n    static String convert(R C::*p) {\n        if(p)\n            return detail::rawMemoryToString(p);\n        return \"NULL\";\n    }\n};\n\ntemplate <typename T>\nString toString(const DOCTEST_REF_WRAP(T) value) {\n    return StringMaker<T>::convert(value);\n}\n\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\nDOCTEST_INTERFACE String toString(char* in);\nDOCTEST_INTERFACE String toString(const char* in);\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\nDOCTEST_INTERFACE String toString(bool in);\nDOCTEST_INTERFACE String toString(float in);\nDOCTEST_INTERFACE String toString(double in);\nDOCTEST_INTERFACE String toString(double long in);\n\nDOCTEST_INTERFACE String toString(char in);\nDOCTEST_INTERFACE String toString(char signed in);\nDOCTEST_INTERFACE String toString(char unsigned in);\nDOCTEST_INTERFACE String toString(int short in);\nDOCTEST_INTERFACE String toString(int short unsigned in);\nDOCTEST_INTERFACE String toString(int in);\nDOCTEST_INTERFACE String toString(int unsigned in);\nDOCTEST_INTERFACE String toString(int long in);\nDOCTEST_INTERFACE String toString(int long unsigned in);\nDOCTEST_INTERFACE String toString(int long long in);\nDOCTEST_INTERFACE String toString(int long long unsigned in);\nDOCTEST_INTERFACE String toString(std::nullptr_t in);\n\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183\nDOCTEST_INTERFACE String toString(const std::string& in);\n#endif // VS 2019\n\nclass DOCTEST_INTERFACE Approx\n{\npublic:\n    explicit Approx(double value);\n\n    Approx operator()(double value) const;\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n    template <typename T>\n    explicit Approx(const T& value,\n                    typename detail::enable_if<std::is_constructible<double, T>::value>::type* =\n                            static_cast<T*>(nullptr)) {\n        *this = Approx(static_cast<double>(value));\n    }\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    Approx& epsilon(double newEpsilon);\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n    template <typename T>\n    typename detail::enable_if<std::is_constructible<double, T>::value, Approx&>::type epsilon(\n            const T& newEpsilon) {\n        m_epsilon = static_cast<double>(newEpsilon);\n        return *this;\n    }\n#endif //  DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    Approx& scale(double newScale);\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n    template <typename T>\n    typename detail::enable_if<std::is_constructible<double, T>::value, Approx&>::type scale(\n            const T& newScale) {\n        m_scale = static_cast<double>(newScale);\n        return *this;\n    }\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    // clang-format off\n    DOCTEST_INTERFACE friend bool operator==(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator==(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator!=(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator!=(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator<=(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator<=(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator>=(double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator>=(const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator< (double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator< (const Approx & lhs, double rhs);\n    DOCTEST_INTERFACE friend bool operator> (double lhs, const Approx & rhs);\n    DOCTEST_INTERFACE friend bool operator> (const Approx & lhs, double rhs);\n\n    DOCTEST_INTERFACE friend String toString(const Approx& in);\n\n#ifdef DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n#define DOCTEST_APPROX_PREFIX \\\n    template <typename T> friend typename detail::enable_if<std::is_constructible<double, T>::value, bool>::type\n\n    DOCTEST_APPROX_PREFIX operator==(const T& lhs, const Approx& rhs) { return operator==(double(lhs), rhs); }\n    DOCTEST_APPROX_PREFIX operator==(const Approx& lhs, const T& rhs) { return operator==(rhs, lhs); }\n    DOCTEST_APPROX_PREFIX operator!=(const T& lhs, const Approx& rhs) { return !operator==(lhs, rhs); }\n    DOCTEST_APPROX_PREFIX operator!=(const Approx& lhs, const T& rhs) { return !operator==(rhs, lhs); }\n    DOCTEST_APPROX_PREFIX operator<=(const T& lhs, const Approx& rhs) { return double(lhs) < rhs.m_value || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator<=(const Approx& lhs, const T& rhs) { return lhs.m_value < double(rhs) || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator>=(const T& lhs, const Approx& rhs) { return double(lhs) > rhs.m_value || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator>=(const Approx& lhs, const T& rhs) { return lhs.m_value > double(rhs) || lhs == rhs; }\n    DOCTEST_APPROX_PREFIX operator< (const T& lhs, const Approx& rhs) { return double(lhs) < rhs.m_value && lhs != rhs; }\n    DOCTEST_APPROX_PREFIX operator< (const Approx& lhs, const T& rhs) { return lhs.m_value < double(rhs) && lhs != rhs; }\n    DOCTEST_APPROX_PREFIX operator> (const T& lhs, const Approx& rhs) { return double(lhs) > rhs.m_value && lhs != rhs; }\n    DOCTEST_APPROX_PREFIX operator> (const Approx& lhs, const T& rhs) { return lhs.m_value > double(rhs) && lhs != rhs; }\n#undef DOCTEST_APPROX_PREFIX\n#endif // DOCTEST_CONFIG_INCLUDE_TYPE_TRAITS\n\n    // clang-format on\n\nprivate:\n    double m_epsilon;\n    double m_scale;\n    double m_value;\n};\n\nDOCTEST_INTERFACE String toString(const Approx& in);\n\nDOCTEST_INTERFACE const ContextOptions* getContextOptions();\n\n#if !defined(DOCTEST_CONFIG_DISABLE)\n\nnamespace detail {\n    // clang-format off\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    template<class T>               struct decay_array       { typedef T type; };\n    template<class T, unsigned N>   struct decay_array<T[N]> { typedef T* type; };\n    template<class T>               struct decay_array<T[]>  { typedef T* type; };\n\n    template<class T>   struct not_char_pointer              { enum { value = 1 }; };\n    template<>          struct not_char_pointer<char*>       { enum { value = 0 }; };\n    template<>          struct not_char_pointer<const char*> { enum { value = 0 }; };\n\n    template<class T> struct can_use_op : public not_char_pointer<typename decay_array<T>::type> {};\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    // clang-format on\n\n    struct DOCTEST_INTERFACE TestFailureException\n    {\n    };\n\n    DOCTEST_INTERFACE bool checkIfShouldThrow(assertType::Enum at);\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n    [[noreturn]]\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n    DOCTEST_INTERFACE void throwException();\n\n    struct DOCTEST_INTERFACE Subcase\n    {\n        SubcaseSignature m_signature;\n        bool             m_entered = false;\n\n        Subcase(const char* name, const char* file, int line);\n        ~Subcase();\n\n        operator bool() const;\n    };\n\n    template <typename L, typename R>\n    String stringifyBinaryExpr(const DOCTEST_REF_WRAP(L) lhs, const char* op,\n                               const DOCTEST_REF_WRAP(R) rhs) {\n        return toString(lhs) + op + toString(rhs);\n    }\n\n#define DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(op, op_str, op_macro)                              \\\n    template <typename R>                                                                          \\\n    DOCTEST_NOINLINE Result operator op(const DOCTEST_REF_WRAP(R) rhs) {                           \\\n        bool res = op_macro(lhs, rhs);                                                             \\\n        if(m_at & assertType::is_false)                                                            \\\n            res = !res;                                                                            \\\n        if(!res || doctest::getContextOptions()->success)                                          \\\n            return Result(res, stringifyBinaryExpr(lhs, op_str, rhs));                             \\\n        return Result(res);                                                                        \\\n    }\n\n    // more checks could be added - like in Catch:\n    // https://github.com/catchorg/Catch2/pull/1480/files\n    // https://github.com/catchorg/Catch2/pull/1481/files\n#define DOCTEST_FORBIT_EXPRESSION(rt, op)                                                          \\\n    template <typename R>                                                                          \\\n    rt& operator op(const R&) {                                                                    \\\n        static_assert(deferred_false<R>::value,                                                    \\\n                      \"Expression Too Complex Please Rewrite As Binary Comparison!\");              \\\n        return *this;                                                                              \\\n    }\n\n    struct DOCTEST_INTERFACE Result\n    {\n        bool   m_passed;\n        String m_decomp;\n\n        Result(bool passed, const String& decomposition = String());\n\n        // forbidding some expressions based on this table: http://en.cppreference.com/w/cpp/language/operator_precedence\n        DOCTEST_FORBIT_EXPRESSION(Result, &)\n        DOCTEST_FORBIT_EXPRESSION(Result, ^)\n        DOCTEST_FORBIT_EXPRESSION(Result, |)\n        DOCTEST_FORBIT_EXPRESSION(Result, &&)\n        DOCTEST_FORBIT_EXPRESSION(Result, ||)\n        DOCTEST_FORBIT_EXPRESSION(Result, ==)\n        DOCTEST_FORBIT_EXPRESSION(Result, !=)\n        DOCTEST_FORBIT_EXPRESSION(Result, <)\n        DOCTEST_FORBIT_EXPRESSION(Result, >)\n        DOCTEST_FORBIT_EXPRESSION(Result, <=)\n        DOCTEST_FORBIT_EXPRESSION(Result, >=)\n        DOCTEST_FORBIT_EXPRESSION(Result, =)\n        DOCTEST_FORBIT_EXPRESSION(Result, +=)\n        DOCTEST_FORBIT_EXPRESSION(Result, -=)\n        DOCTEST_FORBIT_EXPRESSION(Result, *=)\n        DOCTEST_FORBIT_EXPRESSION(Result, /=)\n        DOCTEST_FORBIT_EXPRESSION(Result, %=)\n        DOCTEST_FORBIT_EXPRESSION(Result, <<=)\n        DOCTEST_FORBIT_EXPRESSION(Result, >>=)\n        DOCTEST_FORBIT_EXPRESSION(Result, &=)\n        DOCTEST_FORBIT_EXPRESSION(Result, ^=)\n        DOCTEST_FORBIT_EXPRESSION(Result, |=)\n    };\n\n#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_PUSH\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wsign-conversion\")\n    DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wsign-compare\")\n    //DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wdouble-promotion\")\n    //DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wconversion\")\n    //DOCTEST_CLANG_SUPPRESS_WARNING(\"-Wfloat-equal\")\n\n    DOCTEST_GCC_SUPPRESS_WARNING_PUSH\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-conversion\")\n    DOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-compare\")\n    //DOCTEST_GCC_SUPPRESS_WARNING(\"-Wdouble-promotion\")\n    //DOCTEST_GCC_SUPPRESS_WARNING(\"-Wconversion\")\n    //DOCTEST_GCC_SUPPRESS_WARNING(\"-Wfloat-equal\")\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_PUSH\n    // http://stackoverflow.com/questions/39479163 what's the difference between 4018 and 4389\n    DOCTEST_MSVC_SUPPRESS_WARNING(4388) // signed/unsigned mismatch\n    DOCTEST_MSVC_SUPPRESS_WARNING(4389) // 'operator' : signed/unsigned mismatch\n    DOCTEST_MSVC_SUPPRESS_WARNING(4018) // 'expression' : signed/unsigned mismatch\n    //DOCTEST_MSVC_SUPPRESS_WARNING(4805) // 'operation' : unsafe mix of type 'type' and type 'type' in operation\n\n#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    // clang-format off\n#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_COMPARISON_RETURN_TYPE bool\n#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_COMPARISON_RETURN_TYPE typename enable_if<can_use_op<L>::value || can_use_op<R>::value, bool>::type\n    inline bool eq(const char* lhs, const char* rhs) { return String(lhs) == String(rhs); }\n    inline bool ne(const char* lhs, const char* rhs) { return String(lhs) != String(rhs); }\n    inline bool lt(const char* lhs, const char* rhs) { return String(lhs) <  String(rhs); }\n    inline bool gt(const char* lhs, const char* rhs) { return String(lhs) >  String(rhs); }\n    inline bool le(const char* lhs, const char* rhs) { return String(lhs) <= String(rhs); }\n    inline bool ge(const char* lhs, const char* rhs) { return String(lhs) >= String(rhs); }\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    // clang-format on\n\n#define DOCTEST_RELATIONAL_OP(name, op)                                                            \\\n    template <typename L, typename R>                                                              \\\n    DOCTEST_COMPARISON_RETURN_TYPE name(const DOCTEST_REF_WRAP(L) lhs,                             \\\n                                        const DOCTEST_REF_WRAP(R) rhs) {                           \\\n        return lhs op rhs;                                                                         \\\n    }\n\n    DOCTEST_RELATIONAL_OP(eq, ==)\n    DOCTEST_RELATIONAL_OP(ne, !=)\n    DOCTEST_RELATIONAL_OP(lt, <)\n    DOCTEST_RELATIONAL_OP(gt, >)\n    DOCTEST_RELATIONAL_OP(le, <=)\n    DOCTEST_RELATIONAL_OP(ge, >=)\n\n#ifndef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_CMP_EQ(l, r) l == r\n#define DOCTEST_CMP_NE(l, r) l != r\n#define DOCTEST_CMP_GT(l, r) l > r\n#define DOCTEST_CMP_LT(l, r) l < r\n#define DOCTEST_CMP_GE(l, r) l >= r\n#define DOCTEST_CMP_LE(l, r) l <= r\n#else // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n#define DOCTEST_CMP_EQ(l, r) eq(l, r)\n#define DOCTEST_CMP_NE(l, r) ne(l, r)\n#define DOCTEST_CMP_GT(l, r) gt(l, r)\n#define DOCTEST_CMP_LT(l, r) lt(l, r)\n#define DOCTEST_CMP_GE(l, r) ge(l, r)\n#define DOCTEST_CMP_LE(l, r) le(l, r)\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n\n    template <typename L>\n    // cppcheck-suppress copyCtorAndEqOperator\n    struct Expression_lhs\n    {\n        L                lhs;\n        assertType::Enum m_at;\n\n        explicit Expression_lhs(L in, assertType::Enum at)\n                : lhs(in)\n                , m_at(at) {}\n\n        DOCTEST_NOINLINE operator Result() {\n            bool res = !!lhs;\n            if(m_at & assertType::is_false) //!OCLINT bitwise operator in conditional\n                res = !res;\n\n            if(!res || getContextOptions()->success)\n                return Result(res, toString(lhs));\n            return Result(res);\n        }\n\n        // clang-format off\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(==, \" == \", DOCTEST_CMP_EQ) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(!=, \" != \", DOCTEST_CMP_NE) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>,  \" >  \", DOCTEST_CMP_GT) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<,  \" <  \", DOCTEST_CMP_LT) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(>=, \" >= \", DOCTEST_CMP_GE) //!OCLINT bitwise operator in conditional\n        DOCTEST_DO_BINARY_EXPRESSION_COMPARISON(<=, \" <= \", DOCTEST_CMP_LE) //!OCLINT bitwise operator in conditional\n        // clang-format on\n\n        // forbidding some expressions based on this table: http://en.cppreference.com/w/cpp/language/operator_precedence\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &&)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ||)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, =)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, +=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, -=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, *=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, /=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, %=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, &=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, ^=)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, |=)\n        // these 2 are unfortunate because they should be allowed - they have higher precedence over the comparisons, but the\n        // ExpressionDecomposer class uses the left shift operator to capture the left operand of the binary expression...\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, <<)\n        DOCTEST_FORBIT_EXPRESSION(Expression_lhs, >>)\n    };\n\n#ifndef DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_CONFIG_NO_COMPARISON_WARNING_SUPPRESSION\n\n    struct DOCTEST_INTERFACE ExpressionDecomposer\n    {\n        assertType::Enum m_at;\n\n        ExpressionDecomposer(assertType::Enum at);\n\n        // The right operator for capturing expressions is \"<=\" instead of \"<<\" (based on the operator precedence table)\n        // but then there will be warnings from GCC about \"-Wparentheses\" and since \"_Pragma()\" is problematic this will stay for now...\n        // https://github.com/catchorg/Catch2/issues/870\n        // https://github.com/catchorg/Catch2/issues/565\n        template <typename L>\n        Expression_lhs<const DOCTEST_REF_WRAP(L)> operator<<(const DOCTEST_REF_WRAP(L) operand) {\n            return Expression_lhs<const DOCTEST_REF_WRAP(L)>(operand, m_at);\n        }\n    };\n\n    struct DOCTEST_INTERFACE TestSuite\n    {\n        const char* m_test_suite;\n        const char* m_description;\n        bool        m_skip;\n        bool        m_may_fail;\n        bool        m_should_fail;\n        int         m_expected_failures;\n        double      m_timeout;\n\n        TestSuite& operator*(const char* in);\n\n        template <typename T>\n        TestSuite& operator*(const T& in) {\n            in.fill(*this);\n            return *this;\n        }\n    };\n\n    typedef void (*funcType)();\n\n    struct DOCTEST_INTERFACE TestCase : public TestCaseData\n    {\n        funcType m_test; // a function pointer to the test case\n\n        const char* m_type; // for templated test cases - gets appended to the real name\n        int m_template_id; // an ID used to distinguish between the different versions of a templated test case\n        String m_full_name; // contains the name (only for templated test cases!) + the template type\n\n        TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite,\n                 const char* type = \"\", int template_id = -1);\n\n        TestCase(const TestCase& other);\n\n        DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function\n        TestCase& operator=(const TestCase& other);\n        DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n        TestCase& operator*(const char* in);\n\n        template <typename T>\n        TestCase& operator*(const T& in) {\n            in.fill(*this);\n            return *this;\n        }\n\n        bool operator<(const TestCase& other) const;\n    };\n\n    // forward declarations of functions used by the macros\n    DOCTEST_INTERFACE int  regTest(const TestCase& tc);\n    DOCTEST_INTERFACE int  setTestSuite(const TestSuite& ts);\n    DOCTEST_INTERFACE bool isDebuggerActive();\n\n    template<typename T>\n    int instantiationHelper(const T&) { return 0; }\n\n    namespace binaryAssertComparison {\n        enum Enum\n        {\n            eq = 0,\n            ne,\n            gt,\n            lt,\n            ge,\n            le\n        };\n    } // namespace binaryAssertComparison\n\n    // clang-format off\n    template <int, class L, class R> struct RelationalComparator     { bool operator()(const DOCTEST_REF_WRAP(L),     const DOCTEST_REF_WRAP(R)    ) const { return false;        } };\n\n#define DOCTEST_BINARY_RELATIONAL_OP(n, op) \\\n    template <class L, class R> struct RelationalComparator<n, L, R> { bool operator()(const DOCTEST_REF_WRAP(L) lhs, const DOCTEST_REF_WRAP(R) rhs) const { return op(lhs, rhs); } };\n    // clang-format on\n\n    DOCTEST_BINARY_RELATIONAL_OP(0, eq)\n    DOCTEST_BINARY_RELATIONAL_OP(1, ne)\n    DOCTEST_BINARY_RELATIONAL_OP(2, gt)\n    DOCTEST_BINARY_RELATIONAL_OP(3, lt)\n    DOCTEST_BINARY_RELATIONAL_OP(4, ge)\n    DOCTEST_BINARY_RELATIONAL_OP(5, le)\n\n    struct DOCTEST_INTERFACE ResultBuilder : public AssertData\n    {\n        ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,\n                      const char* exception_type = \"\", const char* exception_string = \"\");\n\n        void setResult(const Result& res);\n\n        template <int comparison, typename L, typename R>\n        DOCTEST_NOINLINE void binary_assert(const DOCTEST_REF_WRAP(L) lhs,\n                                            const DOCTEST_REF_WRAP(R) rhs) {\n            m_failed = !RelationalComparator<comparison, L, R>()(lhs, rhs);\n            if(m_failed || getContextOptions()->success)\n                m_decomp = stringifyBinaryExpr(lhs, \", \", rhs);\n        }\n\n        template <typename L>\n        DOCTEST_NOINLINE void unary_assert(const DOCTEST_REF_WRAP(L) val) {\n            m_failed = !val;\n\n            if(m_at & assertType::is_false) //!OCLINT bitwise operator in conditional\n                m_failed = !m_failed;\n\n            if(m_failed || getContextOptions()->success)\n                m_decomp = toString(val);\n        }\n\n        void translateException();\n\n        bool log();\n        void react() const;\n    };\n\n    namespace assertAction {\n        enum Enum\n        {\n            nothing     = 0,\n            dbgbreak    = 1,\n            shouldthrow = 2\n        };\n    } // namespace assertAction\n\n    DOCTEST_INTERFACE void failed_out_of_a_testing_context(const AssertData& ad);\n\n    DOCTEST_INTERFACE void decomp_assert(assertType::Enum at, const char* file, int line,\n                                         const char* expr, Result result);\n\n#define DOCTEST_ASSERT_OUT_OF_TESTS(decomp)                                                        \\\n    do {                                                                                           \\\n        if(!is_running_in_test) {                                                                  \\\n            if(failed) {                                                                           \\\n                ResultBuilder rb(at, file, line, expr);                                            \\\n                rb.m_failed = failed;                                                              \\\n                rb.m_decomp = decomp;                                                              \\\n                failed_out_of_a_testing_context(rb);                                               \\\n                if(isDebuggerActive() && !getContextOptions()->no_breaks)                          \\\n                    DOCTEST_BREAK_INTO_DEBUGGER();                                                 \\\n                if(checkIfShouldThrow(at))                                                         \\\n                    throwException();                                                              \\\n            }                                                                                      \\\n            return;                                                                                \\\n        }                                                                                          \\\n    } while(false)\n\n#define DOCTEST_ASSERT_IN_TESTS(decomp)                                                            \\\n    ResultBuilder rb(at, file, line, expr);                                                        \\\n    rb.m_failed = failed;                                                                          \\\n    if(rb.m_failed || getContextOptions()->success)                                                \\\n        rb.m_decomp = decomp;                                                                      \\\n    if(rb.log())                                                                                   \\\n        DOCTEST_BREAK_INTO_DEBUGGER();                                                             \\\n    if(rb.m_failed && checkIfShouldThrow(at))                                                      \\\n    throwException()\n\n    template <int comparison, typename L, typename R>\n    DOCTEST_NOINLINE void binary_assert(assertType::Enum at, const char* file, int line,\n                                        const char* expr, const DOCTEST_REF_WRAP(L) lhs,\n                                        const DOCTEST_REF_WRAP(R) rhs) {\n        bool failed = !RelationalComparator<comparison, L, R>()(lhs, rhs);\n\n        // ###################################################################################\n        // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT\n        // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED\n        // ###################################################################################\n        DOCTEST_ASSERT_OUT_OF_TESTS(stringifyBinaryExpr(lhs, \", \", rhs));\n        DOCTEST_ASSERT_IN_TESTS(stringifyBinaryExpr(lhs, \", \", rhs));\n    }\n\n    template <typename L>\n    DOCTEST_NOINLINE void unary_assert(assertType::Enum at, const char* file, int line,\n                                       const char* expr, const DOCTEST_REF_WRAP(L) val) {\n        bool failed = !val;\n\n        if(at & assertType::is_false) //!OCLINT bitwise operator in conditional\n            failed = !failed;\n\n        // ###################################################################################\n        // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT\n        // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED\n        // ###################################################################################\n        DOCTEST_ASSERT_OUT_OF_TESTS(toString(val));\n        DOCTEST_ASSERT_IN_TESTS(toString(val));\n    }\n\n    struct DOCTEST_INTERFACE IExceptionTranslator\n    {\n        IExceptionTranslator();\n        virtual ~IExceptionTranslator();\n        virtual bool translate(String&) const = 0;\n    };\n\n    template <typename T>\n    class ExceptionTranslator : public IExceptionTranslator //!OCLINT destructor of virtual class\n    {\n    public:\n        explicit ExceptionTranslator(String (*translateFunction)(T))\n                : m_translateFunction(translateFunction) {}\n\n        bool translate(String& res) const override {\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n            try {\n                throw; // lgtm [cpp/rethrow-no-exception]\n                // cppcheck-suppress catchExceptionByValue\n            } catch(T ex) {                    // NOLINT\n                res = m_translateFunction(ex); //!OCLINT parameter reassignment\n                return true;\n            } catch(...) {} //!OCLINT -  empty catch statement\n#endif                      // DOCTEST_CONFIG_NO_EXCEPTIONS\n            ((void)res);    // to silence -Wunused-parameter\n            return false;\n        }\n\n    private:\n        String (*m_translateFunction)(T);\n    };\n\n    DOCTEST_INTERFACE void registerExceptionTranslatorImpl(const IExceptionTranslator* et);\n\n    template <bool C>\n    struct StringStreamBase\n    {\n        template <typename T>\n        static void convert(std::ostream* s, const T& in) {\n            *s << toString(in);\n        }\n\n        // always treat char* as a string in this context - no matter\n        // if DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING is defined\n        static void convert(std::ostream* s, const char* in) { *s << String(in); }\n    };\n\n    template <>\n    struct StringStreamBase<true>\n    {\n        template <typename T>\n        static void convert(std::ostream* s, const T& in) {\n            *s << in;\n        }\n    };\n\n    template <typename T>\n    struct StringStream : public StringStreamBase<has_insertion_operator<T>::value>\n    {};\n\n    template <typename T>\n    void toStream(std::ostream* s, const T& value) {\n        StringStream<T>::convert(s, value);\n    }\n\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    DOCTEST_INTERFACE void toStream(std::ostream* s, char* in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, const char* in);\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    DOCTEST_INTERFACE void toStream(std::ostream* s, bool in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, float in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, double in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, double long in);\n\n    DOCTEST_INTERFACE void toStream(std::ostream* s, char in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, char signed in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, char unsigned in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int short in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int short unsigned in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int unsigned in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int long in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int long unsigned in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int long long in);\n    DOCTEST_INTERFACE void toStream(std::ostream* s, int long long unsigned in);\n\n    // ContextScope base class used to allow implementing methods of ContextScope \n    // that don't depend on the template parameter in doctest.cpp.\n    class DOCTEST_INTERFACE ContextScopeBase : public IContextScope {\n    protected:\n        ContextScopeBase();\n\n        void destroy();\n    };\n\n    template <typename L> class DOCTEST_INTERFACE ContextScope : public ContextScopeBase\n    {\n        const L &lambda_;\n\n    public:\n        explicit ContextScope(const L &lambda) : lambda_(lambda) {}\n\n        ContextScope(ContextScope &&other) : lambda_(other.lambda_) {}\n\n        void stringify(std::ostream* s) const override { lambda_(s); }\n\n        ~ContextScope() override { destroy(); }\n    };\n\n    struct DOCTEST_INTERFACE MessageBuilder : public MessageData\n    {\n        std::ostream* m_stream;\n\n        MessageBuilder(const char* file, int line, assertType::Enum severity);\n        MessageBuilder() = delete;\n        ~MessageBuilder();\n\n        template <typename T>\n        MessageBuilder& operator<<(const T& in) {\n            toStream(m_stream, in);\n            return *this;\n        }\n\n        bool log();\n        void react();\n    };\n    \n    template <typename L>\n    ContextScope<L> MakeContextScope(const L &lambda) {\n        return ContextScope<L>(lambda);\n    }\n} // namespace detail\n\n#define DOCTEST_DEFINE_DECORATOR(name, type, def)                                                  \\\n    struct name                                                                                    \\\n    {                                                                                              \\\n        type data;                                                                                 \\\n        name(type in = def)                                                                        \\\n                : data(in) {}                                                                      \\\n        void fill(detail::TestCase& state) const { state.DOCTEST_CAT(m_, name) = data; }           \\\n        void fill(detail::TestSuite& state) const { state.DOCTEST_CAT(m_, name) = data; }          \\\n    }\n\nDOCTEST_DEFINE_DECORATOR(test_suite, const char*, \"\");\nDOCTEST_DEFINE_DECORATOR(description, const char*, \"\");\nDOCTEST_DEFINE_DECORATOR(skip, bool, true);\nDOCTEST_DEFINE_DECORATOR(timeout, double, 0);\nDOCTEST_DEFINE_DECORATOR(may_fail, bool, true);\nDOCTEST_DEFINE_DECORATOR(should_fail, bool, true);\nDOCTEST_DEFINE_DECORATOR(expected_failures, int, 0);\n\ntemplate <typename T>\nint registerExceptionTranslator(String (*translateFunction)(T)) {\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wexit-time-destructors\")\n    static detail::ExceptionTranslator<T> exceptionTranslator(translateFunction);\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    detail::registerExceptionTranslatorImpl(&exceptionTranslator);\n    return 0;\n}\n\n} // namespace doctest\n\n// in a separate namespace outside of doctest because the DOCTEST_TEST_SUITE macro\n// introduces an anonymous namespace in which getCurrentTestSuite gets overridden\nnamespace doctest_detail_test_suite_ns {\nDOCTEST_INTERFACE doctest::detail::TestSuite& getCurrentTestSuite();\n} // namespace doctest_detail_test_suite_ns\n\nnamespace doctest {\n#else  // DOCTEST_CONFIG_DISABLE\ntemplate <typename T>\nint registerExceptionTranslator(String (*)(T)) {\n    return 0;\n}\n#endif // DOCTEST_CONFIG_DISABLE\n\nnamespace detail {\n    typedef void (*assert_handler)(const AssertData&);\n    struct ContextState;\n} // namespace detail\n\nclass DOCTEST_INTERFACE Context\n{\n    detail::ContextState* p;\n\n    void parseArgs(int argc, const char* const* argv, bool withDefaults = false);\n\npublic:\n    explicit Context(int argc = 0, const char* const* argv = nullptr);\n\n    ~Context();\n\n    void applyCommandLine(int argc, const char* const* argv);\n\n    void addFilter(const char* filter, const char* value);\n    void clearFilters();\n    void setOption(const char* option, int value);\n    void setOption(const char* option, const char* value);\n\n    bool shouldExit();\n\n    void setAsDefaultForAssertsOutOfTestCases();\n\n    void setAssertHandler(detail::assert_handler ah);\n\n    int run();\n};\n\nnamespace TestCaseFailureReason {\n    enum Enum\n    {\n        None                     = 0,\n        AssertFailure            = 1,   // an assertion has failed in the test case\n        Exception                = 2,   // test case threw an exception\n        Crash                    = 4,   // a crash...\n        TooManyFailedAsserts     = 8,   // the abort-after option\n        Timeout                  = 16,  // see the timeout decorator\n        ShouldHaveFailedButDidnt = 32,  // see the should_fail decorator\n        ShouldHaveFailedAndDid   = 64,  // see the should_fail decorator\n        DidntFailExactlyNumTimes = 128, // see the expected_failures decorator\n        FailedExactlyNumTimes    = 256, // see the expected_failures decorator\n        CouldHaveFailedAndDid    = 512  // see the may_fail decorator\n    };\n} // namespace TestCaseFailureReason\n\nstruct DOCTEST_INTERFACE CurrentTestCaseStats\n{\n    int    numAssertsCurrentTest;\n    int    numAssertsFailedCurrentTest;\n    double seconds;\n    int    failure_flags; // use TestCaseFailureReason::Enum\n};\n\nstruct DOCTEST_INTERFACE TestCaseException\n{\n    String error_string;\n    bool   is_crash;\n};\n\nstruct DOCTEST_INTERFACE TestRunStats\n{\n    unsigned numTestCases;\n    unsigned numTestCasesPassingFilters;\n    unsigned numTestSuitesPassingFilters;\n    unsigned numTestCasesFailed;\n    int      numAsserts;\n    int      numAssertsFailed;\n};\n\nstruct QueryData\n{\n    const TestRunStats* run_stats = nullptr;\n    String*             data      = nullptr;\n    unsigned            num_data  = 0;\n};\n\nstruct DOCTEST_INTERFACE IReporter\n{\n    // The constructor has to accept \"const ContextOptions&\" as a single argument\n    // which has most of the options for the run + a pointer to the stdout stream\n    // Reporter(const ContextOptions& in)\n\n    // called when a query should be reported (listing test cases, printing the version, etc.)\n    virtual void report_query(const QueryData&) = 0;\n\n    // called when the whole test run starts\n    virtual void test_run_start() = 0;\n    // called when the whole test run ends (caching a pointer to the input doesn't make sense here)\n    virtual void test_run_end(const TestRunStats&) = 0;\n\n    // called when a test case is started (safe to cache a pointer to the input)\n    virtual void test_case_start(const TestCaseData&) = 0;\n    // called when a test case is reentered because of unfinished subcases (safe to cache a pointer to the input)\n    virtual void test_case_reenter(const TestCaseData&) = 0;\n    // called when a test case has ended\n    virtual void test_case_end(const CurrentTestCaseStats&) = 0;\n\n    // called when an exception is thrown from the test case (or it crashes)\n    virtual void test_case_exception(const TestCaseException&) = 0;\n\n    // called whenever a subcase is entered (don't cache pointers to the input)\n    virtual void subcase_start(const SubcaseSignature&) = 0;\n    // called whenever a subcase is exited (don't cache pointers to the input)\n    virtual void subcase_end() = 0;\n\n    // called for each assert (don't cache pointers to the input)\n    virtual void log_assert(const AssertData&) = 0;\n    // called for each message (don't cache pointers to the input)\n    virtual void log_message(const MessageData&) = 0;\n\n    // called when a test case is skipped either because it doesn't pass the filters, has a skip decorator\n    // or isn't in the execution range (between first and last) (safe to cache a pointer to the input)\n    virtual void test_case_skipped(const TestCaseData&) = 0;\n\n    // doctest will not be managing the lifetimes of reporters given to it but this would still be nice to have\n    virtual ~IReporter();\n\n    // can obtain all currently active contexts and stringify them if one wishes to do so\n    static int                         get_num_active_contexts();\n    static const IContextScope* const* get_active_contexts();\n\n    // can iterate through contexts which have been stringified automatically in their destructors when an exception has been thrown\n    static int           get_num_stringified_contexts();\n    static const String* get_stringified_contexts();\n};\n\nnamespace detail {\n    typedef IReporter* (*reporterCreatorFunc)(const ContextOptions&);\n\n    DOCTEST_INTERFACE void registerReporterImpl(const char* name, int prio, reporterCreatorFunc c, bool isReporter);\n\n    template <typename Reporter>\n    IReporter* reporterCreator(const ContextOptions& o) {\n        return new Reporter(o);\n    }\n} // namespace detail\n\ntemplate <typename Reporter>\nint registerReporter(const char* name, int priority, bool isReporter) {\n    detail::registerReporterImpl(name, priority, detail::reporterCreator<Reporter>, isReporter);\n    return 0;\n}\n} // namespace doctest\n\n// if registering is not disabled\n#if !defined(DOCTEST_CONFIG_DISABLE)\n\n// common code in asserts - for convenience\n#define DOCTEST_ASSERT_LOG_AND_REACT(b)                                                            \\\n    if(b.log())                                                                                    \\\n        DOCTEST_BREAK_INTO_DEBUGGER();                                                             \\\n    b.react()\n\n#ifdef DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n#define DOCTEST_WRAP_IN_TRY(x) x;\n#else // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n#define DOCTEST_WRAP_IN_TRY(x)                                                                     \\\n    try {                                                                                          \\\n        x;                                                                                         \\\n    } catch(...) { _DOCTEST_RB.translateException(); }\n#endif // DOCTEST_CONFIG_NO_TRY_CATCH_IN_ASSERTS\n\n#ifdef DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS\n#define DOCTEST_CAST_TO_VOID(x)                                                                    \\\n    DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wuseless-cast\")                                       \\\n    static_cast<void>(x);                                                                          \\\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n#else // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS\n#define DOCTEST_CAST_TO_VOID(x) x;\n#endif // DOCTEST_CONFIG_VOID_CAST_EXPRESSIONS\n\n// registers the test by initializing a dummy var with a function\n#define DOCTEST_REGISTER_FUNCTION(global_prefix, f, decorators)                                    \\\n    global_prefix DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) =              \\\n            doctest::detail::regTest(                                                              \\\n                    doctest::detail::TestCase(                                                     \\\n                            f, __FILE__, __LINE__,                                                 \\\n                            doctest_detail_test_suite_ns::getCurrentTestSuite()) *                 \\\n                    decorators);                                                                   \\\n    DOCTEST_GLOBAL_NO_WARNINGS_END()\n\n#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, decorators)                                     \\\n    namespace {                                                                                    \\\n        struct der : public base                                                                   \\\n        {                                                                                          \\\n            void f();                                                                              \\\n        };                                                                                         \\\n        static void func() {                                                                       \\\n            der v;                                                                                 \\\n            v.f();                                                                                 \\\n        }                                                                                          \\\n        DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, func, decorators)                                 \\\n    }                                                                                              \\\n    inline DOCTEST_NOINLINE void der::f()\n\n#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, decorators)                                        \\\n    static void f();                                                                               \\\n    DOCTEST_REGISTER_FUNCTION(DOCTEST_EMPTY, f, decorators)                                        \\\n    static void f()\n\n#define DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(f, proxy, decorators)                        \\\n    static doctest::detail::funcType proxy() { return f; }                                         \\\n    DOCTEST_REGISTER_FUNCTION(inline const, proxy(), decorators)                                   \\\n    static void f()\n\n// for registering tests\n#define DOCTEST_TEST_CASE(decorators)                                                              \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), decorators)\n\n// for registering tests in classes - requires C++17 for inline variables!\n#if __cplusplus >= 201703L || (DOCTEST_MSVC >= DOCTEST_COMPILER(19, 12, 0) && _MSVC_LANG >= 201703L)\n#define DOCTEST_TEST_CASE_CLASS(decorators)                                                        \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION_IN_CLASS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_),          \\\n                                                  DOCTEST_ANONYMOUS(_DOCTEST_ANON_PROXY_),         \\\n                                                  decorators)\n#else // DOCTEST_TEST_CASE_CLASS\n#define DOCTEST_TEST_CASE_CLASS(...)                                                               \\\n    TEST_CASES_CAN_BE_REGISTERED_IN_CLASSES_ONLY_IN_CPP17_MODE_OR_WITH_VS_2017_OR_NEWER\n#endif // DOCTEST_TEST_CASE_CLASS\n\n// for registering tests with a fixture\n#define DOCTEST_TEST_CASE_FIXTURE(c, decorators)                                                   \\\n    DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(_DOCTEST_ANON_CLASS_), c,                          \\\n                              DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), decorators)\n\n// for converting types to strings without the <typeinfo> header and demangling\n#define DOCTEST_TYPE_TO_STRING_IMPL(...)                                                           \\\n    template <>                                                                                    \\\n    inline const char* type_to_string<__VA_ARGS__>() {                                             \\\n        return \"<\" #__VA_ARGS__ \">\";                                                               \\\n    }\n#define DOCTEST_TYPE_TO_STRING(...)                                                                \\\n    namespace doctest { namespace detail {                                                         \\\n            DOCTEST_TYPE_TO_STRING_IMPL(__VA_ARGS__)                                               \\\n        }                                                                                          \\\n    }                                                                                              \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, iter, func)                                 \\\n    template <typename T>                                                                          \\\n    static void func();                                                                            \\\n    namespace {                                                                                    \\\n        template <typename Tuple>                                                                  \\\n        struct iter;                                                                               \\\n        template <typename Type, typename... Rest>                                                 \\\n        struct iter<std::tuple<Type, Rest...>>                                                     \\\n        {                                                                                          \\\n            iter(const char* file, unsigned line, int index) {                                     \\\n                doctest::detail::regTest(doctest::detail::TestCase(func<Type>, file, line,         \\\n                                            doctest_detail_test_suite_ns::getCurrentTestSuite(),   \\\n                                            doctest::detail::type_to_string<Type>(),               \\\n                                            int(line) * 1000 + index)                              \\\n                                         * dec);                                                   \\\n                iter<std::tuple<Rest...>>(file, line, index + 1);                                  \\\n            }                                                                                      \\\n        };                                                                                         \\\n        template <>                                                                                \\\n        struct iter<std::tuple<>>                                                                  \\\n        {                                                                                          \\\n            iter(const char*, unsigned, int) {}                                                    \\\n        };                                                                                         \\\n    }                                                                                              \\\n    template <typename T>                                                                          \\\n    static void func()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(dec, T, id)                                              \\\n    DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(id, ITERATOR),                      \\\n                                           DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_))\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, anon, ...)                                 \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_CAT(anon, DUMMY)) =                                         \\\n        doctest::detail::instantiationHelper(DOCTEST_CAT(id, ITERATOR)<__VA_ARGS__>(__FILE__, __LINE__, 0));\\\n    DOCTEST_GLOBAL_NO_WARNINGS_END()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...)                                                 \\\n    DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_), std::tuple<__VA_ARGS__>) \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...)                                                  \\\n    DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(id, DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_), __VA_ARGS__) \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n#define DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, anon, ...)                                         \\\n    DOCTEST_TEST_CASE_TEMPLATE_DEFINE_IMPL(dec, T, DOCTEST_CAT(anon, ITERATOR), anon);             \\\n    DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE_IMPL(anon, anon, std::tuple<__VA_ARGS__>)               \\\n    template <typename T>                                                                          \\\n    static void anon()\n\n#define DOCTEST_TEST_CASE_TEMPLATE(dec, T, ...)                                                    \\\n    DOCTEST_TEST_CASE_TEMPLATE_IMPL(dec, T, DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_), __VA_ARGS__)\n\n// for subcases\n#define DOCTEST_SUBCASE(name)                                                                      \\\n    if(const doctest::detail::Subcase & DOCTEST_ANONYMOUS(_DOCTEST_ANON_SUBCASE_) DOCTEST_UNUSED = \\\n               doctest::detail::Subcase(name, __FILE__, __LINE__))\n\n// for grouping tests in test suites by using code blocks\n#define DOCTEST_TEST_SUITE_IMPL(decorators, ns_name)                                               \\\n    namespace ns_name { namespace doctest_detail_test_suite_ns {                                   \\\n            static DOCTEST_NOINLINE doctest::detail::TestSuite& getCurrentTestSuite() {            \\\n                DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4640)                                      \\\n                DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wexit-time-destructors\")                \\\n                static doctest::detail::TestSuite data;                                            \\\n                static bool                       inited = false;                                  \\\n                DOCTEST_MSVC_SUPPRESS_WARNING_POP                                                  \\\n                DOCTEST_CLANG_SUPPRESS_WARNING_POP                                                 \\\n                if(!inited) {                                                                      \\\n                    data* decorators;                                                              \\\n                    inited = true;                                                                 \\\n                }                                                                                  \\\n                return data;                                                                       \\\n            }                                                                                      \\\n        }                                                                                          \\\n    }                                                                                              \\\n    namespace ns_name\n\n#define DOCTEST_TEST_SUITE(decorators)                                                             \\\n    DOCTEST_TEST_SUITE_IMPL(decorators, DOCTEST_ANONYMOUS(_DOCTEST_ANON_SUITE_))\n\n// for starting a testsuite block\n#define DOCTEST_TEST_SUITE_BEGIN(decorators)                                                       \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) =                            \\\n            doctest::detail::setTestSuite(doctest::detail::TestSuite() * decorators);              \\\n    DOCTEST_GLOBAL_NO_WARNINGS_END()                                                               \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n// for ending a testsuite block\n#define DOCTEST_TEST_SUITE_END                                                                     \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_VAR_)) =                            \\\n            doctest::detail::setTestSuite(doctest::detail::TestSuite() * \"\");                      \\\n    DOCTEST_GLOBAL_NO_WARNINGS_END()                                                               \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n// for registering exception translators\n#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(translatorName, signature)                      \\\n    inline doctest::String translatorName(signature);                                              \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_TRANSLATOR_)) =                     \\\n            doctest::registerExceptionTranslator(translatorName);                                  \\\n    DOCTEST_GLOBAL_NO_WARNINGS_END()                                                               \\\n    doctest::String translatorName(signature)\n\n#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature)                                           \\\n    DOCTEST_REGISTER_EXCEPTION_TRANSLATOR_IMPL(DOCTEST_ANONYMOUS(_DOCTEST_ANON_TRANSLATOR_),       \\\n                                               signature)\n\n// for registering reporters\n#define DOCTEST_REGISTER_REPORTER(name, priority, reporter)                                        \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_REPORTER_)) =                       \\\n            doctest::registerReporter<reporter>(name, priority, true);                             \\\n    DOCTEST_GLOBAL_NO_WARNINGS_END() typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n// for registering listeners\n#define DOCTEST_REGISTER_LISTENER(name, priority, reporter)                                        \\\n    DOCTEST_GLOBAL_NO_WARNINGS(DOCTEST_ANONYMOUS(_DOCTEST_ANON_REPORTER_)) =                       \\\n            doctest::registerReporter<reporter>(name, priority, false);                            \\\n    DOCTEST_GLOBAL_NO_WARNINGS_END() typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n// for logging\n#define DOCTEST_INFO(expression)                                                                   \\\n    DOCTEST_INFO_IMPL(DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_), DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_),  \\\n                      DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_), expression)\n\n#define DOCTEST_INFO_IMPL(lambda_name, mb_name, s_name, expression)                                \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4626)                                                  \\\n    auto lambda_name = [&](std::ostream* s_name) {                                                 \\\n        doctest::detail::MessageBuilder mb_name(__FILE__, __LINE__, doctest::assertType::is_warn); \\\n        mb_name.m_stream = s_name;                                                                 \\\n        mb_name << expression;                                                                     \\\n    };                                                                                             \\\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP                                                              \\\n    auto DOCTEST_ANONYMOUS(_DOCTEST_CAPTURE_) = doctest::detail::MakeContextScope(lambda_name)\n\n#define DOCTEST_CAPTURE(x) DOCTEST_INFO(#x \" := \" << x)\n\n#define DOCTEST_ADD_AT_IMPL(type, file, line, mb, x)                                               \\\n    do {                                                                                           \\\n        doctest::detail::MessageBuilder mb(file, line, doctest::assertType::type);                 \\\n        mb << x;                                                                                   \\\n        DOCTEST_ASSERT_LOG_AND_REACT(mb);                                                          \\\n    } while((void)0, 0)\n\n// clang-format off\n#define DOCTEST_ADD_MESSAGE_AT(file, line, x) DOCTEST_ADD_AT_IMPL(is_warn, file, line, DOCTEST_ANONYMOUS(_DOCTEST_MESSAGE_), x)\n#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, x) DOCTEST_ADD_AT_IMPL(is_check, file, line, DOCTEST_ANONYMOUS(_DOCTEST_MESSAGE_), x)\n#define DOCTEST_ADD_FAIL_AT(file, line, x) DOCTEST_ADD_AT_IMPL(is_require, file, line, DOCTEST_ANONYMOUS(_DOCTEST_MESSAGE_), x)\n// clang-format on\n\n#define DOCTEST_MESSAGE(x) DOCTEST_ADD_MESSAGE_AT(__FILE__, __LINE__, x)\n#define DOCTEST_FAIL_CHECK(x) DOCTEST_ADD_FAIL_CHECK_AT(__FILE__, __LINE__, x)\n#define DOCTEST_FAIL(x) DOCTEST_ADD_FAIL_AT(__FILE__, __LINE__, x)\n\n#define DOCTEST_TO_LVALUE(...) __VA_ARGS__ // Not removed to keep backwards compatibility.\n\n#ifndef DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_ASSERT_IMPLEMENT_2(assert_type, ...)                                               \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Woverloaded-shift-op-parentheses\")                  \\\n    doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__,         \\\n                                               __LINE__, #__VA_ARGS__);                            \\\n    DOCTEST_WRAP_IN_TRY(_DOCTEST_RB.setResult(                                                     \\\n            doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type)                \\\n            << __VA_ARGS__))                                                                       \\\n    DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB)                                                      \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...)                                               \\\n    do {                                                                                           \\\n        DOCTEST_ASSERT_IMPLEMENT_2(assert_type, __VA_ARGS__);                                      \\\n    } while((void)0, 0)\n\n#else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n// necessary for <ASSERT>_MESSAGE\n#define DOCTEST_ASSERT_IMPLEMENT_2 DOCTEST_ASSERT_IMPLEMENT_1\n\n#define DOCTEST_ASSERT_IMPLEMENT_1(assert_type, ...)                                               \\\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Woverloaded-shift-op-parentheses\")                  \\\n    doctest::detail::decomp_assert(                                                                \\\n            doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__,                    \\\n            doctest::detail::ExpressionDecomposer(doctest::assertType::assert_type)                \\\n                    << __VA_ARGS__) DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_WARN(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN, __VA_ARGS__)\n#define DOCTEST_CHECK(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK, __VA_ARGS__)\n#define DOCTEST_REQUIRE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE, __VA_ARGS__)\n#define DOCTEST_WARN_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_WARN_FALSE, __VA_ARGS__)\n#define DOCTEST_CHECK_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_CHECK_FALSE, __VA_ARGS__)\n#define DOCTEST_REQUIRE_FALSE(...) DOCTEST_ASSERT_IMPLEMENT_1(DT_REQUIRE_FALSE, __VA_ARGS__)\n\n// clang-format off\n#define DOCTEST_WARN_MESSAGE(cond, msg) do { DOCTEST_INFO(msg); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN, cond); } while((void)0, 0)\n#define DOCTEST_CHECK_MESSAGE(cond, msg) do { DOCTEST_INFO(msg); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK, cond); } while((void)0, 0)\n#define DOCTEST_REQUIRE_MESSAGE(cond, msg) do { DOCTEST_INFO(msg); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE, cond); } while((void)0, 0)\n#define DOCTEST_WARN_FALSE_MESSAGE(cond, msg) do { DOCTEST_INFO(msg); DOCTEST_ASSERT_IMPLEMENT_2(DT_WARN_FALSE, cond); } while((void)0, 0)\n#define DOCTEST_CHECK_FALSE_MESSAGE(cond, msg) do { DOCTEST_INFO(msg); DOCTEST_ASSERT_IMPLEMENT_2(DT_CHECK_FALSE, cond); } while((void)0, 0)\n#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, msg) do { DOCTEST_INFO(msg); DOCTEST_ASSERT_IMPLEMENT_2(DT_REQUIRE_FALSE, cond); } while((void)0, 0)\n// clang-format on\n\n#define DOCTEST_ASSERT_THROWS_AS(expr, assert_type, message, ...)                                  \\\n    do {                                                                                           \\\n        if(!doctest::getContextOptions()->no_throw) {                                              \\\n            doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \\\n                                                       __LINE__, #expr, #__VA_ARGS__, message);    \\\n            try {                                                                                  \\\n                DOCTEST_CAST_TO_VOID(expr)                                                         \\\n            } catch(const doctest::detail::remove_const<                                           \\\n                    doctest::detail::remove_reference<__VA_ARGS__>::type>::type&) {                \\\n                _DOCTEST_RB.translateException();                                                  \\\n                _DOCTEST_RB.m_threw_as = true;                                                     \\\n            } catch(...) { _DOCTEST_RB.translateException(); }                                     \\\n            DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB);                                             \\\n        }                                                                                          \\\n    } while((void)0, 0)\n\n#define DOCTEST_ASSERT_THROWS_WITH(expr, assert_type, ...)                                         \\\n    do {                                                                                           \\\n        if(!doctest::getContextOptions()->no_throw) {                                              \\\n            doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__, \\\n                                                       __LINE__, #expr, \"\", __VA_ARGS__);          \\\n            try {                                                                                  \\\n                DOCTEST_CAST_TO_VOID(expr)                                                         \\\n            } catch(...) { _DOCTEST_RB.translateException(); }                                     \\\n            DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB);                                             \\\n        }                                                                                          \\\n    } while((void)0, 0)\n\n#define DOCTEST_ASSERT_NOTHROW(expr, assert_type)                                                  \\\n    do {                                                                                           \\\n        doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__,     \\\n                                                   __LINE__, #expr);                               \\\n        try {                                                                                      \\\n            DOCTEST_CAST_TO_VOID(expr)                                                             \\\n        } catch(...) { _DOCTEST_RB.translateException(); }                                         \\\n        DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB);                                                 \\\n    } while((void)0, 0)\n\n// clang-format off\n#define DOCTEST_WARN_THROWS(expr) DOCTEST_ASSERT_THROWS_WITH(expr, DT_WARN_THROWS, \"\")\n#define DOCTEST_CHECK_THROWS(expr) DOCTEST_ASSERT_THROWS_WITH(expr, DT_CHECK_THROWS, \"\")\n#define DOCTEST_REQUIRE_THROWS(expr) DOCTEST_ASSERT_THROWS_WITH(expr, DT_REQUIRE_THROWS, \"\")\n\n#define DOCTEST_WARN_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_AS, \"\", __VA_ARGS__)\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_AS, \"\", __VA_ARGS__)\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_AS, \"\", __VA_ARGS__)\n\n#define DOCTEST_WARN_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, DT_WARN_THROWS_WITH, __VA_ARGS__)\n#define DOCTEST_CHECK_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, DT_CHECK_THROWS_WITH, __VA_ARGS__)\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) DOCTEST_ASSERT_THROWS_WITH(expr, DT_REQUIRE_THROWS_WITH, __VA_ARGS__)\n\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_WARN_THROWS_WITH_AS, message, __VA_ARGS__)\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_CHECK_THROWS_WITH_AS, message, __VA_ARGS__)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, message, ...) DOCTEST_ASSERT_THROWS_AS(expr, DT_REQUIRE_THROWS_WITH_AS, message, __VA_ARGS__)\n\n#define DOCTEST_WARN_NOTHROW(expr) DOCTEST_ASSERT_NOTHROW(expr, DT_WARN_NOTHROW)\n#define DOCTEST_CHECK_NOTHROW(expr) DOCTEST_ASSERT_NOTHROW(expr, DT_CHECK_NOTHROW)\n#define DOCTEST_REQUIRE_NOTHROW(expr) DOCTEST_ASSERT_NOTHROW(expr, DT_REQUIRE_NOTHROW)\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, msg) do { DOCTEST_INFO(msg); DOCTEST_WARN_THROWS(expr); } while((void)0, 0)\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, msg) do { DOCTEST_INFO(msg); DOCTEST_CHECK_THROWS(expr); } while((void)0, 0)\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, msg) do { DOCTEST_INFO(msg); DOCTEST_REQUIRE_THROWS(expr); } while((void)0, 0)\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, msg) do { DOCTEST_INFO(msg); DOCTEST_WARN_THROWS_AS(expr, ex); } while((void)0, 0)\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, msg) do { DOCTEST_INFO(msg); DOCTEST_CHECK_THROWS_AS(expr, ex); } while((void)0, 0)\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, msg) do { DOCTEST_INFO(msg); DOCTEST_REQUIRE_THROWS_AS(expr, ex); } while((void)0, 0)\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, msg) do { DOCTEST_INFO(msg); DOCTEST_WARN_THROWS_WITH(expr, with); } while((void)0, 0)\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, msg) do { DOCTEST_INFO(msg); DOCTEST_CHECK_THROWS_WITH(expr, with); } while((void)0, 0)\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, msg) do { DOCTEST_INFO(msg); DOCTEST_REQUIRE_THROWS_WITH(expr, with); } while((void)0, 0)\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) do { DOCTEST_INFO(msg); DOCTEST_WARN_THROWS_WITH_AS(expr, with, ex); } while((void)0, 0)\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) do { DOCTEST_INFO(msg); DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ex); } while((void)0, 0)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) do { DOCTEST_INFO(msg); DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ex); } while((void)0, 0)\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, msg) do { DOCTEST_INFO(msg); DOCTEST_WARN_NOTHROW(expr); } while((void)0, 0)\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, msg) do { DOCTEST_INFO(msg); DOCTEST_CHECK_NOTHROW(expr); } while((void)0, 0)\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, msg) do { DOCTEST_INFO(msg); DOCTEST_REQUIRE_NOTHROW(expr); } while((void)0, 0)\n// clang-format on\n\n#ifndef DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_BINARY_ASSERT(assert_type, comp, ...)                                              \\\n    do {                                                                                           \\\n        doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__,     \\\n                                                   __LINE__, #__VA_ARGS__);                        \\\n        DOCTEST_WRAP_IN_TRY(                                                                       \\\n                _DOCTEST_RB.binary_assert<doctest::detail::binaryAssertComparison::comp>(          \\\n                        __VA_ARGS__))                                                              \\\n        DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB);                                                 \\\n    } while((void)0, 0)\n\n#define DOCTEST_UNARY_ASSERT(assert_type, ...)                                                     \\\n    do {                                                                                           \\\n        doctest::detail::ResultBuilder _DOCTEST_RB(doctest::assertType::assert_type, __FILE__,     \\\n                                                   __LINE__, #__VA_ARGS__);                        \\\n        DOCTEST_WRAP_IN_TRY(_DOCTEST_RB.unary_assert(__VA_ARGS__))                                 \\\n        DOCTEST_ASSERT_LOG_AND_REACT(_DOCTEST_RB);                                                 \\\n    } while((void)0, 0)\n\n#else // DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_BINARY_ASSERT(assert_type, comparison, ...)                                        \\\n    doctest::detail::binary_assert<doctest::detail::binaryAssertComparison::comparison>(           \\\n            doctest::assertType::assert_type, __FILE__, __LINE__, #__VA_ARGS__, __VA_ARGS__)\n\n#define DOCTEST_UNARY_ASSERT(assert_type, ...)                                                     \\\n    doctest::detail::unary_assert(doctest::assertType::assert_type, __FILE__, __LINE__,            \\\n                                  #__VA_ARGS__, __VA_ARGS__)\n\n#endif // DOCTEST_CONFIG_SUPER_FAST_ASSERTS\n\n#define DOCTEST_WARN_EQ(...) DOCTEST_BINARY_ASSERT(DT_WARN_EQ, eq, __VA_ARGS__)\n#define DOCTEST_CHECK_EQ(...) DOCTEST_BINARY_ASSERT(DT_CHECK_EQ, eq, __VA_ARGS__)\n#define DOCTEST_REQUIRE_EQ(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_EQ, eq, __VA_ARGS__)\n#define DOCTEST_WARN_NE(...) DOCTEST_BINARY_ASSERT(DT_WARN_NE, ne, __VA_ARGS__)\n#define DOCTEST_CHECK_NE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_NE, ne, __VA_ARGS__)\n#define DOCTEST_REQUIRE_NE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_NE, ne, __VA_ARGS__)\n#define DOCTEST_WARN_GT(...) DOCTEST_BINARY_ASSERT(DT_WARN_GT, gt, __VA_ARGS__)\n#define DOCTEST_CHECK_GT(...) DOCTEST_BINARY_ASSERT(DT_CHECK_GT, gt, __VA_ARGS__)\n#define DOCTEST_REQUIRE_GT(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_GT, gt, __VA_ARGS__)\n#define DOCTEST_WARN_LT(...) DOCTEST_BINARY_ASSERT(DT_WARN_LT, lt, __VA_ARGS__)\n#define DOCTEST_CHECK_LT(...) DOCTEST_BINARY_ASSERT(DT_CHECK_LT, lt, __VA_ARGS__)\n#define DOCTEST_REQUIRE_LT(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_LT, lt, __VA_ARGS__)\n#define DOCTEST_WARN_GE(...) DOCTEST_BINARY_ASSERT(DT_WARN_GE, ge, __VA_ARGS__)\n#define DOCTEST_CHECK_GE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_GE, ge, __VA_ARGS__)\n#define DOCTEST_REQUIRE_GE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_GE, ge, __VA_ARGS__)\n#define DOCTEST_WARN_LE(...) DOCTEST_BINARY_ASSERT(DT_WARN_LE, le, __VA_ARGS__)\n#define DOCTEST_CHECK_LE(...) DOCTEST_BINARY_ASSERT(DT_CHECK_LE, le, __VA_ARGS__)\n#define DOCTEST_REQUIRE_LE(...) DOCTEST_BINARY_ASSERT(DT_REQUIRE_LE, le, __VA_ARGS__)\n\n#define DOCTEST_WARN_UNARY(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY, __VA_ARGS__)\n#define DOCTEST_CHECK_UNARY(...) DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY, __VA_ARGS__)\n#define DOCTEST_REQUIRE_UNARY(...) DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY, __VA_ARGS__)\n#define DOCTEST_WARN_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_WARN_UNARY_FALSE, __VA_ARGS__)\n#define DOCTEST_CHECK_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_CHECK_UNARY_FALSE, __VA_ARGS__)\n#define DOCTEST_REQUIRE_UNARY_FALSE(...) DOCTEST_UNARY_ASSERT(DT_REQUIRE_UNARY_FALSE, __VA_ARGS__)\n\n#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS\n\n#undef DOCTEST_WARN_THROWS\n#undef DOCTEST_CHECK_THROWS\n#undef DOCTEST_REQUIRE_THROWS\n#undef DOCTEST_WARN_THROWS_AS\n#undef DOCTEST_CHECK_THROWS_AS\n#undef DOCTEST_REQUIRE_THROWS_AS\n#undef DOCTEST_WARN_THROWS_WITH\n#undef DOCTEST_CHECK_THROWS_WITH\n#undef DOCTEST_REQUIRE_THROWS_WITH\n#undef DOCTEST_WARN_THROWS_WITH_AS\n#undef DOCTEST_CHECK_THROWS_WITH_AS\n#undef DOCTEST_REQUIRE_THROWS_WITH_AS\n#undef DOCTEST_WARN_NOTHROW\n#undef DOCTEST_CHECK_NOTHROW\n#undef DOCTEST_REQUIRE_NOTHROW\n\n#undef DOCTEST_WARN_THROWS_MESSAGE\n#undef DOCTEST_CHECK_THROWS_MESSAGE\n#undef DOCTEST_REQUIRE_THROWS_MESSAGE\n#undef DOCTEST_WARN_THROWS_AS_MESSAGE\n#undef DOCTEST_CHECK_THROWS_AS_MESSAGE\n#undef DOCTEST_REQUIRE_THROWS_AS_MESSAGE\n#undef DOCTEST_WARN_THROWS_WITH_MESSAGE\n#undef DOCTEST_CHECK_THROWS_WITH_MESSAGE\n#undef DOCTEST_REQUIRE_THROWS_WITH_MESSAGE\n#undef DOCTEST_WARN_THROWS_WITH_AS_MESSAGE\n#undef DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE\n#undef DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE\n#undef DOCTEST_WARN_NOTHROW_MESSAGE\n#undef DOCTEST_CHECK_NOTHROW_MESSAGE\n#undef DOCTEST_REQUIRE_NOTHROW_MESSAGE\n\n#ifdef DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n\n#define DOCTEST_WARN_THROWS(expr) ((void)0)\n#define DOCTEST_CHECK_THROWS(expr) ((void)0)\n#define DOCTEST_REQUIRE_THROWS(expr) ((void)0)\n#define DOCTEST_WARN_THROWS_AS(expr, ...) ((void)0)\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH(expr, ...) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH(expr, ...) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) ((void)0)\n#define DOCTEST_WARN_NOTHROW(expr) ((void)0)\n#define DOCTEST_CHECK_NOTHROW(expr) ((void)0)\n#define DOCTEST_REQUIRE_NOTHROW(expr) ((void)0)\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, msg) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, msg) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) ((void)0)\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, msg) ((void)0)\n\n#else // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n\n#undef DOCTEST_REQUIRE\n#undef DOCTEST_REQUIRE_FALSE\n#undef DOCTEST_REQUIRE_MESSAGE\n#undef DOCTEST_REQUIRE_FALSE_MESSAGE\n#undef DOCTEST_REQUIRE_EQ\n#undef DOCTEST_REQUIRE_NE\n#undef DOCTEST_REQUIRE_GT\n#undef DOCTEST_REQUIRE_LT\n#undef DOCTEST_REQUIRE_GE\n#undef DOCTEST_REQUIRE_LE\n#undef DOCTEST_REQUIRE_UNARY\n#undef DOCTEST_REQUIRE_UNARY_FALSE\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS\n\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n// =================================================================================================\n// == WHAT FOLLOWS IS VERSIONS OF THE MACROS THAT DO NOT DO ANY REGISTERING!                      ==\n// == THIS CAN BE ENABLED BY DEFINING DOCTEST_CONFIG_DISABLE GLOBALLY!                            ==\n// =================================================================================================\n#else // DOCTEST_CONFIG_DISABLE\n\n#define DOCTEST_IMPLEMENT_FIXTURE(der, base, func, name)                                           \\\n    namespace {                                                                                    \\\n        template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                           \\\n        struct der : public base                                                                   \\\n        { void f(); };                                                                             \\\n    }                                                                                              \\\n    template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                               \\\n    inline void der<DOCTEST_UNUSED_TEMPLATE_TYPE>::f()\n\n#define DOCTEST_CREATE_AND_REGISTER_FUNCTION(f, name)                                              \\\n    template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                               \\\n    static inline void f()\n\n// for registering tests\n#define DOCTEST_TEST_CASE(name)                                                                    \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), name)\n\n// for registering tests in classes\n#define DOCTEST_TEST_CASE_CLASS(name)                                                              \\\n    DOCTEST_CREATE_AND_REGISTER_FUNCTION(DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), name)\n\n// for registering tests with a fixture\n#define DOCTEST_TEST_CASE_FIXTURE(x, name)                                                         \\\n    DOCTEST_IMPLEMENT_FIXTURE(DOCTEST_ANONYMOUS(_DOCTEST_ANON_CLASS_), x,                          \\\n                              DOCTEST_ANONYMOUS(_DOCTEST_ANON_FUNC_), name)\n\n// for converting types to strings without the <typeinfo> header and demangling\n#define DOCTEST_TYPE_TO_STRING(...) typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n#define DOCTEST_TYPE_TO_STRING_IMPL(...)\n\n// for typed tests\n#define DOCTEST_TEST_CASE_TEMPLATE(name, type, ...)                                                \\\n    template <typename type>                                                                       \\\n    inline void DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_)()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_DEFINE(name, type, id)                                          \\\n    template <typename type>                                                                       \\\n    inline void DOCTEST_ANONYMOUS(_DOCTEST_ANON_TMP_)()\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INVOKE(id, ...)                                                 \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n#define DOCTEST_TEST_CASE_TEMPLATE_APPLY(id, ...)                                                  \\\n    typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n// for subcases\n#define DOCTEST_SUBCASE(name)\n\n// for a testsuite block\n#define DOCTEST_TEST_SUITE(name) namespace\n\n// for starting a testsuite block\n#define DOCTEST_TEST_SUITE_BEGIN(name) typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n// for ending a testsuite block\n#define DOCTEST_TEST_SUITE_END typedef int DOCTEST_ANONYMOUS(_DOCTEST_ANON_FOR_SEMICOLON_)\n\n#define DOCTEST_REGISTER_EXCEPTION_TRANSLATOR(signature)                                           \\\n    template <typename DOCTEST_UNUSED_TEMPLATE_TYPE>                                               \\\n    static inline doctest::String DOCTEST_ANONYMOUS(_DOCTEST_ANON_TRANSLATOR_)(signature)\n\n#define DOCTEST_REGISTER_REPORTER(name, priority, reporter)\n#define DOCTEST_REGISTER_LISTENER(name, priority, reporter)\n\n#define DOCTEST_INFO(x) ((void)0)\n#define DOCTEST_CAPTURE(x) ((void)0)\n#define DOCTEST_ADD_MESSAGE_AT(file, line, x) ((void)0)\n#define DOCTEST_ADD_FAIL_CHECK_AT(file, line, x) ((void)0)\n#define DOCTEST_ADD_FAIL_AT(file, line, x) ((void)0)\n#define DOCTEST_MESSAGE(x) ((void)0)\n#define DOCTEST_FAIL_CHECK(x) ((void)0)\n#define DOCTEST_FAIL(x) ((void)0)\n\n#define DOCTEST_WARN(...) ((void)0)\n#define DOCTEST_CHECK(...) ((void)0)\n#define DOCTEST_REQUIRE(...) ((void)0)\n#define DOCTEST_WARN_FALSE(...) ((void)0)\n#define DOCTEST_CHECK_FALSE(...) ((void)0)\n#define DOCTEST_REQUIRE_FALSE(...) ((void)0)\n\n#define DOCTEST_WARN_MESSAGE(cond, msg) ((void)0)\n#define DOCTEST_CHECK_MESSAGE(cond, msg) ((void)0)\n#define DOCTEST_REQUIRE_MESSAGE(cond, msg) ((void)0)\n#define DOCTEST_WARN_FALSE_MESSAGE(cond, msg) ((void)0)\n#define DOCTEST_CHECK_FALSE_MESSAGE(cond, msg) ((void)0)\n#define DOCTEST_REQUIRE_FALSE_MESSAGE(cond, msg) ((void)0)\n\n#define DOCTEST_WARN_THROWS(expr) ((void)0)\n#define DOCTEST_CHECK_THROWS(expr) ((void)0)\n#define DOCTEST_REQUIRE_THROWS(expr) ((void)0)\n#define DOCTEST_WARN_THROWS_AS(expr, ...) ((void)0)\n#define DOCTEST_CHECK_THROWS_AS(expr, ...) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_AS(expr, ...) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH(expr, ...) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH(expr, ...) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH(expr, ...) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH_AS(expr, with, ...) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH_AS(expr, with, ...) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS(expr, with, ...) ((void)0)\n#define DOCTEST_WARN_NOTHROW(expr) ((void)0)\n#define DOCTEST_CHECK_NOTHROW(expr) ((void)0)\n#define DOCTEST_REQUIRE_NOTHROW(expr) ((void)0)\n\n#define DOCTEST_WARN_THROWS_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_WARN_THROWS_AS_MESSAGE(expr, ex, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_AS_MESSAGE(expr, ex, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_AS_MESSAGE(expr, ex, msg) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH_MESSAGE(expr, with, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH_MESSAGE(expr, with, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH_MESSAGE(expr, with, msg) ((void)0)\n#define DOCTEST_WARN_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) ((void)0)\n#define DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) ((void)0)\n#define DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE(expr, with, ex, msg) ((void)0)\n#define DOCTEST_WARN_NOTHROW_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_CHECK_NOTHROW_MESSAGE(expr, msg) ((void)0)\n#define DOCTEST_REQUIRE_NOTHROW_MESSAGE(expr, msg) ((void)0)\n\n#define DOCTEST_WARN_EQ(...) ((void)0)\n#define DOCTEST_CHECK_EQ(...) ((void)0)\n#define DOCTEST_REQUIRE_EQ(...) ((void)0)\n#define DOCTEST_WARN_NE(...) ((void)0)\n#define DOCTEST_CHECK_NE(...) ((void)0)\n#define DOCTEST_REQUIRE_NE(...) ((void)0)\n#define DOCTEST_WARN_GT(...) ((void)0)\n#define DOCTEST_CHECK_GT(...) ((void)0)\n#define DOCTEST_REQUIRE_GT(...) ((void)0)\n#define DOCTEST_WARN_LT(...) ((void)0)\n#define DOCTEST_CHECK_LT(...) ((void)0)\n#define DOCTEST_REQUIRE_LT(...) ((void)0)\n#define DOCTEST_WARN_GE(...) ((void)0)\n#define DOCTEST_CHECK_GE(...) ((void)0)\n#define DOCTEST_REQUIRE_GE(...) ((void)0)\n#define DOCTEST_WARN_LE(...) ((void)0)\n#define DOCTEST_CHECK_LE(...) ((void)0)\n#define DOCTEST_REQUIRE_LE(...) ((void)0)\n\n#define DOCTEST_WARN_UNARY(...) ((void)0)\n#define DOCTEST_CHECK_UNARY(...) ((void)0)\n#define DOCTEST_REQUIRE_UNARY(...) ((void)0)\n#define DOCTEST_WARN_UNARY_FALSE(...) ((void)0)\n#define DOCTEST_CHECK_UNARY_FALSE(...) ((void)0)\n#define DOCTEST_REQUIRE_UNARY_FALSE(...) ((void)0)\n\n#endif // DOCTEST_CONFIG_DISABLE\n\n// clang-format off\n// KEPT FOR BACKWARDS COMPATIBILITY - FORWARDING TO THE RIGHT MACROS\n#define DOCTEST_FAST_WARN_EQ             DOCTEST_WARN_EQ\n#define DOCTEST_FAST_CHECK_EQ            DOCTEST_CHECK_EQ\n#define DOCTEST_FAST_REQUIRE_EQ          DOCTEST_REQUIRE_EQ\n#define DOCTEST_FAST_WARN_NE             DOCTEST_WARN_NE\n#define DOCTEST_FAST_CHECK_NE            DOCTEST_CHECK_NE\n#define DOCTEST_FAST_REQUIRE_NE          DOCTEST_REQUIRE_NE\n#define DOCTEST_FAST_WARN_GT             DOCTEST_WARN_GT\n#define DOCTEST_FAST_CHECK_GT            DOCTEST_CHECK_GT\n#define DOCTEST_FAST_REQUIRE_GT          DOCTEST_REQUIRE_GT\n#define DOCTEST_FAST_WARN_LT             DOCTEST_WARN_LT\n#define DOCTEST_FAST_CHECK_LT            DOCTEST_CHECK_LT\n#define DOCTEST_FAST_REQUIRE_LT          DOCTEST_REQUIRE_LT\n#define DOCTEST_FAST_WARN_GE             DOCTEST_WARN_GE\n#define DOCTEST_FAST_CHECK_GE            DOCTEST_CHECK_GE\n#define DOCTEST_FAST_REQUIRE_GE          DOCTEST_REQUIRE_GE\n#define DOCTEST_FAST_WARN_LE             DOCTEST_WARN_LE\n#define DOCTEST_FAST_CHECK_LE            DOCTEST_CHECK_LE\n#define DOCTEST_FAST_REQUIRE_LE          DOCTEST_REQUIRE_LE\n\n#define DOCTEST_FAST_WARN_UNARY          DOCTEST_WARN_UNARY\n#define DOCTEST_FAST_CHECK_UNARY         DOCTEST_CHECK_UNARY\n#define DOCTEST_FAST_REQUIRE_UNARY       DOCTEST_REQUIRE_UNARY\n#define DOCTEST_FAST_WARN_UNARY_FALSE    DOCTEST_WARN_UNARY_FALSE\n#define DOCTEST_FAST_CHECK_UNARY_FALSE   DOCTEST_CHECK_UNARY_FALSE\n#define DOCTEST_FAST_REQUIRE_UNARY_FALSE DOCTEST_REQUIRE_UNARY_FALSE\n\n#define DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE DOCTEST_TEST_CASE_TEMPLATE_INVOKE\n// clang-format on\n\n// BDD style macros\n// clang-format off\n#define DOCTEST_SCENARIO(name) DOCTEST_TEST_CASE(\"  Scenario: \" name)\n#define DOCTEST_SCENARIO_CLASS(name) DOCTEST_TEST_CASE_CLASS(\"  Scenario: \" name)\n#define DOCTEST_SCENARIO_TEMPLATE(name, T, ...)  DOCTEST_TEST_CASE_TEMPLATE(\"  Scenario: \" name, T, __VA_ARGS__)\n#define DOCTEST_SCENARIO_TEMPLATE_DEFINE(name, T, id) DOCTEST_TEST_CASE_TEMPLATE_DEFINE(\"  Scenario: \" name, T, id)\n\n#define DOCTEST_GIVEN(name)     DOCTEST_SUBCASE(\"   Given: \" name)\n#define DOCTEST_WHEN(name)      DOCTEST_SUBCASE(\"    When: \" name)\n#define DOCTEST_AND_WHEN(name)  DOCTEST_SUBCASE(\"And when: \" name)\n#define DOCTEST_THEN(name)      DOCTEST_SUBCASE(\"    Then: \" name)\n#define DOCTEST_AND_THEN(name)  DOCTEST_SUBCASE(\"     And: \" name)\n// clang-format on\n\n// == SHORT VERSIONS OF THE MACROS\n#if !defined(DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES)\n\n#define TEST_CASE DOCTEST_TEST_CASE\n#define TEST_CASE_CLASS DOCTEST_TEST_CASE_CLASS\n#define TEST_CASE_FIXTURE DOCTEST_TEST_CASE_FIXTURE\n#define TYPE_TO_STRING DOCTEST_TYPE_TO_STRING\n#define TEST_CASE_TEMPLATE DOCTEST_TEST_CASE_TEMPLATE\n#define TEST_CASE_TEMPLATE_DEFINE DOCTEST_TEST_CASE_TEMPLATE_DEFINE\n#define TEST_CASE_TEMPLATE_INVOKE DOCTEST_TEST_CASE_TEMPLATE_INVOKE\n#define TEST_CASE_TEMPLATE_APPLY DOCTEST_TEST_CASE_TEMPLATE_APPLY\n#define SUBCASE DOCTEST_SUBCASE\n#define TEST_SUITE DOCTEST_TEST_SUITE\n#define TEST_SUITE_BEGIN DOCTEST_TEST_SUITE_BEGIN\n#define TEST_SUITE_END DOCTEST_TEST_SUITE_END\n#define REGISTER_EXCEPTION_TRANSLATOR DOCTEST_REGISTER_EXCEPTION_TRANSLATOR\n#define REGISTER_REPORTER DOCTEST_REGISTER_REPORTER\n#define REGISTER_LISTENER DOCTEST_REGISTER_LISTENER\n#define INFO DOCTEST_INFO\n#define CAPTURE DOCTEST_CAPTURE\n#define ADD_MESSAGE_AT DOCTEST_ADD_MESSAGE_AT\n#define ADD_FAIL_CHECK_AT DOCTEST_ADD_FAIL_CHECK_AT\n#define ADD_FAIL_AT DOCTEST_ADD_FAIL_AT\n#define MESSAGE DOCTEST_MESSAGE\n#define FAIL_CHECK DOCTEST_FAIL_CHECK\n#define FAIL DOCTEST_FAIL\n#define TO_LVALUE DOCTEST_TO_LVALUE\n\n#define WARN DOCTEST_WARN\n#define WARN_FALSE DOCTEST_WARN_FALSE\n#define WARN_THROWS DOCTEST_WARN_THROWS\n#define WARN_THROWS_AS DOCTEST_WARN_THROWS_AS\n#define WARN_THROWS_WITH DOCTEST_WARN_THROWS_WITH\n#define WARN_THROWS_WITH_AS DOCTEST_WARN_THROWS_WITH_AS\n#define WARN_NOTHROW DOCTEST_WARN_NOTHROW\n#define CHECK DOCTEST_CHECK\n#define CHECK_FALSE DOCTEST_CHECK_FALSE\n#define CHECK_THROWS DOCTEST_CHECK_THROWS\n#define CHECK_THROWS_AS DOCTEST_CHECK_THROWS_AS\n#define CHECK_THROWS_WITH DOCTEST_CHECK_THROWS_WITH\n#define CHECK_THROWS_WITH_AS DOCTEST_CHECK_THROWS_WITH_AS\n#define CHECK_NOTHROW DOCTEST_CHECK_NOTHROW\n#define REQUIRE DOCTEST_REQUIRE\n#define REQUIRE_FALSE DOCTEST_REQUIRE_FALSE\n#define REQUIRE_THROWS DOCTEST_REQUIRE_THROWS\n#define REQUIRE_THROWS_AS DOCTEST_REQUIRE_THROWS_AS\n#define REQUIRE_THROWS_WITH DOCTEST_REQUIRE_THROWS_WITH\n#define REQUIRE_THROWS_WITH_AS DOCTEST_REQUIRE_THROWS_WITH_AS\n#define REQUIRE_NOTHROW DOCTEST_REQUIRE_NOTHROW\n\n#define WARN_MESSAGE DOCTEST_WARN_MESSAGE\n#define WARN_FALSE_MESSAGE DOCTEST_WARN_FALSE_MESSAGE\n#define WARN_THROWS_MESSAGE DOCTEST_WARN_THROWS_MESSAGE\n#define WARN_THROWS_AS_MESSAGE DOCTEST_WARN_THROWS_AS_MESSAGE\n#define WARN_THROWS_WITH_MESSAGE DOCTEST_WARN_THROWS_WITH_MESSAGE\n#define WARN_THROWS_WITH_AS_MESSAGE DOCTEST_WARN_THROWS_WITH_AS_MESSAGE\n#define WARN_NOTHROW_MESSAGE DOCTEST_WARN_NOTHROW_MESSAGE\n#define CHECK_MESSAGE DOCTEST_CHECK_MESSAGE\n#define CHECK_FALSE_MESSAGE DOCTEST_CHECK_FALSE_MESSAGE\n#define CHECK_THROWS_MESSAGE DOCTEST_CHECK_THROWS_MESSAGE\n#define CHECK_THROWS_AS_MESSAGE DOCTEST_CHECK_THROWS_AS_MESSAGE\n#define CHECK_THROWS_WITH_MESSAGE DOCTEST_CHECK_THROWS_WITH_MESSAGE\n#define CHECK_THROWS_WITH_AS_MESSAGE DOCTEST_CHECK_THROWS_WITH_AS_MESSAGE\n#define CHECK_NOTHROW_MESSAGE DOCTEST_CHECK_NOTHROW_MESSAGE\n#define REQUIRE_MESSAGE DOCTEST_REQUIRE_MESSAGE\n#define REQUIRE_FALSE_MESSAGE DOCTEST_REQUIRE_FALSE_MESSAGE\n#define REQUIRE_THROWS_MESSAGE DOCTEST_REQUIRE_THROWS_MESSAGE\n#define REQUIRE_THROWS_AS_MESSAGE DOCTEST_REQUIRE_THROWS_AS_MESSAGE\n#define REQUIRE_THROWS_WITH_MESSAGE DOCTEST_REQUIRE_THROWS_WITH_MESSAGE\n#define REQUIRE_THROWS_WITH_AS_MESSAGE DOCTEST_REQUIRE_THROWS_WITH_AS_MESSAGE\n#define REQUIRE_NOTHROW_MESSAGE DOCTEST_REQUIRE_NOTHROW_MESSAGE\n\n#define SCENARIO DOCTEST_SCENARIO\n#define SCENARIO_CLASS DOCTEST_SCENARIO_CLASS\n#define SCENARIO_TEMPLATE DOCTEST_SCENARIO_TEMPLATE\n#define SCENARIO_TEMPLATE_DEFINE DOCTEST_SCENARIO_TEMPLATE_DEFINE\n#define GIVEN DOCTEST_GIVEN\n#define WHEN DOCTEST_WHEN\n#define AND_WHEN DOCTEST_AND_WHEN\n#define THEN DOCTEST_THEN\n#define AND_THEN DOCTEST_AND_THEN\n\n#define WARN_EQ DOCTEST_WARN_EQ\n#define CHECK_EQ DOCTEST_CHECK_EQ\n#define REQUIRE_EQ DOCTEST_REQUIRE_EQ\n#define WARN_NE DOCTEST_WARN_NE\n#define CHECK_NE DOCTEST_CHECK_NE\n#define REQUIRE_NE DOCTEST_REQUIRE_NE\n#define WARN_GT DOCTEST_WARN_GT\n#define CHECK_GT DOCTEST_CHECK_GT\n#define REQUIRE_GT DOCTEST_REQUIRE_GT\n#define WARN_LT DOCTEST_WARN_LT\n#define CHECK_LT DOCTEST_CHECK_LT\n#define REQUIRE_LT DOCTEST_REQUIRE_LT\n#define WARN_GE DOCTEST_WARN_GE\n#define CHECK_GE DOCTEST_CHECK_GE\n#define REQUIRE_GE DOCTEST_REQUIRE_GE\n#define WARN_LE DOCTEST_WARN_LE\n#define CHECK_LE DOCTEST_CHECK_LE\n#define REQUIRE_LE DOCTEST_REQUIRE_LE\n#define WARN_UNARY DOCTEST_WARN_UNARY\n#define CHECK_UNARY DOCTEST_CHECK_UNARY\n#define REQUIRE_UNARY DOCTEST_REQUIRE_UNARY\n#define WARN_UNARY_FALSE DOCTEST_WARN_UNARY_FALSE\n#define CHECK_UNARY_FALSE DOCTEST_CHECK_UNARY_FALSE\n#define REQUIRE_UNARY_FALSE DOCTEST_REQUIRE_UNARY_FALSE\n\n// KEPT FOR BACKWARDS COMPATIBILITY\n#define FAST_WARN_EQ DOCTEST_FAST_WARN_EQ\n#define FAST_CHECK_EQ DOCTEST_FAST_CHECK_EQ\n#define FAST_REQUIRE_EQ DOCTEST_FAST_REQUIRE_EQ\n#define FAST_WARN_NE DOCTEST_FAST_WARN_NE\n#define FAST_CHECK_NE DOCTEST_FAST_CHECK_NE\n#define FAST_REQUIRE_NE DOCTEST_FAST_REQUIRE_NE\n#define FAST_WARN_GT DOCTEST_FAST_WARN_GT\n#define FAST_CHECK_GT DOCTEST_FAST_CHECK_GT\n#define FAST_REQUIRE_GT DOCTEST_FAST_REQUIRE_GT\n#define FAST_WARN_LT DOCTEST_FAST_WARN_LT\n#define FAST_CHECK_LT DOCTEST_FAST_CHECK_LT\n#define FAST_REQUIRE_LT DOCTEST_FAST_REQUIRE_LT\n#define FAST_WARN_GE DOCTEST_FAST_WARN_GE\n#define FAST_CHECK_GE DOCTEST_FAST_CHECK_GE\n#define FAST_REQUIRE_GE DOCTEST_FAST_REQUIRE_GE\n#define FAST_WARN_LE DOCTEST_FAST_WARN_LE\n#define FAST_CHECK_LE DOCTEST_FAST_CHECK_LE\n#define FAST_REQUIRE_LE DOCTEST_FAST_REQUIRE_LE\n\n#define FAST_WARN_UNARY DOCTEST_FAST_WARN_UNARY\n#define FAST_CHECK_UNARY DOCTEST_FAST_CHECK_UNARY\n#define FAST_REQUIRE_UNARY DOCTEST_FAST_REQUIRE_UNARY\n#define FAST_WARN_UNARY_FALSE DOCTEST_FAST_WARN_UNARY_FALSE\n#define FAST_CHECK_UNARY_FALSE DOCTEST_FAST_CHECK_UNARY_FALSE\n#define FAST_REQUIRE_UNARY_FALSE DOCTEST_FAST_REQUIRE_UNARY_FALSE\n\n#define TEST_CASE_TEMPLATE_INSTANTIATE DOCTEST_TEST_CASE_TEMPLATE_INSTANTIATE\n\n#endif // DOCTEST_CONFIG_NO_SHORT_MACRO_NAMES\n\n#if !defined(DOCTEST_CONFIG_DISABLE)\n\n// this is here to clear the 'current test suite' for the current translation unit - at the top\nDOCTEST_TEST_SUITE_END();\n\n// add stringification for primitive/fundamental types\nnamespace doctest { namespace detail {\n    DOCTEST_TYPE_TO_STRING_IMPL(bool)\n    DOCTEST_TYPE_TO_STRING_IMPL(float)\n    DOCTEST_TYPE_TO_STRING_IMPL(double)\n    DOCTEST_TYPE_TO_STRING_IMPL(long double)\n    DOCTEST_TYPE_TO_STRING_IMPL(char)\n    DOCTEST_TYPE_TO_STRING_IMPL(signed char)\n    DOCTEST_TYPE_TO_STRING_IMPL(unsigned char)\n#if !DOCTEST_MSVC || defined(_NATIVE_WCHAR_T_DEFINED)\n    DOCTEST_TYPE_TO_STRING_IMPL(wchar_t)\n#endif // not MSVC or wchar_t support enabled\n    DOCTEST_TYPE_TO_STRING_IMPL(short int)\n    DOCTEST_TYPE_TO_STRING_IMPL(unsigned short int)\n    DOCTEST_TYPE_TO_STRING_IMPL(int)\n    DOCTEST_TYPE_TO_STRING_IMPL(unsigned int)\n    DOCTEST_TYPE_TO_STRING_IMPL(long int)\n    DOCTEST_TYPE_TO_STRING_IMPL(unsigned long int)\n    DOCTEST_TYPE_TO_STRING_IMPL(long long int)\n    DOCTEST_TYPE_TO_STRING_IMPL(unsigned long long int)\n}} // namespace doctest::detail\n\n#endif // DOCTEST_CONFIG_DISABLE\n\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_LIBRARY_INCLUDED\n\n#ifndef DOCTEST_SINGLE_HEADER\n#define DOCTEST_SINGLE_HEADER\n#endif // DOCTEST_SINGLE_HEADER\n\n#if defined(DOCTEST_CONFIG_IMPLEMENT) || !defined(DOCTEST_SINGLE_HEADER)\n\n#ifndef DOCTEST_SINGLE_HEADER\n#include \"doctest_fwd.h\"\n#endif // DOCTEST_SINGLE_HEADER\n\nDOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wunused-macros\")\n\n#ifndef DOCTEST_LIBRARY_IMPLEMENTATION\n#define DOCTEST_LIBRARY_IMPLEMENTATION\n\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\n\nDOCTEST_CLANG_SUPPRESS_WARNING_PUSH\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunknown-pragmas\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wpadded\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wweak-vtables\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wglobal-constructors\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wexit-time-destructors\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-prototypes\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wsign-conversion\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wshorten-64-to-32\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-variable-declarations\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wswitch\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wswitch-enum\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wcovered-switch-default\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-noreturn\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunused-local-typedef\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wdisabled-macro-expansion\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-braces\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wmissing-field-initializers\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wc++98-compat\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wc++98-compat-pedantic\")\nDOCTEST_CLANG_SUPPRESS_WARNING(\"-Wunused-member-function\")\n\nDOCTEST_GCC_SUPPRESS_WARNING_PUSH\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunknown-pragmas\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wpragmas\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wconversion\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Weffc++\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wsign-conversion\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wstrict-overflow\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wstrict-aliasing\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-field-initializers\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-braces\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmissing-declarations\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wswitch\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wswitch-enum\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wswitch-default\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunsafe-loop-optimizations\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wold-style-cast\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunused-local-typedefs\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wuseless-cast\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wunused-function\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wmultiple-inheritance\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wnoexcept\")\nDOCTEST_GCC_SUPPRESS_WARNING(\"-Wsuggest-attribute\")\n\nDOCTEST_MSVC_SUPPRESS_WARNING_PUSH\nDOCTEST_MSVC_SUPPRESS_WARNING(4616) // invalid compiler warning\nDOCTEST_MSVC_SUPPRESS_WARNING(4619) // invalid compiler warning\nDOCTEST_MSVC_SUPPRESS_WARNING(4996) // The compiler encountered a deprecated declaration\nDOCTEST_MSVC_SUPPRESS_WARNING(4267) // 'var' : conversion from 'x' to 'y', possible loss of data\nDOCTEST_MSVC_SUPPRESS_WARNING(4706) // assignment within conditional expression\nDOCTEST_MSVC_SUPPRESS_WARNING(4512) // 'class' : assignment operator could not be generated\nDOCTEST_MSVC_SUPPRESS_WARNING(4127) // conditional expression is constant\nDOCTEST_MSVC_SUPPRESS_WARNING(4530) // C++ exception handler used, but unwind semantics not enabled\nDOCTEST_MSVC_SUPPRESS_WARNING(4577) // 'noexcept' used with no exception handling mode specified\nDOCTEST_MSVC_SUPPRESS_WARNING(4774) // format string expected in argument is not a string literal\nDOCTEST_MSVC_SUPPRESS_WARNING(4365) // conversion from 'int' to 'unsigned', signed/unsigned mismatch\nDOCTEST_MSVC_SUPPRESS_WARNING(4820) // padding in structs\nDOCTEST_MSVC_SUPPRESS_WARNING(4640) // construction of local static object is not thread-safe\nDOCTEST_MSVC_SUPPRESS_WARNING(5039) // pointer to potentially throwing function passed to extern C\nDOCTEST_MSVC_SUPPRESS_WARNING(5045) // Spectre mitigation stuff\nDOCTEST_MSVC_SUPPRESS_WARNING(4626) // assignment operator was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(5027) // move assignment operator was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(5026) // move constructor was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(4625) // copy constructor was implicitly defined as deleted\nDOCTEST_MSVC_SUPPRESS_WARNING(4800) // forcing value to bool 'true' or 'false' (performance warning)\n// static analysis\nDOCTEST_MSVC_SUPPRESS_WARNING(26439) // This kind of function may not throw. Declare it 'noexcept'\nDOCTEST_MSVC_SUPPRESS_WARNING(26495) // Always initialize a member variable\nDOCTEST_MSVC_SUPPRESS_WARNING(26451) // Arithmetic overflow ...\nDOCTEST_MSVC_SUPPRESS_WARNING(26444) // Avoid unnamed objects with custom construction and dtor...\n\nDOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_BEGIN\n\n// required includes - will go only in one translation unit!\n#include <ctime>\n#include <cmath>\n#include <climits>\n// borland (Embarcadero) compiler requires math.h and not cmath - https://github.com/onqtam/doctest/pull/37\n#ifdef __BORLANDC__\n#include <math.h>\n#endif // __BORLANDC__\n#include <new>\n#include <cstdio>\n#include <cstdlib>\n#include <cstring>\n#include <limits>\n#include <utility>\n#include <fstream>\n#include <sstream>\n#include <iostream>\n#include <algorithm>\n#include <iomanip>\n#include <vector>\n#include <atomic>\n#include <mutex>\n#include <set>\n#include <map>\n#include <exception>\n#include <stdexcept>\n#ifdef DOCTEST_CONFIG_POSIX_SIGNALS\n#include <csignal>\n#endif // DOCTEST_CONFIG_POSIX_SIGNALS\n#include <cfloat>\n#include <cctype>\n#include <cstdint>\n\n#ifdef DOCTEST_PLATFORM_MAC\n#include <sys/types.h>\n#include <unistd.h>\n#include <sys/sysctl.h>\n#endif // DOCTEST_PLATFORM_MAC\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n\n// defines for a leaner windows.h\n#ifndef WIN32_LEAN_AND_MEAN\n#define WIN32_LEAN_AND_MEAN\n#endif // WIN32_LEAN_AND_MEAN\n#ifndef NOMINMAX\n#define NOMINMAX\n#endif // NOMINMAX\n\n// not sure what AfxWin.h is for - here I do what Catch does\n#ifdef __AFXDLL\n#include <AfxWin.h>\n#else\n#include <Windows.h>\n#endif\n#include <io.h>\n\n#else // DOCTEST_PLATFORM_WINDOWS\n\n#include <sys/time.h>\n#include <unistd.h>\n\n#endif // DOCTEST_PLATFORM_WINDOWS\n\nDOCTEST_MAKE_STD_HEADERS_CLEAN_FROM_WARNINGS_ON_WALL_END\n\n// counts the number of elements in a C array\n#define DOCTEST_COUNTOF(x) (sizeof(x) / sizeof(x[0]))\n\n#ifdef DOCTEST_CONFIG_DISABLE\n#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_disabled\n#else // DOCTEST_CONFIG_DISABLE\n#define DOCTEST_BRANCH_ON_DISABLED(if_disabled, if_not_disabled) if_not_disabled\n#endif // DOCTEST_CONFIG_DISABLE\n\n#ifndef DOCTEST_CONFIG_OPTIONS_PREFIX\n#define DOCTEST_CONFIG_OPTIONS_PREFIX \"dt-\"\n#endif\n\n#ifndef DOCTEST_THREAD_LOCAL\n#define DOCTEST_THREAD_LOCAL thread_local\n#endif\n\n#ifdef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n#define DOCTEST_OPTIONS_PREFIX_DISPLAY DOCTEST_CONFIG_OPTIONS_PREFIX\n#else\n#define DOCTEST_OPTIONS_PREFIX_DISPLAY \"\"\n#endif\n\nnamespace doctest {\n\nbool is_running_in_test = false;\n\nnamespace {\n    using namespace detail;\n    // case insensitive strcmp\n    int stricmp(const char* a, const char* b) {\n        for(;; a++, b++) {\n            const int d = tolower(*a) - tolower(*b);\n            if(d != 0 || !*a)\n                return d;\n        }\n    }\n\n    template <typename T>\n    String fpToString(T value, int precision) {\n        std::ostringstream oss;\n        oss << std::setprecision(precision) << std::fixed << value;\n        std::string d = oss.str();\n        size_t      i = d.find_last_not_of('0');\n        if(i != std::string::npos && i != d.size() - 1) {\n            if(d[i] == '.')\n                i++;\n            d = d.substr(0, i + 1);\n        }\n        return d.c_str();\n    }\n\n    struct Endianness\n    {\n        enum Arch\n        {\n            Big,\n            Little\n        };\n\n        static Arch which() {\n            int x = 1;\n            // casting any data pointer to char* is allowed\n            auto ptr = reinterpret_cast<char*>(&x);\n            if(*ptr)\n                return Little;\n            return Big;\n        }\n    };\n} // namespace\n\nnamespace detail {\n    void my_memcpy(void* dest, const void* src, unsigned num) { memcpy(dest, src, num); }\n\n    String rawMemoryToString(const void* object, unsigned size) {\n        // Reverse order for little endian architectures\n        int i = 0, end = static_cast<int>(size), inc = 1;\n        if(Endianness::which() == Endianness::Little) {\n            i   = end - 1;\n            end = inc = -1;\n        }\n\n        unsigned const char* bytes = static_cast<unsigned const char*>(object);\n        std::ostringstream   oss;\n        oss << \"0x\" << std::setfill('0') << std::hex;\n        for(; i != end; i += inc)\n            oss << std::setw(2) << static_cast<unsigned>(bytes[i]);\n        return oss.str().c_str();\n    }\n\n    DOCTEST_THREAD_LOCAL std::ostringstream g_oss; // NOLINT(cert-err58-cpp)\n\n    std::ostream* getTlsOss() {\n        g_oss.clear(); // there shouldn't be anything worth clearing in the flags\n        g_oss.str(\"\"); // the slow way of resetting a string stream\n        //g_oss.seekp(0); // optimal reset - as seen here: https://stackoverflow.com/a/624291/3162383\n        return &g_oss;\n    }\n\n    String getTlsOssResult() {\n        //g_oss << std::ends; // needed - as shown here: https://stackoverflow.com/a/624291/3162383\n        return g_oss.str().c_str();\n    }\n\n#ifndef DOCTEST_CONFIG_DISABLE\n\n    typedef uint64_t UInt64;\n\n#ifdef DOCTEST_CONFIG_GETCURRENTTICKS\n    UInt64 getCurrentTicks() { return DOCTEST_CONFIG_GETCURRENTTICKS(); }\n#elif defined(DOCTEST_PLATFORM_WINDOWS)\n    UInt64 getCurrentTicks() {\n        static UInt64 hz = 0, hzo = 0;\n        if(!hz) {\n            QueryPerformanceFrequency(reinterpret_cast<LARGE_INTEGER*>(&hz));\n            QueryPerformanceCounter(reinterpret_cast<LARGE_INTEGER*>(&hzo));\n        }\n        UInt64 t;\n        QueryPerformanceCounter(reinterpret_cast<LARGE_INTEGER*>(&t));\n        return ((t - hzo) * 1000000) / hz;\n    }\n#else  // DOCTEST_PLATFORM_WINDOWS\n    UInt64 getCurrentTicks() {\n        timeval t;\n        gettimeofday(&t, nullptr);\n        return static_cast<UInt64>(t.tv_sec) * 1000000 + static_cast<UInt64>(t.tv_usec);\n    }\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n    struct Timer\n    {\n        void         start() { m_ticks = getCurrentTicks(); }\n        unsigned int getElapsedMicroseconds() const {\n            return static_cast<unsigned int>(getCurrentTicks() - m_ticks);\n        }\n        //unsigned int getElapsedMilliseconds() const {\n        //    return static_cast<unsigned int>(getElapsedMicroseconds() / 1000);\n        //}\n        double getElapsedSeconds() const { return getElapsedMicroseconds() / 1000000.0; }\n\n    private:\n        UInt64 m_ticks = 0;\n    };\n\n    // this holds both parameters from the command line and runtime data for tests\n    struct ContextState : ContextOptions, TestRunStats, CurrentTestCaseStats\n    {\n        std::atomic<int> numAssertsCurrentTest_atomic;\n        std::atomic<int> numAssertsFailedCurrentTest_atomic;\n\n        std::vector<std::vector<String>> filters = decltype(filters)(9); // 9 different filters\n\n        std::vector<IReporter*> reporters_currently_used;\n\n        const TestCase* currentTest = nullptr;\n\n        assert_handler ah = nullptr;\n\n        Timer timer;\n\n        std::vector<String> stringifiedContexts; // logging from INFO() due to an exception\n\n        // stuff for subcases\n        std::vector<SubcaseSignature>     subcasesStack;\n        std::set<decltype(subcasesStack)> subcasesPassed;\n        int                               subcasesCurrentMaxLevel;\n        bool                              should_reenter;\n        std::atomic<bool>                 shouldLogCurrentException;\n\n        void resetRunData() {\n            numTestCases                = 0;\n            numTestCasesPassingFilters  = 0;\n            numTestSuitesPassingFilters = 0;\n            numTestCasesFailed          = 0;\n            numAsserts                  = 0;\n            numAssertsFailed            = 0;\n            numAssertsCurrentTest       = 0;\n            numAssertsFailedCurrentTest = 0;\n        }\n\n        void finalizeTestCaseData() {\n            seconds = timer.getElapsedSeconds();\n\n            // update the non-atomic counters\n            numAsserts += numAssertsCurrentTest_atomic;\n            numAssertsFailed += numAssertsFailedCurrentTest_atomic;\n            numAssertsCurrentTest       = numAssertsCurrentTest_atomic;\n            numAssertsFailedCurrentTest = numAssertsFailedCurrentTest_atomic;\n\n            if(numAssertsFailedCurrentTest)\n                failure_flags |= TestCaseFailureReason::AssertFailure;\n\n            if(Approx(currentTest->m_timeout).epsilon(DBL_EPSILON) != 0 &&\n               Approx(seconds).epsilon(DBL_EPSILON) > currentTest->m_timeout)\n                failure_flags |= TestCaseFailureReason::Timeout;\n\n            if(currentTest->m_should_fail) {\n                if(failure_flags) {\n                    failure_flags |= TestCaseFailureReason::ShouldHaveFailedAndDid;\n                } else {\n                    failure_flags |= TestCaseFailureReason::ShouldHaveFailedButDidnt;\n                }\n            } else if(failure_flags && currentTest->m_may_fail) {\n                failure_flags |= TestCaseFailureReason::CouldHaveFailedAndDid;\n            } else if(currentTest->m_expected_failures > 0) {\n                if(numAssertsFailedCurrentTest == currentTest->m_expected_failures) {\n                    failure_flags |= TestCaseFailureReason::FailedExactlyNumTimes;\n                } else {\n                    failure_flags |= TestCaseFailureReason::DidntFailExactlyNumTimes;\n                }\n            }\n\n            bool ok_to_fail = (TestCaseFailureReason::ShouldHaveFailedAndDid & failure_flags) ||\n                              (TestCaseFailureReason::CouldHaveFailedAndDid & failure_flags) ||\n                              (TestCaseFailureReason::FailedExactlyNumTimes & failure_flags);\n\n            // if any subcase has failed - the whole test case has failed\n            if(failure_flags && !ok_to_fail)\n                numTestCasesFailed++;\n        }\n    };\n\n    ContextState* g_cs = nullptr;\n\n    // used to avoid locks for the debug output\n    // TODO: figure out if this is indeed necessary/correct - seems like either there still\n    // could be a race or that there wouldn't be a race even if using the context directly\n    DOCTEST_THREAD_LOCAL bool g_no_colors;\n\n#endif // DOCTEST_CONFIG_DISABLE\n} // namespace detail\n\nvoid String::setOnHeap() { *reinterpret_cast<unsigned char*>(&buf[last]) = 128; }\nvoid String::setLast(unsigned in) { buf[last] = char(in); }\n\nvoid String::copy(const String& other) {\n    if(other.isOnStack()) {\n        memcpy(buf, other.buf, len);\n    } else {\n        setOnHeap();\n        data.size     = other.data.size;\n        data.capacity = data.size + 1;\n        data.ptr      = new char[data.capacity];\n        memcpy(data.ptr, other.data.ptr, data.size + 1);\n    }\n}\n\nString::String() {\n    buf[0] = '\\0';\n    setLast();\n}\n\nString::~String() {\n    if(!isOnStack())\n        delete[] data.ptr;\n}\n\nString::String(const char* in)\n        : String(in, strlen(in)) {}\n\nString::String(const char* in, unsigned in_size) {\n    if(in_size <= last) {\n        memcpy(buf, in, in_size + 1);\n        setLast(last - in_size);\n    } else {\n        setOnHeap();\n        data.size     = in_size;\n        data.capacity = data.size + 1;\n        data.ptr      = new char[data.capacity];\n        memcpy(data.ptr, in, in_size + 1);\n    }\n}\n\nString::String(const String& other) { copy(other); }\n\nString& String::operator=(const String& other) {\n    if(this != &other) {\n        if(!isOnStack())\n            delete[] data.ptr;\n\n        copy(other);\n    }\n\n    return *this;\n}\n\nString& String::operator+=(const String& other) {\n    const unsigned my_old_size = size();\n    const unsigned other_size  = other.size();\n    const unsigned total_size  = my_old_size + other_size;\n    if(isOnStack()) {\n        if(total_size < len) {\n            // append to the current stack space\n            memcpy(buf + my_old_size, other.c_str(), other_size + 1);\n            setLast(last - total_size);\n        } else {\n            // alloc new chunk\n            char* temp = new char[total_size + 1];\n            // copy current data to new location before writing in the union\n            memcpy(temp, buf, my_old_size); // skip the +1 ('\\0') for speed\n            // update data in union\n            setOnHeap();\n            data.size     = total_size;\n            data.capacity = data.size + 1;\n            data.ptr      = temp;\n            // transfer the rest of the data\n            memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1);\n        }\n    } else {\n        if(data.capacity > total_size) {\n            // append to the current heap block\n            data.size = total_size;\n            memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1);\n        } else {\n            // resize\n            data.capacity *= 2;\n            if(data.capacity <= total_size)\n                data.capacity = total_size + 1;\n            // alloc new chunk\n            char* temp = new char[data.capacity];\n            // copy current data to new location before releasing it\n            memcpy(temp, data.ptr, my_old_size); // skip the +1 ('\\0') for speed\n            // release old chunk\n            delete[] data.ptr;\n            // update the rest of the union members\n            data.size = total_size;\n            data.ptr  = temp;\n            // transfer the rest of the data\n            memcpy(data.ptr + my_old_size, other.c_str(), other_size + 1);\n        }\n    }\n\n    return *this;\n}\n\nString String::operator+(const String& other) const { return String(*this) += other; }\n\nString::String(String&& other) {\n    memcpy(buf, other.buf, len);\n    other.buf[0] = '\\0';\n    other.setLast();\n}\n\nString& String::operator=(String&& other) {\n    if(this != &other) {\n        if(!isOnStack())\n            delete[] data.ptr;\n        memcpy(buf, other.buf, len);\n        other.buf[0] = '\\0';\n        other.setLast();\n    }\n    return *this;\n}\n\nchar String::operator[](unsigned i) const {\n    return const_cast<String*>(this)->operator[](i); // NOLINT\n}\n\nchar& String::operator[](unsigned i) {\n    if(isOnStack())\n        return reinterpret_cast<char*>(buf)[i];\n    return data.ptr[i];\n}\n\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wmaybe-uninitialized\")\nunsigned String::size() const {\n    if(isOnStack())\n        return last - (unsigned(buf[last]) & 31); // using \"last\" would work only if \"len\" is 32\n    return data.size;\n}\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\nunsigned String::capacity() const {\n    if(isOnStack())\n        return len;\n    return data.capacity;\n}\n\nint String::compare(const char* other, bool no_case) const {\n    if(no_case)\n        return stricmp(c_str(), other);\n    return std::strcmp(c_str(), other);\n}\n\nint String::compare(const String& other, bool no_case) const {\n    return compare(other.c_str(), no_case);\n}\n\n// clang-format off\nbool operator==(const String& lhs, const String& rhs) { return lhs.compare(rhs) == 0; }\nbool operator!=(const String& lhs, const String& rhs) { return lhs.compare(rhs) != 0; }\nbool operator< (const String& lhs, const String& rhs) { return lhs.compare(rhs) < 0; }\nbool operator> (const String& lhs, const String& rhs) { return lhs.compare(rhs) > 0; }\nbool operator<=(const String& lhs, const String& rhs) { return (lhs != rhs) ? lhs.compare(rhs) < 0 : true; }\nbool operator>=(const String& lhs, const String& rhs) { return (lhs != rhs) ? lhs.compare(rhs) > 0 : true; }\n// clang-format on\n\nstd::ostream& operator<<(std::ostream& s, const String& in) { return s << in.c_str(); }\n\nnamespace {\n    void color_to_stream(std::ostream&, Color::Enum) DOCTEST_BRANCH_ON_DISABLED({}, ;)\n} // namespace\n\nnamespace Color {\n    std::ostream& operator<<(std::ostream& s, Color::Enum code) {\n        color_to_stream(s, code);\n        return s;\n    }\n} // namespace Color\n\n// clang-format off\nconst char* assertString(assertType::Enum at) {\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4062) // enum 'x' in switch of enum 'y' is not handled\n    switch(at) {  //!OCLINT missing default in switch statements\n        case assertType::DT_WARN                    : return \"WARN\";\n        case assertType::DT_CHECK                   : return \"CHECK\";\n        case assertType::DT_REQUIRE                 : return \"REQUIRE\";\n\n        case assertType::DT_WARN_FALSE              : return \"WARN_FALSE\";\n        case assertType::DT_CHECK_FALSE             : return \"CHECK_FALSE\";\n        case assertType::DT_REQUIRE_FALSE           : return \"REQUIRE_FALSE\";\n\n        case assertType::DT_WARN_THROWS             : return \"WARN_THROWS\";\n        case assertType::DT_CHECK_THROWS            : return \"CHECK_THROWS\";\n        case assertType::DT_REQUIRE_THROWS          : return \"REQUIRE_THROWS\";\n\n        case assertType::DT_WARN_THROWS_AS          : return \"WARN_THROWS_AS\";\n        case assertType::DT_CHECK_THROWS_AS         : return \"CHECK_THROWS_AS\";\n        case assertType::DT_REQUIRE_THROWS_AS       : return \"REQUIRE_THROWS_AS\";\n\n        case assertType::DT_WARN_THROWS_WITH        : return \"WARN_THROWS_WITH\";\n        case assertType::DT_CHECK_THROWS_WITH       : return \"CHECK_THROWS_WITH\";\n        case assertType::DT_REQUIRE_THROWS_WITH     : return \"REQUIRE_THROWS_WITH\";\n\n        case assertType::DT_WARN_THROWS_WITH_AS     : return \"WARN_THROWS_WITH_AS\";\n        case assertType::DT_CHECK_THROWS_WITH_AS    : return \"CHECK_THROWS_WITH_AS\";\n        case assertType::DT_REQUIRE_THROWS_WITH_AS  : return \"REQUIRE_THROWS_WITH_AS\";\n\n        case assertType::DT_WARN_NOTHROW            : return \"WARN_NOTHROW\";\n        case assertType::DT_CHECK_NOTHROW           : return \"CHECK_NOTHROW\";\n        case assertType::DT_REQUIRE_NOTHROW         : return \"REQUIRE_NOTHROW\";\n\n        case assertType::DT_WARN_EQ                 : return \"WARN_EQ\";\n        case assertType::DT_CHECK_EQ                : return \"CHECK_EQ\";\n        case assertType::DT_REQUIRE_EQ              : return \"REQUIRE_EQ\";\n        case assertType::DT_WARN_NE                 : return \"WARN_NE\";\n        case assertType::DT_CHECK_NE                : return \"CHECK_NE\";\n        case assertType::DT_REQUIRE_NE              : return \"REQUIRE_NE\";\n        case assertType::DT_WARN_GT                 : return \"WARN_GT\";\n        case assertType::DT_CHECK_GT                : return \"CHECK_GT\";\n        case assertType::DT_REQUIRE_GT              : return \"REQUIRE_GT\";\n        case assertType::DT_WARN_LT                 : return \"WARN_LT\";\n        case assertType::DT_CHECK_LT                : return \"CHECK_LT\";\n        case assertType::DT_REQUIRE_LT              : return \"REQUIRE_LT\";\n        case assertType::DT_WARN_GE                 : return \"WARN_GE\";\n        case assertType::DT_CHECK_GE                : return \"CHECK_GE\";\n        case assertType::DT_REQUIRE_GE              : return \"REQUIRE_GE\";\n        case assertType::DT_WARN_LE                 : return \"WARN_LE\";\n        case assertType::DT_CHECK_LE                : return \"CHECK_LE\";\n        case assertType::DT_REQUIRE_LE              : return \"REQUIRE_LE\";\n\n        case assertType::DT_WARN_UNARY              : return \"WARN_UNARY\";\n        case assertType::DT_CHECK_UNARY             : return \"CHECK_UNARY\";\n        case assertType::DT_REQUIRE_UNARY           : return \"REQUIRE_UNARY\";\n        case assertType::DT_WARN_UNARY_FALSE        : return \"WARN_UNARY_FALSE\";\n        case assertType::DT_CHECK_UNARY_FALSE       : return \"CHECK_UNARY_FALSE\";\n        case assertType::DT_REQUIRE_UNARY_FALSE     : return \"REQUIRE_UNARY_FALSE\";\n    }\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n    return \"\";\n}\n// clang-format on\n\nconst char* failureString(assertType::Enum at) {\n    if(at & assertType::is_warn) //!OCLINT bitwise operator in conditional\n        return \"WARNING\";\n    if(at & assertType::is_check) //!OCLINT bitwise operator in conditional\n        return \"ERROR\";\n    if(at & assertType::is_require) //!OCLINT bitwise operator in conditional\n        return \"FATAL ERROR\";\n    return \"\";\n}\n\nDOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wnull-dereference\")\nDOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wnull-dereference\")\n// depending on the current options this will remove the path of filenames\nconst char* skipPathFromFilename(const char* file) {\n    if(getContextOptions()->no_path_in_filenames) {\n        auto back    = std::strrchr(file, '\\\\');\n        auto forward = std::strrchr(file, '/');\n        if(back || forward) {\n            if(back > forward)\n                forward = back;\n            return forward + 1;\n        }\n    }\n    return file;\n}\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\nbool SubcaseSignature::operator<(const SubcaseSignature& other) const {\n    if(m_line != other.m_line)\n        return m_line < other.m_line;\n    if(std::strcmp(m_file, other.m_file) != 0)\n        return std::strcmp(m_file, other.m_file) < 0;\n    return std::strcmp(m_name, other.m_name) < 0;\n}\n\nIContextScope::IContextScope()  = default;\nIContextScope::~IContextScope() = default;\n\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\nString toString(char* in) { return toString(static_cast<const char*>(in)); }\nString toString(const char* in) { return String(\"\\\"\") + (in ? in : \"{null string}\") + \"\\\"\"; }\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\nString toString(bool in) { return in ? \"true\" : \"false\"; }\nString toString(float in) { return fpToString(in, 5) + \"f\"; }\nString toString(double in) { return fpToString(in, 10); }\nString toString(double long in) { return fpToString(in, 15); }\n\n#define DOCTEST_TO_STRING_OVERLOAD(type, fmt)                                                      \\\n    String toString(type in) {                                                                     \\\n        char buf[64];                                                                              \\\n        std::sprintf(buf, fmt, in);                                                                \\\n        return buf;                                                                                \\\n    }\n\nDOCTEST_TO_STRING_OVERLOAD(char, \"%d\")\nDOCTEST_TO_STRING_OVERLOAD(char signed, \"%d\")\nDOCTEST_TO_STRING_OVERLOAD(char unsigned, \"%u\")\nDOCTEST_TO_STRING_OVERLOAD(int short, \"%d\")\nDOCTEST_TO_STRING_OVERLOAD(int short unsigned, \"%u\")\nDOCTEST_TO_STRING_OVERLOAD(int, \"%d\")\nDOCTEST_TO_STRING_OVERLOAD(unsigned, \"%u\")\nDOCTEST_TO_STRING_OVERLOAD(int long, \"%ld\")\nDOCTEST_TO_STRING_OVERLOAD(int long unsigned, \"%lu\")\nDOCTEST_TO_STRING_OVERLOAD(int long long, \"%lld\")\nDOCTEST_TO_STRING_OVERLOAD(int long long unsigned, \"%llu\")\n\nString toString(std::nullptr_t) { return \"NULL\"; }\n\n#if DOCTEST_MSVC >= DOCTEST_COMPILER(19, 20, 0)\n// see this issue on why this is needed: https://github.com/onqtam/doctest/issues/183\nString toString(const std::string& in) { return in.c_str(); }\n#endif // VS 2019\n\nApprox::Approx(double value)\n        : m_epsilon(static_cast<double>(std::numeric_limits<float>::epsilon()) * 100)\n        , m_scale(1.0)\n        , m_value(value) {}\n\nApprox Approx::operator()(double value) const {\n    Approx approx(value);\n    approx.epsilon(m_epsilon);\n    approx.scale(m_scale);\n    return approx;\n}\n\nApprox& Approx::epsilon(double newEpsilon) {\n    m_epsilon = newEpsilon;\n    return *this;\n}\nApprox& Approx::scale(double newScale) {\n    m_scale = newScale;\n    return *this;\n}\n\nbool operator==(double lhs, const Approx& rhs) {\n    // Thanks to Richard Harris for his help refining this formula\n    return std::fabs(lhs - rhs.m_value) <\n           rhs.m_epsilon * (rhs.m_scale + std::max<double>(std::fabs(lhs), std::fabs(rhs.m_value)));\n}\nbool operator==(const Approx& lhs, double rhs) { return operator==(rhs, lhs); }\nbool operator!=(double lhs, const Approx& rhs) { return !operator==(lhs, rhs); }\nbool operator!=(const Approx& lhs, double rhs) { return !operator==(rhs, lhs); }\nbool operator<=(double lhs, const Approx& rhs) { return lhs < rhs.m_value || lhs == rhs; }\nbool operator<=(const Approx& lhs, double rhs) { return lhs.m_value < rhs || lhs == rhs; }\nbool operator>=(double lhs, const Approx& rhs) { return lhs > rhs.m_value || lhs == rhs; }\nbool operator>=(const Approx& lhs, double rhs) { return lhs.m_value > rhs || lhs == rhs; }\nbool operator<(double lhs, const Approx& rhs) { return lhs < rhs.m_value && lhs != rhs; }\nbool operator<(const Approx& lhs, double rhs) { return lhs.m_value < rhs && lhs != rhs; }\nbool operator>(double lhs, const Approx& rhs) { return lhs > rhs.m_value && lhs != rhs; }\nbool operator>(const Approx& lhs, double rhs) { return lhs.m_value > rhs && lhs != rhs; }\n\nString toString(const Approx& in) {\n    return String(\"Approx( \") + doctest::toString(in.m_value) + \" )\";\n}\nconst ContextOptions* getContextOptions() { return DOCTEST_BRANCH_ON_DISABLED(nullptr, g_cs); }\n\n} // namespace doctest\n\n#ifdef DOCTEST_CONFIG_DISABLE\nnamespace doctest {\nContext::Context(int, const char* const*) {}\nContext::~Context() = default;\nvoid Context::applyCommandLine(int, const char* const*) {}\nvoid Context::addFilter(const char*, const char*) {}\nvoid Context::clearFilters() {}\nvoid Context::setOption(const char*, int) {}\nvoid Context::setOption(const char*, const char*) {}\nbool Context::shouldExit() { return false; }\nvoid Context::setAsDefaultForAssertsOutOfTestCases() {}\nvoid Context::setAssertHandler(detail::assert_handler) {}\nint  Context::run() { return 0; }\n\nIReporter::~IReporter() = default;\n\nint                         IReporter::get_num_active_contexts() { return 0; }\nconst IContextScope* const* IReporter::get_active_contexts() { return nullptr; }\nint                         IReporter::get_num_stringified_contexts() { return 0; }\nconst String*               IReporter::get_stringified_contexts() { return nullptr; }\n\nint registerReporter(const char*, int, IReporter*) { return 0; }\n\n} // namespace doctest\n#else // DOCTEST_CONFIG_DISABLE\n\n#if !defined(DOCTEST_CONFIG_COLORS_NONE)\n#if !defined(DOCTEST_CONFIG_COLORS_WINDOWS) && !defined(DOCTEST_CONFIG_COLORS_ANSI)\n#ifdef DOCTEST_PLATFORM_WINDOWS\n#define DOCTEST_CONFIG_COLORS_WINDOWS\n#else // linux\n#define DOCTEST_CONFIG_COLORS_ANSI\n#endif // platform\n#endif // DOCTEST_CONFIG_COLORS_WINDOWS && DOCTEST_CONFIG_COLORS_ANSI\n#endif // DOCTEST_CONFIG_COLORS_NONE\n\nnamespace doctest_detail_test_suite_ns {\n// holds the current test suite\ndoctest::detail::TestSuite& getCurrentTestSuite() {\n    static doctest::detail::TestSuite data;\n    return data;\n}\n} // namespace doctest_detail_test_suite_ns\n\nnamespace doctest {\nnamespace {\n    // the int (priority) is part of the key for automatic sorting - sadly one can register a\n    // reporter with a duplicate name and a different priority but hopefully that won't happen often :|\n    typedef std::map<std::pair<int, String>, reporterCreatorFunc> reporterMap;\n\n    reporterMap& getReporters() {\n        static reporterMap data;\n        return data;\n    }\n    reporterMap& getListeners() {\n        static reporterMap data;\n        return data;\n    }\n} // namespace\nnamespace detail {\n#define DOCTEST_ITERATE_THROUGH_REPORTERS(function, ...)                                           \\\n    for(auto& curr_rep : g_cs->reporters_currently_used)                                           \\\n    curr_rep->function(__VA_ARGS__)\n\n    bool checkIfShouldThrow(assertType::Enum at) {\n        if(at & assertType::is_require) //!OCLINT bitwise operator in conditional\n            return true;\n\n        if((at & assertType::is_check) //!OCLINT bitwise operator in conditional\n           && getContextOptions()->abort_after > 0 &&\n           (g_cs->numAssertsFailed + g_cs->numAssertsFailedCurrentTest_atomic) >=\n                   getContextOptions()->abort_after)\n            return true;\n\n        return false;\n    }\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n    [[noreturn]] void throwException() {\n        g_cs->shouldLogCurrentException = false;\n        throw TestFailureException();\n    } // NOLINT(cert-err60-cpp)\n#else // DOCTEST_CONFIG_NO_EXCEPTIONS\n    void throwException() {}\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n} // namespace detail\n\nnamespace {\n    using namespace detail;\n    // matching of a string against a wildcard mask (case sensitivity configurable) taken from\n    // https://www.codeproject.com/Articles/1088/Wildcard-string-compare-globbing\n    int wildcmp(const char* str, const char* wild, bool caseSensitive) {\n        const char* cp = nullptr;\n        const char* mp = nullptr;\n\n        while((*str) && (*wild != '*')) {\n            if((caseSensitive ? (*wild != *str) : (tolower(*wild) != tolower(*str))) &&\n               (*wild != '?')) {\n                return 0;\n            }\n            wild++;\n            str++;\n        }\n\n        while(*str) {\n            if(*wild == '*') {\n                if(!*++wild) {\n                    return 1;\n                }\n                mp = wild;\n                cp = str + 1;\n            } else if((caseSensitive ? (*wild == *str) : (tolower(*wild) == tolower(*str))) ||\n                      (*wild == '?')) {\n                wild++;\n                str++;\n            } else {\n                wild = mp;   //!OCLINT parameter reassignment\n                str  = cp++; //!OCLINT parameter reassignment\n            }\n        }\n\n        while(*wild == '*') {\n            wild++;\n        }\n        return !*wild;\n    }\n\n    //// C string hash function (djb2) - taken from http://www.cse.yorku.ca/~oz/hash.html\n    //unsigned hashStr(unsigned const char* str) {\n    //    unsigned long hash = 5381;\n    //    char          c;\n    //    while((c = *str++))\n    //        hash = ((hash << 5) + hash) + c; // hash * 33 + c\n    //    return hash;\n    //}\n\n    // checks if the name matches any of the filters (and can be configured what to do when empty)\n    bool matchesAny(const char* name, const std::vector<String>& filters, bool matchEmpty,\n                    bool caseSensitive) {\n        if(filters.empty() && matchEmpty)\n            return true;\n        for(auto& curr : filters)\n            if(wildcmp(name, curr.c_str(), caseSensitive))\n                return true;\n        return false;\n    }\n} // namespace\nnamespace detail {\n\n    Subcase::Subcase(const char* name, const char* file, int line)\n            : m_signature({name, file, line}) {\n        ContextState* s = g_cs;\n\n        // check subcase filters\n        if(s->subcasesStack.size() < size_t(s->subcase_filter_levels)) {\n            if(!matchesAny(m_signature.m_name, s->filters[6], true, s->case_sensitive))\n                return;\n            if(matchesAny(m_signature.m_name, s->filters[7], false, s->case_sensitive))\n                return;\n        }\n        \n        // if a Subcase on the same level has already been entered\n        if(s->subcasesStack.size() < size_t(s->subcasesCurrentMaxLevel)) {\n            s->should_reenter = true;\n            return;\n        }\n\n        // push the current signature to the stack so we can check if the\n        // current stack + the current new subcase have been traversed\n        s->subcasesStack.push_back(m_signature);\n        if(s->subcasesPassed.count(s->subcasesStack) != 0) {\n            // pop - revert to previous stack since we've already passed this\n            s->subcasesStack.pop_back();\n            return;\n        }\n\n        s->subcasesCurrentMaxLevel = s->subcasesStack.size();\n        m_entered = true;\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature);\n    }\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17\n    DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    Subcase::~Subcase() {\n        if(m_entered) {\n            // only mark the subcase stack as passed if no subcases have been skipped\n            if(g_cs->should_reenter == false)\n                g_cs->subcasesPassed.insert(g_cs->subcasesStack);\n            g_cs->subcasesStack.pop_back();\n\n            if(std::uncaught_exception() && g_cs->shouldLogCurrentException) {\n                DOCTEST_ITERATE_THROUGH_REPORTERS(\n                        test_case_exception, {\"exception thrown in subcase - will translate later \"\n                                              \"when the whole test case has been exited (cannot \"\n                                              \"translate while there is an active exception)\",\n                                              false});\n                g_cs->shouldLogCurrentException = false;\n            }\n            DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY);\n        }\n    }\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n    Subcase::operator bool() const { return m_entered; }\n\n    Result::Result(bool passed, const String& decomposition)\n            : m_passed(passed)\n            , m_decomp(decomposition) {}\n\n    ExpressionDecomposer::ExpressionDecomposer(assertType::Enum at)\n            : m_at(at) {}\n\n    TestSuite& TestSuite::operator*(const char* in) {\n        m_test_suite = in;\n        // clear state\n        m_description       = nullptr;\n        m_skip              = false;\n        m_may_fail          = false;\n        m_should_fail       = false;\n        m_expected_failures = 0;\n        m_timeout           = 0;\n        return *this;\n    }\n\n    TestCase::TestCase(funcType test, const char* file, unsigned line, const TestSuite& test_suite,\n                       const char* type, int template_id) {\n        m_file              = file;\n        m_line              = line;\n        m_name              = nullptr; // will be later overridden in operator*\n        m_test_suite        = test_suite.m_test_suite;\n        m_description       = test_suite.m_description;\n        m_skip              = test_suite.m_skip;\n        m_may_fail          = test_suite.m_may_fail;\n        m_should_fail       = test_suite.m_should_fail;\n        m_expected_failures = test_suite.m_expected_failures;\n        m_timeout           = test_suite.m_timeout;\n\n        m_test        = test;\n        m_type        = type;\n        m_template_id = template_id;\n    }\n\n    TestCase::TestCase(const TestCase& other)\n            : TestCaseData() {\n        *this = other;\n    }\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(26434) // hides a non-virtual function\n    DOCTEST_MSVC_SUPPRESS_WARNING(26437)           // Do not slice\n    TestCase& TestCase::operator=(const TestCase& other) {\n        static_cast<TestCaseData&>(*this) = static_cast<const TestCaseData&>(other);\n\n        m_test        = other.m_test;\n        m_type        = other.m_type;\n        m_template_id = other.m_template_id;\n        m_full_name   = other.m_full_name;\n\n        if(m_template_id != -1)\n            m_name = m_full_name.c_str();\n        return *this;\n    }\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n    TestCase& TestCase::operator*(const char* in) {\n        m_name = in;\n        // make a new name with an appended type for templated test case\n        if(m_template_id != -1) {\n            m_full_name = String(m_name) + m_type;\n            // redirect the name to point to the newly constructed full name\n            m_name = m_full_name.c_str();\n        }\n        return *this;\n    }\n\n    bool TestCase::operator<(const TestCase& other) const {\n        if(m_line != other.m_line)\n            return m_line < other.m_line;\n        const int file_cmp = std::strcmp(m_file, other.m_file);\n        if(file_cmp != 0)\n            return file_cmp < 0;\n        return m_template_id < other.m_template_id;\n    }\n} // namespace detail\nnamespace {\n    using namespace detail;\n    // for sorting tests by file/line\n    bool fileOrderComparator(const TestCase* lhs, const TestCase* rhs) {\n#if DOCTEST_MSVC\n        // this is needed because MSVC gives different case for drive letters\n        // for __FILE__ when evaluated in a header and a source file\n        const int res = stricmp(lhs->m_file, rhs->m_file);\n#else  // MSVC\n        const int res = std::strcmp(lhs->m_file, rhs->m_file);\n#endif // MSVC\n        if(res != 0)\n            return res < 0;\n        if(lhs->m_line != rhs->m_line)\n            return lhs->m_line < rhs->m_line;\n        return lhs->m_template_id < rhs->m_template_id;\n    }\n\n    // for sorting tests by suite/file/line\n    bool suiteOrderComparator(const TestCase* lhs, const TestCase* rhs) {\n        const int res = std::strcmp(lhs->m_test_suite, rhs->m_test_suite);\n        if(res != 0)\n            return res < 0;\n        return fileOrderComparator(lhs, rhs);\n    }\n\n    // for sorting tests by name/suite/file/line\n    bool nameOrderComparator(const TestCase* lhs, const TestCase* rhs) {\n        const int res = std::strcmp(lhs->m_name, rhs->m_name);\n        if(res != 0)\n            return res < 0;\n        return suiteOrderComparator(lhs, rhs);\n    }\n\n    // all the registered tests\n    std::set<TestCase>& getRegisteredTests() {\n        static std::set<TestCase> data;\n        return data;\n    }\n\n#ifdef DOCTEST_CONFIG_COLORS_WINDOWS\n    HANDLE g_stdoutHandle;\n    WORD   g_origFgAttrs;\n    WORD   g_origBgAttrs;\n    bool   g_attrsInitted = false;\n\n    int colors_init() {\n        if(!g_attrsInitted) {\n            g_stdoutHandle = GetStdHandle(STD_OUTPUT_HANDLE);\n            g_attrsInitted = true;\n            CONSOLE_SCREEN_BUFFER_INFO csbiInfo;\n            GetConsoleScreenBufferInfo(g_stdoutHandle, &csbiInfo);\n            g_origFgAttrs = csbiInfo.wAttributes & ~(BACKGROUND_GREEN | BACKGROUND_RED |\n                                                     BACKGROUND_BLUE | BACKGROUND_INTENSITY);\n            g_origBgAttrs = csbiInfo.wAttributes & ~(FOREGROUND_GREEN | FOREGROUND_RED |\n                                                     FOREGROUND_BLUE | FOREGROUND_INTENSITY);\n        }\n        return 0;\n    }\n\n    int dumy_init_console_colors = colors_init();\n#endif // DOCTEST_CONFIG_COLORS_WINDOWS\n\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    void color_to_stream(std::ostream& s, Color::Enum code) {\n        ((void)s);    // for DOCTEST_CONFIG_COLORS_NONE or DOCTEST_CONFIG_COLORS_WINDOWS\n        ((void)code); // for DOCTEST_CONFIG_COLORS_NONE\n#ifdef DOCTEST_CONFIG_COLORS_ANSI\n        if(g_no_colors ||\n           (isatty(STDOUT_FILENO) == false && getContextOptions()->force_colors == false))\n            return;\n\n        auto col = \"\";\n        // clang-format off\n            switch(code) { //!OCLINT missing break in switch statement / unnecessary default statement in covered switch statement\n                case Color::Red:         col = \"[0;31m\"; break;\n                case Color::Green:       col = \"[0;32m\"; break;\n                case Color::Blue:        col = \"[0;34m\"; break;\n                case Color::Cyan:        col = \"[0;36m\"; break;\n                case Color::Yellow:      col = \"[0;33m\"; break;\n                case Color::Grey:        col = \"[1;30m\"; break;\n                case Color::LightGrey:   col = \"[0;37m\"; break;\n                case Color::BrightRed:   col = \"[1;31m\"; break;\n                case Color::BrightGreen: col = \"[1;32m\"; break;\n                case Color::BrightWhite: col = \"[1;37m\"; break;\n                case Color::Bright: // invalid\n                case Color::None:\n                case Color::White:\n                default:                 col = \"[0m\";\n            }\n        // clang-format on\n        s << \"\\033\" << col;\n#endif // DOCTEST_CONFIG_COLORS_ANSI\n\n#ifdef DOCTEST_CONFIG_COLORS_WINDOWS\n        if(g_no_colors ||\n           (isatty(fileno(stdout)) == false && getContextOptions()->force_colors == false))\n            return;\n\n#define DOCTEST_SET_ATTR(x) SetConsoleTextAttribute(g_stdoutHandle, x | g_origBgAttrs)\n\n        // clang-format off\n        switch (code) {\n            case Color::White:       DOCTEST_SET_ATTR(FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break;\n            case Color::Red:         DOCTEST_SET_ATTR(FOREGROUND_RED);                                      break;\n            case Color::Green:       DOCTEST_SET_ATTR(FOREGROUND_GREEN);                                    break;\n            case Color::Blue:        DOCTEST_SET_ATTR(FOREGROUND_BLUE);                                     break;\n            case Color::Cyan:        DOCTEST_SET_ATTR(FOREGROUND_BLUE | FOREGROUND_GREEN);                  break;\n            case Color::Yellow:      DOCTEST_SET_ATTR(FOREGROUND_RED | FOREGROUND_GREEN);                   break;\n            case Color::Grey:        DOCTEST_SET_ATTR(0);                                                   break;\n            case Color::LightGrey:   DOCTEST_SET_ATTR(FOREGROUND_INTENSITY);                                break;\n            case Color::BrightRed:   DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_RED);               break;\n            case Color::BrightGreen: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN);             break;\n            case Color::BrightWhite: DOCTEST_SET_ATTR(FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE); break;\n            case Color::None:\n            case Color::Bright: // invalid\n            default:                 DOCTEST_SET_ATTR(g_origFgAttrs);\n        }\n            // clang-format on\n#endif // DOCTEST_CONFIG_COLORS_WINDOWS\n    }\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n\n    std::vector<const IExceptionTranslator*>& getExceptionTranslators() {\n        static std::vector<const IExceptionTranslator*> data;\n        return data;\n    }\n\n    String translateActiveException() {\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n        String res;\n        auto&  translators = getExceptionTranslators();\n        for(auto& curr : translators)\n            if(curr->translate(res))\n                return res;\n        // clang-format off\n        DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wcatch-value\")\n        try {\n            throw;\n        } catch(std::exception& ex) {\n            return ex.what();\n        } catch(std::string& msg) {\n            return msg.c_str();\n        } catch(const char* msg) {\n            return msg;\n        } catch(...) {\n            return \"unknown exception\";\n        }\n        DOCTEST_GCC_SUPPRESS_WARNING_POP\n// clang-format on\n#else  // DOCTEST_CONFIG_NO_EXCEPTIONS\n        return \"\";\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n    }\n} // namespace\n\nnamespace detail {\n    // used by the macros for registering tests\n    int regTest(const TestCase& tc) {\n        getRegisteredTests().insert(tc);\n        return 0;\n    }\n\n    // sets the current test suite\n    int setTestSuite(const TestSuite& ts) {\n        doctest_detail_test_suite_ns::getCurrentTestSuite() = ts;\n        return 0;\n    }\n\n#ifdef DOCTEST_IS_DEBUGGER_ACTIVE\n    bool isDebuggerActive() { return DOCTEST_IS_DEBUGGER_ACTIVE(); }\n#else // DOCTEST_IS_DEBUGGER_ACTIVE\n#ifdef DOCTEST_PLATFORM_MAC\n    // The following function is taken directly from the following technical note:\n    // http://developer.apple.com/library/mac/#qa/qa2004/qa1361.html\n    // Returns true if the current process is being debugged (either\n    // running under the debugger or has a debugger attached post facto).\n    bool isDebuggerActive() {\n        int        mib[4];\n        kinfo_proc info;\n        size_t     size;\n        // Initialize the flags so that, if sysctl fails for some bizarre\n        // reason, we get a predictable result.\n        info.kp_proc.p_flag = 0;\n        // Initialize mib, which tells sysctl the info we want, in this case\n        // we're looking for information about a specific process ID.\n        mib[0] = CTL_KERN;\n        mib[1] = KERN_PROC;\n        mib[2] = KERN_PROC_PID;\n        mib[3] = getpid();\n        // Call sysctl.\n        size = sizeof(info);\n        if(sysctl(mib, DOCTEST_COUNTOF(mib), &info, &size, 0, 0) != 0) {\n            std::cerr << \"\\nCall to sysctl failed - unable to determine if debugger is active **\\n\";\n            return false;\n        }\n        // We're being debugged if the P_TRACED flag is set.\n        return ((info.kp_proc.p_flag & P_TRACED) != 0);\n    }\n#elif DOCTEST_MSVC || defined(__MINGW32__)\n    bool isDebuggerActive() { return ::IsDebuggerPresent() != 0; }\n#else\n    bool isDebuggerActive() { return false; }\n#endif // Platform\n#endif // DOCTEST_IS_DEBUGGER_ACTIVE\n\n    void registerExceptionTranslatorImpl(const IExceptionTranslator* et) {\n        if(std::find(getExceptionTranslators().begin(), getExceptionTranslators().end(), et) ==\n           getExceptionTranslators().end())\n            getExceptionTranslators().push_back(et);\n    }\n\n#ifdef DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    void toStream(std::ostream* s, char* in) { *s << in; }\n    void toStream(std::ostream* s, const char* in) { *s << in; }\n#endif // DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING\n    void toStream(std::ostream* s, bool in) { *s << std::boolalpha << in << std::noboolalpha; }\n    void toStream(std::ostream* s, float in) { *s << in; }\n    void toStream(std::ostream* s, double in) { *s << in; }\n    void toStream(std::ostream* s, double long in) { *s << in; }\n\n    void toStream(std::ostream* s, char in) { *s << in; }\n    void toStream(std::ostream* s, char signed in) { *s << in; }\n    void toStream(std::ostream* s, char unsigned in) { *s << in; }\n    void toStream(std::ostream* s, int short in) { *s << in; }\n    void toStream(std::ostream* s, int short unsigned in) { *s << in; }\n    void toStream(std::ostream* s, int in) { *s << in; }\n    void toStream(std::ostream* s, int unsigned in) { *s << in; }\n    void toStream(std::ostream* s, int long in) { *s << in; }\n    void toStream(std::ostream* s, int long unsigned in) { *s << in; }\n    void toStream(std::ostream* s, int long long in) { *s << in; }\n    void toStream(std::ostream* s, int long long unsigned in) { *s << in; }\n\n    DOCTEST_THREAD_LOCAL std::vector<IContextScope*> g_infoContexts; // for logging with INFO()\n\n    ContextScopeBase::ContextScopeBase() {\n        g_infoContexts.push_back(this);\n    }\n\n    DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17\n    DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n    // destroy cannot be inlined into the destructor because that would mean calling stringify after\n    // ContextScope has been destroyed (base class destructors run after derived class destructors).\n    // Instead, ContextScope calls this method directly from its destructor.\n    void ContextScopeBase::destroy() {\n        if(std::uncaught_exception()) {\n            std::ostringstream s;\n            this->stringify(&s);\n            g_cs->stringifiedContexts.push_back(s.str().c_str());\n        }\n        g_infoContexts.pop_back();\n    }\n    DOCTEST_CLANG_SUPPRESS_WARNING_POP\n    DOCTEST_GCC_SUPPRESS_WARNING_POP\n    DOCTEST_MSVC_SUPPRESS_WARNING_POP\n\n} // namespace detail\nnamespace {\n    using namespace detail;\n\n    std::ostream& file_line_to_stream(std::ostream& s, const char* file, int line,\n                                      const char* tail = \"\") {\n        const auto opt = getContextOptions();\n        s << Color::LightGrey << skipPathFromFilename(file) << (opt->gnu_file_line ? \":\" : \"(\")\n          << (opt->no_line_numbers ? 0 : line) // 0 or the real num depending on the option\n          << (opt->gnu_file_line ? \":\" : \"):\") << tail;\n        return s;\n    }\n\n#if !defined(DOCTEST_CONFIG_POSIX_SIGNALS) && !defined(DOCTEST_CONFIG_WINDOWS_SEH)\n    struct FatalConditionHandler\n    {\n        void reset() {}\n    };\n#else // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH\n\n    void reportFatal(const std::string&);\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n\n    struct SignalDefs\n    {\n        DWORD id;\n        const char* name;\n    };\n    // There is no 1-1 mapping between signals and windows exceptions.\n    // Windows can easily distinguish between SO and SigSegV,\n    // but SigInt, SigTerm, etc are handled differently.\n    SignalDefs signalDefs[] = {\n            {EXCEPTION_ILLEGAL_INSTRUCTION, \"SIGILL - Illegal instruction signal\"},\n            {EXCEPTION_STACK_OVERFLOW, \"SIGSEGV - Stack overflow\"},\n            {EXCEPTION_ACCESS_VIOLATION, \"SIGSEGV - Segmentation violation signal\"},\n            {EXCEPTION_INT_DIVIDE_BY_ZERO, \"Divide by zero error\"},\n    };\n\n    struct FatalConditionHandler\n    {\n        static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) {\n            for(size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                if(ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) {\n                    reportFatal(signalDefs[i].name);\n                }\n            }\n            // If its not an exception we care about, pass it along.\n            // This stops us from eating debugger breaks etc.\n            return EXCEPTION_CONTINUE_SEARCH;\n        }\n\n        FatalConditionHandler() {\n            isSet = true;\n            // 32k seems enough for doctest to handle stack overflow,\n            // but the value was found experimentally, so there is no strong guarantee\n            guaranteeSize = 32 * 1024;\n            exceptionHandlerHandle = nullptr;\n            // Register as first handler in current chain\n            exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException);\n            // Pass in guarantee size to be filled\n            SetThreadStackGuarantee(&guaranteeSize);\n        }\n\n        static void reset() {\n            if(isSet) {\n                // Unregister handler and restore the old guarantee\n                RemoveVectoredExceptionHandler(exceptionHandlerHandle);\n                SetThreadStackGuarantee(&guaranteeSize);\n                exceptionHandlerHandle = nullptr;\n                isSet = false;\n            }\n        }\n\n        ~FatalConditionHandler() { reset(); }\n\n    private:\n        static bool isSet;\n        static ULONG guaranteeSize;\n        static PVOID exceptionHandlerHandle;\n    };\n\n    bool FatalConditionHandler::isSet = false;\n    ULONG FatalConditionHandler::guaranteeSize = 0;\n    PVOID FatalConditionHandler::exceptionHandlerHandle = nullptr;\n\n#else // DOCTEST_PLATFORM_WINDOWS\n\n    struct SignalDefs\n    {\n        int         id;\n        const char* name;\n    };\n    SignalDefs signalDefs[] = {{SIGINT, \"SIGINT - Terminal interrupt signal\"},\n                               {SIGILL, \"SIGILL - Illegal instruction signal\"},\n                               {SIGFPE, \"SIGFPE - Floating point error signal\"},\n                               {SIGSEGV, \"SIGSEGV - Segmentation violation signal\"},\n                               {SIGTERM, \"SIGTERM - Termination request signal\"},\n                               {SIGABRT, \"SIGABRT - Abort (abnormal termination) signal\"}};\n\n    struct FatalConditionHandler\n    {\n        static bool             isSet;\n        static struct sigaction oldSigActions[DOCTEST_COUNTOF(signalDefs)];\n        static stack_t          oldSigStack;\n        static char             altStackMem[4 * SIGSTKSZ];\n\n        static void handleSignal(int sig) {\n            const char* name = \"<unknown signal>\";\n            for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                SignalDefs& def = signalDefs[i];\n                if(sig == def.id) {\n                    name = def.name;\n                    break;\n                }\n            }\n            reset();\n            reportFatal(name);\n            raise(sig);\n        }\n\n        FatalConditionHandler() {\n            isSet = true;\n            stack_t sigStack;\n            sigStack.ss_sp    = altStackMem;\n            sigStack.ss_size  = sizeof(altStackMem);\n            sigStack.ss_flags = 0;\n            sigaltstack(&sigStack, &oldSigStack);\n            struct sigaction sa = {};\n            sa.sa_handler       = handleSignal; // NOLINT\n            sa.sa_flags         = SA_ONSTACK;\n            for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                sigaction(signalDefs[i].id, &sa, &oldSigActions[i]);\n            }\n        }\n\n        ~FatalConditionHandler() { reset(); }\n        static void reset() {\n            if(isSet) {\n                // Set signals back to previous values -- hopefully nobody overwrote them in the meantime\n                for(std::size_t i = 0; i < DOCTEST_COUNTOF(signalDefs); ++i) {\n                    sigaction(signalDefs[i].id, &oldSigActions[i], nullptr);\n                }\n                // Return the old stack\n                sigaltstack(&oldSigStack, nullptr);\n                isSet = false;\n            }\n        }\n    };\n\n    bool             FatalConditionHandler::isSet                                      = false;\n    struct sigaction FatalConditionHandler::oldSigActions[DOCTEST_COUNTOF(signalDefs)] = {};\n    stack_t          FatalConditionHandler::oldSigStack                                = {};\n    char             FatalConditionHandler::altStackMem[]                              = {};\n\n#endif // DOCTEST_PLATFORM_WINDOWS\n#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH\n\n} // namespace\n\nnamespace {\n    using namespace detail;\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n#define DOCTEST_OUTPUT_DEBUG_STRING(text) ::OutputDebugStringA(text)\n#else\n    // TODO: integration with XCode and other IDEs\n#define DOCTEST_OUTPUT_DEBUG_STRING(text) // NOLINT(clang-diagnostic-unused-macros)\n#endif // Platform\n\n    void addAssert(assertType::Enum at) {\n        if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional\n            g_cs->numAssertsCurrentTest_atomic++;\n    }\n\n    void addFailedAssert(assertType::Enum at) {\n        if((at & assertType::is_warn) == 0) //!OCLINT bitwise operator in conditional\n            g_cs->numAssertsFailedCurrentTest_atomic++;\n    }\n\n#if defined(DOCTEST_CONFIG_POSIX_SIGNALS) || defined(DOCTEST_CONFIG_WINDOWS_SEH)\n    void reportFatal(const std::string& message) {\n        g_cs->failure_flags |= TestCaseFailureReason::Crash;\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception, {message.c_str(), true});\n\n        while(g_cs->subcasesStack.size()) {\n            g_cs->subcasesStack.pop_back();\n            DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_end, DOCTEST_EMPTY);\n        }\n\n        g_cs->finalizeTestCaseData();\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs);\n\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs);\n    }\n#endif // DOCTEST_CONFIG_POSIX_SIGNALS || DOCTEST_CONFIG_WINDOWS_SEH\n} // namespace\nnamespace detail {\n\n    ResultBuilder::ResultBuilder(assertType::Enum at, const char* file, int line, const char* expr,\n                                 const char* exception_type, const char* exception_string) {\n        m_test_case        = g_cs->currentTest;\n        m_at               = at;\n        m_file             = file;\n        m_line             = line;\n        m_expr             = expr;\n        m_failed           = true;\n        m_threw            = false;\n        m_threw_as         = false;\n        m_exception_type   = exception_type;\n        m_exception_string = exception_string;\n#if DOCTEST_MSVC\n        if(m_expr[0] == ' ') // this happens when variadic macros are disabled under MSVC\n            ++m_expr;\n#endif // MSVC\n    }\n\n    void ResultBuilder::setResult(const Result& res) {\n        m_decomp = res.m_decomp;\n        m_failed = !res.m_passed;\n    }\n\n    void ResultBuilder::translateException() {\n        m_threw     = true;\n        m_exception = translateActiveException();\n    }\n\n    bool ResultBuilder::log() {\n        if(m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional\n            m_failed = !m_threw;\n        } else if((m_at & assertType::is_throws_as) && (m_at & assertType::is_throws_with)) { //!OCLINT\n            m_failed = !m_threw_as || (m_exception != m_exception_string);\n        } else if(m_at & assertType::is_throws_as) { //!OCLINT bitwise operator in conditional\n            m_failed = !m_threw_as;\n        } else if(m_at & assertType::is_throws_with) { //!OCLINT bitwise operator in conditional\n            m_failed = m_exception != m_exception_string;\n        } else if(m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional\n            m_failed = m_threw;\n        }\n\n        if(m_exception.size())\n            m_exception = String(\"\\\"\") + m_exception + \"\\\"\";\n\n        if(is_running_in_test) {\n            addAssert(m_at);\n            DOCTEST_ITERATE_THROUGH_REPORTERS(log_assert, *this);\n\n            if(m_failed)\n                addFailedAssert(m_at);\n        } else if(m_failed) {\n            failed_out_of_a_testing_context(*this);\n        }\n\n        return m_failed && isDebuggerActive() &&\n               !getContextOptions()->no_breaks; // break into debugger\n    }\n\n    void ResultBuilder::react() const {\n        if(m_failed && checkIfShouldThrow(m_at))\n            throwException();\n    }\n\n    void failed_out_of_a_testing_context(const AssertData& ad) {\n        if(g_cs->ah)\n            g_cs->ah(ad);\n        else\n            std::abort();\n    }\n\n    void decomp_assert(assertType::Enum at, const char* file, int line, const char* expr,\n                       Result result) {\n        bool failed = !result.m_passed;\n\n        // ###################################################################################\n        // IF THE DEBUGGER BREAKS HERE - GO 1 LEVEL UP IN THE CALLSTACK FOR THE FAILING ASSERT\n        // THIS IS THE EFFECT OF HAVING 'DOCTEST_CONFIG_SUPER_FAST_ASSERTS' DEFINED\n        // ###################################################################################\n        DOCTEST_ASSERT_OUT_OF_TESTS(result.m_decomp);\n        DOCTEST_ASSERT_IN_TESTS(result.m_decomp);\n    }\n\n    MessageBuilder::MessageBuilder(const char* file, int line, assertType::Enum severity) {\n        m_stream   = getTlsOss();\n        m_file     = file;\n        m_line     = line;\n        m_severity = severity;\n    }\n\n    IExceptionTranslator::IExceptionTranslator()  = default;\n    IExceptionTranslator::~IExceptionTranslator() = default;\n\n    bool MessageBuilder::log() {\n        m_string = getTlsOssResult();\n        DOCTEST_ITERATE_THROUGH_REPORTERS(log_message, *this);\n\n        const bool isWarn = m_severity & assertType::is_warn;\n\n        // warn is just a message in this context so we don't treat it as an assert\n        if(!isWarn) {\n            addAssert(m_severity);\n            addFailedAssert(m_severity);\n        }\n\n        return isDebuggerActive() && !getContextOptions()->no_breaks && !isWarn; // break\n    }\n\n    void MessageBuilder::react() {\n        if(m_severity & assertType::is_require) //!OCLINT bitwise operator in conditional\n            throwException();\n    }\n\n    MessageBuilder::~MessageBuilder() = default;\n} // namespace detail\nnamespace {\n    using namespace detail;\n\n    template <typename Ex>\n    [[noreturn]] void throw_exception(Ex const& e) {\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n        throw e;\n#else  // DOCTEST_CONFIG_NO_EXCEPTIONS\n        std::cerr << \"doctest will terminate because it needed to throw an exception.\\n\"\n                  << \"The message was: \" << e.what() << '\\n';\n        std::terminate();\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n    }\n\n#define DOCTEST_INTERNAL_ERROR(msg)                                                                \\\n    throw_exception(std::logic_error(                                                              \\\n            __FILE__ \":\" DOCTEST_TOSTR(__LINE__) \": Internal doctest error: \" msg))\n\n    // clang-format off\n\n// =================================================================================================\n// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp\n// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched.\n// =================================================================================================\n\n    class XmlEncode {\n    public:\n        enum ForWhat { ForTextNodes, ForAttributes };\n\n        XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes );\n\n        void encodeTo( std::ostream& os ) const;\n\n        friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode );\n\n    private:\n        std::string m_str;\n        ForWhat m_forWhat;\n    };\n\n    class XmlWriter {\n    public:\n\n        class ScopedElement {\n        public:\n            ScopedElement( XmlWriter* writer );\n\n            ScopedElement( ScopedElement&& other ) noexcept;\n            ScopedElement& operator=( ScopedElement&& other ) noexcept;\n\n            ~ScopedElement();\n\n            ScopedElement& writeText( std::string const& text, bool indent = true );\n\n            template<typename T>\n            ScopedElement& writeAttribute( std::string const& name, T const& attribute ) {\n                m_writer->writeAttribute( name, attribute );\n                return *this;\n            }\n\n        private:\n            mutable XmlWriter* m_writer = nullptr;\n        };\n\n        XmlWriter( std::ostream& os = std::cout );\n        ~XmlWriter();\n\n        XmlWriter( XmlWriter const& ) = delete;\n        XmlWriter& operator=( XmlWriter const& ) = delete;\n\n        XmlWriter& startElement( std::string const& name );\n\n        ScopedElement scopedElement( std::string const& name );\n\n        XmlWriter& endElement();\n\n        XmlWriter& writeAttribute( std::string const& name, std::string const& attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, const char* attribute );\n\n        XmlWriter& writeAttribute( std::string const& name, bool attribute );\n\n        template<typename T>\n        XmlWriter& writeAttribute( std::string const& name, T const& attribute ) {\n        std::stringstream rss;\n            rss << attribute;\n            return writeAttribute( name, rss.str() );\n        }\n\n        XmlWriter& writeText( std::string const& text, bool indent = true );\n\n        //XmlWriter& writeComment( std::string const& text );\n\n        //void writeStylesheetRef( std::string const& url );\n\n        //XmlWriter& writeBlankLine();\n\n        void ensureTagClosed();\n\n    private:\n\n        void writeDeclaration();\n\n        void newlineIfNecessary();\n\n        bool m_tagIsOpen = false;\n        bool m_needsNewline = false;\n        std::vector<std::string> m_tags;\n        std::string m_indent;\n        std::ostream& m_os;\n    };\n\n// =================================================================================================\n// The following code has been taken verbatim from Catch2/include/internal/catch_xmlwriter.h/cpp\n// This is done so cherry-picking bug fixes is trivial - even the style/formatting is untouched.\n// =================================================================================================\n\nusing uchar = unsigned char;\n\nnamespace {\n\n    size_t trailingBytes(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return 2;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return 3;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return 4;\n        }\n        DOCTEST_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    uint32_t headerValue(unsigned char c) {\n        if ((c & 0xE0) == 0xC0) {\n            return c & 0x1F;\n        }\n        if ((c & 0xF0) == 0xE0) {\n            return c & 0x0F;\n        }\n        if ((c & 0xF8) == 0xF0) {\n            return c & 0x07;\n        }\n        DOCTEST_INTERNAL_ERROR(\"Invalid multibyte utf-8 start byte encountered\");\n    }\n\n    void hexEscapeChar(std::ostream& os, unsigned char c) {\n        std::ios_base::fmtflags f(os.flags());\n        os << \"\\\\x\"\n            << std::uppercase << std::hex << std::setfill('0') << std::setw(2)\n            << static_cast<int>(c);\n        os.flags(f);\n    }\n\n} // anonymous namespace\n\n    XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat )\n    :   m_str( str ),\n        m_forWhat( forWhat )\n    {}\n\n    void XmlEncode::encodeTo( std::ostream& os ) const {\n        // Apostrophe escaping not necessary if we always use \" to write attributes\n        // (see: http://www.w3.org/TR/xml/#syntax)\n\n        for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) {\n            uchar c = m_str[idx];\n            switch (c) {\n            case '<':   os << \"&lt;\"; break;\n            case '&':   os << \"&amp;\"; break;\n\n            case '>':\n                // See: http://www.w3.org/TR/xml/#syntax\n                if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']')\n                    os << \"&gt;\";\n                else\n                    os << c;\n                break;\n\n            case '\\\"':\n                if (m_forWhat == ForAttributes)\n                    os << \"&quot;\";\n                else\n                    os << c;\n                break;\n\n            default:\n                // Check for control characters and invalid utf-8\n\n                // Escape control characters in standard ascii\n                // see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0\n                if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // Plain ASCII: Write it to stream\n                if (c < 0x7F) {\n                    os << c;\n                    break;\n                }\n\n                // UTF-8 territory\n                // Check if the encoding is valid and if it is not, hex escape bytes.\n                // Important: We do not check the exact decoded values for validity, only the encoding format\n                // First check that this bytes is a valid lead byte:\n                // This means that it is not encoded as 1111 1XXX\n                // Or as 10XX XXXX\n                if (c <  0xC0 ||\n                    c >= 0xF8) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                auto encBytes = trailingBytes(c);\n                // Are there enough bytes left to avoid accessing out-of-bounds memory?\n                if (idx + encBytes - 1 >= m_str.size()) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n                // The header is valid, check data\n                // The next encBytes bytes must together be a valid utf-8\n                // This means: bitpattern 10XX XXXX and the extracted value is sane (ish)\n                bool valid = true;\n                uint32_t value = headerValue(c);\n                for (std::size_t n = 1; n < encBytes; ++n) {\n                    uchar nc = m_str[idx + n];\n                    valid &= ((nc & 0xC0) == 0x80);\n                    value = (value << 6) | (nc & 0x3F);\n                }\n\n                if (\n                    // Wrong bit pattern of following bytes\n                    (!valid) ||\n                    // Overlong encodings\n                    (value < 0x80) ||\n                    (                 value < 0x800   && encBytes > 2) || // removed \"0x80 <= value &&\" because redundant\n                    (0x800 < value && value < 0x10000 && encBytes > 3) ||\n                    // Encoded value out of range\n                    (value >= 0x110000)\n                    ) {\n                    hexEscapeChar(os, c);\n                    break;\n                }\n\n                // If we got here, this is in fact a valid(ish) utf-8 sequence\n                for (std::size_t n = 0; n < encBytes; ++n) {\n                    os << m_str[idx + n];\n                }\n                idx += encBytes - 1;\n                break;\n            }\n        }\n    }\n\n    std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) {\n        xmlEncode.encodeTo( os );\n        return os;\n    }\n\n    XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer )\n    :   m_writer( writer )\n    {}\n\n    XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept\n    :   m_writer( other.m_writer ){\n        other.m_writer = nullptr;\n    }\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept {\n        if ( m_writer ) {\n            m_writer->endElement();\n        }\n        m_writer = other.m_writer;\n        other.m_writer = nullptr;\n        return *this;\n    }\n\n\n    XmlWriter::ScopedElement::~ScopedElement() {\n        if( m_writer )\n            m_writer->endElement();\n    }\n\n    XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) {\n        m_writer->writeText( text, indent );\n        return *this;\n    }\n\n    XmlWriter::XmlWriter( std::ostream& os ) : m_os( os )\n    {\n        writeDeclaration();\n    }\n\n    XmlWriter::~XmlWriter() {\n        while( !m_tags.empty() )\n            endElement();\n    }\n\n    XmlWriter& XmlWriter::startElement( std::string const& name ) {\n        ensureTagClosed();\n        newlineIfNecessary();\n        m_os << m_indent << '<' << name;\n        m_tags.push_back( name );\n        m_indent += \"  \";\n        m_tagIsOpen = true;\n        return *this;\n    }\n\n    XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) {\n        ScopedElement scoped( this );\n        startElement( name );\n        return scoped;\n    }\n\n    XmlWriter& XmlWriter::endElement() {\n        newlineIfNecessary();\n        m_indent = m_indent.substr( 0, m_indent.size()-2 );\n        if( m_tagIsOpen ) {\n            m_os << \"/>\";\n            m_tagIsOpen = false;\n        }\n        else {\n            m_os << m_indent << \"</\" << m_tags.back() << \">\";\n        }\n        m_os << std::endl;\n        m_tags.pop_back();\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) {\n        if( !name.empty() && !attribute.empty() )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, const char* attribute ) {\n        if( !name.empty() && attribute && attribute[0] != '\\0' )\n            m_os << ' ' << name << \"=\\\"\" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) {\n        m_os << ' ' << name << \"=\\\"\" << ( attribute ? \"true\" : \"false\" ) << '\"';\n        return *this;\n    }\n\n    XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) {\n        if( !text.empty() ){\n            bool tagWasOpen = m_tagIsOpen;\n            ensureTagClosed();\n            if( tagWasOpen && indent )\n                m_os << m_indent;\n            m_os << XmlEncode( text );\n            m_needsNewline = true;\n        }\n        return *this;\n    }\n\n    //XmlWriter& XmlWriter::writeComment( std::string const& text ) {\n    //    ensureTagClosed();\n    //    m_os << m_indent << \"<!--\" << text << \"-->\";\n    //    m_needsNewline = true;\n    //    return *this;\n    //}\n\n    //void XmlWriter::writeStylesheetRef( std::string const& url ) {\n    //    m_os << \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"\" << url << \"\\\"?>\\n\";\n    //}\n\n    //XmlWriter& XmlWriter::writeBlankLine() {\n    //    ensureTagClosed();\n    //    m_os << '\\n';\n    //    return *this;\n    //}\n\n    void XmlWriter::ensureTagClosed() {\n        if( m_tagIsOpen ) {\n            m_os << \">\" << std::endl;\n            m_tagIsOpen = false;\n        }\n    }\n\n    void XmlWriter::writeDeclaration() {\n        m_os << \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n    }\n\n    void XmlWriter::newlineIfNecessary() {\n        if( m_needsNewline ) {\n            m_os << std::endl;\n            m_needsNewline = false;\n        }\n    }\n\n// =================================================================================================\n// End of copy-pasted code from Catch\n// =================================================================================================\n\n    // clang-format on\n\n    struct XmlReporter : public IReporter\n    {\n        XmlWriter  xml;\n        std::mutex mutex;\n\n        // caching pointers/references to objects of these types - safe to do\n        const ContextOptions& opt;\n        const TestCaseData*   tc = nullptr;\n\n        XmlReporter(const ContextOptions& co)\n                : xml(*co.cout)\n                , opt(co) {}\n\n        void log_contexts() {\n            int num_contexts = get_num_active_contexts();\n            if(num_contexts) {\n                auto              contexts = get_active_contexts();\n                std::stringstream ss;\n                for(int i = 0; i < num_contexts; ++i) {\n                    contexts[i]->stringify(&ss);\n                    xml.scopedElement(\"Info\").writeText(ss.str());\n                    ss.str(\"\");\n                }\n            }\n        }\n\n        unsigned line(unsigned l) const { return opt.no_line_numbers ? 0 : l; }\n\n        void test_case_start_impl(const TestCaseData& in) {\n            bool open_ts_tag = false;\n            if(tc != nullptr) { // we have already opened a test suite\n                if(strcmp(tc->m_test_suite, in.m_test_suite) != 0) {\n                    xml.endElement();\n                    open_ts_tag = true;\n                }\n            }\n            else {\n                open_ts_tag = true; // first test case ==> first test suite\n            }\n\n            if(open_ts_tag) {\n                xml.startElement(\"TestSuite\");\n                xml.writeAttribute(\"name\", in.m_test_suite);\n            }\n\n            tc = &in;\n            xml.startElement(\"TestCase\")\n                    .writeAttribute(\"name\", in.m_name)\n                    .writeAttribute(\"filename\", skipPathFromFilename(in.m_file))\n                    .writeAttribute(\"line\", line(in.m_line))\n                    .writeAttribute(\"description\", in.m_description);\n\n            if(Approx(in.m_timeout) != 0)\n                xml.writeAttribute(\"timeout\", in.m_timeout);\n            if(in.m_may_fail)\n                xml.writeAttribute(\"may_fail\", true);\n            if(in.m_should_fail)\n                xml.writeAttribute(\"should_fail\", true);\n        }\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE\n        // =========================================================================================\n\n        void report_query(const QueryData& in) override {\n            test_run_start();\n            if(opt.list_reporters) {\n                for(auto& curr : getListeners())\n                    xml.scopedElement(\"Listener\")\n                            .writeAttribute(\"priority\", curr.first.first)\n                            .writeAttribute(\"name\", curr.first.second);\n                for(auto& curr : getReporters())\n                    xml.scopedElement(\"Reporter\")\n                            .writeAttribute(\"priority\", curr.first.first)\n                            .writeAttribute(\"name\", curr.first.second);\n            } else if(opt.count || opt.list_test_cases) {\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    xml.scopedElement(\"TestCase\").writeAttribute(\"name\", in.data[i]);\n                xml.scopedElement(\"OverallResultsTestCases\")\n                        .writeAttribute(\"unskipped\", in.run_stats->numTestCasesPassingFilters);\n            } else if(opt.list_test_suites) {\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    xml.scopedElement(\"TestSuite\").writeAttribute(\"name\", in.data[i]);\n                xml.scopedElement(\"OverallResultsTestCases\")\n                        .writeAttribute(\"unskipped\", in.run_stats->numTestCasesPassingFilters);\n                xml.scopedElement(\"OverallResultsTestSuites\")\n                        .writeAttribute(\"unskipped\", in.run_stats->numTestSuitesPassingFilters);\n            }\n            xml.endElement();\n        }\n\n        void test_run_start() override {\n            // remove .exe extension - mainly to have the same output on UNIX and Windows\n            std::string binary_name = skipPathFromFilename(opt.binary_name.c_str());\n#ifdef DOCTEST_PLATFORM_WINDOWS\n            if(binary_name.rfind(\".exe\") != std::string::npos)\n                binary_name = binary_name.substr(0, binary_name.length() - 4);\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n            xml.startElement(\"doctest\").writeAttribute(\"binary\", binary_name);\n            if(opt.no_version == false)\n                xml.writeAttribute(\"version\", DOCTEST_VERSION_STR);\n\n            // only the consequential ones (TODO: filters)\n            xml.scopedElement(\"Options\")\n                    .writeAttribute(\"order_by\", opt.order_by.c_str())\n                    .writeAttribute(\"rand_seed\", opt.rand_seed)\n                    .writeAttribute(\"first\", opt.first)\n                    .writeAttribute(\"last\", opt.last)\n                    .writeAttribute(\"abort_after\", opt.abort_after)\n                    .writeAttribute(\"subcase_filter_levels\", opt.subcase_filter_levels)\n                    .writeAttribute(\"case_sensitive\", opt.case_sensitive)\n                    .writeAttribute(\"no_throw\", opt.no_throw)\n                    .writeAttribute(\"no_skip\", opt.no_skip);\n        }\n\n        void test_run_end(const TestRunStats& p) override {\n            if(tc) // the TestSuite tag - only if there has been at least 1 test case\n                xml.endElement();\n\n            xml.scopedElement(\"OverallResultsAsserts\")\n                    .writeAttribute(\"successes\", p.numAsserts - p.numAssertsFailed)\n                    .writeAttribute(\"failures\", p.numAssertsFailed);\n\n            xml.startElement(\"OverallResultsTestCases\")\n                    .writeAttribute(\"successes\",\n                                    p.numTestCasesPassingFilters - p.numTestCasesFailed)\n                    .writeAttribute(\"failures\", p.numTestCasesFailed);\n            if(opt.no_skipped_summary == false)\n                xml.writeAttribute(\"skipped\", p.numTestCases - p.numTestCasesPassingFilters);\n            xml.endElement();\n\n            xml.endElement();\n        }\n\n        void test_case_start(const TestCaseData& in) override {\n            test_case_start_impl(in);\n            xml.ensureTagClosed();\n        }\n        \n        void test_case_reenter(const TestCaseData&) override {}\n\n        void test_case_end(const CurrentTestCaseStats& st) override {\n            xml.startElement(\"OverallResultsAsserts\")\n                    .writeAttribute(\"successes\",\n                                    st.numAssertsCurrentTest - st.numAssertsFailedCurrentTest)\n                    .writeAttribute(\"failures\", st.numAssertsFailedCurrentTest);\n            if(opt.duration)\n                xml.writeAttribute(\"duration\", st.seconds);\n            if(tc->m_expected_failures)\n                xml.writeAttribute(\"expected_failures\", tc->m_expected_failures);\n            xml.endElement();\n\n            xml.endElement();\n        }\n\n        void test_case_exception(const TestCaseException& e) override {\n            std::lock_guard<std::mutex> lock(mutex);\n\n            xml.scopedElement(\"Exception\")\n                    .writeAttribute(\"crash\", e.is_crash)\n                    .writeText(e.error_string.c_str());\n        }\n\n        void subcase_start(const SubcaseSignature& in) override {\n            std::lock_guard<std::mutex> lock(mutex);\n\n            xml.startElement(\"SubCase\")\n                    .writeAttribute(\"name\", in.m_name)\n                    .writeAttribute(\"filename\", skipPathFromFilename(in.m_file))\n                    .writeAttribute(\"line\", line(in.m_line));\n            xml.ensureTagClosed();\n        }\n\n        void subcase_end() override { xml.endElement(); }\n\n        void log_assert(const AssertData& rb) override {\n            if(!rb.m_failed && !opt.success)\n                return;\n\n            std::lock_guard<std::mutex> lock(mutex);\n\n            xml.startElement(\"Expression\")\n                    .writeAttribute(\"success\", !rb.m_failed)\n                    .writeAttribute(\"type\", assertString(rb.m_at))\n                    .writeAttribute(\"filename\", skipPathFromFilename(rb.m_file))\n                    .writeAttribute(\"line\", line(rb.m_line));\n\n            xml.scopedElement(\"Original\").writeText(rb.m_expr);\n\n            if(rb.m_threw)\n                xml.scopedElement(\"Exception\").writeText(rb.m_exception.c_str());\n\n            if(rb.m_at & assertType::is_throws_as)\n                xml.scopedElement(\"ExpectedException\").writeText(rb.m_exception_type);\n            if(rb.m_at & assertType::is_throws_with)\n                xml.scopedElement(\"ExpectedExceptionString\").writeText(rb.m_exception_string);\n            if((rb.m_at & assertType::is_normal) && !rb.m_threw)\n                xml.scopedElement(\"Expanded\").writeText(rb.m_decomp.c_str());\n\n            log_contexts();\n\n            xml.endElement();\n        }\n\n        void log_message(const MessageData& mb) override {\n            std::lock_guard<std::mutex> lock(mutex);\n\n            xml.startElement(\"Message\")\n                    .writeAttribute(\"type\", failureString(mb.m_severity))\n                    .writeAttribute(\"filename\", skipPathFromFilename(mb.m_file))\n                    .writeAttribute(\"line\", line(mb.m_line));\n\n            xml.scopedElement(\"Text\").writeText(mb.m_string.c_str());\n\n            log_contexts();\n\n            xml.endElement();\n        }\n\n        void test_case_skipped(const TestCaseData& in) override {\n            if(opt.no_skipped_summary == false) {\n                test_case_start_impl(in);\n                xml.writeAttribute(\"skipped\", \"true\");\n                xml.endElement();\n            }\n        }\n    };\n\n    DOCTEST_REGISTER_REPORTER(\"xml\", 0, XmlReporter);\n\n    struct Whitespace\n    {\n        int nrSpaces;\n        explicit Whitespace(int nr)\n                : nrSpaces(nr) {}\n    };\n\n    std::ostream& operator<<(std::ostream& out, const Whitespace& ws) {\n        if(ws.nrSpaces != 0)\n            out << std::setw(ws.nrSpaces) << ' ';\n        return out;\n    }\n\n    struct ConsoleReporter : public IReporter\n    {\n        std::ostream&                 s;\n        bool                          hasLoggedCurrentTestStart;\n        std::vector<SubcaseSignature> subcasesStack;\n        std::mutex                    mutex;\n\n        // caching pointers/references to objects of these types - safe to do\n        const ContextOptions& opt;\n        const TestCaseData*   tc;\n\n        ConsoleReporter(const ContextOptions& co)\n                : s(*co.cout)\n                , opt(co) {}\n\n        ConsoleReporter(const ContextOptions& co, std::ostream& ostr)\n                : s(ostr)\n                , opt(co) {}\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE HELPERS USED BY THE OVERRIDES OF THE VIRTUAL METHODS OF THE INTERFACE\n        // =========================================================================================\n\n        void separator_to_stream() {\n            s << Color::Yellow\n              << \"===============================================================================\"\n                 \"\\n\";\n        }\n\n        const char* getSuccessOrFailString(bool success, assertType::Enum at,\n                                           const char* success_str) {\n            if(success)\n                return success_str;\n            return failureString(at);\n        }\n\n        Color::Enum getSuccessOrFailColor(bool success, assertType::Enum at) {\n            return success ? Color::BrightGreen :\n                             (at & assertType::is_warn) ? Color::Yellow : Color::Red;\n        }\n\n        void successOrFailColoredStringToStream(bool success, assertType::Enum at,\n                                                const char* success_str = \"SUCCESS\") {\n            s << getSuccessOrFailColor(success, at)\n              << getSuccessOrFailString(success, at, success_str) << \": \";\n        }\n\n        void log_contexts() {\n            int num_contexts = get_num_active_contexts();\n            if(num_contexts) {\n                auto contexts = get_active_contexts();\n\n                s << Color::None << \"  logged: \";\n                for(int i = 0; i < num_contexts; ++i) {\n                    s << (i == 0 ? \"\" : \"          \");\n                    contexts[i]->stringify(&s);\n                    s << \"\\n\";\n                }\n            }\n\n            s << \"\\n\";\n        }\n\n        void logTestStart() {\n            if(hasLoggedCurrentTestStart)\n                return;\n\n            separator_to_stream();\n            file_line_to_stream(s, tc->m_file, tc->m_line, \"\\n\");\n            if(tc->m_description)\n                s << Color::Yellow << \"DESCRIPTION: \" << Color::None << tc->m_description << \"\\n\";\n            if(tc->m_test_suite && tc->m_test_suite[0] != '\\0')\n                s << Color::Yellow << \"TEST SUITE: \" << Color::None << tc->m_test_suite << \"\\n\";\n            if(strncmp(tc->m_name, \"  Scenario:\", 11) != 0)\n                s << Color::None << \"TEST CASE:  \";\n            s << Color::None << tc->m_name << \"\\n\";\n\n            for(auto& curr : subcasesStack)\n                if(curr.m_name[0] != '\\0')\n                    s << \"  \" << curr.m_name << \"\\n\";\n\n            s << \"\\n\";\n\n            hasLoggedCurrentTestStart = true;\n        }\n\n        void printVersion() {\n            if(opt.no_version == false)\n                s << Color::Cyan << \"[doctest] \" << Color::None << \"doctest version is \\\"\"\n                  << DOCTEST_VERSION_STR << \"\\\"\\n\";\n        }\n\n        void printIntro() {\n            printVersion();\n            s << Color::Cyan << \"[doctest] \" << Color::None\n              << \"run with \\\"--\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"help\\\" for options\\n\";\n        }\n\n        void printHelp() {\n            int sizePrefixDisplay = static_cast<int>(strlen(DOCTEST_OPTIONS_PREFIX_DISPLAY));\n            printVersion();\n            // clang-format off\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"boolean values: \\\"1/on/yes/true\\\" or \\\"0/off/no/false\\\"\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"filter  values: \\\"str1,str2,str3\\\" (comma separated strings)\\n\";\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"filters use wildcards for matching strings\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"something passes a filter if any of the strings in a filter matches\\n\";\n#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"ALL FLAGS, OPTIONS AND FILTERS ALSO AVAILABLE WITH A \\\"\" DOCTEST_CONFIG_OPTIONS_PREFIX \"\\\" PREFIX!!!\\n\";\n#endif\n            s << Color::Cyan << \"[doctest]\\n\" << Color::None;\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"Query flags - the program quits after them. Available:\\n\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"?,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"help, -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"h                      \"\n              << Whitespace(sizePrefixDisplay*0) <<  \"prints this message\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"v,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"version                       \"\n              << Whitespace(sizePrefixDisplay*1) << \"prints the version\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"c,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"count                         \"\n              << Whitespace(sizePrefixDisplay*1) << \"prints the number of matching tests\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ltc, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"list-test-cases               \"\n              << Whitespace(sizePrefixDisplay*1) << \"lists all matching tests by name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"lts, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"list-test-suites              \"\n              << Whitespace(sizePrefixDisplay*1) << \"lists all matching test suites\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"lr,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"list-reporters                \"\n              << Whitespace(sizePrefixDisplay*1) << \"lists all registered reporters\\n\\n\";\n            // ================================================================================== << 79\n            s << Color::Cyan << \"[doctest] \" << Color::None;\n            s << \"The available <int>/<string> options/filters are:\\n\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"tc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-case=<filters>           \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     tests by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"tce, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-case-exclude=<filters>   \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT tests by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sf,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"source-file=<filters>         \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     tests by their file\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sfe, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"source-file-exclude=<filters> \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT tests by their file\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ts,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-suite=<filters>          \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     tests by their test suite\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"tse, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"test-suite-exclude=<filters>  \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT tests by their test suite\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"subcase=<filters>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters     subcases by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"sce, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"subcase-exclude=<filters>     \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters OUT subcases by their name\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"r,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"reporters=<filters>           \"\n              << Whitespace(sizePrefixDisplay*1) << \"reporters to use (console is default)\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"o,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"out=<string>                  \"\n              << Whitespace(sizePrefixDisplay*1) << \"output filename\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ob,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"order-by=<string>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"how the tests should be ordered\\n\";\n            s << Whitespace(sizePrefixDisplay*3) << \"                                       <string> - by [file/suite/name/rand]\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"rs,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"rand-seed=<int>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"seed for random ordering\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"f,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"first=<int>                   \"\n              << Whitespace(sizePrefixDisplay*1) << \"the first test passing the filters to\\n\";\n            s << Whitespace(sizePrefixDisplay*3) << \"                                       execute - for range-based execution\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"l,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"last=<int>                    \"\n              << Whitespace(sizePrefixDisplay*1) << \"the last test passing the filters to\\n\";\n            s << Whitespace(sizePrefixDisplay*3) << \"                                       execute - for range-based execution\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"aa,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"abort-after=<int>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"stop after <int> failed assertions\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"scfl,--\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"subcase-filter-levels=<int>   \"\n              << Whitespace(sizePrefixDisplay*1) << \"apply filters for the first <int> levels\\n\";\n            s << Color::Cyan << \"\\n[doctest] \" << Color::None;\n            s << \"Bool options - can be used like flags and true is assumed. Available:\\n\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"s,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"success=<bool>                \"\n              << Whitespace(sizePrefixDisplay*1) << \"include successful assertions in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"cs,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"case-sensitive=<bool>         \"\n              << Whitespace(sizePrefixDisplay*1) << \"filters being treated as case sensitive\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"e,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"exit=<bool>                   \"\n              << Whitespace(sizePrefixDisplay*1) << \"exits after the tests finish\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"d,   --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"duration=<bool>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"prints the time duration of each test\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nt,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-throw=<bool>               \"\n              << Whitespace(sizePrefixDisplay*1) << \"skips exceptions-related assert checks\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ne,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-exitcode=<bool>            \"\n              << Whitespace(sizePrefixDisplay*1) << \"returns (or exits) always with success\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nr,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-run=<bool>                 \"\n              << Whitespace(sizePrefixDisplay*1) << \"skips all runtime doctest operations\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nv,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-version=<bool>             \"\n              << Whitespace(sizePrefixDisplay*1) << \"omit the framework version in the output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-colors=<bool>              \"\n              << Whitespace(sizePrefixDisplay*1) << \"disables colors in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"fc,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"force-colors=<bool>           \"\n              << Whitespace(sizePrefixDisplay*1) << \"use colors even when not in a tty\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nb,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-breaks=<bool>              \"\n              << Whitespace(sizePrefixDisplay*1) << \"disables breakpoints in debuggers\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"ns,  --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-skip=<bool>                \"\n              << Whitespace(sizePrefixDisplay*1) << \"don't skip test cases marked as skip\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"gfl, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"gnu-file-line=<bool>          \"\n              << Whitespace(sizePrefixDisplay*1) << \":n: vs (n): for line numbers in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"npf, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-path-filenames=<bool>      \"\n              << Whitespace(sizePrefixDisplay*1) << \"only filenames and no paths in output\\n\";\n            s << \" -\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"nln, --\" DOCTEST_OPTIONS_PREFIX_DISPLAY \"no-line-numbers=<bool>        \"\n              << Whitespace(sizePrefixDisplay*1) << \"0 instead of real line numbers in output\\n\";\n            // ================================================================================== << 79\n            // clang-format on\n\n            s << Color::Cyan << \"\\n[doctest] \" << Color::None;\n            s << \"for more information visit the project documentation\\n\\n\";\n        }\n\n        void printRegisteredReporters() {\n            printVersion();\n            auto printReporters = [this] (const reporterMap& reporters, const char* type) {\n                if(reporters.size()) {\n                    s << Color::Cyan << \"[doctest] \" << Color::None << \"listing all registered \" << type << \"\\n\";\n                    for(auto& curr : reporters)\n                        s << \"priority: \" << std::setw(5) << curr.first.first\n                          << \" name: \" << curr.first.second << \"\\n\";\n                }\n            };\n            printReporters(getListeners(), \"listeners\");\n            printReporters(getReporters(), \"reporters\");\n        }\n\n        void list_query_results() {\n            separator_to_stream();\n            if(opt.count || opt.list_test_cases) {\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"unskipped test cases passing the current filters: \"\n                  << g_cs->numTestCasesPassingFilters << \"\\n\";\n            } else if(opt.list_test_suites) {\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"unskipped test cases passing the current filters: \"\n                  << g_cs->numTestCasesPassingFilters << \"\\n\";\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"test suites with unskipped test cases passing the current filters: \"\n                  << g_cs->numTestSuitesPassingFilters << \"\\n\";\n            }\n        }\n\n        // =========================================================================================\n        // WHAT FOLLOWS ARE OVERRIDES OF THE VIRTUAL METHODS OF THE REPORTER INTERFACE\n        // =========================================================================================\n\n        void report_query(const QueryData& in) override {\n            if(opt.version) {\n                printVersion();\n            } else if(opt.help) {\n                printHelp();\n            } else if(opt.list_reporters) {\n                printRegisteredReporters();\n            } else if(opt.count || opt.list_test_cases) {\n                if(opt.list_test_cases) {\n                    s << Color::Cyan << \"[doctest] \" << Color::None\n                      << \"listing all test case names\\n\";\n                    separator_to_stream();\n                }\n\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    s << Color::None << in.data[i] << \"\\n\";\n\n                separator_to_stream();\n\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"unskipped test cases passing the current filters: \"\n                  << g_cs->numTestCasesPassingFilters << \"\\n\";\n\n            } else if(opt.list_test_suites) {\n                s << Color::Cyan << \"[doctest] \" << Color::None << \"listing all test suites\\n\";\n                separator_to_stream();\n\n                for(unsigned i = 0; i < in.num_data; ++i)\n                    s << Color::None << in.data[i] << \"\\n\";\n\n                separator_to_stream();\n\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"unskipped test cases passing the current filters: \"\n                  << g_cs->numTestCasesPassingFilters << \"\\n\";\n                s << Color::Cyan << \"[doctest] \" << Color::None\n                  << \"test suites with unskipped test cases passing the current filters: \"\n                  << g_cs->numTestSuitesPassingFilters << \"\\n\";\n            }\n        }\n\n        void test_run_start() override { printIntro(); }\n\n        void test_run_end(const TestRunStats& p) override {\n            separator_to_stream();\n\n            const bool anythingFailed = p.numTestCasesFailed > 0 || p.numAssertsFailed > 0;\n            s << Color::Cyan << \"[doctest] \" << Color::None << \"test cases: \" << std::setw(6)\n              << p.numTestCasesPassingFilters << \" | \"\n              << ((p.numTestCasesPassingFilters == 0 || anythingFailed) ? Color::None :\n                                                                          Color::Green)\n              << std::setw(6) << p.numTestCasesPassingFilters - p.numTestCasesFailed << \" passed\"\n              << Color::None << \" | \" << (p.numTestCasesFailed > 0 ? Color::Red : Color::None)\n              << std::setw(6) << p.numTestCasesFailed << \" failed\" << Color::None << \" | \";\n            if(opt.no_skipped_summary == false) {\n                const int numSkipped = p.numTestCases - p.numTestCasesPassingFilters;\n                s << (numSkipped == 0 ? Color::None : Color::Yellow) << std::setw(6) << numSkipped\n                  << \" skipped\" << Color::None;\n            }\n            s << \"\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None << \"assertions: \" << std::setw(6)\n              << p.numAsserts << \" | \"\n              << ((p.numAsserts == 0 || anythingFailed) ? Color::None : Color::Green)\n              << std::setw(6) << (p.numAsserts - p.numAssertsFailed) << \" passed\" << Color::None\n              << \" | \" << (p.numAssertsFailed > 0 ? Color::Red : Color::None) << std::setw(6)\n              << p.numAssertsFailed << \" failed\" << Color::None << \" |\\n\";\n            s << Color::Cyan << \"[doctest] \" << Color::None\n              << \"Status: \" << (p.numTestCasesFailed > 0 ? Color::Red : Color::Green)\n              << ((p.numTestCasesFailed > 0) ? \"FAILURE!\" : \"SUCCESS!\") << Color::None << std::endl;\n        }\n\n        void test_case_start(const TestCaseData& in) override {\n            hasLoggedCurrentTestStart = false;\n            tc                        = &in;\n        }\n        \n        void test_case_reenter(const TestCaseData&) override {}\n\n        void test_case_end(const CurrentTestCaseStats& st) override {\n            // log the preamble of the test case only if there is something\n            // else to print - something other than that an assert has failed\n            if(opt.duration ||\n               (st.failure_flags && st.failure_flags != TestCaseFailureReason::AssertFailure))\n                logTestStart();\n\n            if(opt.duration)\n                s << Color::None << std::setprecision(6) << std::fixed << st.seconds\n                  << \" s: \" << tc->m_name << \"\\n\";\n\n            if(st.failure_flags & TestCaseFailureReason::Timeout)\n                s << Color::Red << \"Test case exceeded time limit of \" << std::setprecision(6)\n                  << std::fixed << tc->m_timeout << \"!\\n\";\n\n            if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedButDidnt) {\n                s << Color::Red << \"Should have failed but didn't! Marking it as failed!\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::ShouldHaveFailedAndDid) {\n                s << Color::Yellow << \"Failed as expected so marking it as not failed\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::CouldHaveFailedAndDid) {\n                s << Color::Yellow << \"Allowed to fail so marking it as not failed\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::DidntFailExactlyNumTimes) {\n                s << Color::Red << \"Didn't fail exactly \" << tc->m_expected_failures\n                  << \" times so marking it as failed!\\n\";\n            } else if(st.failure_flags & TestCaseFailureReason::FailedExactlyNumTimes) {\n                s << Color::Yellow << \"Failed exactly \" << tc->m_expected_failures\n                  << \" times as expected so marking it as not failed!\\n\";\n            }\n            if(st.failure_flags & TestCaseFailureReason::TooManyFailedAsserts) {\n                s << Color::Red << \"Aborting - too many failed asserts!\\n\";\n            }\n            s << Color::None; // lgtm [cpp/useless-expression]\n        }\n\n        void test_case_exception(const TestCaseException& e) override {\n            logTestStart();\n\n            file_line_to_stream(s, tc->m_file, tc->m_line, \" \");\n            successOrFailColoredStringToStream(false, e.is_crash ? assertType::is_require :\n                                                                   assertType::is_check);\n            s << Color::Red << (e.is_crash ? \"test case CRASHED: \" : \"test case THREW exception: \")\n              << Color::Cyan << e.error_string << \"\\n\";\n\n            int num_stringified_contexts = get_num_stringified_contexts();\n            if(num_stringified_contexts) {\n                auto stringified_contexts = get_stringified_contexts();\n                s << Color::None << \"  logged: \";\n                for(int i = num_stringified_contexts; i > 0; --i) {\n                    s << (i == num_stringified_contexts ? \"\" : \"          \")\n                      << stringified_contexts[i - 1] << \"\\n\";\n                }\n            }\n            s << \"\\n\" << Color::None;\n        }\n\n        void subcase_start(const SubcaseSignature& subc) override {\n            std::lock_guard<std::mutex> lock(mutex);\n            subcasesStack.push_back(subc);\n            hasLoggedCurrentTestStart = false;\n        }\n\n        void subcase_end() override {\n            std::lock_guard<std::mutex> lock(mutex);\n            subcasesStack.pop_back();\n            hasLoggedCurrentTestStart = false;\n        }\n\n        void log_assert(const AssertData& rb) override {\n            if(!rb.m_failed && !opt.success)\n                return;\n\n            std::lock_guard<std::mutex> lock(mutex);\n\n            logTestStart();\n\n            file_line_to_stream(s, rb.m_file, rb.m_line, \" \");\n            successOrFailColoredStringToStream(!rb.m_failed, rb.m_at);\n            if((rb.m_at & (assertType::is_throws_as | assertType::is_throws_with)) ==\n               0) //!OCLINT bitwise operator in conditional\n                s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \" ) \"\n                  << Color::None;\n\n            if(rb.m_at & assertType::is_throws) { //!OCLINT bitwise operator in conditional\n                s << (rb.m_threw ? \"threw as expected!\" : \"did NOT throw at all!\") << \"\\n\";\n            } else if((rb.m_at & assertType::is_throws_as) &&\n                      (rb.m_at & assertType::is_throws_with)) { //!OCLINT\n                s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \", \\\"\"\n                  << rb.m_exception_string << \"\\\", \" << rb.m_exception_type << \" ) \" << Color::None;\n                if(rb.m_threw) {\n                    if(!rb.m_failed) {\n                        s << \"threw as expected!\\n\";\n                    } else {\n                        s << \"threw a DIFFERENT exception! (contents: \" << rb.m_exception << \")\\n\";\n                    }\n                } else {\n                    s << \"did NOT throw at all!\\n\";\n                }\n            } else if(rb.m_at &\n                      assertType::is_throws_as) { //!OCLINT bitwise operator in conditional\n                s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \", \"\n                  << rb.m_exception_type << \" ) \" << Color::None\n                  << (rb.m_threw ? (rb.m_threw_as ? \"threw as expected!\" :\n                                                    \"threw a DIFFERENT exception: \") :\n                                   \"did NOT throw at all!\")\n                  << Color::Cyan << rb.m_exception << \"\\n\";\n            } else if(rb.m_at &\n                      assertType::is_throws_with) { //!OCLINT bitwise operator in conditional\n                s << Color::Cyan << assertString(rb.m_at) << \"( \" << rb.m_expr << \", \\\"\"\n                  << rb.m_exception_string << \"\\\" ) \" << Color::None\n                  << (rb.m_threw ? (!rb.m_failed ? \"threw as expected!\" :\n                                                   \"threw a DIFFERENT exception: \") :\n                                   \"did NOT throw at all!\")\n                  << Color::Cyan << rb.m_exception << \"\\n\";\n            } else if(rb.m_at & assertType::is_nothrow) { //!OCLINT bitwise operator in conditional\n                s << (rb.m_threw ? \"THREW exception: \" : \"didn't throw!\") << Color::Cyan\n                  << rb.m_exception << \"\\n\";\n            } else {\n                s << (rb.m_threw ? \"THREW exception: \" :\n                                   (!rb.m_failed ? \"is correct!\\n\" : \"is NOT correct!\\n\"));\n                if(rb.m_threw)\n                    s << rb.m_exception << \"\\n\";\n                else\n                    s << \"  values: \" << assertString(rb.m_at) << \"( \" << rb.m_decomp << \" )\\n\";\n            }\n\n            log_contexts();\n        }\n\n        void log_message(const MessageData& mb) override {\n            std::lock_guard<std::mutex> lock(mutex);\n\n            logTestStart();\n\n            file_line_to_stream(s, mb.m_file, mb.m_line, \" \");\n            s << getSuccessOrFailColor(false, mb.m_severity)\n              << getSuccessOrFailString(mb.m_severity & assertType::is_warn, mb.m_severity,\n                                        \"MESSAGE\") << \": \";\n            s << Color::None << mb.m_string << \"\\n\";\n            log_contexts();\n        }\n\n        void test_case_skipped(const TestCaseData&) override {}\n    };\n\n    DOCTEST_REGISTER_REPORTER(\"console\", 0, ConsoleReporter);\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n    struct DebugOutputWindowReporter : public ConsoleReporter\n    {\n        DOCTEST_THREAD_LOCAL static std::ostringstream oss;\n\n        DebugOutputWindowReporter(const ContextOptions& co)\n                : ConsoleReporter(co, oss) {}\n\n#define DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(func, type, arg)                                    \\\n    void func(type arg) override {                                                                 \\\n        bool with_col = g_no_colors;                                                               \\\n        g_no_colors   = false;                                                                     \\\n        ConsoleReporter::func(arg);                                                                \\\n        DOCTEST_OUTPUT_DEBUG_STRING(oss.str().c_str());                                            \\\n        oss.str(\"\");                                                                               \\\n        g_no_colors = with_col;                                                                    \\\n    }\n\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_start, DOCTEST_EMPTY, DOCTEST_EMPTY)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_run_end, const TestRunStats&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_start, const TestCaseData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_reenter, const TestCaseData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_end, const CurrentTestCaseStats&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_exception, const TestCaseException&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_start, const SubcaseSignature&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(subcase_end, DOCTEST_EMPTY, DOCTEST_EMPTY)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_assert, const AssertData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(log_message, const MessageData&, in)\n        DOCTEST_DEBUG_OUTPUT_REPORTER_OVERRIDE(test_case_skipped, const TestCaseData&, in)\n    };\n\n    DOCTEST_THREAD_LOCAL std::ostringstream DebugOutputWindowReporter::oss;\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n    // the implementation of parseOption()\n    bool parseOptionImpl(int argc, const char* const* argv, const char* pattern, String* value) {\n        // going from the end to the beginning and stopping on the first occurrence from the end\n        for(int i = argc; i > 0; --i) {\n            auto index = i - 1;\n            auto temp = std::strstr(argv[index], pattern);\n            if(temp && (value || strlen(temp) == strlen(pattern))) { //!OCLINT prefer early exits and continue\n                // eliminate matches in which the chars before the option are not '-'\n                bool noBadCharsFound = true;\n                auto curr            = argv[index];\n                while(curr != temp) {\n                    if(*curr++ != '-') {\n                        noBadCharsFound = false;\n                        break;\n                    }\n                }\n                if(noBadCharsFound && argv[index][0] == '-') {\n                    if(value) {\n                        // parsing the value of an option\n                        temp += strlen(pattern);\n                        const unsigned len = strlen(temp);\n                        if(len) {\n                            *value = temp;\n                            return true;\n                        }\n                    } else {\n                        // just a flag - no value\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    }\n\n    // parses an option and returns the string after the '=' character\n    bool parseOption(int argc, const char* const* argv, const char* pattern, String* value = nullptr,\n                     const String& defaultVal = String()) {\n        if(value)\n            *value = defaultVal;\n#ifndef DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n        // offset (normally 3 for \"dt-\") to skip prefix\n        if(parseOptionImpl(argc, argv, pattern + strlen(DOCTEST_CONFIG_OPTIONS_PREFIX), value))\n            return true;\n#endif // DOCTEST_CONFIG_NO_UNPREFIXED_OPTIONS\n        return parseOptionImpl(argc, argv, pattern, value);\n    }\n\n    // locates a flag on the command line\n    bool parseFlag(int argc, const char* const* argv, const char* pattern) {\n        return parseOption(argc, argv, pattern);\n    }\n\n    // parses a comma separated list of words after a pattern in one of the arguments in argv\n    bool parseCommaSepArgs(int argc, const char* const* argv, const char* pattern,\n                           std::vector<String>& res) {\n        String filtersString;\n        if(parseOption(argc, argv, pattern, &filtersString)) {\n            // tokenize with \",\" as a separator\n            // cppcheck-suppress strtokCalled\n            DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH(\"-Wdeprecated-declarations\")\n            auto pch = std::strtok(filtersString.c_str(), \",\"); // modifies the string\n            while(pch != nullptr) {\n                if(strlen(pch))\n                    res.push_back(pch);\n                // uses the strtok() internal state to go to the next token\n                // cppcheck-suppress strtokCalled\n                pch = std::strtok(nullptr, \",\");\n            }\n            DOCTEST_CLANG_SUPPRESS_WARNING_POP\n            return true;\n        }\n        return false;\n    }\n\n    enum optionType\n    {\n        option_bool,\n        option_int\n    };\n\n    // parses an int/bool option from the command line\n    bool parseIntOption(int argc, const char* const* argv, const char* pattern, optionType type,\n                        int& res) {\n        String parsedValue;\n        if(!parseOption(argc, argv, pattern, &parsedValue))\n            return false;\n\n        if(type == 0) {\n            // boolean\n            const char positive[][5] = {\"1\", \"true\", \"on\", \"yes\"};  // 5 - strlen(\"true\") + 1\n            const char negative[][6] = {\"0\", \"false\", \"off\", \"no\"}; // 6 - strlen(\"false\") + 1\n\n            // if the value matches any of the positive/negative possibilities\n            for(unsigned i = 0; i < 4; i++) {\n                if(parsedValue.compare(positive[i], true) == 0) {\n                    res = 1; //!OCLINT parameter reassignment\n                    return true;\n                }\n                if(parsedValue.compare(negative[i], true) == 0) {\n                    res = 0; //!OCLINT parameter reassignment\n                    return true;\n                }\n            }\n        } else {\n            // integer\n            // TODO: change this to use std::stoi or something else! currently it uses undefined behavior - assumes '0' on failed parse...\n            int theInt = std::atoi(parsedValue.c_str()); // NOLINT\n            if(theInt != 0) {\n                res = theInt; //!OCLINT parameter reassignment\n                return true;\n            }\n        }\n        return false;\n    }\n} // namespace\n\nContext::Context(int argc, const char* const* argv)\n        : p(new detail::ContextState) {\n    parseArgs(argc, argv, true);\n    if(argc)\n        p->binary_name = argv[0];\n}\n\nContext::~Context() {\n    if(g_cs == p)\n        g_cs = nullptr;\n    delete p;\n}\n\nvoid Context::applyCommandLine(int argc, const char* const* argv) {\n    parseArgs(argc, argv);\n    if(argc)\n        p->binary_name = argv[0];\n}\n\n// parses args\nvoid Context::parseArgs(int argc, const char* const* argv, bool withDefaults) {\n    using namespace detail;\n\n    // clang-format off\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"source-file=\",        p->filters[0]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sf=\",                 p->filters[0]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"source-file-exclude=\",p->filters[1]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sfe=\",                p->filters[1]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-suite=\",         p->filters[2]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"ts=\",                 p->filters[2]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-suite-exclude=\", p->filters[3]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"tse=\",                p->filters[3]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-case=\",          p->filters[4]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"tc=\",                 p->filters[4]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"test-case-exclude=\",  p->filters[5]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"tce=\",                p->filters[5]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"subcase=\",            p->filters[6]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sc=\",                 p->filters[6]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"subcase-exclude=\",    p->filters[7]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"sce=\",                p->filters[7]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"reporters=\",          p->filters[8]);\n    parseCommaSepArgs(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"r=\",                  p->filters[8]);\n    // clang-format on\n\n    int    intRes = 0;\n    String strRes;\n\n#define DOCTEST_PARSE_AS_BOOL_OR_FLAG(name, sname, var, default)                                   \\\n    if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name \"=\", option_bool, intRes) ||  \\\n       parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname \"=\", option_bool, intRes))   \\\n        p->var = !!intRes;                                                                         \\\n    else if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name) ||                           \\\n            parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname))                            \\\n        p->var = true;                                                                             \\\n    else if(withDefaults)                                                                          \\\n    p->var = default\n\n#define DOCTEST_PARSE_INT_OPTION(name, sname, var, default)                                        \\\n    if(parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name \"=\", option_int, intRes) ||   \\\n       parseIntOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname \"=\", option_int, intRes))    \\\n        p->var = intRes;                                                                           \\\n    else if(withDefaults)                                                                          \\\n    p->var = default\n\n#define DOCTEST_PARSE_STR_OPTION(name, sname, var, default)                                        \\\n    if(parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX name \"=\", &strRes, default) ||        \\\n       parseOption(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX sname \"=\", &strRes, default) ||       \\\n       withDefaults)                                                                               \\\n    p->var = strRes\n\n    // clang-format off\n    DOCTEST_PARSE_STR_OPTION(\"out\", \"o\", out, \"\");\n    DOCTEST_PARSE_STR_OPTION(\"order-by\", \"ob\", order_by, \"file\");\n    DOCTEST_PARSE_INT_OPTION(\"rand-seed\", \"rs\", rand_seed, 0);\n\n    DOCTEST_PARSE_INT_OPTION(\"first\", \"f\", first, 0);\n    DOCTEST_PARSE_INT_OPTION(\"last\", \"l\", last, UINT_MAX);\n\n    DOCTEST_PARSE_INT_OPTION(\"abort-after\", \"aa\", abort_after, 0);\n    DOCTEST_PARSE_INT_OPTION(\"subcase-filter-levels\", \"scfl\", subcase_filter_levels, INT_MAX);\n\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"success\", \"s\", success, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"case-sensitive\", \"cs\", case_sensitive, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"exit\", \"e\", exit, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"duration\", \"d\", duration, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-throw\", \"nt\", no_throw, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-exitcode\", \"ne\", no_exitcode, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-run\", \"nr\", no_run, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-version\", \"nv\", no_version, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-colors\", \"nc\", no_colors, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"force-colors\", \"fc\", force_colors, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-breaks\", \"nb\", no_breaks, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-skip\", \"ns\", no_skip, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"gnu-file-line\", \"gfl\", gnu_file_line, !bool(DOCTEST_MSVC));\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-path-filenames\", \"npf\", no_path_in_filenames, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-line-numbers\", \"nln\", no_line_numbers, false);\n    DOCTEST_PARSE_AS_BOOL_OR_FLAG(\"no-skipped-summary\", \"nss\", no_skipped_summary, false);\n    // clang-format on\n\n    if(withDefaults) {\n        p->help             = false;\n        p->version          = false;\n        p->count            = false;\n        p->list_test_cases  = false;\n        p->list_test_suites = false;\n        p->list_reporters   = false;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"help\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"h\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"?\")) {\n        p->help = true;\n        p->exit = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"version\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"v\")) {\n        p->version = true;\n        p->exit    = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"count\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"c\")) {\n        p->count = true;\n        p->exit  = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"list-test-cases\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"ltc\")) {\n        p->list_test_cases = true;\n        p->exit            = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"list-test-suites\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"lts\")) {\n        p->list_test_suites = true;\n        p->exit             = true;\n    }\n    if(parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"list-reporters\") ||\n       parseFlag(argc, argv, DOCTEST_CONFIG_OPTIONS_PREFIX \"lr\")) {\n        p->list_reporters = true;\n        p->exit           = true;\n    }\n}\n\n// allows the user to add procedurally to the filters from the command line\nvoid Context::addFilter(const char* filter, const char* value) { setOption(filter, value); }\n\n// allows the user to clear all filters from the command line\nvoid Context::clearFilters() {\n    for(auto& curr : p->filters)\n        curr.clear();\n}\n\n// allows the user to override procedurally the int/bool options from the command line\nvoid Context::setOption(const char* option, int value) {\n    setOption(option, toString(value).c_str());\n}\n\n// allows the user to override procedurally the string options from the command line\nvoid Context::setOption(const char* option, const char* value) {\n    auto argv   = String(\"-\") + option + \"=\" + value;\n    auto lvalue = argv.c_str();\n    parseArgs(1, &lvalue);\n}\n\n// users should query this in their main() and exit the program if true\nbool Context::shouldExit() { return p->exit; }\n\nvoid Context::setAsDefaultForAssertsOutOfTestCases() { g_cs = p; }\n\nvoid Context::setAssertHandler(detail::assert_handler ah) { p->ah = ah; }\n\n// the main function that does all the filtering and test running\nint Context::run() {\n    using namespace detail;\n\n    // save the old context state in case such was setup - for using asserts out of a testing context\n    auto old_cs = g_cs;\n    // this is the current contest\n    g_cs               = p;\n    is_running_in_test = true;\n\n    g_no_colors = p->no_colors;\n    p->resetRunData();\n\n    // stdout by default\n    p->cout = &std::cout;\n    p->cerr = &std::cerr;\n\n    // or to a file if specified\n    std::fstream fstr;\n    if(p->out.size()) {\n        fstr.open(p->out.c_str(), std::fstream::out);\n        p->cout = &fstr;\n    }\n\n    auto cleanup_and_return = [&]() {\n        if(fstr.is_open())\n            fstr.close();\n\n        // restore context\n        g_cs               = old_cs;\n        is_running_in_test = false;\n\n        // we have to free the reporters which were allocated when the run started\n        for(auto& curr : p->reporters_currently_used)\n            delete curr;\n        p->reporters_currently_used.clear();\n\n        if(p->numTestCasesFailed && !p->no_exitcode)\n            return EXIT_FAILURE;\n        return EXIT_SUCCESS;\n    };\n\n    // setup default reporter if none is given through the command line\n    if(p->filters[8].empty())\n        p->filters[8].push_back(\"console\");\n\n    // check to see if any of the registered reporters has been selected\n    for(auto& curr : getReporters()) {\n        if(matchesAny(curr.first.second.c_str(), p->filters[8], false, p->case_sensitive))\n            p->reporters_currently_used.push_back(curr.second(*g_cs));\n    }\n\n    // TODO: check if there is nothing in reporters_currently_used\n\n    // prepend all listeners\n    for(auto& curr : getListeners())\n        p->reporters_currently_used.insert(p->reporters_currently_used.begin(), curr.second(*g_cs));\n\n#ifdef DOCTEST_PLATFORM_WINDOWS\n    if(isDebuggerActive())\n        p->reporters_currently_used.push_back(new DebugOutputWindowReporter(*g_cs));\n#endif // DOCTEST_PLATFORM_WINDOWS\n\n    // handle version, help and no_run\n    if(p->no_run || p->version || p->help || p->list_reporters) {\n        DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, QueryData());\n\n        return cleanup_and_return();\n    }\n\n    std::vector<const TestCase*> testArray;\n    for(auto& curr : getRegisteredTests())\n        testArray.push_back(&curr);\n    p->numTestCases = testArray.size();\n\n    // sort the collected records\n    if(!testArray.empty()) {\n        if(p->order_by.compare(\"file\", true) == 0) {\n            std::sort(testArray.begin(), testArray.end(), fileOrderComparator);\n        } else if(p->order_by.compare(\"suite\", true) == 0) {\n            std::sort(testArray.begin(), testArray.end(), suiteOrderComparator);\n        } else if(p->order_by.compare(\"name\", true) == 0) {\n            std::sort(testArray.begin(), testArray.end(), nameOrderComparator);\n        } else if(p->order_by.compare(\"rand\", true) == 0) {\n            std::srand(p->rand_seed);\n\n            // random_shuffle implementation\n            const auto first = &testArray[0];\n            for(size_t i = testArray.size() - 1; i > 0; --i) {\n                int idxToSwap = std::rand() % (i + 1); // NOLINT\n\n                const auto temp = first[i];\n\n                first[i]         = first[idxToSwap];\n                first[idxToSwap] = temp;\n            }\n        }\n    }\n\n    std::set<String> testSuitesPassingFilt;\n\n    bool                query_mode = p->count || p->list_test_cases || p->list_test_suites;\n    std::vector<String> queryResults;\n\n    if(!query_mode)\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_start, DOCTEST_EMPTY);\n\n    // invoke the registered functions if they match the filter criteria (or just count them)\n    for(auto& curr : testArray) {\n        const auto& tc = *curr;\n\n        bool skip_me = false;\n        if(tc.m_skip && !p->no_skip)\n            skip_me = true;\n\n        if(!matchesAny(tc.m_file, p->filters[0], true, p->case_sensitive))\n            skip_me = true;\n        if(matchesAny(tc.m_file, p->filters[1], false, p->case_sensitive))\n            skip_me = true;\n        if(!matchesAny(tc.m_test_suite, p->filters[2], true, p->case_sensitive))\n            skip_me = true;\n        if(matchesAny(tc.m_test_suite, p->filters[3], false, p->case_sensitive))\n            skip_me = true;\n        if(!matchesAny(tc.m_name, p->filters[4], true, p->case_sensitive))\n            skip_me = true;\n        if(matchesAny(tc.m_name, p->filters[5], false, p->case_sensitive))\n            skip_me = true;\n\n        if(!skip_me)\n            p->numTestCasesPassingFilters++;\n\n        // skip the test if it is not in the execution range\n        if((p->last < p->numTestCasesPassingFilters && p->first <= p->last) ||\n           (p->first > p->numTestCasesPassingFilters))\n            skip_me = true;\n\n        if(skip_me) {\n            if(!query_mode)\n                DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_skipped, tc);\n            continue;\n        }\n\n        // do not execute the test if we are to only count the number of filter passing tests\n        if(p->count)\n            continue;\n\n        // print the name of the test and don't execute it\n        if(p->list_test_cases) {\n            queryResults.push_back(tc.m_name);\n            continue;\n        }\n\n        // print the name of the test suite if not done already and don't execute it\n        if(p->list_test_suites) {\n            if((testSuitesPassingFilt.count(tc.m_test_suite) == 0) && tc.m_test_suite[0] != '\\0') {\n                queryResults.push_back(tc.m_test_suite);\n                testSuitesPassingFilt.insert(tc.m_test_suite);\n                p->numTestSuitesPassingFilters++;\n            }\n            continue;\n        }\n\n        // execute the test if it passes all the filtering\n        {\n            p->currentTest = &tc;\n\n            p->failure_flags = TestCaseFailureReason::None;\n            p->seconds       = 0;\n\n            // reset atomic counters\n            p->numAssertsFailedCurrentTest_atomic = 0;\n            p->numAssertsCurrentTest_atomic       = 0;\n\n            p->subcasesPassed.clear();\n\n            DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_start, tc);\n\n            p->timer.start();\n            \n            bool run_test = true;\n\n            do {\n                // reset some of the fields for subcases (except for the set of fully passed ones)\n                p->should_reenter          = false;\n                p->subcasesCurrentMaxLevel = 0;\n                p->subcasesStack.clear();\n\n                p->shouldLogCurrentException = true;\n\n                // reset stuff for logging with INFO()\n                p->stringifiedContexts.clear();\n\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n                try {\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n                    FatalConditionHandler fatalConditionHandler; // Handle signals\n                    // execute the test\n                    tc.m_test();\n                    fatalConditionHandler.reset();\n#ifndef DOCTEST_CONFIG_NO_EXCEPTIONS\n                } catch(const TestFailureException&) {\n                    p->failure_flags |= TestCaseFailureReason::AssertFailure;\n                } catch(...) {\n                    DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_exception,\n                                                      {translateActiveException(), false});\n                    p->failure_flags |= TestCaseFailureReason::Exception;\n                }\n#endif // DOCTEST_CONFIG_NO_EXCEPTIONS\n\n                // exit this loop if enough assertions have failed - even if there are more subcases\n                if(p->abort_after > 0 &&\n                   p->numAssertsFailed + p->numAssertsFailedCurrentTest_atomic >= p->abort_after) {\n                    run_test = false;\n                    p->failure_flags |= TestCaseFailureReason::TooManyFailedAsserts;\n                }\n                \n                if(p->should_reenter && run_test)\n                    DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_reenter, tc);\n                if(!p->should_reenter)\n                    run_test = false;\n            } while(run_test);\n\n            p->finalizeTestCaseData();\n\n            DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_end, *g_cs);\n\n            p->currentTest = nullptr;\n\n            // stop executing tests if enough assertions have failed\n            if(p->abort_after > 0 && p->numAssertsFailed >= p->abort_after)\n                break;\n        }\n    }\n\n    if(!query_mode) {\n        DOCTEST_ITERATE_THROUGH_REPORTERS(test_run_end, *g_cs);\n    } else {\n        QueryData qdata;\n        qdata.run_stats = g_cs;\n        qdata.data      = queryResults.data();\n        qdata.num_data  = unsigned(queryResults.size());\n        DOCTEST_ITERATE_THROUGH_REPORTERS(report_query, qdata);\n    }\n\n    // see these issues on the reasoning for this:\n    // - https://github.com/onqtam/doctest/issues/143#issuecomment-414418903\n    // - https://github.com/onqtam/doctest/issues/126\n    auto DOCTEST_FIX_FOR_MACOS_LIBCPP_IOSFWD_STRING_LINK_ERRORS = []() DOCTEST_NOINLINE\n        { std::cout << std::string(); };\n    DOCTEST_FIX_FOR_MACOS_LIBCPP_IOSFWD_STRING_LINK_ERRORS();\n\n    return cleanup_and_return();\n}\n\nIReporter::~IReporter() = default;\n\nint IReporter::get_num_active_contexts() { return detail::g_infoContexts.size(); }\nconst IContextScope* const* IReporter::get_active_contexts() {\n    return get_num_active_contexts() ? &detail::g_infoContexts[0] : nullptr;\n}\n\nint IReporter::get_num_stringified_contexts() { return detail::g_cs->stringifiedContexts.size(); }\nconst String* IReporter::get_stringified_contexts() {\n    return get_num_stringified_contexts() ? &detail::g_cs->stringifiedContexts[0] : nullptr;\n}\n\nnamespace detail {\n    void registerReporterImpl(const char* name, int priority, reporterCreatorFunc c, bool isReporter) {\n        if(isReporter)\n            getReporters().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));\n        else\n            getListeners().insert(reporterMap::value_type(reporterMap::key_type(priority, name), c));\n    }\n} // namespace detail\n\n} // namespace doctest\n\n#endif // DOCTEST_CONFIG_DISABLE\n\n#ifdef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\nDOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4007) // 'function' : must be 'attribute' - see issue #182\nint main(int argc, char** argv) { return doctest::Context(argc, argv).run(); }\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\n#endif // DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n\nDOCTEST_CLANG_SUPPRESS_WARNING_POP\nDOCTEST_MSVC_SUPPRESS_WARNING_POP\nDOCTEST_GCC_SUPPRESS_WARNING_POP\n\n#endif // DOCTEST_LIBRARY_IMPLEMENTATION\n#endif // DOCTEST_CONFIG_IMPLEMENT\n"
  },
  {
    "path": ".config/proji/templates/cmake/external/headers/json.hpp",
    "content": "/*\n    __ _____ _____ _____\n __|  |   __|     |   | |  JSON for Modern C++\n|  |  |__   |  |  | | | |  version 3.7.0\n|_____|_____|_____|_|___|  https://github.com/nlohmann/json\n\nLicensed under the MIT License <http://opensource.org/licenses/MIT>.\nSPDX-License-Identifier: MIT\nCopyright (c) 2013-2019 Niels Lohmann <http://nlohmann.me>.\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 all\ncopies 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 THE\nSOFTWARE.\n*/\n\n#ifndef INCLUDE_NLOHMANN_JSON_HPP_\n#define INCLUDE_NLOHMANN_JSON_HPP_\n\n#define NLOHMANN_JSON_VERSION_MAJOR 3\n#define NLOHMANN_JSON_VERSION_MINOR 7\n#define NLOHMANN_JSON_VERSION_PATCH 0\n\n#include <algorithm> // all_of, find, for_each\n#include <cassert> // assert\n#include <ciso646> // and, not, or\n#include <cstddef> // nullptr_t, ptrdiff_t, size_t\n#include <functional> // hash, less\n#include <initializer_list> // initializer_list\n#include <iosfwd> // istream, ostream\n#include <iterator> // random_access_iterator_tag\n#include <memory> // unique_ptr\n#include <numeric> // accumulate\n#include <string> // string, stoi, to_string\n#include <utility> // declval, forward, move, pair, swap\n#include <vector> // vector\n\n// #include <nlohmann/adl_serializer.hpp>\n\n\n#include <utility>\n\n// #include <nlohmann/detail/conversions/from_json.hpp>\n\n\n#include <algorithm> // transform\n#include <array> // array\n#include <ciso646> // and, not\n#include <forward_list> // forward_list\n#include <iterator> // inserter, front_inserter, end\n#include <map> // map\n#include <string> // string\n#include <tuple> // tuple, make_tuple\n#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible\n#include <unordered_map> // unordered_map\n#include <utility> // pair, declval\n#include <valarray> // valarray\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n\n#include <exception> // exception\n#include <stdexcept> // runtime_error\n#include <string> // to_string\n\n// #include <nlohmann/detail/input/position_t.hpp>\n\n\n#include <cstddef> // size_t\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/// struct to capture the start position of the current token\nstruct position_t\n{\n    /// the total number of characters read\n    std::size_t chars_read_total = 0;\n    /// the number of characters read in the current line\n    std::size_t chars_read_current_line = 0;\n    /// the number of lines read\n    std::size_t lines_read = 0;\n\n    /// conversion to size_t to preserve SAX interface\n    constexpr operator size_t() const\n    {\n        return chars_read_total;\n    }\n};\n\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\n#include <utility> // pair\n// #include <nlohmann/thirdparty/hedley/hedley.hpp>\n/* Hedley - https://nemequ.github.io/hedley\n * Created by Evan Nemerson <evan@nemerson.com>\n *\n * To the extent possible under law, the author(s) have dedicated all\n * copyright and related and neighboring rights to this software to\n * the public domain worldwide. This software is distributed without\n * any warranty.\n *\n * For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.\n * SPDX-License-Identifier: CC0-1.0\n */\n\n#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 11)\n#if defined(JSON_HEDLEY_VERSION)\n    #undef JSON_HEDLEY_VERSION\n#endif\n#define JSON_HEDLEY_VERSION 11\n\n#if defined(JSON_HEDLEY_STRINGIFY_EX)\n    #undef JSON_HEDLEY_STRINGIFY_EX\n#endif\n#define JSON_HEDLEY_STRINGIFY_EX(x) #x\n\n#if defined(JSON_HEDLEY_STRINGIFY)\n    #undef JSON_HEDLEY_STRINGIFY\n#endif\n#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x)\n\n#if defined(JSON_HEDLEY_CONCAT_EX)\n    #undef JSON_HEDLEY_CONCAT_EX\n#endif\n#define JSON_HEDLEY_CONCAT_EX(a,b) a##b\n\n#if defined(JSON_HEDLEY_CONCAT)\n    #undef JSON_HEDLEY_CONCAT\n#endif\n#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b)\n\n#if defined(JSON_HEDLEY_VERSION_ENCODE)\n    #undef JSON_HEDLEY_VERSION_ENCODE\n#endif\n#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision))\n\n#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR)\n    #undef JSON_HEDLEY_VERSION_DECODE_MAJOR\n#endif\n#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000)\n\n#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR)\n    #undef JSON_HEDLEY_VERSION_DECODE_MINOR\n#endif\n#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000)\n\n#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION)\n    #undef JSON_HEDLEY_VERSION_DECODE_REVISION\n#endif\n#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000)\n\n#if defined(JSON_HEDLEY_GNUC_VERSION)\n    #undef JSON_HEDLEY_GNUC_VERSION\n#endif\n#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__)\n    #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__)\n#elif defined(__GNUC__)\n    #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK)\n    #undef JSON_HEDLEY_GNUC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_GNUC_VERSION)\n    #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_MSVC_VERSION)\n    #undef JSON_HEDLEY_MSVC_VERSION\n#endif\n#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000)\n    #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100)\n#elif defined(_MSC_FULL_VER)\n    #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10)\n#elif defined(_MSC_VER)\n    #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0)\n#endif\n\n#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK)\n    #undef JSON_HEDLEY_MSVC_VERSION_CHECK\n#endif\n#if !defined(_MSC_VER)\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0)\n#elif defined(_MSC_VER) && (_MSC_VER >= 1400)\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch)))\n#elif defined(_MSC_VER) && (_MSC_VER >= 1200)\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch)))\n#else\n    #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor)))\n#endif\n\n#if defined(JSON_HEDLEY_INTEL_VERSION)\n    #undef JSON_HEDLEY_INTEL_VERSION\n#endif\n#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)\n    #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE)\n#elif defined(__INTEL_COMPILER)\n    #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0)\n#endif\n\n#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK)\n    #undef JSON_HEDLEY_INTEL_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_INTEL_VERSION)\n    #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_PGI_VERSION)\n    #undef JSON_HEDLEY_PGI_VERSION\n#endif\n#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)\n    #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__)\n#endif\n\n#if defined(JSON_HEDLEY_PGI_VERSION_CHECK)\n    #undef JSON_HEDLEY_PGI_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_PGI_VERSION)\n    #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_SUNPRO_VERSION)\n    #undef JSON_HEDLEY_SUNPRO_VERSION\n#endif\n#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10)\n#elif defined(__SUNPRO_C)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf)\n#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10)\n#elif defined(__SUNPRO_CC)\n    #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf)\n#endif\n\n#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK)\n    #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_SUNPRO_VERSION)\n    #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)\n    #undef JSON_HEDLEY_EMSCRIPTEN_VERSION\n#endif\n#if defined(__EMSCRIPTEN__)\n    #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)\n#endif\n\n#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK)\n    #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION)\n    #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_ARM_VERSION)\n    #undef JSON_HEDLEY_ARM_VERSION\n#endif\n#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION)\n    #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100)\n#elif defined(__CC_ARM) && defined(__ARMCC_VERSION)\n    #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100)\n#endif\n\n#if defined(JSON_HEDLEY_ARM_VERSION_CHECK)\n    #undef JSON_HEDLEY_ARM_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_ARM_VERSION)\n    #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_IBM_VERSION)\n    #undef JSON_HEDLEY_IBM_VERSION\n#endif\n#if defined(__ibmxl__)\n    #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__)\n#elif defined(__xlC__) && defined(__xlC_ver__)\n    #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff)\n#elif defined(__xlC__)\n    #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0)\n#endif\n\n#if defined(JSON_HEDLEY_IBM_VERSION_CHECK)\n    #undef JSON_HEDLEY_IBM_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_IBM_VERSION)\n    #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TI_VERSION)\n    #undef JSON_HEDLEY_TI_VERSION\n#endif\n#if defined(__TI_COMPILER_VERSION__)\n    #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000))\n#endif\n\n#if defined(JSON_HEDLEY_TI_VERSION_CHECK)\n    #undef JSON_HEDLEY_TI_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TI_VERSION)\n    #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_CRAY_VERSION)\n    #undef JSON_HEDLEY_CRAY_VERSION\n#endif\n#if defined(_CRAYC)\n    #if defined(_RELEASE_PATCHLEVEL)\n        #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL)\n    #else\n        #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0)\n    #endif\n#endif\n\n#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK)\n    #undef JSON_HEDLEY_CRAY_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_CRAY_VERSION)\n    #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_IAR_VERSION)\n    #undef JSON_HEDLEY_IAR_VERSION\n#endif\n#if defined(__IAR_SYSTEMS_ICC__)\n    #if __VER__ > 1000\n        #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000))\n    #else\n        #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(VER / 100, __VER__ % 100, 0)\n    #endif\n#endif\n\n#if defined(JSON_HEDLEY_IAR_VERSION_CHECK)\n    #undef JSON_HEDLEY_IAR_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_IAR_VERSION)\n    #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_TINYC_VERSION)\n    #undef JSON_HEDLEY_TINYC_VERSION\n#endif\n#if defined(__TINYC__)\n    #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100)\n#endif\n\n#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK)\n    #undef JSON_HEDLEY_TINYC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_TINYC_VERSION)\n    #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_DMC_VERSION)\n    #undef JSON_HEDLEY_DMC_VERSION\n#endif\n#if defined(__DMC__)\n    #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf)\n#endif\n\n#if defined(JSON_HEDLEY_DMC_VERSION_CHECK)\n    #undef JSON_HEDLEY_DMC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_DMC_VERSION)\n    #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_COMPCERT_VERSION)\n    #undef JSON_HEDLEY_COMPCERT_VERSION\n#endif\n#if defined(__COMPCERT_VERSION__)\n    #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100)\n#endif\n\n#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK)\n    #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_COMPCERT_VERSION)\n    #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_PELLES_VERSION)\n    #undef JSON_HEDLEY_PELLES_VERSION\n#endif\n#if defined(__POCC__)\n    #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0)\n#endif\n\n#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK)\n    #undef JSON_HEDLEY_PELLES_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_PELLES_VERSION)\n    #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_VERSION)\n    #undef JSON_HEDLEY_GCC_VERSION\n#endif\n#if \\\n    defined(JSON_HEDLEY_GNUC_VERSION) && \\\n    !defined(__clang__) && \\\n    !defined(JSON_HEDLEY_INTEL_VERSION) && \\\n    !defined(JSON_HEDLEY_PGI_VERSION) && \\\n    !defined(JSON_HEDLEY_ARM_VERSION) && \\\n    !defined(JSON_HEDLEY_TI_VERSION) && \\\n    !defined(__COMPCERT__)\n    #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION\n#endif\n\n#if defined(JSON_HEDLEY_GCC_VERSION_CHECK)\n    #undef JSON_HEDLEY_GCC_VERSION_CHECK\n#endif\n#if defined(JSON_HEDLEY_GCC_VERSION)\n    #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch))\n#else\n    #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_HAS_ATTRIBUTE\n#endif\n#if defined(__has_attribute)\n    #define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute)\n#else\n    #define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE\n#endif\n#if defined(__has_attribute)\n    #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE\n#endif\n#if defined(__has_attribute)\n    #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) __has_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE\n#endif\n#if \\\n    defined(__has_cpp_attribute) && \\\n    defined(__cplusplus) && \\\n    (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0))\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute)\n#else\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS)\n    #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS\n#endif\n#if !defined(__cplusplus) || !defined(__has_cpp_attribute)\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)\n#elif \\\n    !defined(JSON_HEDLEY_PGI_VERSION) && \\\n    (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \\\n    (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0))\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute)\n#else\n    #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE\n#endif\n#if defined(__has_cpp_attribute) && defined(__cplusplus)\n    #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE\n#endif\n#if defined(__has_cpp_attribute) && defined(__cplusplus)\n    #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_BUILTIN)\n    #undef JSON_HEDLEY_HAS_BUILTIN\n#endif\n#if defined(__has_builtin)\n    #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin)\n#else\n    #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN)\n    #undef JSON_HEDLEY_GNUC_HAS_BUILTIN\n#endif\n#if defined(__has_builtin)\n    #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN)\n    #undef JSON_HEDLEY_GCC_HAS_BUILTIN\n#endif\n#if defined(__has_builtin)\n    #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin)\n#else\n    #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_FEATURE)\n    #undef JSON_HEDLEY_HAS_FEATURE\n#endif\n#if defined(__has_feature)\n    #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature)\n#else\n    #define JSON_HEDLEY_HAS_FEATURE(feature) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE)\n    #undef JSON_HEDLEY_GNUC_HAS_FEATURE\n#endif\n#if defined(__has_feature)\n    #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_FEATURE)\n    #undef JSON_HEDLEY_GCC_HAS_FEATURE\n#endif\n#if defined(__has_feature)\n    #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature)\n#else\n    #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_EXTENSION)\n    #undef JSON_HEDLEY_HAS_EXTENSION\n#endif\n#if defined(__has_extension)\n    #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension)\n#else\n    #define JSON_HEDLEY_HAS_EXTENSION(extension) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION)\n    #undef JSON_HEDLEY_GNUC_HAS_EXTENSION\n#endif\n#if defined(__has_extension)\n    #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION)\n    #undef JSON_HEDLEY_GCC_HAS_EXTENSION\n#endif\n#if defined(__has_extension)\n    #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension)\n#else\n    #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE\n#endif\n#if defined(__has_declspec_attribute)\n    #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute)\n#else\n    #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE\n#endif\n#if defined(__has_declspec_attribute)\n    #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE\n#endif\n#if defined(__has_declspec_attribute)\n    #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute)\n#else\n    #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_HAS_WARNING)\n    #undef JSON_HEDLEY_HAS_WARNING\n#endif\n#if defined(__has_warning)\n    #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning)\n#else\n    #define JSON_HEDLEY_HAS_WARNING(warning) (0)\n#endif\n\n#if defined(JSON_HEDLEY_GNUC_HAS_WARNING)\n    #undef JSON_HEDLEY_GNUC_HAS_WARNING\n#endif\n#if defined(__has_warning)\n    #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)\n#else\n    #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_GCC_HAS_WARNING)\n    #undef JSON_HEDLEY_GCC_HAS_WARNING\n#endif\n#if defined(__has_warning)\n    #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning)\n#else\n    #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for\n   HEDLEY INTERNAL USE ONLY.  API subject to change without notice. */\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_\n#endif\n#if defined(__cplusplus) && JSON_HEDLEY_HAS_WARNING(\"-Wc++98-compat\")\n#  define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wc++98-compat\\\"\") \\\n    xpr \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#else\n#  define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x\n#endif\n\n#if \\\n    (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \\\n    defined(__clang__) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) || \\\n    JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \\\n    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR))\n    #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value)\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_PRAGMA(value) __pragma(value)\n#else\n    #define JSON_HEDLEY_PRAGMA(value)\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH)\n    #undef JSON_HEDLEY_DIAGNOSTIC_PUSH\n#endif\n#if defined(JSON_HEDLEY_DIAGNOSTIC_POP)\n    #undef JSON_HEDLEY_DIAGNOSTIC_POP\n#endif\n#if defined(__clang__)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"clang diagnostic push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"clang diagnostic pop\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"warning(push)\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"warning(pop)\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"GCC diagnostic push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"GCC diagnostic pop\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push))\n    #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop))\n#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"pop\")\n#elif JSON_HEDLEY_TI_VERSION_CHECK(8,1,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"diag_push\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"diag_pop\")\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma(\"warning(push)\")\n    #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma(\"warning(pop)\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_PUSH\n    #define JSON_HEDLEY_DIAGNOSTIC_POP\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wdeprecated-declarations\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"clang diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"warning(disable:1478 1786)\")\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress 1215,1444\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996))\n#elif JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress 1291,1718\")\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)\")\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"error_messages(off,symdeprecated,symdeprecated2)\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"diag_suppress=Pe1444,Pe1215\")\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma(\"warn(disable:2241)\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-pragmas\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"clang diagnostic ignored \\\"-Wunknown-pragmas\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"warning(disable:161)\")\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress 1675\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"GCC diagnostic ignored \\\"-Wunknown-pragmas\\\"\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068))\n#elif JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress 163\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma(\"diag_suppress=Pe161\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-attributes\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"clang diagnostic ignored \\\"-Wunknown-attributes\\\"\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"GCC diagnostic ignored \\\"-Wdeprecated-declarations\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"warning(disable:1292)\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030))\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress 1097\")\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"error_messages(off,attrskipunsup)\")\n#elif JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma(\"diag_suppress 1173\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES\n#endif\n\n#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL)\n    #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wcast-qual\")\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma(\"clang diagnostic ignored \\\"-Wcast-qual\\\"\")\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma(\"warning(disable:2203 2331)\")\n#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0)\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma(\"GCC diagnostic ignored \\\"-Wcast-qual\\\"\")\n#else\n    #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\n#endif\n\n#if defined(JSON_HEDLEY_DEPRECATED)\n    #undef JSON_HEDLEY_DEPRECATED\n#endif\n#if defined(JSON_HEDLEY_DEPRECATED_FOR)\n    #undef JSON_HEDLEY_DEPRECATED_FOR\n#endif\n#if defined(__cplusplus) && (__cplusplus >= 201402L)\n    #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated(\"Since \" #since)]])\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated(\"Since \" #since \"; use \" #replacement)]])\n#elif \\\n    JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,3,0)\n    #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__(\"Since \" #since)))\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__(\"Since \" #since \"; use \" #replacement)))\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n    #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__))\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__))\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0)\n    #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated(\"Since \" # since))\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated(\"Since \" #since \"; use \" #replacement))\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \\\n    JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0)\n    #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated)\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated)\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_DEPRECATED(since) _Pragma(\"deprecated\")\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma(\"deprecated\")\n#else\n    #define JSON_HEDLEY_DEPRECATED(since)\n    #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement)\n#endif\n\n#if defined(JSON_HEDLEY_UNAVAILABLE)\n    #undef JSON_HEDLEY_UNAVAILABLE\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__(\"Not available until \" #available_since)))\n#else\n    #define JSON_HEDLEY_UNAVAILABLE(available_since)\n#endif\n\n#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT)\n    #undef JSON_HEDLEY_WARN_UNUSED_RESULT\n#endif\n#if defined(__cplusplus) && (__cplusplus >= 201703L)\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]])\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))\n#elif defined(_Check_return_) /* SAL */\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_\n#else\n    #define JSON_HEDLEY_WARN_UNUSED_RESULT\n#endif\n\n#if defined(JSON_HEDLEY_SENTINEL)\n    #undef JSON_HEDLEY_SENTINEL\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0)\n    #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position)))\n#else\n    #define JSON_HEDLEY_SENTINEL(position)\n#endif\n\n#if defined(JSON_HEDLEY_NO_RETURN)\n    #undef JSON_HEDLEY_NO_RETURN\n#endif\n#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_NO_RETURN __noreturn\n#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))\n#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L\n    #define JSON_HEDLEY_NO_RETURN _Noreturn\n#elif defined(__cplusplus) && (__cplusplus >= 201103L)\n    #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]])\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(18,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(17,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n    #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__))\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_NO_RETURN _Pragma(\"does_not_return\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)\n    #define JSON_HEDLEY_NO_RETURN __declspec(noreturn)\n#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_NO_RETURN _Pragma(\"FUNC_NEVER_RETURNS;\")\n#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)\n    #define JSON_HEDLEY_NO_RETURN __attribute((noreturn))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)\n    #define JSON_HEDLEY_NO_RETURN __declspec(noreturn)\n#else\n    #define JSON_HEDLEY_NO_RETURN\n#endif\n\n#if defined(JSON_HEDLEY_NO_ESCAPE)\n    #undef JSON_HEDLEY_NO_ESCAPE\n#endif\n#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape)\n    #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__))\n#else\n    #define JSON_HEDLEY_NO_ESCAPE\n#endif\n\n#if defined(JSON_HEDLEY_UNREACHABLE)\n    #undef JSON_HEDLEY_UNREACHABLE\n#endif\n#if defined(JSON_HEDLEY_UNREACHABLE_RETURN)\n    #undef JSON_HEDLEY_UNREACHABLE_RETURN\n#endif\n#if \\\n    (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5)\n    #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable()\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)\n    #define JSON_HEDLEY_UNREACHABLE() __assume(0)\n#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0)\n    #if defined(__cplusplus)\n        #define JSON_HEDLEY_UNREACHABLE() std::_nassert(0)\n    #else\n        #define JSON_HEDLEY_UNREACHABLE() _nassert(0)\n    #endif\n    #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return value\n#elif defined(EXIT_FAILURE)\n    #define JSON_HEDLEY_UNREACHABLE() abort()\n#else\n    #define JSON_HEDLEY_UNREACHABLE()\n    #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return value\n#endif\n#if !defined(JSON_HEDLEY_UNREACHABLE_RETURN)\n    #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE()\n#endif\n\n#if defined(JSON_HEDLEY_ASSUME)\n    #undef JSON_HEDLEY_ASSUME\n#endif\n#if \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_ASSUME(expr) __assume(expr)\n#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume)\n    #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr)\n#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0)\n    #if defined(__cplusplus)\n        #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr)\n    #else\n        #define JSON_HEDLEY_ASSUME(expr) _nassert(expr)\n    #endif\n#elif \\\n    (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && !defined(JSON_HEDLEY_ARM_VERSION)) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5)\n    #define JSON_HEDLEY_ASSUME(expr) ((void) ((expr) ? 1 : (__builtin_unreachable(), 1)))\n#else\n    #define JSON_HEDLEY_ASSUME(expr) ((void) (expr))\n#endif\n\nJSON_HEDLEY_DIAGNOSTIC_PUSH\n#if JSON_HEDLEY_HAS_WARNING(\"-Wpedantic\")\n    #pragma clang diagnostic ignored \"-Wpedantic\"\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wc++98-compat-pedantic\") && defined(__cplusplus)\n    #pragma clang diagnostic ignored \"-Wc++98-compat-pedantic\"\n#endif\n#if JSON_HEDLEY_GCC_HAS_WARNING(\"-Wvariadic-macros\",4,0,0)\n    #if defined(__clang__)\n        #pragma clang diagnostic ignored \"-Wvariadic-macros\"\n    #elif defined(JSON_HEDLEY_GCC_VERSION)\n        #pragma GCC diagnostic ignored \"-Wvariadic-macros\"\n    #endif\n#endif\n#if defined(JSON_HEDLEY_NON_NULL)\n    #undef JSON_HEDLEY_NON_NULL\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)\n    #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__)))\n#else\n    #define JSON_HEDLEY_NON_NULL(...)\n#endif\nJSON_HEDLEY_DIAGNOSTIC_POP\n\n#if defined(JSON_HEDLEY_PRINTF_FORMAT)\n    #undef JSON_HEDLEY_PRINTF_FORMAT\n#endif\n#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check)))\n#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check)))\n#elif \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(format) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check)))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0)\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check))\n#else\n    #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check)\n#endif\n\n#if defined(JSON_HEDLEY_CONSTEXPR)\n    #undef JSON_HEDLEY_CONSTEXPR\n#endif\n#if defined(__cplusplus)\n    #if __cplusplus >= 201103L\n        #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr)\n    #endif\n#endif\n#if !defined(JSON_HEDLEY_CONSTEXPR)\n    #define JSON_HEDLEY_CONSTEXPR\n#endif\n\n#if defined(JSON_HEDLEY_PREDICT)\n    #undef JSON_HEDLEY_PREDICT\n#endif\n#if defined(JSON_HEDLEY_LIKELY)\n    #undef JSON_HEDLEY_LIKELY\n#endif\n#if defined(JSON_HEDLEY_UNLIKELY)\n    #undef JSON_HEDLEY_UNLIKELY\n#endif\n#if defined(JSON_HEDLEY_UNPREDICTABLE)\n    #undef JSON_HEDLEY_UNPREDICTABLE\n#endif\n#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable)\n    #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable(!!(expr))\n#endif\n#if \\\n  JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0)\n#  define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability(expr, value, probability)\n#  define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1, probability)\n#  define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0, probability)\n#  define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1)\n#  define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)\n#if !defined(JSON_HEDLEY_BUILTIN_UNPREDICTABLE)\n    #define JSON_HEDLEY_BUILTIN_UNPREDICTABLE(expr) __builtin_expect_with_probability(!!(expr), 1, 0.5)\n#endif\n#elif \\\n  JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n  (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \\\n  JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n  JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n  JSON_HEDLEY_TI_VERSION_CHECK(6,1,0) || \\\n  JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27)\n#  define JSON_HEDLEY_PREDICT(expr, expected, probability) \\\n    (((probability) >= 0.9) ? __builtin_expect(!!(expr), (expected)) : (((void) (expected)), !!(expr)))\n#  define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \\\n    (__extension__ ({ \\\n        JSON_HEDLEY_CONSTEXPR double hedley_probability_ = (probability); \\\n        ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \\\n    }))\n#  define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \\\n    (__extension__ ({ \\\n        JSON_HEDLEY_CONSTEXPR double hedley_probability_ = (probability); \\\n        ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \\\n    }))\n#  define JSON_HEDLEY_LIKELY(expr)   __builtin_expect(!!(expr), 1)\n#  define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0)\n#else\n#  define JSON_HEDLEY_PREDICT(expr, expected, probability) (((void) (expected)), !!(expr))\n#  define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr))\n#  define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr))\n#  define JSON_HEDLEY_LIKELY(expr) (!!(expr))\n#  define JSON_HEDLEY_UNLIKELY(expr) (!!(expr))\n#endif\n#if !defined(JSON_HEDLEY_UNPREDICTABLE)\n    #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5)\n#endif\n\n#if defined(JSON_HEDLEY_MALLOC)\n    #undef JSON_HEDLEY_MALLOC\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n    #define JSON_HEDLEY_MALLOC __attribute__((__malloc__))\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_MALLOC _Pragma(\"returns_new_memory\")\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(14, 0, 0)\n    #define JSON_HEDLEY_MALLOC __declspec(restrict)\n#else\n    #define JSON_HEDLEY_MALLOC\n#endif\n\n#if defined(JSON_HEDLEY_PURE)\n    #undef JSON_HEDLEY_PURE\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_PURE __attribute__((__pure__))\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_PURE _Pragma(\"does_not_write_global_data\")\n#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_PURE _Pragma(\"FUNC_IS_PURE;\")\n#else\n    #define JSON_HEDLEY_PURE\n#endif\n\n#if defined(JSON_HEDLEY_CONST)\n    #undef JSON_HEDLEY_CONST\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(const) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0)\n    #define JSON_HEDLEY_CONST __attribute__((__const__))\n#elif \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0)\n    #define JSON_HEDLEY_CONST _Pragma(\"no_side_effect\")\n#else\n    #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE\n#endif\n\n#if defined(JSON_HEDLEY_RESTRICT)\n    #undef JSON_HEDLEY_RESTRICT\n#endif\n#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus)\n    #define JSON_HEDLEY_RESTRICT restrict\n#elif \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \\\n    JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \\\n    defined(__clang__)\n    #define JSON_HEDLEY_RESTRICT __restrict\n#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus)\n    #define JSON_HEDLEY_RESTRICT _Restrict\n#else\n    #define JSON_HEDLEY_RESTRICT\n#endif\n\n#if defined(JSON_HEDLEY_INLINE)\n    #undef JSON_HEDLEY_INLINE\n#endif\n#if \\\n    (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \\\n    (defined(__cplusplus) && (__cplusplus >= 199711L))\n    #define JSON_HEDLEY_INLINE inline\n#elif \\\n    defined(JSON_HEDLEY_GCC_VERSION) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0)\n    #define JSON_HEDLEY_INLINE __inline__\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_INLINE __inline\n#else\n    #define JSON_HEDLEY_INLINE\n#endif\n\n#if defined(JSON_HEDLEY_ALWAYS_INLINE)\n    #undef JSON_HEDLEY_ALWAYS_INLINE\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n    #define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0)\n    #define JSON_HEDLEY_ALWAYS_INLINE __forceinline\n#elif JSON_HEDLEY_TI_VERSION_CHECK(7,0,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_ALWAYS_INLINE _Pragma(\"FUNC_ALWAYS_INLINE;\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_ALWAYS_INLINE _Pragma(\"inline=forced\")\n#else\n    #define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE\n#endif\n\n#if defined(JSON_HEDLEY_NEVER_INLINE)\n    #undef JSON_HEDLEY_NEVER_INLINE\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n    (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n    #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__))\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0)\n    #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)\n#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0)\n    #define JSON_HEDLEY_NEVER_INLINE _Pragma(\"noinline\")\n#elif JSON_HEDLEY_TI_VERSION_CHECK(6,0,0) && defined(__cplusplus)\n    #define JSON_HEDLEY_NEVER_INLINE _Pragma(\"FUNC_CANNOT_INLINE;\")\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n    #define JSON_HEDLEY_NEVER_INLINE _Pragma(\"inline=never\")\n#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0)\n    #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0)\n    #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline)\n#else\n    #define JSON_HEDLEY_NEVER_INLINE\n#endif\n\n#if defined(JSON_HEDLEY_PRIVATE)\n    #undef JSON_HEDLEY_PRIVATE\n#endif\n#if defined(JSON_HEDLEY_PUBLIC)\n    #undef JSON_HEDLEY_PUBLIC\n#endif\n#if defined(JSON_HEDLEY_IMPORT)\n    #undef JSON_HEDLEY_IMPORT\n#endif\n#if defined(_WIN32) || defined(__CYGWIN__)\n    #define JSON_HEDLEY_PRIVATE\n    #define JSON_HEDLEY_PUBLIC   __declspec(dllexport)\n    #define JSON_HEDLEY_IMPORT   __declspec(dllimport)\n#else\n    #if \\\n        JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \\\n        JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \\\n        JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \\\n        JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n        JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n        JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \\\n        JSON_HEDLEY_TI_VERSION_CHECK(8,0,0) || \\\n        (JSON_HEDLEY_TI_VERSION_CHECK(7,3,0) && defined(__TI_EABI__) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__))\n        #define JSON_HEDLEY_PRIVATE __attribute__((__visibility__(\"hidden\")))\n        #define JSON_HEDLEY_PUBLIC  __attribute__((__visibility__(\"default\")))\n    #else\n        #define JSON_HEDLEY_PRIVATE\n        #define JSON_HEDLEY_PUBLIC\n    #endif\n    #define JSON_HEDLEY_IMPORT    extern\n#endif\n\n#if defined(JSON_HEDLEY_NO_THROW)\n    #undef JSON_HEDLEY_NO_THROW\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n    #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__))\n#elif \\\n    JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0)\n    #define JSON_HEDLEY_NO_THROW __declspec(nothrow)\n#else\n    #define JSON_HEDLEY_NO_THROW\n#endif\n\n#if defined(JSON_HEDLEY_FALL_THROUGH)\n    #undef JSON_HEDLEY_FALL_THROUGH\n#endif\n#if JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(fallthrough,7,0,0) && !defined(JSON_HEDLEY_PGI_VERSION)\n    #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__))\n#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough)\n    #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]])\n#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough)\n    #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]])\n#elif defined(__fallthrough) /* SAL */\n    #define JSON_HEDLEY_FALL_THROUGH __fallthrough\n#else\n    #define JSON_HEDLEY_FALL_THROUGH\n#endif\n\n#if defined(JSON_HEDLEY_RETURNS_NON_NULL)\n    #undef JSON_HEDLEY_RETURNS_NON_NULL\n#endif\n#if \\\n    JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0)\n    #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__))\n#elif defined(_Ret_notnull_) /* SAL */\n    #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_\n#else\n    #define JSON_HEDLEY_RETURNS_NON_NULL\n#endif\n\n#if defined(JSON_HEDLEY_ARRAY_PARAM)\n    #undef JSON_HEDLEY_ARRAY_PARAM\n#endif\n#if \\\n    defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \\\n    !defined(__STDC_NO_VLA__) && \\\n    !defined(__cplusplus) && \\\n    !defined(JSON_HEDLEY_PGI_VERSION) && \\\n    !defined(JSON_HEDLEY_TINYC_VERSION)\n    #define JSON_HEDLEY_ARRAY_PARAM(name) (name)\n#else\n    #define JSON_HEDLEY_ARRAY_PARAM(name)\n#endif\n\n#if defined(JSON_HEDLEY_IS_CONSTANT)\n    #undef JSON_HEDLEY_IS_CONSTANT\n#endif\n#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR)\n    #undef JSON_HEDLEY_REQUIRE_CONSTEXPR\n#endif\n/* JSON_HEDLEY_IS_CONSTEXPR_ is for\n   HEDLEY INTERNAL USE ONLY.  API subject to change without notice. */\n#if defined(JSON_HEDLEY_IS_CONSTEXPR_)\n    #undef JSON_HEDLEY_IS_CONSTEXPR_\n#endif\n#if \\\n    JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \\\n    JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \\\n    JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n    JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \\\n    JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \\\n    JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \\\n    JSON_HEDLEY_TI_VERSION_CHECK(6,1,0) || \\\n    (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \\\n    JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0)\n    #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr)\n#endif\n#if !defined(__cplusplus)\n#  if \\\n       JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \\\n       JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \\\n       JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n       JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \\\n       JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \\\n       JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \\\n       JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24)\n#if defined(__INTPTR_TYPE__)\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*)\n#else\n    #include <stdint.h>\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*)\n#endif\n#  elif \\\n       (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(JSON_HEDLEY_SUNPRO_VERSION) && !defined(JSON_HEDLEY_PGI_VERSION)) || \\\n       JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) || \\\n       JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \\\n       JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \\\n       JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \\\n       JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0)\n#if defined(__INTPTR_TYPE__)\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0)\n#else\n    #include <stdint.h>\n    #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0)\n#endif\n#  elif \\\n       defined(JSON_HEDLEY_GCC_VERSION) || \\\n       defined(JSON_HEDLEY_INTEL_VERSION) || \\\n       defined(JSON_HEDLEY_TINYC_VERSION) || \\\n       defined(JSON_HEDLEY_TI_VERSION) || \\\n       defined(__clang__)\n#    define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \\\n        sizeof(void) != \\\n        sizeof(*( \\\n                  1 ? \\\n                  ((void*) ((expr) * 0L) ) : \\\n((struct { char v[sizeof(void) * 2]; } *) 1) \\\n                ) \\\n              ) \\\n                                            )\n#  endif\n#endif\n#if defined(JSON_HEDLEY_IS_CONSTEXPR_)\n    #if !defined(JSON_HEDLEY_IS_CONSTANT)\n        #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr)\n    #endif\n    #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1))\n#else\n    #if !defined(JSON_HEDLEY_IS_CONSTANT)\n        #define JSON_HEDLEY_IS_CONSTANT(expr) (0)\n    #endif\n    #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr)\n#endif\n\n#if defined(JSON_HEDLEY_BEGIN_C_DECLS)\n    #undef JSON_HEDLEY_BEGIN_C_DECLS\n#endif\n#if defined(JSON_HEDLEY_END_C_DECLS)\n    #undef JSON_HEDLEY_END_C_DECLS\n#endif\n#if defined(JSON_HEDLEY_C_DECL)\n    #undef JSON_HEDLEY_C_DECL\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_BEGIN_C_DECLS extern \"C\" {\n    #define JSON_HEDLEY_END_C_DECLS }\n    #define JSON_HEDLEY_C_DECL extern \"C\"\n#else\n    #define JSON_HEDLEY_BEGIN_C_DECLS\n    #define JSON_HEDLEY_END_C_DECLS\n    #define JSON_HEDLEY_C_DECL\n#endif\n\n#if defined(JSON_HEDLEY_STATIC_ASSERT)\n    #undef JSON_HEDLEY_STATIC_ASSERT\n#endif\n#if \\\n  !defined(__cplusplus) && ( \\\n      (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \\\n      JSON_HEDLEY_HAS_FEATURE(c_static_assert) || \\\n      JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \\\n      JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \\\n      defined(_Static_assert) \\\n    )\n#  define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message)\n#elif \\\n  (defined(__cplusplus) && (__cplusplus >= 201103L)) || \\\n  JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \\\n  (defined(__cplusplus) && JSON_HEDLEY_TI_VERSION_CHECK(8,3,0))\n#  define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message))\n#else\n#  define JSON_HEDLEY_STATIC_ASSERT(expr, message)\n#endif\n\n#if defined(JSON_HEDLEY_CONST_CAST)\n    #undef JSON_HEDLEY_CONST_CAST\n#endif\n#if defined(__cplusplus)\n#  define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast<T>(expr))\n#elif \\\n  JSON_HEDLEY_HAS_WARNING(\"-Wcast-qual\") || \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n#  define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \\\n        JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n        JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \\\n        ((T) (expr)); \\\n        JSON_HEDLEY_DIAGNOSTIC_POP \\\n    }))\n#else\n#  define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr))\n#endif\n\n#if defined(JSON_HEDLEY_REINTERPRET_CAST)\n    #undef JSON_HEDLEY_REINTERPRET_CAST\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast<T>(expr))\n#else\n    #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (*((T*) &(expr)))\n#endif\n\n#if defined(JSON_HEDLEY_STATIC_CAST)\n    #undef JSON_HEDLEY_STATIC_CAST\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast<T>(expr))\n#else\n    #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr))\n#endif\n\n#if defined(JSON_HEDLEY_CPP_CAST)\n    #undef JSON_HEDLEY_CPP_CAST\n#endif\n#if defined(__cplusplus)\n    #define JSON_HEDLEY_CPP_CAST(T, expr) static_cast<T>(expr)\n#else\n    #define JSON_HEDLEY_CPP_CAST(T, expr) (expr)\n#endif\n\n#if defined(JSON_HEDLEY_NULL)\n    #undef JSON_HEDLEY_NULL\n#endif\n#if defined(__cplusplus)\n    #if __cplusplus >= 201103L\n        #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr)\n    #elif defined(NULL)\n        #define JSON_HEDLEY_NULL NULL\n    #else\n        #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0)\n    #endif\n#elif defined(NULL)\n    #define JSON_HEDLEY_NULL NULL\n#else\n    #define JSON_HEDLEY_NULL ((void*) 0)\n#endif\n\n#if defined(JSON_HEDLEY_MESSAGE)\n    #undef JSON_HEDLEY_MESSAGE\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-pragmas\")\n#  define JSON_HEDLEY_MESSAGE(msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \\\n    JSON_HEDLEY_PRAGMA(message msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#elif \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \\\n  JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg)\n#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg)\n#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))\n#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0)\n#  define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg))\n#else\n#  define JSON_HEDLEY_MESSAGE(msg)\n#endif\n\n#if defined(JSON_HEDLEY_WARNING)\n    #undef JSON_HEDLEY_WARNING\n#endif\n#if JSON_HEDLEY_HAS_WARNING(\"-Wunknown-pragmas\")\n#  define JSON_HEDLEY_WARNING(msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \\\n    JSON_HEDLEY_PRAGMA(clang warning msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#elif \\\n  JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \\\n  JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0)\n#  define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg)\n#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0)\n#  define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg))\n#else\n#  define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg)\n#endif\n\n#if defined(JSON_HEDLEY_REQUIRE)\n    #undef JSON_HEDLEY_REQUIRE\n#endif\n#if defined(JSON_HEDLEY_REQUIRE_MSG)\n    #undef JSON_HEDLEY_REQUIRE_MSG\n#endif\n#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if)\n#  if JSON_HEDLEY_HAS_WARNING(\"-Wgcc-compat\")\n#    define JSON_HEDLEY_REQUIRE(expr) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wgcc-compat\\\"\") \\\n    __attribute__((diagnose_if(!(expr), #expr, \"error\"))) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#    define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \\\n    JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n    _Pragma(\"clang diagnostic ignored \\\"-Wgcc-compat\\\"\") \\\n    __attribute__((diagnose_if(!(expr), msg, \"error\"))) \\\n    JSON_HEDLEY_DIAGNOSTIC_POP\n#  else\n#    define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, \"error\")))\n#    define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, \"error\")))\n#  endif\n#else\n#  define JSON_HEDLEY_REQUIRE(expr)\n#  define JSON_HEDLEY_REQUIRE_MSG(expr,msg)\n#endif\n\n#if defined(JSON_HEDLEY_FLAGS)\n    #undef JSON_HEDLEY_FLAGS\n#endif\n#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum)\n    #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__))\n#endif\n\n#if defined(JSON_HEDLEY_FLAGS_CAST)\n    #undef JSON_HEDLEY_FLAGS_CAST\n#endif\n#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0)\n#  define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \\\n        JSON_HEDLEY_DIAGNOSTIC_PUSH \\\n        _Pragma(\"warning(disable:188)\") \\\n        ((T) (expr)); \\\n        JSON_HEDLEY_DIAGNOSTIC_POP \\\n    }))\n#else\n#  define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr)\n#endif\n\n#if defined(JSON_HEDLEY_EMPTY_BASES)\n    #undef JSON_HEDLEY_EMPTY_BASES\n#endif\n#if JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)\n    #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases)\n#else\n    #define JSON_HEDLEY_EMPTY_BASES\n#endif\n\n/* Remaining macros are deprecated. */\n\n#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK)\n    #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK\n#endif\n#if defined(__clang__)\n    #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0)\n#else\n    #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch)\n#endif\n\n#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE)\n    #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE)\n    #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN)\n    #undef JSON_HEDLEY_CLANG_HAS_BUILTIN\n#endif\n#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE)\n    #undef JSON_HEDLEY_CLANG_HAS_FEATURE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION)\n    #undef JSON_HEDLEY_CLANG_HAS_EXTENSION\n#endif\n#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE)\n    #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE\n#endif\n#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute)\n\n#if defined(JSON_HEDLEY_CLANG_HAS_WARNING)\n    #undef JSON_HEDLEY_CLANG_HAS_WARNING\n#endif\n#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning)\n\n#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */\n\n\n// This file contains all internal macro definitions\n// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them\n\n// exclude unsupported compilers\n#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK)\n    #if defined(__clang__)\n        #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400\n            #error \"unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers\"\n        #endif\n    #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))\n        #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800\n            #error \"unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers\"\n        #endif\n    #endif\n#endif\n\n// C++ language standard detection\n#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464\n    #define JSON_HAS_CPP_17\n    #define JSON_HAS_CPP_14\n#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1)\n    #define JSON_HAS_CPP_14\n#endif\n\n// disable float-equal warnings on GCC/clang\n#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wfloat-equal\"\n#endif\n\n// disable documentation warnings on clang\n#if defined(__clang__)\n    #pragma GCC diagnostic push\n    #pragma GCC diagnostic ignored \"-Wdocumentation\"\n#endif\n\n// allow to disable exceptions\n#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION)\n    #define JSON_THROW(exception) throw exception\n    #define JSON_TRY try\n    #define JSON_CATCH(exception) catch(exception)\n    #define JSON_INTERNAL_CATCH(exception) catch(exception)\n#else\n    #include <cstdlib>\n    #define JSON_THROW(exception) std::abort()\n    #define JSON_TRY if(true)\n    #define JSON_CATCH(exception) if(false)\n    #define JSON_INTERNAL_CATCH(exception) if(false)\n#endif\n\n// override exception macros\n#if defined(JSON_THROW_USER)\n    #undef JSON_THROW\n    #define JSON_THROW JSON_THROW_USER\n#endif\n#if defined(JSON_TRY_USER)\n    #undef JSON_TRY\n    #define JSON_TRY JSON_TRY_USER\n#endif\n#if defined(JSON_CATCH_USER)\n    #undef JSON_CATCH\n    #define JSON_CATCH JSON_CATCH_USER\n    #undef JSON_INTERNAL_CATCH\n    #define JSON_INTERNAL_CATCH JSON_CATCH_USER\n#endif\n#if defined(JSON_INTERNAL_CATCH_USER)\n    #undef JSON_INTERNAL_CATCH\n    #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER\n#endif\n\n/*!\n@brief macro to briefly define a mapping between an enum and JSON\n@def NLOHMANN_JSON_SERIALIZE_ENUM\n@since version 3.4.0\n*/\n#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...)                                           \\\n    template<typename BasicJsonType>                                                           \\\n    inline void to_json(BasicJsonType& j, const ENUM_TYPE& e)                                  \\\n    {                                                                                          \\\n        static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE \" must be an enum!\");         \\\n        static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;                    \\\n        auto it = std::find_if(std::begin(m), std::end(m),                                     \\\n                               [e](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \\\n        {                                                                                      \\\n            return ej_pair.first == e;                                                         \\\n        });                                                                                    \\\n        j = ((it != std::end(m)) ? it : std::begin(m))->second;                                \\\n    }                                                                                          \\\n    template<typename BasicJsonType>                                                           \\\n    inline void from_json(const BasicJsonType& j, ENUM_TYPE& e)                                \\\n    {                                                                                          \\\n        static_assert(std::is_enum<ENUM_TYPE>::value, #ENUM_TYPE \" must be an enum!\");         \\\n        static const std::pair<ENUM_TYPE, BasicJsonType> m[] = __VA_ARGS__;                    \\\n        auto it = std::find_if(std::begin(m), std::end(m),                                     \\\n                               [j](const std::pair<ENUM_TYPE, BasicJsonType>& ej_pair) -> bool \\\n        {                                                                                      \\\n            return ej_pair.second == j;                                                        \\\n        });                                                                                    \\\n        e = ((it != std::end(m)) ? it : std::begin(m))->first;                                 \\\n    }\n\n// Ugly macros to avoid uglier copy-paste when specializing basic_json. They\n// may be removed in the future once the class is split.\n\n#define NLOHMANN_BASIC_JSON_TPL_DECLARATION                                \\\n    template<template<typename, typename, typename...> class ObjectType,   \\\n             template<typename, typename...> class ArrayType,              \\\n             class StringType, class BooleanType, class NumberIntegerType, \\\n             class NumberUnsignedType, class NumberFloatType,              \\\n             template<typename> class AllocatorType,                       \\\n             template<typename, typename = void> class JSONSerializer>\n\n#define NLOHMANN_BASIC_JSON_TPL                                            \\\n    basic_json<ObjectType, ArrayType, StringType, BooleanType,             \\\n    NumberIntegerType, NumberUnsignedType, NumberFloatType,                \\\n    AllocatorType, JSONSerializer>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n////////////////\n// exceptions //\n////////////////\n\n/*!\n@brief general exception of the @ref basic_json class\n\nThis class is an extension of `std::exception` objects with a member @a id for\nexception ids. It is used as the base class for all exceptions thrown by the\n@ref basic_json class. This class can hence be used as \"wildcard\" to catch\nexceptions.\n\nSubclasses:\n- @ref parse_error for exceptions indicating a parse error\n- @ref invalid_iterator for exceptions indicating errors with iterators\n- @ref type_error for exceptions indicating executing a member function with\n                  a wrong type\n- @ref out_of_range for exceptions indicating access out of the defined range\n- @ref other_error for exceptions indicating other library errors\n\n@internal\n@note To have nothrow-copy-constructible exceptions, we internally use\n      `std::runtime_error` which can cope with arbitrary-length error messages.\n      Intermediate strings are built with static functions and then passed to\n      the actual constructor.\n@endinternal\n\n@liveexample{The following code shows how arbitrary library exceptions can be\ncaught.,exception}\n\n@since version 3.0.0\n*/\nclass exception : public std::exception\n{\n  public:\n    /// returns the explanatory string\n    JSON_HEDLEY_RETURNS_NON_NULL\n    const char* what() const noexcept override\n    {\n        return m.what();\n    }\n\n    /// the id of the exception\n    const int id;\n\n  protected:\n    JSON_HEDLEY_NON_NULL(3)\n    exception(int id_, const char* what_arg) : id(id_), m(what_arg) {}\n\n    static std::string name(const std::string& ename, int id_)\n    {\n        return \"[json.exception.\" + ename + \".\" + std::to_string(id_) + \"] \";\n    }\n\n  private:\n    /// an exception object as storage for error messages\n    std::runtime_error m;\n};\n\n/*!\n@brief exception indicating a parse error\n\nThis exception is thrown by the library when a parse error occurs. Parse errors\ncan occur during the deserialization of JSON text, CBOR, MessagePack, as well\nas when using JSON Patch.\n\nMember @a byte holds the byte index of the last read character in the input\nfile.\n\nExceptions have ids 1xx.\n\nname / id                      | example message | description\n------------------------------ | --------------- | -------------------------\njson.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position.\njson.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\\uxxxx` entries (\"surrogate pairs\"). This error indicates that the surrogate pair is incomplete or contains an invalid code point.\njson.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid.\njson.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects.\njson.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one \"op\" member, whose value indicates the operation to perform. Its value must be one of \"add\", \"remove\", \"replace\", \"move\", \"copy\", or \"test\"; other values are errors.\njson.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`.\njson.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character.\njson.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences.\njson.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number.\njson.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read.\njson.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read.\njson.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read.\njson.exception.parse_error.114 | parse error: Unsupported BSON record type 0x0F | The parsing of the corresponding BSON record type is not implemented (yet).\n\n@note For an input with n bytes, 1 is the index of the first character and n+1\n      is the index of the terminating null byte or the end of file. This also\n      holds true when reading a byte vector (CBOR or MessagePack).\n\n@liveexample{The following code shows how a `parse_error` exception can be\ncaught.,parse_error}\n\n@sa - @ref exception for the base class of the library exceptions\n@sa - @ref invalid_iterator for exceptions indicating errors with iterators\n@sa - @ref type_error for exceptions indicating executing a member function with\n                    a wrong type\n@sa - @ref out_of_range for exceptions indicating access out of the defined range\n@sa - @ref other_error for exceptions indicating other library errors\n\n@since version 3.0.0\n*/\nclass parse_error : public exception\n{\n  public:\n    /*!\n    @brief create a parse error exception\n    @param[in] id_       the id of the exception\n    @param[in] pos       the position where the error occurred (or with\n                         chars_read_total=0 if the position cannot be\n                         determined)\n    @param[in] what_arg  the explanatory string\n    @return parse_error object\n    */\n    static parse_error create(int id_, const position_t& pos, const std::string& what_arg)\n    {\n        std::string w = exception::name(\"parse_error\", id_) + \"parse error\" +\n                        position_string(pos) + \": \" + what_arg;\n        return parse_error(id_, pos.chars_read_total, w.c_str());\n    }\n\n    static parse_error create(int id_, std::size_t byte_, const std::string& what_arg)\n    {\n        std::string w = exception::name(\"parse_error\", id_) + \"parse error\" +\n                        (byte_ != 0 ? (\" at byte \" + std::to_string(byte_)) : \"\") +\n                        \": \" + what_arg;\n        return parse_error(id_, byte_, w.c_str());\n    }\n\n    /*!\n    @brief byte index of the parse error\n\n    The byte index of the last read character in the input file.\n\n    @note For an input with n bytes, 1 is the index of the first character and\n          n+1 is the index of the terminating null byte or the end of file.\n          This also holds true when reading a byte vector (CBOR or MessagePack).\n    */\n    const std::size_t byte;\n\n  private:\n    parse_error(int id_, std::size_t byte_, const char* what_arg)\n        : exception(id_, what_arg), byte(byte_) {}\n\n    static std::string position_string(const position_t& pos)\n    {\n        return \" at line \" + std::to_string(pos.lines_read + 1) +\n               \", column \" + std::to_string(pos.chars_read_current_line);\n    }\n};\n\n/*!\n@brief exception indicating errors with iterators\n\nThis exception is thrown if iterators passed to a library function do not match\nthe expected semantics.\n\nExceptions have ids 2xx.\n\nname / id                           | example message | description\n----------------------------------- | --------------- | -------------------------\njson.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid.\njson.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion.\njson.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from.\njson.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid.\njson.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid.\njson.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range.\njson.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key.\njson.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered.\njson.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered.\njson.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid.\njson.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to.\njson.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container.\njson.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered.\njson.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin().\n\n@liveexample{The following code shows how an `invalid_iterator` exception can be\ncaught.,invalid_iterator}\n\n@sa - @ref exception for the base class of the library exceptions\n@sa - @ref parse_error for exceptions indicating a parse error\n@sa - @ref type_error for exceptions indicating executing a member function with\n                    a wrong type\n@sa - @ref out_of_range for exceptions indicating access out of the defined range\n@sa - @ref other_error for exceptions indicating other library errors\n\n@since version 3.0.0\n*/\nclass invalid_iterator : public exception\n{\n  public:\n    static invalid_iterator create(int id_, const std::string& what_arg)\n    {\n        std::string w = exception::name(\"invalid_iterator\", id_) + what_arg;\n        return invalid_iterator(id_, w.c_str());\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    invalid_iterator(int id_, const char* what_arg)\n        : exception(id_, what_arg) {}\n};\n\n/*!\n@brief exception indicating executing a member function with a wrong type\n\nThis exception is thrown in case of a type error; that is, a library function is\nexecuted on a JSON value whose type does not match the expected semantics.\n\nExceptions have ids 3xx.\n\nname / id                     | example message | description\n----------------------------- | --------------- | -------------------------\njson.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead.\njson.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types.\njson.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t &.\njson.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types.\njson.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types.\njson.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types.\njson.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types.\njson.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types.\njson.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types.\njson.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types.\njson.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types.\njson.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types.\njson.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined.\njson.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers.\njson.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive.\njson.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. |\njson.exception.type_error.317 | JSON value cannot be serialized to requested format | The dynamic type of the object cannot be represented in the requested serialization format (e.g. a raw `true` or `null` JSON object cannot be serialized to BSON) |\n\n@liveexample{The following code shows how a `type_error` exception can be\ncaught.,type_error}\n\n@sa - @ref exception for the base class of the library exceptions\n@sa - @ref parse_error for exceptions indicating a parse error\n@sa - @ref invalid_iterator for exceptions indicating errors with iterators\n@sa - @ref out_of_range for exceptions indicating access out of the defined range\n@sa - @ref other_error for exceptions indicating other library errors\n\n@since version 3.0.0\n*/\nclass type_error : public exception\n{\n  public:\n    static type_error create(int id_, const std::string& what_arg)\n    {\n        std::string w = exception::name(\"type_error\", id_) + what_arg;\n        return type_error(id_, w.c_str());\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    type_error(int id_, const char* what_arg) : exception(id_, what_arg) {}\n};\n\n/*!\n@brief exception indicating access out of the defined range\n\nThis exception is thrown in case a library function is called on an input\nparameter that exceeds the expected range, for instance in case of array\nindices or nonexisting object keys.\n\nExceptions have ids 4xx.\n\nname / id                       | example message | description\n------------------------------- | --------------- | -------------------------\njson.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1.\njson.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it.\njson.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object.\njson.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved.\njson.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value.\njson.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF.\njson.exception.out_of_range.407 | number overflow serializing '9223372036854775808' | UBJSON and BSON only support integer numbers up to 9223372036854775807. |\njson.exception.out_of_range.408 | excessive array size: 8658170730974374167 | The size (following `#`) of an UBJSON array or object exceeds the maximal capacity. |\njson.exception.out_of_range.409 | BSON key cannot contain code point U+0000 (at byte 2) | Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string |\n\n@liveexample{The following code shows how an `out_of_range` exception can be\ncaught.,out_of_range}\n\n@sa - @ref exception for the base class of the library exceptions\n@sa - @ref parse_error for exceptions indicating a parse error\n@sa - @ref invalid_iterator for exceptions indicating errors with iterators\n@sa - @ref type_error for exceptions indicating executing a member function with\n                    a wrong type\n@sa - @ref other_error for exceptions indicating other library errors\n\n@since version 3.0.0\n*/\nclass out_of_range : public exception\n{\n  public:\n    static out_of_range create(int id_, const std::string& what_arg)\n    {\n        std::string w = exception::name(\"out_of_range\", id_) + what_arg;\n        return out_of_range(id_, w.c_str());\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {}\n};\n\n/*!\n@brief exception indicating other library errors\n\nThis exception is thrown in case of errors that cannot be classified with the\nother exception types.\n\nExceptions have ids 5xx.\n\nname / id                      | example message | description\n------------------------------ | --------------- | -------------------------\njson.exception.other_error.501 | unsuccessful: {\"op\":\"test\",\"path\":\"/baz\", \"value\":\"bar\"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed.\n\n@sa - @ref exception for the base class of the library exceptions\n@sa - @ref parse_error for exceptions indicating a parse error\n@sa - @ref invalid_iterator for exceptions indicating errors with iterators\n@sa - @ref type_error for exceptions indicating executing a member function with\n                    a wrong type\n@sa - @ref out_of_range for exceptions indicating access out of the defined range\n\n@liveexample{The following code shows how an `other_error` exception can be\ncaught.,other_error}\n\n@since version 3.0.0\n*/\nclass other_error : public exception\n{\n  public:\n    static other_error create(int id_, const std::string& what_arg)\n    {\n        std::string w = exception::name(\"other_error\", id_) + what_arg;\n        return other_error(id_, w.c_str());\n    }\n\n  private:\n    JSON_HEDLEY_NON_NULL(3)\n    other_error(int id_, const char* what_arg) : exception(id_, what_arg) {}\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n\n#include <ciso646> // not\n#include <cstddef> // size_t\n#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type\n\nnamespace nlohmann\n{\nnamespace detail\n{\n// alias templates to reduce boilerplate\ntemplate<bool B, typename T = void>\nusing enable_if_t = typename std::enable_if<B, T>::type;\n\ntemplate<typename T>\nusing uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type;\n\n// implementation of C++14 index_sequence and affiliates\n// source: https://stackoverflow.com/a/32223343\ntemplate<std::size_t... Ints>\nstruct index_sequence\n{\n    using type = index_sequence;\n    using value_type = std::size_t;\n    static constexpr std::size_t size() noexcept\n    {\n        return sizeof...(Ints);\n    }\n};\n\ntemplate<class Sequence1, class Sequence2>\nstruct merge_and_renumber;\n\ntemplate<std::size_t... I1, std::size_t... I2>\nstruct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>>\n        : index_sequence < I1..., (sizeof...(I1) + I2)... > {};\n\ntemplate<std::size_t N>\nstruct make_index_sequence\n    : merge_and_renumber < typename make_index_sequence < N / 2 >::type,\n      typename make_index_sequence < N - N / 2 >::type > {};\n\ntemplate<> struct make_index_sequence<0> : index_sequence<> {};\ntemplate<> struct make_index_sequence<1> : index_sequence<0> {};\n\ntemplate<typename... Ts>\nusing index_sequence_for = make_index_sequence<sizeof...(Ts)>;\n\n// dispatch utility (taken from ranges-v3)\ntemplate<unsigned N> struct priority_tag : priority_tag < N - 1 > {};\ntemplate<> struct priority_tag<0> {};\n\n// taken from ranges-v3\ntemplate<typename T>\nstruct static_const\n{\n    static constexpr T value{};\n};\n\ntemplate<typename T>\nconstexpr T static_const<T>::value;\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\n#include <ciso646> // not\n#include <limits> // numeric_limits\n#include <type_traits> // false_type, is_constructible, is_integral, is_same, true_type\n#include <utility> // declval\n\n// #include <nlohmann/detail/iterators/iterator_traits.hpp>\n\n\n#include <iterator> // random_access_iterator_tag\n\n// #include <nlohmann/detail/meta/void_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate <typename ...Ts> struct make_void\n{\n    using type = void;\n};\ntemplate <typename ...Ts> using void_t = typename make_void<Ts...>::type;\n} // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate <typename It, typename = void>\nstruct iterator_types {};\n\ntemplate <typename It>\nstruct iterator_types <\n    It,\n    void_t<typename It::difference_type, typename It::value_type, typename It::pointer,\n    typename It::reference, typename It::iterator_category >>\n{\n    using difference_type = typename It::difference_type;\n    using value_type = typename It::value_type;\n    using pointer = typename It::pointer;\n    using reference = typename It::reference;\n    using iterator_category = typename It::iterator_category;\n};\n\n// This is required as some compilers implement std::iterator_traits in a way that\n// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341.\ntemplate <typename T, typename = void>\nstruct iterator_traits\n{\n};\n\ntemplate <typename T>\nstruct iterator_traits < T, enable_if_t < !std::is_pointer<T>::value >>\n            : iterator_types<T>\n{\n};\n\ntemplate <typename T>\nstruct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>\n{\n    using iterator_category = std::random_access_iterator_tag;\n    using value_type = T;\n    using difference_type = ptrdiff_t;\n    using pointer = T*;\n    using reference = T&;\n};\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/detected.hpp>\n\n\n#include <type_traits>\n\n// #include <nlohmann/detail/meta/void_t.hpp>\n\n\n// http://en.cppreference.com/w/cpp/experimental/is_detected\nnamespace nlohmann\n{\nnamespace detail\n{\nstruct nonesuch\n{\n    nonesuch() = delete;\n    ~nonesuch() = delete;\n    nonesuch(nonesuch const&) = delete;\n    nonesuch(nonesuch const&&) = delete;\n    void operator=(nonesuch const&) = delete;\n    void operator=(nonesuch&&) = delete;\n};\n\ntemplate <class Default,\n          class AlwaysVoid,\n          template <class...> class Op,\n          class... Args>\nstruct detector\n{\n    using value_t = std::false_type;\n    using type = Default;\n};\n\ntemplate <class Default, template <class...> class Op, class... Args>\nstruct detector<Default, void_t<Op<Args...>>, Op, Args...>\n{\n    using value_t = std::true_type;\n    using type = Op<Args...>;\n};\n\ntemplate <template <class...> class Op, class... Args>\nusing is_detected = typename detector<nonesuch, void, Op, Args...>::value_t;\n\ntemplate <template <class...> class Op, class... Args>\nusing detected_t = typename detector<nonesuch, void, Op, Args...>::type;\n\ntemplate <class Default, template <class...> class Op, class... Args>\nusing detected_or = detector<Default, void, Op, Args...>;\n\ntemplate <class Default, template <class...> class Op, class... Args>\nusing detected_or_t = typename detected_or<Default, Op, Args...>::type;\n\ntemplate <class Expected, template <class...> class Op, class... Args>\nusing is_detected_exact = std::is_same<Expected, detected_t<Op, Args...>>;\n\ntemplate <class To, template <class...> class Op, class... Args>\nusing is_detected_convertible =\n    std::is_convertible<detected_t<Op, Args...>, To>;\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/json_fwd.hpp>\n#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_\n#define INCLUDE_NLOHMANN_JSON_FWD_HPP_\n\n#include <cstdint> // int64_t, uint64_t\n#include <map> // map\n#include <memory> // allocator\n#include <string> // string\n#include <vector> // vector\n\n/*!\n@brief namespace for Niels Lohmann\n@see https://github.com/nlohmann\n@since version 1.0.0\n*/\nnamespace nlohmann\n{\n/*!\n@brief default JSONSerializer template argument\n\nThis serializer ignores the template arguments and uses ADL\n([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))\nfor serialization.\n*/\ntemplate<typename T = void, typename SFINAE = void>\nstruct adl_serializer;\n\ntemplate<template<typename U, typename V, typename... Args> class ObjectType =\n         std::map,\n         template<typename U, typename... Args> class ArrayType = std::vector,\n         class StringType = std::string, class BooleanType = bool,\n         class NumberIntegerType = std::int64_t,\n         class NumberUnsignedType = std::uint64_t,\n         class NumberFloatType = double,\n         template<typename U> class AllocatorType = std::allocator,\n         template<typename T, typename SFINAE = void> class JSONSerializer =\n         adl_serializer>\nclass basic_json;\n\n/*!\n@brief JSON Pointer\n\nA JSON pointer defines a string syntax for identifying a specific value\nwithin a JSON document. It can be used with functions `at` and\n`operator[]`. Furthermore, JSON pointers are the base for JSON patches.\n\n@sa [RFC 6901](https://tools.ietf.org/html/rfc6901)\n\n@since version 2.0.0\n*/\ntemplate<typename BasicJsonType>\nclass json_pointer;\n\n/*!\n@brief default JSON class\n\nThis type is the default specialization of the @ref basic_json class which\nuses the standard template types.\n\n@since version 1.0.0\n*/\nusing json = basic_json<>;\n}  // namespace nlohmann\n\n#endif  // INCLUDE_NLOHMANN_JSON_FWD_HPP_\n\n\nnamespace nlohmann\n{\n/*!\n@brief detail namespace with internal helper functions\n\nThis namespace collects functions that should not be exposed,\nimplementations of some @ref basic_json methods, and meta-programming helpers.\n\n@since version 2.1.0\n*/\nnamespace detail\n{\n/////////////\n// helpers //\n/////////////\n\n// Note to maintainers:\n//\n// Every trait in this file expects a non CV-qualified type.\n// The only exceptions are in the 'aliases for detected' section\n// (i.e. those of the form: decltype(T::member_function(std::declval<T>())))\n//\n// In this case, T has to be properly CV-qualified to constraint the function arguments\n// (e.g. to_json(BasicJsonType&, const T&))\n\ntemplate<typename> struct is_basic_json : std::false_type {};\n\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nstruct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};\n\n//////////////////////////\n// aliases for detected //\n//////////////////////////\n\ntemplate <typename T>\nusing mapped_type_t = typename T::mapped_type;\n\ntemplate <typename T>\nusing key_type_t = typename T::key_type;\n\ntemplate <typename T>\nusing value_type_t = typename T::value_type;\n\ntemplate <typename T>\nusing difference_type_t = typename T::difference_type;\n\ntemplate <typename T>\nusing pointer_t = typename T::pointer;\n\ntemplate <typename T>\nusing reference_t = typename T::reference;\n\ntemplate <typename T>\nusing iterator_category_t = typename T::iterator_category;\n\ntemplate <typename T>\nusing iterator_t = typename T::iterator;\n\ntemplate <typename T, typename... Args>\nusing to_json_function = decltype(T::to_json(std::declval<Args>()...));\n\ntemplate <typename T, typename... Args>\nusing from_json_function = decltype(T::from_json(std::declval<Args>()...));\n\ntemplate <typename T, typename U>\nusing get_template_function = decltype(std::declval<T>().template get<U>());\n\n// trait checking if JSONSerializer<T>::from_json(json const&, udt&) exists\ntemplate <typename BasicJsonType, typename T, typename = void>\nstruct has_from_json : std::false_type {};\n\ntemplate <typename BasicJsonType, typename T>\nstruct has_from_json<BasicJsonType, T,\n           enable_if_t<not is_basic_json<T>::value>>\n{\n    using serializer = typename BasicJsonType::template json_serializer<T, void>;\n\n    static constexpr bool value =\n        is_detected_exact<void, from_json_function, serializer,\n        const BasicJsonType&, T&>::value;\n};\n\n// This trait checks if JSONSerializer<T>::from_json(json const&) exists\n// this overload is used for non-default-constructible user-defined-types\ntemplate <typename BasicJsonType, typename T, typename = void>\nstruct has_non_default_from_json : std::false_type {};\n\ntemplate<typename BasicJsonType, typename T>\nstruct has_non_default_from_json<BasicJsonType, T, enable_if_t<not is_basic_json<T>::value>>\n{\n    using serializer = typename BasicJsonType::template json_serializer<T, void>;\n\n    static constexpr bool value =\n        is_detected_exact<T, from_json_function, serializer,\n        const BasicJsonType&>::value;\n};\n\n// This trait checks if BasicJsonType::json_serializer<T>::to_json exists\n// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion.\ntemplate <typename BasicJsonType, typename T, typename = void>\nstruct has_to_json : std::false_type {};\n\ntemplate <typename BasicJsonType, typename T>\nstruct has_to_json<BasicJsonType, T, enable_if_t<not is_basic_json<T>::value>>\n{\n    using serializer = typename BasicJsonType::template json_serializer<T, void>;\n\n    static constexpr bool value =\n        is_detected_exact<void, to_json_function, serializer, BasicJsonType&,\n        T>::value;\n};\n\n\n///////////////////\n// is_ functions //\n///////////////////\n\ntemplate <typename T, typename = void>\nstruct is_iterator_traits : std::false_type {};\n\ntemplate <typename T>\nstruct is_iterator_traits<iterator_traits<T>>\n{\n  private:\n    using traits = iterator_traits<T>;\n\n  public:\n    static constexpr auto value =\n        is_detected<value_type_t, traits>::value &&\n        is_detected<difference_type_t, traits>::value &&\n        is_detected<pointer_t, traits>::value &&\n        is_detected<iterator_category_t, traits>::value &&\n        is_detected<reference_t, traits>::value;\n};\n\n// source: https://stackoverflow.com/a/37193089/4116453\n\ntemplate <typename T, typename = void>\nstruct is_complete_type : std::false_type {};\n\ntemplate <typename T>\nstruct is_complete_type<T, decltype(void(sizeof(T)))> : std::true_type {};\n\ntemplate <typename BasicJsonType, typename CompatibleObjectType,\n          typename = void>\nstruct is_compatible_object_type_impl : std::false_type {};\n\ntemplate <typename BasicJsonType, typename CompatibleObjectType>\nstruct is_compatible_object_type_impl <\n    BasicJsonType, CompatibleObjectType,\n    enable_if_t<is_detected<mapped_type_t, CompatibleObjectType>::value and\n    is_detected<key_type_t, CompatibleObjectType>::value >>\n{\n\n    using object_t = typename BasicJsonType::object_t;\n\n    // macOS's is_constructible does not play well with nonesuch...\n    static constexpr bool value =\n        std::is_constructible<typename object_t::key_type,\n        typename CompatibleObjectType::key_type>::value and\n        std::is_constructible<typename object_t::mapped_type,\n        typename CompatibleObjectType::mapped_type>::value;\n};\n\ntemplate <typename BasicJsonType, typename CompatibleObjectType>\nstruct is_compatible_object_type\n    : is_compatible_object_type_impl<BasicJsonType, CompatibleObjectType> {};\n\ntemplate <typename BasicJsonType, typename ConstructibleObjectType,\n          typename = void>\nstruct is_constructible_object_type_impl : std::false_type {};\n\ntemplate <typename BasicJsonType, typename ConstructibleObjectType>\nstruct is_constructible_object_type_impl <\n    BasicJsonType, ConstructibleObjectType,\n    enable_if_t<is_detected<mapped_type_t, ConstructibleObjectType>::value and\n    is_detected<key_type_t, ConstructibleObjectType>::value >>\n{\n    using object_t = typename BasicJsonType::object_t;\n\n    static constexpr bool value =\n        (std::is_default_constructible<ConstructibleObjectType>::value and\n         (std::is_move_assignable<ConstructibleObjectType>::value or\n          std::is_copy_assignable<ConstructibleObjectType>::value) and\n         (std::is_constructible<typename ConstructibleObjectType::key_type,\n          typename object_t::key_type>::value and\n          std::is_same <\n          typename object_t::mapped_type,\n          typename ConstructibleObjectType::mapped_type >::value)) or\n        (has_from_json<BasicJsonType,\n         typename ConstructibleObjectType::mapped_type>::value or\n         has_non_default_from_json <\n         BasicJsonType,\n         typename ConstructibleObjectType::mapped_type >::value);\n};\n\ntemplate <typename BasicJsonType, typename ConstructibleObjectType>\nstruct is_constructible_object_type\n    : is_constructible_object_type_impl<BasicJsonType,\n      ConstructibleObjectType> {};\n\ntemplate <typename BasicJsonType, typename CompatibleStringType,\n          typename = void>\nstruct is_compatible_string_type_impl : std::false_type {};\n\ntemplate <typename BasicJsonType, typename CompatibleStringType>\nstruct is_compatible_string_type_impl <\n    BasicJsonType, CompatibleStringType,\n    enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type,\n    value_type_t, CompatibleStringType>::value >>\n{\n    static constexpr auto value =\n        std::is_constructible<typename BasicJsonType::string_t, CompatibleStringType>::value;\n};\n\ntemplate <typename BasicJsonType, typename ConstructibleStringType>\nstruct is_compatible_string_type\n    : is_compatible_string_type_impl<BasicJsonType, ConstructibleStringType> {};\n\ntemplate <typename BasicJsonType, typename ConstructibleStringType,\n          typename = void>\nstruct is_constructible_string_type_impl : std::false_type {};\n\ntemplate <typename BasicJsonType, typename ConstructibleStringType>\nstruct is_constructible_string_type_impl <\n    BasicJsonType, ConstructibleStringType,\n    enable_if_t<is_detected_exact<typename BasicJsonType::string_t::value_type,\n    value_type_t, ConstructibleStringType>::value >>\n{\n    static constexpr auto value =\n        std::is_constructible<ConstructibleStringType,\n        typename BasicJsonType::string_t>::value;\n};\n\ntemplate <typename BasicJsonType, typename ConstructibleStringType>\nstruct is_constructible_string_type\n    : is_constructible_string_type_impl<BasicJsonType, ConstructibleStringType> {};\n\ntemplate <typename BasicJsonType, typename CompatibleArrayType, typename = void>\nstruct is_compatible_array_type_impl : std::false_type {};\n\ntemplate <typename BasicJsonType, typename CompatibleArrayType>\nstruct is_compatible_array_type_impl <\n    BasicJsonType, CompatibleArrayType,\n    enable_if_t<is_detected<value_type_t, CompatibleArrayType>::value and\n    is_detected<iterator_t, CompatibleArrayType>::value and\n// This is needed because json_reverse_iterator has a ::iterator type...\n// Therefore it is detected as a CompatibleArrayType.\n// The real fix would be to have an Iterable concept.\n    not is_iterator_traits<\n    iterator_traits<CompatibleArrayType>>::value >>\n{\n    static constexpr bool value =\n        std::is_constructible<BasicJsonType,\n        typename CompatibleArrayType::value_type>::value;\n};\n\ntemplate <typename BasicJsonType, typename CompatibleArrayType>\nstruct is_compatible_array_type\n    : is_compatible_array_type_impl<BasicJsonType, CompatibleArrayType> {};\n\ntemplate <typename BasicJsonType, typename ConstructibleArrayType, typename = void>\nstruct is_constructible_array_type_impl : std::false_type {};\n\ntemplate <typename BasicJsonType, typename ConstructibleArrayType>\nstruct is_constructible_array_type_impl <\n    BasicJsonType, ConstructibleArrayType,\n    enable_if_t<std::is_same<ConstructibleArrayType,\n    typename BasicJsonType::value_type>::value >>\n            : std::true_type {};\n\ntemplate <typename BasicJsonType, typename ConstructibleArrayType>\nstruct is_constructible_array_type_impl <\n    BasicJsonType, ConstructibleArrayType,\n    enable_if_t<not std::is_same<ConstructibleArrayType,\n    typename BasicJsonType::value_type>::value and\n    std::is_default_constructible<ConstructibleArrayType>::value and\n(std::is_move_assignable<ConstructibleArrayType>::value or\n std::is_copy_assignable<ConstructibleArrayType>::value) and\nis_detected<value_type_t, ConstructibleArrayType>::value and\nis_detected<iterator_t, ConstructibleArrayType>::value and\nis_complete_type<\ndetected_t<value_type_t, ConstructibleArrayType>>::value >>\n{\n    static constexpr bool value =\n        // This is needed because json_reverse_iterator has a ::iterator type,\n        // furthermore, std::back_insert_iterator (and other iterators) have a\n        // base class `iterator`... Therefore it is detected as a\n        // ConstructibleArrayType. The real fix would be to have an Iterable\n        // concept.\n        not is_iterator_traits<iterator_traits<ConstructibleArrayType>>::value and\n\n        (std::is_same<typename ConstructibleArrayType::value_type,\n         typename BasicJsonType::array_t::value_type>::value or\n         has_from_json<BasicJsonType,\n         typename ConstructibleArrayType::value_type>::value or\n         has_non_default_from_json <\n         BasicJsonType, typename ConstructibleArrayType::value_type >::value);\n};\n\ntemplate <typename BasicJsonType, typename ConstructibleArrayType>\nstruct is_constructible_array_type\n    : is_constructible_array_type_impl<BasicJsonType, ConstructibleArrayType> {};\n\ntemplate <typename RealIntegerType, typename CompatibleNumberIntegerType,\n          typename = void>\nstruct is_compatible_integer_type_impl : std::false_type {};\n\ntemplate <typename RealIntegerType, typename CompatibleNumberIntegerType>\nstruct is_compatible_integer_type_impl <\n    RealIntegerType, CompatibleNumberIntegerType,\n    enable_if_t<std::is_integral<RealIntegerType>::value and\n    std::is_integral<CompatibleNumberIntegerType>::value and\n    not std::is_same<bool, CompatibleNumberIntegerType>::value >>\n{\n    // is there an assert somewhere on overflows?\n    using RealLimits = std::numeric_limits<RealIntegerType>;\n    using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>;\n\n    static constexpr auto value =\n        std::is_constructible<RealIntegerType,\n        CompatibleNumberIntegerType>::value and\n        CompatibleLimits::is_integer and\n        RealLimits::is_signed == CompatibleLimits::is_signed;\n};\n\ntemplate <typename RealIntegerType, typename CompatibleNumberIntegerType>\nstruct is_compatible_integer_type\n    : is_compatible_integer_type_impl<RealIntegerType,\n      CompatibleNumberIntegerType> {};\n\ntemplate <typename BasicJsonType, typename CompatibleType, typename = void>\nstruct is_compatible_type_impl: std::false_type {};\n\ntemplate <typename BasicJsonType, typename CompatibleType>\nstruct is_compatible_type_impl <\n    BasicJsonType, CompatibleType,\n    enable_if_t<is_complete_type<CompatibleType>::value >>\n{\n    static constexpr bool value =\n        has_to_json<BasicJsonType, CompatibleType>::value;\n};\n\ntemplate <typename BasicJsonType, typename CompatibleType>\nstruct is_compatible_type\n    : is_compatible_type_impl<BasicJsonType, CompatibleType> {};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\n#include <array> // array\n#include <ciso646> // and\n#include <cstddef> // size_t\n#include <cstdint> // uint8_t\n#include <string> // string\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////////////\n// JSON type enumeration //\n///////////////////////////\n\n/*!\n@brief the JSON type enumeration\n\nThis enumeration collects the different JSON types. It is internally used to\ndistinguish the stored values, and the functions @ref basic_json::is_null(),\n@ref basic_json::is_object(), @ref basic_json::is_array(),\n@ref basic_json::is_string(), @ref basic_json::is_boolean(),\n@ref basic_json::is_number() (with @ref basic_json::is_number_integer(),\n@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()),\n@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and\n@ref basic_json::is_structured() rely on it.\n\n@note There are three enumeration entries (number_integer, number_unsigned, and\nnumber_float), because the library distinguishes these three types for numbers:\n@ref basic_json::number_unsigned_t is used for unsigned integers,\n@ref basic_json::number_integer_t is used for signed integers, and\n@ref basic_json::number_float_t is used for floating-point numbers or to\napproximate integers which do not fit in the limits of their respective type.\n\n@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON\nvalue with the default value for a given type\n\n@since version 1.0.0\n*/\nenum class value_t : std::uint8_t\n{\n    null,             ///< null value\n    object,           ///< object (unordered set of name/value pairs)\n    array,            ///< array (ordered collection of values)\n    string,           ///< string value\n    boolean,          ///< boolean value\n    number_integer,   ///< number value (signed integer)\n    number_unsigned,  ///< number value (unsigned integer)\n    number_float,     ///< number value (floating-point)\n    discarded         ///< discarded by the the parser callback function\n};\n\n/*!\n@brief comparison operator for JSON types\n\nReturns an ordering that is similar to Python:\n- order: null < boolean < number < object < array < string\n- furthermore, each type is not smaller than itself\n- discarded values are not comparable\n\n@since version 1.0.0\n*/\ninline bool operator<(const value_t lhs, const value_t rhs) noexcept\n{\n    static constexpr std::array<std::uint8_t, 8> order = {{\n            0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */,\n            1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */\n        }\n    };\n\n    const auto l_index = static_cast<std::size_t>(lhs);\n    const auto r_index = static_cast<std::size_t>(rhs);\n    return l_index < order.size() and r_index < order.size() and order[l_index] < order[r_index];\n}\n}  // namespace detail\n}  // namespace nlohmann\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename std::nullptr_t& n)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_null()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be null, but is \" + std::string(j.type_name())));\n    }\n    n = nullptr;\n}\n\n// overloads for basic_json template parameters\ntemplate<typename BasicJsonType, typename ArithmeticType,\n         enable_if_t<std::is_arithmetic<ArithmeticType>::value and\n                     not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value,\n                     int> = 0>\nvoid get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)\n{\n    switch (static_cast<value_t>(j))\n    {\n        case value_t::number_unsigned:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());\n            break;\n        }\n        case value_t::number_integer:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());\n            break;\n        }\n        case value_t::number_float:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());\n            break;\n        }\n\n        default:\n            JSON_THROW(type_error::create(302, \"type must be number, but is \" + std::string(j.type_name())));\n    }\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_boolean()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be boolean, but is \" + std::string(j.type_name())));\n    }\n    b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>();\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_string()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be string, but is \" + std::string(j.type_name())));\n    }\n    s = *j.template get_ptr<const typename BasicJsonType::string_t*>();\n}\n\ntemplate <\n    typename BasicJsonType, typename ConstructibleStringType,\n    enable_if_t <\n        is_constructible_string_type<BasicJsonType, ConstructibleStringType>::value and\n        not std::is_same<typename BasicJsonType::string_t,\n                         ConstructibleStringType>::value,\n        int > = 0 >\nvoid from_json(const BasicJsonType& j, ConstructibleStringType& s)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_string()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be string, but is \" + std::string(j.type_name())));\n    }\n\n    s = *j.template get_ptr<const typename BasicJsonType::string_t*>();\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val)\n{\n    get_arithmetic_value(j, val);\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val)\n{\n    get_arithmetic_value(j, val);\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val)\n{\n    get_arithmetic_value(j, val);\n}\n\ntemplate<typename BasicJsonType, typename EnumType,\n         enable_if_t<std::is_enum<EnumType>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, EnumType& e)\n{\n    typename std::underlying_type<EnumType>::type val;\n    get_arithmetic_value(j, val);\n    e = static_cast<EnumType>(val);\n}\n\n// forward_list doesn't have an insert method\ntemplate<typename BasicJsonType, typename T, typename Allocator,\n         enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name())));\n    }\n    l.clear();\n    std::transform(j.rbegin(), j.rend(),\n                   std::front_inserter(l), [](const BasicJsonType & i)\n    {\n        return i.template get<T>();\n    });\n}\n\n// valarray doesn't have an insert method\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, std::valarray<T>& l)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name())));\n    }\n    l.resize(j.size());\n    std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l));\n}\n\ntemplate <typename BasicJsonType, typename T, std::size_t N>\nauto from_json(const BasicJsonType& j, T (&arr)[N])\n-> decltype(j.template get<T>(), void())\n{\n    for (std::size_t i = 0; i < N; ++i)\n    {\n        arr[i] = j.at(i).template get<T>();\n    }\n}\n\ntemplate<typename BasicJsonType>\nvoid from_json_array_impl(const BasicJsonType& j, typename BasicJsonType::array_t& arr, priority_tag<3> /*unused*/)\n{\n    arr = *j.template get_ptr<const typename BasicJsonType::array_t*>();\n}\n\ntemplate <typename BasicJsonType, typename T, std::size_t N>\nauto from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr,\n                          priority_tag<2> /*unused*/)\n-> decltype(j.template get<T>(), void())\n{\n    for (std::size_t i = 0; i < N; ++i)\n    {\n        arr[i] = j.at(i).template get<T>();\n    }\n}\n\ntemplate<typename BasicJsonType, typename ConstructibleArrayType>\nauto from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr, priority_tag<1> /*unused*/)\n-> decltype(\n    arr.reserve(std::declval<typename ConstructibleArrayType::size_type>()),\n    j.template get<typename ConstructibleArrayType::value_type>(),\n    void())\n{\n    using std::end;\n\n    ConstructibleArrayType ret;\n    ret.reserve(j.size());\n    std::transform(j.begin(), j.end(),\n                   std::inserter(ret, end(ret)), [](const BasicJsonType & i)\n    {\n        // get<BasicJsonType>() returns *this, this won't call a from_json\n        // method when value_type is BasicJsonType\n        return i.template get<typename ConstructibleArrayType::value_type>();\n    });\n    arr = std::move(ret);\n}\n\ntemplate <typename BasicJsonType, typename ConstructibleArrayType>\nvoid from_json_array_impl(const BasicJsonType& j, ConstructibleArrayType& arr,\n                          priority_tag<0> /*unused*/)\n{\n    using std::end;\n\n    ConstructibleArrayType ret;\n    std::transform(\n        j.begin(), j.end(), std::inserter(ret, end(ret)),\n        [](const BasicJsonType & i)\n    {\n        // get<BasicJsonType>() returns *this, this won't call a from_json\n        // method when value_type is BasicJsonType\n        return i.template get<typename ConstructibleArrayType::value_type>();\n    });\n    arr = std::move(ret);\n}\n\ntemplate <typename BasicJsonType, typename ConstructibleArrayType,\n          enable_if_t <\n              is_constructible_array_type<BasicJsonType, ConstructibleArrayType>::value and\n              not is_constructible_object_type<BasicJsonType, ConstructibleArrayType>::value and\n              not is_constructible_string_type<BasicJsonType, ConstructibleArrayType>::value and\n              not is_basic_json<ConstructibleArrayType>::value,\n              int > = 0 >\n\nauto from_json(const BasicJsonType& j, ConstructibleArrayType& arr)\n-> decltype(from_json_array_impl(j, arr, priority_tag<3> {}),\nj.template get<typename ConstructibleArrayType::value_type>(),\nvoid())\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" +\n                                      std::string(j.type_name())));\n    }\n\n    from_json_array_impl(j, arr, priority_tag<3> {});\n}\n\ntemplate<typename BasicJsonType, typename ConstructibleObjectType,\n         enable_if_t<is_constructible_object_type<BasicJsonType, ConstructibleObjectType>::value, int> = 0>\nvoid from_json(const BasicJsonType& j, ConstructibleObjectType& obj)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_object()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be object, but is \" + std::string(j.type_name())));\n    }\n\n    ConstructibleObjectType ret;\n    auto inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>();\n    using value_type = typename ConstructibleObjectType::value_type;\n    std::transform(\n        inner_object->begin(), inner_object->end(),\n        std::inserter(ret, ret.begin()),\n        [](typename BasicJsonType::object_t::value_type const & p)\n    {\n        return value_type(p.first, p.second.template get<typename ConstructibleObjectType::mapped_type>());\n    });\n    obj = std::move(ret);\n}\n\n// overload for arithmetic types, not chosen for basic_json template arguments\n// (BooleanType, etc..); note: Is it really necessary to provide explicit\n// overloads for boolean_t etc. in case of a custom BooleanType which is not\n// an arithmetic type?\ntemplate<typename BasicJsonType, typename ArithmeticType,\n         enable_if_t <\n             std::is_arithmetic<ArithmeticType>::value and\n             not std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value and\n             not std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value and\n             not std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value and\n             not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value,\n             int> = 0>\nvoid from_json(const BasicJsonType& j, ArithmeticType& val)\n{\n    switch (static_cast<value_t>(j))\n    {\n        case value_t::number_unsigned:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());\n            break;\n        }\n        case value_t::number_integer:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());\n            break;\n        }\n        case value_t::number_float:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());\n            break;\n        }\n        case value_t::boolean:\n        {\n            val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());\n            break;\n        }\n\n        default:\n            JSON_THROW(type_error::create(302, \"type must be number, but is \" + std::string(j.type_name())));\n    }\n}\n\ntemplate<typename BasicJsonType, typename A1, typename A2>\nvoid from_json(const BasicJsonType& j, std::pair<A1, A2>& p)\n{\n    p = {j.at(0).template get<A1>(), j.at(1).template get<A2>()};\n}\n\ntemplate<typename BasicJsonType, typename Tuple, std::size_t... Idx>\nvoid from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence<Idx...> /*unused*/)\n{\n    t = std::make_tuple(j.at(Idx).template get<typename std::tuple_element<Idx, Tuple>::type>()...);\n}\n\ntemplate<typename BasicJsonType, typename... Args>\nvoid from_json(const BasicJsonType& j, std::tuple<Args...>& t)\n{\n    from_json_tuple_impl(j, t, index_sequence_for<Args...> {});\n}\n\ntemplate <typename BasicJsonType, typename Key, typename Value, typename Compare, typename Allocator,\n          typename = enable_if_t<not std::is_constructible<\n                                     typename BasicJsonType::string_t, Key>::value>>\nvoid from_json(const BasicJsonType& j, std::map<Key, Value, Compare, Allocator>& m)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name())));\n    }\n    m.clear();\n    for (const auto& p : j)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not p.is_array()))\n        {\n            JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(p.type_name())));\n        }\n        m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());\n    }\n}\n\ntemplate <typename BasicJsonType, typename Key, typename Value, typename Hash, typename KeyEqual, typename Allocator,\n          typename = enable_if_t<not std::is_constructible<\n                                     typename BasicJsonType::string_t, Key>::value>>\nvoid from_json(const BasicJsonType& j, std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>& m)\n{\n    if (JSON_HEDLEY_UNLIKELY(not j.is_array()))\n    {\n        JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(j.type_name())));\n    }\n    m.clear();\n    for (const auto& p : j)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not p.is_array()))\n        {\n            JSON_THROW(type_error::create(302, \"type must be array, but is \" + std::string(p.type_name())));\n        }\n        m.emplace(p.at(0).template get<Key>(), p.at(1).template get<Value>());\n    }\n}\n\nstruct from_json_fn\n{\n    template<typename BasicJsonType, typename T>\n    auto operator()(const BasicJsonType& j, T& val) const\n    noexcept(noexcept(from_json(j, val)))\n    -> decltype(from_json(j, val), void())\n    {\n        return from_json(j, val);\n    }\n};\n}  // namespace detail\n\n/// namespace to hold default `from_json` function\n/// to see why this is required:\n/// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4381.html\nnamespace\n{\nconstexpr const auto& from_json = detail::static_const<detail::from_json_fn>::value;\n} // namespace\n} // namespace nlohmann\n\n// #include <nlohmann/detail/conversions/to_json.hpp>\n\n\n#include <algorithm> // copy\n#include <ciso646> // or, and, not\n#include <iterator> // begin, end\n#include <string> // string\n#include <tuple> // tuple, get\n#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type\n#include <utility> // move, forward, declval, pair\n#include <valarray> // valarray\n#include <vector> // vector\n\n// #include <nlohmann/detail/iterators/iteration_proxy.hpp>\n\n\n#include <cstddef> // size_t\n#include <iterator> // input_iterator_tag\n#include <string> // string, to_string\n#include <tuple> // tuple_size, get, tuple_element\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename string_type>\nvoid int_to_string( string_type& target, std::size_t value )\n{\n    target = std::to_string(value);\n}\ntemplate <typename IteratorType> class iteration_proxy_value\n{\n  public:\n    using difference_type = std::ptrdiff_t;\n    using value_type = iteration_proxy_value;\n    using pointer = value_type * ;\n    using reference = value_type & ;\n    using iterator_category = std::input_iterator_tag;\n    using string_type = typename std::remove_cv< typename std::remove_reference<decltype( std::declval<IteratorType>().key() ) >::type >::type;\n\n  private:\n    /// the iterator\n    IteratorType anchor;\n    /// an index for arrays (used to create key names)\n    std::size_t array_index = 0;\n    /// last stringified array index\n    mutable std::size_t array_index_last = 0;\n    /// a string representation of the array index\n    mutable string_type array_index_str = \"0\";\n    /// an empty string (to return a reference for primitive values)\n    const string_type empty_str = \"\";\n\n  public:\n    explicit iteration_proxy_value(IteratorType it) noexcept : anchor(it) {}\n\n    /// dereference operator (needed for range-based for)\n    iteration_proxy_value& operator*()\n    {\n        return *this;\n    }\n\n    /// increment operator (needed for range-based for)\n    iteration_proxy_value& operator++()\n    {\n        ++anchor;\n        ++array_index;\n\n        return *this;\n    }\n\n    /// equality operator (needed for InputIterator)\n    bool operator==(const iteration_proxy_value& o) const\n    {\n        return anchor == o.anchor;\n    }\n\n    /// inequality operator (needed for range-based for)\n    bool operator!=(const iteration_proxy_value& o) const\n    {\n        return anchor != o.anchor;\n    }\n\n    /// return key of the iterator\n    const string_type& key() const\n    {\n        assert(anchor.m_object != nullptr);\n\n        switch (anchor.m_object->type())\n        {\n            // use integer array index as key\n            case value_t::array:\n            {\n                if (array_index != array_index_last)\n                {\n                    int_to_string( array_index_str, array_index );\n                    array_index_last = array_index;\n                }\n                return array_index_str;\n            }\n\n            // use key from the object\n            case value_t::object:\n                return anchor.key();\n\n            // use an empty key for all primitive types\n            default:\n                return empty_str;\n        }\n    }\n\n    /// return value of the iterator\n    typename IteratorType::reference value() const\n    {\n        return anchor.value();\n    }\n};\n\n/// proxy class for the items() function\ntemplate<typename IteratorType> class iteration_proxy\n{\n  private:\n    /// the container to iterate\n    typename IteratorType::reference container;\n\n  public:\n    /// construct iteration proxy from a container\n    explicit iteration_proxy(typename IteratorType::reference cont) noexcept\n        : container(cont) {}\n\n    /// return iterator begin (needed for range-based for)\n    iteration_proxy_value<IteratorType> begin() noexcept\n    {\n        return iteration_proxy_value<IteratorType>(container.begin());\n    }\n\n    /// return iterator end (needed for range-based for)\n    iteration_proxy_value<IteratorType> end() noexcept\n    {\n        return iteration_proxy_value<IteratorType>(container.end());\n    }\n};\n// Structured Bindings Support\n// For further reference see https://blog.tartanllama.xyz/structured-bindings/\n// And see https://github.com/nlohmann/json/pull/1391\ntemplate <std::size_t N, typename IteratorType, enable_if_t<N == 0, int> = 0>\nauto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.key())\n{\n    return i.key();\n}\n// Structured Bindings Support\n// For further reference see https://blog.tartanllama.xyz/structured-bindings/\n// And see https://github.com/nlohmann/json/pull/1391\ntemplate <std::size_t N, typename IteratorType, enable_if_t<N == 1, int> = 0>\nauto get(const nlohmann::detail::iteration_proxy_value<IteratorType>& i) -> decltype(i.value())\n{\n    return i.value();\n}\n}  // namespace detail\n}  // namespace nlohmann\n\n// The Addition to the STD Namespace is required to add\n// Structured Bindings Support to the iteration_proxy_value class\n// For further reference see https://blog.tartanllama.xyz/structured-bindings/\n// And see https://github.com/nlohmann/json/pull/1391\nnamespace std\n{\n#if defined(__clang__)\n    // Fix: https://github.com/nlohmann/json/issues/1401\n    #pragma clang diagnostic push\n    #pragma clang diagnostic ignored \"-Wmismatched-tags\"\n#endif\ntemplate <typename IteratorType>\nclass tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>\n            : public std::integral_constant<std::size_t, 2> {};\n\ntemplate <std::size_t N, typename IteratorType>\nclass tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>\n{\n  public:\n    using type = decltype(\n                     get<N>(std::declval <\n                            ::nlohmann::detail::iteration_proxy_value<IteratorType >> ()));\n};\n#if defined(__clang__)\n    #pragma clang diagnostic pop\n#endif\n} // namespace std\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n//////////////////\n// constructors //\n//////////////////\n\ntemplate<value_t> struct external_constructor;\n\ntemplate<>\nstruct external_constructor<value_t::boolean>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept\n    {\n        j.m_type = value_t::boolean;\n        j.m_value = b;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::string>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s)\n    {\n        j.m_type = value_t::string;\n        j.m_value = s;\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s)\n    {\n        j.m_type = value_t::string;\n        j.m_value = std::move(s);\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType, typename CompatibleStringType,\n             enable_if_t<not std::is_same<CompatibleStringType, typename BasicJsonType::string_t>::value,\n                         int> = 0>\n    static void construct(BasicJsonType& j, const CompatibleStringType& str)\n    {\n        j.m_type = value_t::string;\n        j.m_value.string = j.template create<typename BasicJsonType::string_t>(str);\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::number_float>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept\n    {\n        j.m_type = value_t::number_float;\n        j.m_value = val;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::number_unsigned>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept\n    {\n        j.m_type = value_t::number_unsigned;\n        j.m_value = val;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::number_integer>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept\n    {\n        j.m_type = value_t::number_integer;\n        j.m_value = val;\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::array>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr)\n    {\n        j.m_type = value_t::array;\n        j.m_value = arr;\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)\n    {\n        j.m_type = value_t::array;\n        j.m_value = std::move(arr);\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType, typename CompatibleArrayType,\n             enable_if_t<not std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value,\n                         int> = 0>\n    static void construct(BasicJsonType& j, const CompatibleArrayType& arr)\n    {\n        using std::begin;\n        using std::end;\n        j.m_type = value_t::array;\n        j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr));\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const std::vector<bool>& arr)\n    {\n        j.m_type = value_t::array;\n        j.m_value = value_t::array;\n        j.m_value.array->reserve(arr.size());\n        for (const bool x : arr)\n        {\n            j.m_value.array->push_back(x);\n        }\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType, typename T,\n             enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0>\n    static void construct(BasicJsonType& j, const std::valarray<T>& arr)\n    {\n        j.m_type = value_t::array;\n        j.m_value = value_t::array;\n        j.m_value.array->resize(arr.size());\n        if (arr.size() > 0)\n        {\n            std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin());\n        }\n        j.assert_invariant();\n    }\n};\n\ntemplate<>\nstruct external_constructor<value_t::object>\n{\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj)\n    {\n        j.m_type = value_t::object;\n        j.m_value = obj;\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType>\n    static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj)\n    {\n        j.m_type = value_t::object;\n        j.m_value = std::move(obj);\n        j.assert_invariant();\n    }\n\n    template<typename BasicJsonType, typename CompatibleObjectType,\n             enable_if_t<not std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int> = 0>\n    static void construct(BasicJsonType& j, const CompatibleObjectType& obj)\n    {\n        using std::begin;\n        using std::end;\n\n        j.m_type = value_t::object;\n        j.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj));\n        j.assert_invariant();\n    }\n};\n\n/////////////\n// to_json //\n/////////////\n\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0>\nvoid to_json(BasicJsonType& j, T b) noexcept\n{\n    external_constructor<value_t::boolean>::construct(j, b);\n}\n\ntemplate<typename BasicJsonType, typename CompatibleString,\n         enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const CompatibleString& s)\n{\n    external_constructor<value_t::string>::construct(j, s);\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s)\n{\n    external_constructor<value_t::string>::construct(j, std::move(s));\n}\n\ntemplate<typename BasicJsonType, typename FloatType,\n         enable_if_t<std::is_floating_point<FloatType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, FloatType val) noexcept\n{\n    external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val));\n}\n\ntemplate<typename BasicJsonType, typename CompatibleNumberUnsignedType,\n         enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept\n{\n    external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val));\n}\n\ntemplate<typename BasicJsonType, typename CompatibleNumberIntegerType,\n         enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept\n{\n    external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val));\n}\n\ntemplate<typename BasicJsonType, typename EnumType,\n         enable_if_t<std::is_enum<EnumType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, EnumType e) noexcept\n{\n    using underlying_type = typename std::underlying_type<EnumType>::type;\n    external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e));\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, const std::vector<bool>& e)\n{\n    external_constructor<value_t::array>::construct(j, e);\n}\n\ntemplate <typename BasicJsonType, typename CompatibleArrayType,\n          enable_if_t<is_compatible_array_type<BasicJsonType,\n                      CompatibleArrayType>::value and\n                      not is_compatible_object_type<\n                          BasicJsonType, CompatibleArrayType>::value and\n                      not is_compatible_string_type<BasicJsonType, CompatibleArrayType>::value and\n                      not is_basic_json<CompatibleArrayType>::value,\n                      int> = 0>\nvoid to_json(BasicJsonType& j, const CompatibleArrayType& arr)\n{\n    external_constructor<value_t::array>::construct(j, arr);\n}\n\ntemplate<typename BasicJsonType, typename T,\n         enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const std::valarray<T>& arr)\n{\n    external_constructor<value_t::array>::construct(j, std::move(arr));\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr)\n{\n    external_constructor<value_t::array>::construct(j, std::move(arr));\n}\n\ntemplate<typename BasicJsonType, typename CompatibleObjectType,\n         enable_if_t<is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value and not is_basic_json<CompatibleObjectType>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const CompatibleObjectType& obj)\n{\n    external_constructor<value_t::object>::construct(j, obj);\n}\n\ntemplate<typename BasicJsonType>\nvoid to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj)\n{\n    external_constructor<value_t::object>::construct(j, std::move(obj));\n}\n\ntemplate <\n    typename BasicJsonType, typename T, std::size_t N,\n    enable_if_t<not std::is_constructible<typename BasicJsonType::string_t,\n                const T(&)[N]>::value,\n                int> = 0 >\nvoid to_json(BasicJsonType& j, const T(&arr)[N])\n{\n    external_constructor<value_t::array>::construct(j, arr);\n}\n\ntemplate<typename BasicJsonType, typename... Args>\nvoid to_json(BasicJsonType& j, const std::pair<Args...>& p)\n{\n    j = { p.first, p.second };\n}\n\n// for https://github.com/nlohmann/json/pull/1134\ntemplate < typename BasicJsonType, typename T,\n           enable_if_t<std::is_same<T, iteration_proxy_value<typename BasicJsonType::iterator>>::value, int> = 0>\nvoid to_json(BasicJsonType& j, const T& b)\n{\n    j = { {b.key(), b.value()} };\n}\n\ntemplate<typename BasicJsonType, typename Tuple, std::size_t... Idx>\nvoid to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...> /*unused*/)\n{\n    j = { std::get<Idx>(t)... };\n}\n\ntemplate<typename BasicJsonType, typename... Args>\nvoid to_json(BasicJsonType& j, const std::tuple<Args...>& t)\n{\n    to_json_tuple_impl(j, t, index_sequence_for<Args...> {});\n}\n\nstruct to_json_fn\n{\n    template<typename BasicJsonType, typename T>\n    auto operator()(BasicJsonType& j, T&& val) const noexcept(noexcept(to_json(j, std::forward<T>(val))))\n    -> decltype(to_json(j, std::forward<T>(val)), void())\n    {\n        return to_json(j, std::forward<T>(val));\n    }\n};\n}  // namespace detail\n\n/// namespace to hold default `to_json` function\nnamespace\n{\nconstexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value;\n} // namespace\n} // namespace nlohmann\n\n\nnamespace nlohmann\n{\n\ntemplate<typename, typename>\nstruct adl_serializer\n{\n    /*!\n    @brief convert a JSON value to any value type\n\n    This function is usually called by the `get()` function of the\n    @ref basic_json class (either explicit or via conversion operators).\n\n    @param[in] j        JSON value to read from\n    @param[in,out] val  value to write to\n    */\n    template<typename BasicJsonType, typename ValueType>\n    static auto from_json(BasicJsonType&& j, ValueType& val) noexcept(\n        noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val)))\n    -> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), val), void())\n    {\n        ::nlohmann::from_json(std::forward<BasicJsonType>(j), val);\n    }\n\n    /*!\n    @brief convert any value type to a JSON value\n\n    This function is usually called by the constructors of the @ref basic_json\n    class.\n\n    @param[in,out] j  JSON value to write to\n    @param[in] val    value to read from\n    */\n    template <typename BasicJsonType, typename ValueType>\n    static auto to_json(BasicJsonType& j, ValueType&& val) noexcept(\n        noexcept(::nlohmann::to_json(j, std::forward<ValueType>(val))))\n    -> decltype(::nlohmann::to_json(j, std::forward<ValueType>(val)), void())\n    {\n        ::nlohmann::to_json(j, std::forward<ValueType>(val));\n    }\n};\n\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/conversions/from_json.hpp>\n\n// #include <nlohmann/detail/conversions/to_json.hpp>\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/input/binary_reader.hpp>\n\n\n#include <algorithm> // generate_n\n#include <array> // array\n#include <cassert> // assert\n#include <cmath> // ldexp\n#include <cstddef> // size_t\n#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t\n#include <cstdio> // snprintf\n#include <cstring> // memcpy\n#include <iterator> // back_inserter\n#include <limits> // numeric_limits\n#include <string> // char_traits, string\n#include <utility> // make_pair, move\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n\n#include <array> // array\n#include <cassert> // assert\n#include <cstddef> // size_t\n#include <cstdio> //FILE *\n#include <cstring> // strlen\n#include <istream> // istream\n#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next\n#include <memory> // shared_ptr, make_shared, addressof\n#include <numeric> // accumulate\n#include <string> // string, char_traits\n#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer\n#include <utility> // pair, declval\n\n// #include <nlohmann/detail/iterators/iterator_traits.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/// the supported input formats\nenum class input_format_t { json, cbor, msgpack, ubjson, bson };\n\n////////////////////\n// input adapters //\n////////////////////\n\n/*!\n@brief abstract input adapter interface\n\nProduces a stream of std::char_traits<char>::int_type characters from a\nstd::istream, a buffer, or some other input type. Accepts the return of\nexactly one non-EOF character for future input. The int_type characters\nreturned consist of all valid char values as positive values (typically\nunsigned char), plus an EOF value outside that range, specified by the value\nof the function std::char_traits<char>::eof(). This value is typically -1, but\ncould be any arbitrary value which is not a valid char value.\n*/\nstruct input_adapter_protocol\n{\n    /// get a character [0,255] or std::char_traits<char>::eof().\n    virtual std::char_traits<char>::int_type get_character() = 0;\n    virtual ~input_adapter_protocol() = default;\n};\n\n/// a type to simplify interfaces\nusing input_adapter_t = std::shared_ptr<input_adapter_protocol>;\n\n/*!\nInput adapter for stdio file access. This adapter read only 1 byte and do not use any\n buffer. This adapter is a very low level adapter.\n*/\nclass file_input_adapter : public input_adapter_protocol\n{\n  public:\n    JSON_HEDLEY_NON_NULL(2)\n    explicit file_input_adapter(std::FILE* f)  noexcept\n        : m_file(f)\n    {}\n\n    // make class move-only\n    file_input_adapter(const file_input_adapter&) = delete;\n    file_input_adapter(file_input_adapter&&) = default;\n    file_input_adapter& operator=(const file_input_adapter&) = delete;\n    file_input_adapter& operator=(file_input_adapter&&) = default;\n    ~file_input_adapter() override = default;\n\n    std::char_traits<char>::int_type get_character() noexcept override\n    {\n        return std::fgetc(m_file);\n    }\n\n  private:\n    /// the file pointer to read from\n    std::FILE* m_file;\n};\n\n\n/*!\nInput adapter for a (caching) istream. Ignores a UFT Byte Order Mark at\nbeginning of input. Does not support changing the underlying std::streambuf\nin mid-input. Maintains underlying std::istream and std::streambuf to support\nsubsequent use of standard std::istream operations to process any input\ncharacters following those used in parsing the JSON input.  Clears the\nstd::istream flags; any input errors (e.g., EOF) will be detected by the first\nsubsequent call for input from the std::istream.\n*/\nclass input_stream_adapter : public input_adapter_protocol\n{\n  public:\n    ~input_stream_adapter() override\n    {\n        // clear stream flags; we use underlying streambuf I/O, do not\n        // maintain ifstream flags, except eof\n        is.clear(is.rdstate() & std::ios::eofbit);\n    }\n\n    explicit input_stream_adapter(std::istream& i)\n        : is(i), sb(*i.rdbuf())\n    {}\n\n    // delete because of pointer members\n    input_stream_adapter(const input_stream_adapter&) = delete;\n    input_stream_adapter& operator=(input_stream_adapter&) = delete;\n    input_stream_adapter(input_stream_adapter&&) = delete;\n    input_stream_adapter& operator=(input_stream_adapter&&) = delete;\n\n    // std::istream/std::streambuf use std::char_traits<char>::to_int_type, to\n    // ensure that std::char_traits<char>::eof() and the character 0xFF do not\n    // end up as the same value, eg. 0xFFFFFFFF.\n    std::char_traits<char>::int_type get_character() override\n    {\n        auto res = sb.sbumpc();\n        // set eof manually, as we don't use the istream interface.\n        if (res == EOF)\n        {\n            is.clear(is.rdstate() | std::ios::eofbit);\n        }\n        return res;\n    }\n\n  private:\n    /// the associated input stream\n    std::istream& is;\n    std::streambuf& sb;\n};\n\n/// input adapter for buffer input\nclass input_buffer_adapter : public input_adapter_protocol\n{\n  public:\n    input_buffer_adapter(const char* b, const std::size_t l) noexcept\n        : cursor(b), limit(b == nullptr ? nullptr : (b + l))\n    {}\n\n    // delete because of pointer members\n    input_buffer_adapter(const input_buffer_adapter&) = delete;\n    input_buffer_adapter& operator=(input_buffer_adapter&) = delete;\n    input_buffer_adapter(input_buffer_adapter&&) = delete;\n    input_buffer_adapter& operator=(input_buffer_adapter&&) = delete;\n    ~input_buffer_adapter() override = default;\n\n    std::char_traits<char>::int_type get_character() noexcept override\n    {\n        if (JSON_HEDLEY_LIKELY(cursor < limit))\n        {\n            assert(cursor != nullptr and limit != nullptr);\n            return std::char_traits<char>::to_int_type(*(cursor++));\n        }\n\n        return std::char_traits<char>::eof();\n    }\n\n  private:\n    /// pointer to the current character\n    const char* cursor;\n    /// pointer past the last character\n    const char* const limit;\n};\n\ntemplate<typename WideStringType, size_t T>\nstruct wide_string_input_helper\n{\n    // UTF-32\n    static void fill_buffer(const WideStringType& str,\n                            size_t& current_wchar,\n                            std::array<std::char_traits<char>::int_type, 4>& utf8_bytes,\n                            size_t& utf8_bytes_index,\n                            size_t& utf8_bytes_filled)\n    {\n        utf8_bytes_index = 0;\n\n        if (current_wchar == str.size())\n        {\n            utf8_bytes[0] = std::char_traits<char>::eof();\n            utf8_bytes_filled = 1;\n        }\n        else\n        {\n            // get the current character\n            const auto wc = static_cast<unsigned int>(str[current_wchar++]);\n\n            // UTF-32 to UTF-8 encoding\n            if (wc < 0x80)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                utf8_bytes_filled = 1;\n            }\n            else if (wc <= 0x7FF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((wc >> 6u) & 0x1Fu));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu));\n                utf8_bytes_filled = 2;\n            }\n            else if (wc <= 0xFFFF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((wc >> 12u) & 0x0Fu));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 6u) & 0x3Fu));\n                utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu));\n                utf8_bytes_filled = 3;\n            }\n            else if (wc <= 0x10FFFF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | ((wc >> 18u) & 0x07u));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 12u) & 0x3Fu));\n                utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 6u) & 0x3Fu));\n                utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu));\n                utf8_bytes_filled = 4;\n            }\n            else\n            {\n                // unknown character\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                utf8_bytes_filled = 1;\n            }\n        }\n    }\n};\n\ntemplate<typename WideStringType>\nstruct wide_string_input_helper<WideStringType, 2>\n{\n    // UTF-16\n    static void fill_buffer(const WideStringType& str,\n                            size_t& current_wchar,\n                            std::array<std::char_traits<char>::int_type, 4>& utf8_bytes,\n                            size_t& utf8_bytes_index,\n                            size_t& utf8_bytes_filled)\n    {\n        utf8_bytes_index = 0;\n\n        if (current_wchar == str.size())\n        {\n            utf8_bytes[0] = std::char_traits<char>::eof();\n            utf8_bytes_filled = 1;\n        }\n        else\n        {\n            // get the current character\n            const auto wc = static_cast<unsigned int>(str[current_wchar++]);\n\n            // UTF-16 to UTF-8 encoding\n            if (wc < 0x80)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                utf8_bytes_filled = 1;\n            }\n            else if (wc <= 0x7FF)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xC0u | ((wc >> 6u)));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu));\n                utf8_bytes_filled = 2;\n            }\n            else if (0xD800 > wc or wc >= 0xE000)\n            {\n                utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xE0u | ((wc >> 12u)));\n                utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((wc >> 6u) & 0x3Fu));\n                utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | (wc & 0x3Fu));\n                utf8_bytes_filled = 3;\n            }\n            else\n            {\n                if (current_wchar < str.size())\n                {\n                    const auto wc2 = static_cast<unsigned int>(str[current_wchar++]);\n                    const auto charcode = 0x10000u + (((wc & 0x3FFu) << 10u) | (wc2 & 0x3FFu));\n                    utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(0xF0u | (charcode >> 18u));\n                    utf8_bytes[1] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 12u) & 0x3Fu));\n                    utf8_bytes[2] = static_cast<std::char_traits<char>::int_type>(0x80u | ((charcode >> 6u) & 0x3Fu));\n                    utf8_bytes[3] = static_cast<std::char_traits<char>::int_type>(0x80u | (charcode & 0x3Fu));\n                    utf8_bytes_filled = 4;\n                }\n                else\n                {\n                    // unknown character\n                    ++current_wchar;\n                    utf8_bytes[0] = static_cast<std::char_traits<char>::int_type>(wc);\n                    utf8_bytes_filled = 1;\n                }\n            }\n        }\n    }\n};\n\ntemplate<typename WideStringType>\nclass wide_string_input_adapter : public input_adapter_protocol\n{\n  public:\n    explicit wide_string_input_adapter(const WideStringType& w) noexcept\n        : str(w)\n    {}\n\n    std::char_traits<char>::int_type get_character() noexcept override\n    {\n        // check if buffer needs to be filled\n        if (utf8_bytes_index == utf8_bytes_filled)\n        {\n            fill_buffer<sizeof(typename WideStringType::value_type)>();\n\n            assert(utf8_bytes_filled > 0);\n            assert(utf8_bytes_index == 0);\n        }\n\n        // use buffer\n        assert(utf8_bytes_filled > 0);\n        assert(utf8_bytes_index < utf8_bytes_filled);\n        return utf8_bytes[utf8_bytes_index++];\n    }\n\n  private:\n    template<size_t T>\n    void fill_buffer()\n    {\n        wide_string_input_helper<WideStringType, T>::fill_buffer(str, current_wchar, utf8_bytes, utf8_bytes_index, utf8_bytes_filled);\n    }\n\n    /// the wstring to process\n    const WideStringType& str;\n\n    /// index of the current wchar in str\n    std::size_t current_wchar = 0;\n\n    /// a buffer for UTF-8 bytes\n    std::array<std::char_traits<char>::int_type, 4> utf8_bytes = {{0, 0, 0, 0}};\n\n    /// index to the utf8_codes array for the next valid byte\n    std::size_t utf8_bytes_index = 0;\n    /// number of valid bytes in the utf8_codes array\n    std::size_t utf8_bytes_filled = 0;\n};\n\nclass input_adapter\n{\n  public:\n    // native support\n    JSON_HEDLEY_NON_NULL(2)\n    input_adapter(std::FILE* file)\n        : ia(std::make_shared<file_input_adapter>(file)) {}\n    /// input adapter for input stream\n    input_adapter(std::istream& i)\n        : ia(std::make_shared<input_stream_adapter>(i)) {}\n\n    /// input adapter for input stream\n    input_adapter(std::istream&& i)\n        : ia(std::make_shared<input_stream_adapter>(i)) {}\n\n    input_adapter(const std::wstring& ws)\n        : ia(std::make_shared<wide_string_input_adapter<std::wstring>>(ws)) {}\n\n    input_adapter(const std::u16string& ws)\n        : ia(std::make_shared<wide_string_input_adapter<std::u16string>>(ws)) {}\n\n    input_adapter(const std::u32string& ws)\n        : ia(std::make_shared<wide_string_input_adapter<std::u32string>>(ws)) {}\n\n    /// input adapter for buffer\n    template<typename CharT,\n             typename std::enable_if<\n                 std::is_pointer<CharT>::value and\n                 std::is_integral<typename std::remove_pointer<CharT>::type>::value and\n                 sizeof(typename std::remove_pointer<CharT>::type) == 1,\n                 int>::type = 0>\n    input_adapter(CharT b, std::size_t l)\n        : ia(std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(b), l)) {}\n\n    // derived support\n\n    /// input adapter for string literal\n    template<typename CharT,\n             typename std::enable_if<\n                 std::is_pointer<CharT>::value and\n                 std::is_integral<typename std::remove_pointer<CharT>::type>::value and\n                 sizeof(typename std::remove_pointer<CharT>::type) == 1,\n                 int>::type = 0>\n    input_adapter(CharT b)\n        : input_adapter(reinterpret_cast<const char*>(b),\n                        std::strlen(reinterpret_cast<const char*>(b))) {}\n\n    /// input adapter for iterator range with contiguous storage\n    template<class IteratorType,\n             typename std::enable_if<\n                 std::is_same<typename iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value,\n                 int>::type = 0>\n    input_adapter(IteratorType first, IteratorType last)\n    {\n#ifndef NDEBUG\n        // assertion to check that the iterator range is indeed contiguous,\n        // see http://stackoverflow.com/a/35008842/266378 for more discussion\n        const auto is_contiguous = std::accumulate(\n                                       first, last, std::pair<bool, int>(true, 0),\n                                       [&first](std::pair<bool, int> res, decltype(*first) val)\n        {\n            res.first &= (val == *(std::next(std::addressof(*first), res.second++)));\n            return res;\n        }).first;\n        assert(is_contiguous);\n#endif\n\n        // assertion to check that each element is 1 byte long\n        static_assert(\n            sizeof(typename iterator_traits<IteratorType>::value_type) == 1,\n            \"each element in the iterator range must have the size of 1 byte\");\n\n        const auto len = static_cast<size_t>(std::distance(first, last));\n        if (JSON_HEDLEY_LIKELY(len > 0))\n        {\n            // there is at least one element: use the address of first\n            ia = std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(&(*first)), len);\n        }\n        else\n        {\n            // the address of first cannot be used: use nullptr\n            ia = std::make_shared<input_buffer_adapter>(nullptr, len);\n        }\n    }\n\n    /// input adapter for array\n    template<class T, std::size_t N>\n    input_adapter(T (&array)[N])\n        : input_adapter(std::begin(array), std::end(array)) {}\n\n    /// input adapter for contiguous container\n    template<class ContiguousContainer, typename\n             std::enable_if<not std::is_pointer<ContiguousContainer>::value and\n                            std::is_base_of<std::random_access_iterator_tag, typename iterator_traits<decltype(std::begin(std::declval<ContiguousContainer const>()))>::iterator_category>::value,\n                            int>::type = 0>\n    input_adapter(const ContiguousContainer& c)\n        : input_adapter(std::begin(c), std::end(c)) {}\n\n    operator input_adapter_t()\n    {\n        return ia;\n    }\n\n  private:\n    /// the actual adapter\n    input_adapter_t ia = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/json_sax.hpp>\n\n\n#include <cassert> // assert\n#include <cstddef>\n#include <string> // string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\n\n/*!\n@brief SAX interface\n\nThis class describes the SAX interface used by @ref nlohmann::json::sax_parse.\nEach function is called in different situations while the input is parsed. The\nboolean return value informs the parser whether to continue processing the\ninput.\n*/\ntemplate<typename BasicJsonType>\nstruct json_sax\n{\n    /// type for (signed) integers\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    /// type for unsigned integers\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    /// type for floating-point numbers\n    using number_float_t = typename BasicJsonType::number_float_t;\n    /// type for strings\n    using string_t = typename BasicJsonType::string_t;\n\n    /*!\n    @brief a null value was read\n    @return whether parsing should proceed\n    */\n    virtual bool null() = 0;\n\n    /*!\n    @brief a boolean value was read\n    @param[in] val  boolean value\n    @return whether parsing should proceed\n    */\n    virtual bool boolean(bool val) = 0;\n\n    /*!\n    @brief an integer number was read\n    @param[in] val  integer value\n    @return whether parsing should proceed\n    */\n    virtual bool number_integer(number_integer_t val) = 0;\n\n    /*!\n    @brief an unsigned integer number was read\n    @param[in] val  unsigned integer value\n    @return whether parsing should proceed\n    */\n    virtual bool number_unsigned(number_unsigned_t val) = 0;\n\n    /*!\n    @brief an floating-point number was read\n    @param[in] val  floating-point value\n    @param[in] s    raw token value\n    @return whether parsing should proceed\n    */\n    virtual bool number_float(number_float_t val, const string_t& s) = 0;\n\n    /*!\n    @brief a string was read\n    @param[in] val  string value\n    @return whether parsing should proceed\n    @note It is safe to move the passed string.\n    */\n    virtual bool string(string_t& val) = 0;\n\n    /*!\n    @brief the beginning of an object was read\n    @param[in] elements  number of object elements or -1 if unknown\n    @return whether parsing should proceed\n    @note binary formats may report the number of elements\n    */\n    virtual bool start_object(std::size_t elements) = 0;\n\n    /*!\n    @brief an object key was read\n    @param[in] val  object key\n    @return whether parsing should proceed\n    @note It is safe to move the passed string.\n    */\n    virtual bool key(string_t& val) = 0;\n\n    /*!\n    @brief the end of an object was read\n    @return whether parsing should proceed\n    */\n    virtual bool end_object() = 0;\n\n    /*!\n    @brief the beginning of an array was read\n    @param[in] elements  number of array elements or -1 if unknown\n    @return whether parsing should proceed\n    @note binary formats may report the number of elements\n    */\n    virtual bool start_array(std::size_t elements) = 0;\n\n    /*!\n    @brief the end of an array was read\n    @return whether parsing should proceed\n    */\n    virtual bool end_array() = 0;\n\n    /*!\n    @brief a parse error occurred\n    @param[in] position    the position in the input where the error occurs\n    @param[in] last_token  the last read token\n    @param[in] ex          an exception object describing the error\n    @return whether parsing should proceed (must return false)\n    */\n    virtual bool parse_error(std::size_t position,\n                             const std::string& last_token,\n                             const detail::exception& ex) = 0;\n\n    virtual ~json_sax() = default;\n};\n\n\nnamespace detail\n{\n/*!\n@brief SAX implementation to create a JSON value from SAX events\n\nThis class implements the @ref json_sax interface and processes the SAX events\nto create a JSON value which makes it basically a DOM parser. The structure or\nhierarchy of the JSON value is managed by the stack `ref_stack` which contains\na pointer to the respective array or object for each recursion depth.\n\nAfter successful parsing, the value that is passed by reference to the\nconstructor contains the parsed value.\n\n@tparam BasicJsonType  the JSON type\n*/\ntemplate<typename BasicJsonType>\nclass json_sax_dom_parser\n{\n  public:\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n\n    /*!\n    @param[in, out] r  reference to a JSON value that is manipulated while\n                       parsing\n    @param[in] allow_exceptions_  whether parse errors yield exceptions\n    */\n    explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptions_ = true)\n        : root(r), allow_exceptions(allow_exceptions_)\n    {}\n\n    // make class move-only\n    json_sax_dom_parser(const json_sax_dom_parser&) = delete;\n    json_sax_dom_parser(json_sax_dom_parser&&) = default;\n    json_sax_dom_parser& operator=(const json_sax_dom_parser&) = delete;\n    json_sax_dom_parser& operator=(json_sax_dom_parser&&) = default;\n    ~json_sax_dom_parser() = default;\n\n    bool null()\n    {\n        handle_value(nullptr);\n        return true;\n    }\n\n    bool boolean(bool val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_integer(number_integer_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_unsigned(number_unsigned_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_float(number_float_t val, const string_t& /*unused*/)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool string(string_t& val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool start_object(std::size_t len)\n    {\n        ref_stack.push_back(handle_value(BasicJsonType::value_t::object));\n\n        if (JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408,\n                                            \"excessive object size: \" + std::to_string(len)));\n        }\n\n        return true;\n    }\n\n    bool key(string_t& val)\n    {\n        // add null at given key and store the reference for later\n        object_element = &(ref_stack.back()->m_value.object->operator[](val));\n        return true;\n    }\n\n    bool end_object()\n    {\n        ref_stack.pop_back();\n        return true;\n    }\n\n    bool start_array(std::size_t len)\n    {\n        ref_stack.push_back(handle_value(BasicJsonType::value_t::array));\n\n        if (JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408,\n                                            \"excessive array size: \" + std::to_string(len)));\n        }\n\n        return true;\n    }\n\n    bool end_array()\n    {\n        ref_stack.pop_back();\n        return true;\n    }\n\n    bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,\n                     const detail::exception& ex)\n    {\n        errored = true;\n        if (allow_exceptions)\n        {\n            // determine the proper exception type from the id\n            switch ((ex.id / 100) % 100)\n            {\n                case 1:\n                    JSON_THROW(*static_cast<const detail::parse_error*>(&ex));\n                case 4:\n                    JSON_THROW(*static_cast<const detail::out_of_range*>(&ex));\n                // LCOV_EXCL_START\n                case 2:\n                    JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex));\n                case 3:\n                    JSON_THROW(*static_cast<const detail::type_error*>(&ex));\n                case 5:\n                    JSON_THROW(*static_cast<const detail::other_error*>(&ex));\n                default:\n                    assert(false);\n                    // LCOV_EXCL_STOP\n            }\n        }\n        return false;\n    }\n\n    constexpr bool is_errored() const\n    {\n        return errored;\n    }\n\n  private:\n    /*!\n    @invariant If the ref stack is empty, then the passed value will be the new\n               root.\n    @invariant If the ref stack contains a value, then it is an array or an\n               object to which we can add elements\n    */\n    template<typename Value>\n    JSON_HEDLEY_RETURNS_NON_NULL\n    BasicJsonType* handle_value(Value&& v)\n    {\n        if (ref_stack.empty())\n        {\n            root = BasicJsonType(std::forward<Value>(v));\n            return &root;\n        }\n\n        assert(ref_stack.back()->is_array() or ref_stack.back()->is_object());\n\n        if (ref_stack.back()->is_array())\n        {\n            ref_stack.back()->m_value.array->emplace_back(std::forward<Value>(v));\n            return &(ref_stack.back()->m_value.array->back());\n        }\n\n        assert(ref_stack.back()->is_object());\n        assert(object_element);\n        *object_element = BasicJsonType(std::forward<Value>(v));\n        return object_element;\n    }\n\n    /// the parsed JSON value\n    BasicJsonType& root;\n    /// stack to model hierarchy of values\n    std::vector<BasicJsonType*> ref_stack {};\n    /// helper to hold the reference for the next object element\n    BasicJsonType* object_element = nullptr;\n    /// whether a syntax error occurred\n    bool errored = false;\n    /// whether to throw exceptions in case of errors\n    const bool allow_exceptions = true;\n};\n\ntemplate<typename BasicJsonType>\nclass json_sax_dom_callback_parser\n{\n  public:\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using parser_callback_t = typename BasicJsonType::parser_callback_t;\n    using parse_event_t = typename BasicJsonType::parse_event_t;\n\n    json_sax_dom_callback_parser(BasicJsonType& r,\n                                 const parser_callback_t cb,\n                                 const bool allow_exceptions_ = true)\n        : root(r), callback(cb), allow_exceptions(allow_exceptions_)\n    {\n        keep_stack.push_back(true);\n    }\n\n    // make class move-only\n    json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = delete;\n    json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default;\n    json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_parser&) = delete;\n    json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&) = default;\n    ~json_sax_dom_callback_parser() = default;\n\n    bool null()\n    {\n        handle_value(nullptr);\n        return true;\n    }\n\n    bool boolean(bool val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_integer(number_integer_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_unsigned(number_unsigned_t val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool number_float(number_float_t val, const string_t& /*unused*/)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool string(string_t& val)\n    {\n        handle_value(val);\n        return true;\n    }\n\n    bool start_object(std::size_t len)\n    {\n        // check callback for object start\n        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded);\n        keep_stack.push_back(keep);\n\n        auto val = handle_value(BasicJsonType::value_t::object, true);\n        ref_stack.push_back(val.second);\n\n        // check object limit\n        if (ref_stack.back() and JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408, \"excessive object size: \" + std::to_string(len)));\n        }\n\n        return true;\n    }\n\n    bool key(string_t& val)\n    {\n        BasicJsonType k = BasicJsonType(val);\n\n        // check callback for key\n        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);\n        key_keep_stack.push_back(keep);\n\n        // add discarded value at given key and store the reference for later\n        if (keep and ref_stack.back())\n        {\n            object_element = &(ref_stack.back()->m_value.object->operator[](val) = discarded);\n        }\n\n        return true;\n    }\n\n    bool end_object()\n    {\n        if (ref_stack.back() and not callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))\n        {\n            // discard object\n            *ref_stack.back() = discarded;\n        }\n\n        assert(not ref_stack.empty());\n        assert(not keep_stack.empty());\n        ref_stack.pop_back();\n        keep_stack.pop_back();\n\n        if (not ref_stack.empty() and ref_stack.back() and ref_stack.back()->is_object())\n        {\n            // remove discarded value\n            for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)\n            {\n                if (it->is_discarded())\n                {\n                    ref_stack.back()->erase(it);\n                    break;\n                }\n            }\n        }\n\n        return true;\n    }\n\n    bool start_array(std::size_t len)\n    {\n        const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::array_start, discarded);\n        keep_stack.push_back(keep);\n\n        auto val = handle_value(BasicJsonType::value_t::array, true);\n        ref_stack.push_back(val.second);\n\n        // check array limit\n        if (ref_stack.back() and JSON_HEDLEY_UNLIKELY(len != std::size_t(-1) and len > ref_stack.back()->max_size()))\n        {\n            JSON_THROW(out_of_range::create(408, \"excessive array size: \" + std::to_string(len)));\n        }\n\n        return true;\n    }\n\n    bool end_array()\n    {\n        bool keep = true;\n\n        if (ref_stack.back())\n        {\n            keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());\n            if (not keep)\n            {\n                // discard array\n                *ref_stack.back() = discarded;\n            }\n        }\n\n        assert(not ref_stack.empty());\n        assert(not keep_stack.empty());\n        ref_stack.pop_back();\n        keep_stack.pop_back();\n\n        // remove discarded value\n        if (not keep and not ref_stack.empty() and ref_stack.back()->is_array())\n        {\n            ref_stack.back()->m_value.array->pop_back();\n        }\n\n        return true;\n    }\n\n    bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,\n                     const detail::exception& ex)\n    {\n        errored = true;\n        if (allow_exceptions)\n        {\n            // determine the proper exception type from the id\n            switch ((ex.id / 100) % 100)\n            {\n                case 1:\n                    JSON_THROW(*static_cast<const detail::parse_error*>(&ex));\n                case 4:\n                    JSON_THROW(*static_cast<const detail::out_of_range*>(&ex));\n                // LCOV_EXCL_START\n                case 2:\n                    JSON_THROW(*static_cast<const detail::invalid_iterator*>(&ex));\n                case 3:\n                    JSON_THROW(*static_cast<const detail::type_error*>(&ex));\n                case 5:\n                    JSON_THROW(*static_cast<const detail::other_error*>(&ex));\n                default:\n                    assert(false);\n                    // LCOV_EXCL_STOP\n            }\n        }\n        return false;\n    }\n\n    constexpr bool is_errored() const\n    {\n        return errored;\n    }\n\n  private:\n    /*!\n    @param[in] v  value to add to the JSON value we build during parsing\n    @param[in] skip_callback  whether we should skip calling the callback\n               function; this is required after start_array() and\n               start_object() SAX events, because otherwise we would call the\n               callback function with an empty array or object, respectively.\n\n    @invariant If the ref stack is empty, then the passed value will be the new\n               root.\n    @invariant If the ref stack contains a value, then it is an array or an\n               object to which we can add elements\n\n    @return pair of boolean (whether value should be kept) and pointer (to the\n            passed value in the ref_stack hierarchy; nullptr if not kept)\n    */\n    template<typename Value>\n    std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)\n    {\n        assert(not keep_stack.empty());\n\n        // do not handle this value if we know it would be added to a discarded\n        // container\n        if (not keep_stack.back())\n        {\n            return {false, nullptr};\n        }\n\n        // create value\n        auto value = BasicJsonType(std::forward<Value>(v));\n\n        // check callback\n        const bool keep = skip_callback or callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);\n\n        // do not handle this value if we just learnt it shall be discarded\n        if (not keep)\n        {\n            return {false, nullptr};\n        }\n\n        if (ref_stack.empty())\n        {\n            root = std::move(value);\n            return {true, &root};\n        }\n\n        // skip this value if we already decided to skip the parent\n        // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)\n        if (not ref_stack.back())\n        {\n            return {false, nullptr};\n        }\n\n        // we now only expect arrays and objects\n        assert(ref_stack.back()->is_array() or ref_stack.back()->is_object());\n\n        // array\n        if (ref_stack.back()->is_array())\n        {\n            ref_stack.back()->m_value.array->push_back(std::move(value));\n            return {true, &(ref_stack.back()->m_value.array->back())};\n        }\n\n        // object\n        assert(ref_stack.back()->is_object());\n        // check if we should store an element for the current key\n        assert(not key_keep_stack.empty());\n        const bool store_element = key_keep_stack.back();\n        key_keep_stack.pop_back();\n\n        if (not store_element)\n        {\n            return {false, nullptr};\n        }\n\n        assert(object_element);\n        *object_element = std::move(value);\n        return {true, object_element};\n    }\n\n    /// the parsed JSON value\n    BasicJsonType& root;\n    /// stack to model hierarchy of values\n    std::vector<BasicJsonType*> ref_stack {};\n    /// stack to manage which values to keep\n    std::vector<bool> keep_stack {};\n    /// stack to manage which object keys to keep\n    std::vector<bool> key_keep_stack {};\n    /// helper to hold the reference for the next object element\n    BasicJsonType* object_element = nullptr;\n    /// whether a syntax error occurred\n    bool errored = false;\n    /// callback function\n    const parser_callback_t callback = nullptr;\n    /// whether to throw exceptions in case of errors\n    const bool allow_exceptions = true;\n    /// a discarded value for the callback\n    BasicJsonType discarded = BasicJsonType::value_t::discarded;\n};\n\ntemplate<typename BasicJsonType>\nclass json_sax_acceptor\n{\n  public:\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n\n    bool null()\n    {\n        return true;\n    }\n\n    bool boolean(bool /*unused*/)\n    {\n        return true;\n    }\n\n    bool number_integer(number_integer_t /*unused*/)\n    {\n        return true;\n    }\n\n    bool number_unsigned(number_unsigned_t /*unused*/)\n    {\n        return true;\n    }\n\n    bool number_float(number_float_t /*unused*/, const string_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool string(string_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool start_object(std::size_t  /*unused*/ = std::size_t(-1))\n    {\n        return true;\n    }\n\n    bool key(string_t& /*unused*/)\n    {\n        return true;\n    }\n\n    bool end_object()\n    {\n        return true;\n    }\n\n    bool start_array(std::size_t  /*unused*/ = std::size_t(-1))\n    {\n        return true;\n    }\n\n    bool end_array()\n    {\n        return true;\n    }\n\n    bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/, const detail::exception& /*unused*/)\n    {\n        return false;\n    }\n};\n}  // namespace detail\n\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/is_sax.hpp>\n\n\n#include <cstdint> // size_t\n#include <utility> // declval\n#include <string> // string\n\n// #include <nlohmann/detail/meta/detected.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate <typename T>\nusing null_function_t = decltype(std::declval<T&>().null());\n\ntemplate <typename T>\nusing boolean_function_t =\n    decltype(std::declval<T&>().boolean(std::declval<bool>()));\n\ntemplate <typename T, typename Integer>\nusing number_integer_function_t =\n    decltype(std::declval<T&>().number_integer(std::declval<Integer>()));\n\ntemplate <typename T, typename Unsigned>\nusing number_unsigned_function_t =\n    decltype(std::declval<T&>().number_unsigned(std::declval<Unsigned>()));\n\ntemplate <typename T, typename Float, typename String>\nusing number_float_function_t = decltype(std::declval<T&>().number_float(\n                                    std::declval<Float>(), std::declval<const String&>()));\n\ntemplate <typename T, typename String>\nusing string_function_t =\n    decltype(std::declval<T&>().string(std::declval<String&>()));\n\ntemplate <typename T>\nusing start_object_function_t =\n    decltype(std::declval<T&>().start_object(std::declval<std::size_t>()));\n\ntemplate <typename T, typename String>\nusing key_function_t =\n    decltype(std::declval<T&>().key(std::declval<String&>()));\n\ntemplate <typename T>\nusing end_object_function_t = decltype(std::declval<T&>().end_object());\n\ntemplate <typename T>\nusing start_array_function_t =\n    decltype(std::declval<T&>().start_array(std::declval<std::size_t>()));\n\ntemplate <typename T>\nusing end_array_function_t = decltype(std::declval<T&>().end_array());\n\ntemplate <typename T, typename Exception>\nusing parse_error_function_t = decltype(std::declval<T&>().parse_error(\n        std::declval<std::size_t>(), std::declval<const std::string&>(),\n        std::declval<const Exception&>()));\n\ntemplate <typename SAX, typename BasicJsonType>\nstruct is_sax\n{\n  private:\n    static_assert(is_basic_json<BasicJsonType>::value,\n                  \"BasicJsonType must be of type basic_json<...>\");\n\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using exception_t = typename BasicJsonType::exception;\n\n  public:\n    static constexpr bool value =\n        is_detected_exact<bool, null_function_t, SAX>::value &&\n        is_detected_exact<bool, boolean_function_t, SAX>::value &&\n        is_detected_exact<bool, number_integer_function_t, SAX,\n        number_integer_t>::value &&\n        is_detected_exact<bool, number_unsigned_function_t, SAX,\n        number_unsigned_t>::value &&\n        is_detected_exact<bool, number_float_function_t, SAX, number_float_t,\n        string_t>::value &&\n        is_detected_exact<bool, string_function_t, SAX, string_t>::value &&\n        is_detected_exact<bool, start_object_function_t, SAX>::value &&\n        is_detected_exact<bool, key_function_t, SAX, string_t>::value &&\n        is_detected_exact<bool, end_object_function_t, SAX>::value &&\n        is_detected_exact<bool, start_array_function_t, SAX>::value &&\n        is_detected_exact<bool, end_array_function_t, SAX>::value &&\n        is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value;\n};\n\ntemplate <typename SAX, typename BasicJsonType>\nstruct is_sax_static_asserts\n{\n  private:\n    static_assert(is_basic_json<BasicJsonType>::value,\n                  \"BasicJsonType must be of type basic_json<...>\");\n\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using exception_t = typename BasicJsonType::exception;\n\n  public:\n    static_assert(is_detected_exact<bool, null_function_t, SAX>::value,\n                  \"Missing/invalid function: bool null()\");\n    static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value,\n                  \"Missing/invalid function: bool boolean(bool)\");\n    static_assert(is_detected_exact<bool, boolean_function_t, SAX>::value,\n                  \"Missing/invalid function: bool boolean(bool)\");\n    static_assert(\n        is_detected_exact<bool, number_integer_function_t, SAX,\n        number_integer_t>::value,\n        \"Missing/invalid function: bool number_integer(number_integer_t)\");\n    static_assert(\n        is_detected_exact<bool, number_unsigned_function_t, SAX,\n        number_unsigned_t>::value,\n        \"Missing/invalid function: bool number_unsigned(number_unsigned_t)\");\n    static_assert(is_detected_exact<bool, number_float_function_t, SAX,\n                  number_float_t, string_t>::value,\n                  \"Missing/invalid function: bool number_float(number_float_t, const string_t&)\");\n    static_assert(\n        is_detected_exact<bool, string_function_t, SAX, string_t>::value,\n        \"Missing/invalid function: bool string(string_t&)\");\n    static_assert(is_detected_exact<bool, start_object_function_t, SAX>::value,\n                  \"Missing/invalid function: bool start_object(std::size_t)\");\n    static_assert(is_detected_exact<bool, key_function_t, SAX, string_t>::value,\n                  \"Missing/invalid function: bool key(string_t&)\");\n    static_assert(is_detected_exact<bool, end_object_function_t, SAX>::value,\n                  \"Missing/invalid function: bool end_object()\");\n    static_assert(is_detected_exact<bool, start_array_function_t, SAX>::value,\n                  \"Missing/invalid function: bool start_array(std::size_t)\");\n    static_assert(is_detected_exact<bool, end_array_function_t, SAX>::value,\n                  \"Missing/invalid function: bool end_array()\");\n    static_assert(\n        is_detected_exact<bool, parse_error_function_t, SAX, exception_t>::value,\n        \"Missing/invalid function: bool parse_error(std::size_t, const \"\n        \"std::string&, const exception&)\");\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////\n// binary reader //\n///////////////////\n\n/*!\n@brief deserialization of CBOR, MessagePack, and UBJSON values\n*/\ntemplate<typename BasicJsonType, typename SAX = json_sax_dom_parser<BasicJsonType>>\nclass binary_reader\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using json_sax_t = SAX;\n\n  public:\n    /*!\n    @brief create a binary reader\n\n    @param[in] adapter  input adapter to read from\n    */\n    explicit binary_reader(input_adapter_t adapter) : ia(std::move(adapter))\n    {\n        (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};\n        assert(ia);\n    }\n\n    // make class move-only\n    binary_reader(const binary_reader&) = delete;\n    binary_reader(binary_reader&&) = default;\n    binary_reader& operator=(const binary_reader&) = delete;\n    binary_reader& operator=(binary_reader&&) = default;\n    ~binary_reader() = default;\n\n    /*!\n    @param[in] format  the binary format to parse\n    @param[in] sax_    a SAX event processor\n    @param[in] strict  whether to expect the input to be consumed completed\n\n    @return\n    */\n    JSON_HEDLEY_NON_NULL(3)\n    bool sax_parse(const input_format_t format,\n                   json_sax_t* sax_,\n                   const bool strict = true)\n    {\n        sax = sax_;\n        bool result = false;\n\n        switch (format)\n        {\n            case input_format_t::bson:\n                result = parse_bson_internal();\n                break;\n\n            case input_format_t::cbor:\n                result = parse_cbor_internal();\n                break;\n\n            case input_format_t::msgpack:\n                result = parse_msgpack_internal();\n                break;\n\n            case input_format_t::ubjson:\n                result = parse_ubjson_internal();\n                break;\n\n            default:            // LCOV_EXCL_LINE\n                assert(false);  // LCOV_EXCL_LINE\n        }\n\n        // strict mode: next byte must be EOF\n        if (result and strict)\n        {\n            if (format == input_format_t::ubjson)\n            {\n                get_ignore_noop();\n            }\n            else\n            {\n                get();\n            }\n\n            if (JSON_HEDLEY_UNLIKELY(current != std::char_traits<char>::eof()))\n            {\n                return sax->parse_error(chars_read, get_token_string(),\n                                        parse_error::create(110, chars_read, exception_message(format, \"expected end of input; last byte: 0x\" + get_token_string(), \"value\")));\n            }\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief determine system byte order\n\n    @return true if and only if system's byte order is little endian\n\n    @note from http://stackoverflow.com/a/1001328/266378\n    */\n    static constexpr bool little_endianess(int num = 1) noexcept\n    {\n        return *reinterpret_cast<char*>(&num) == 1;\n    }\n\n  private:\n    //////////\n    // BSON //\n    //////////\n\n    /*!\n    @brief Reads in a BSON-object and passes it to the SAX-parser.\n    @return whether a valid BSON-value was passed to the SAX parser\n    */\n    bool parse_bson_internal()\n    {\n        std::int32_t document_size;\n        get_number<std::int32_t, true>(input_format_t::bson, document_size);\n\n        if (JSON_HEDLEY_UNLIKELY(not sax->start_object(std::size_t(-1))))\n        {\n            return false;\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(not parse_bson_element_list(/*is_array*/false)))\n        {\n            return false;\n        }\n\n        return sax->end_object();\n    }\n\n    /*!\n    @brief Parses a C-style string from the BSON input.\n    @param[in, out] result  A reference to the string variable where the read\n                            string is to be stored.\n    @return `true` if the \\x00-byte indicating the end of the string was\n             encountered before the EOF; false` indicates an unexpected EOF.\n    */\n    bool get_bson_cstr(string_t& result)\n    {\n        auto out = std::back_inserter(result);\n        while (true)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::bson, \"cstring\")))\n            {\n                return false;\n            }\n            if (current == 0x00)\n            {\n                return true;\n            }\n            *out++ = static_cast<char>(current);\n        }\n\n        return true;\n    }\n\n    /*!\n    @brief Parses a zero-terminated string of length @a len from the BSON\n           input.\n    @param[in] len  The length (including the zero-byte at the end) of the\n                    string to be read.\n    @param[in, out] result  A reference to the string variable where the read\n                            string is to be stored.\n    @tparam NumberType The type of the length @a len\n    @pre len >= 1\n    @return `true` if the string was successfully parsed\n    */\n    template<typename NumberType>\n    bool get_bson_string(const NumberType len, string_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(len < 1))\n        {\n            auto last_token = get_token_string();\n            return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::bson, \"string length must be at least 1, is \" + std::to_string(len), \"string\")));\n        }\n\n        return get_string(input_format_t::bson, len - static_cast<NumberType>(1), result) and get() != std::char_traits<char>::eof();\n    }\n\n    /*!\n    @brief Read a BSON document element of the given @a element_type.\n    @param[in] element_type The BSON element type, c.f. http://bsonspec.org/spec.html\n    @param[in] element_type_parse_position The position in the input stream,\n               where the `element_type` was read.\n    @warning Not all BSON element types are supported yet. An unsupported\n             @a element_type will give rise to a parse_error.114:\n             Unsupported BSON record type 0x...\n    @return whether a valid BSON-object/array was passed to the SAX parser\n    */\n    bool parse_bson_element_internal(const int element_type,\n                                     const std::size_t element_type_parse_position)\n    {\n        switch (element_type)\n        {\n            case 0x01: // double\n            {\n                double number;\n                return get_number<double, true>(input_format_t::bson, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0x02: // string\n            {\n                std::int32_t len;\n                string_t value;\n                return get_number<std::int32_t, true>(input_format_t::bson, len) and get_bson_string(len, value) and sax->string(value);\n            }\n\n            case 0x03: // object\n            {\n                return parse_bson_internal();\n            }\n\n            case 0x04: // array\n            {\n                return parse_bson_array();\n            }\n\n            case 0x08: // boolean\n            {\n                return sax->boolean(get() != 0);\n            }\n\n            case 0x0A: // null\n            {\n                return sax->null();\n            }\n\n            case 0x10: // int32\n            {\n                std::int32_t value;\n                return get_number<std::int32_t, true>(input_format_t::bson, value) and sax->number_integer(value);\n            }\n\n            case 0x12: // int64\n            {\n                std::int64_t value;\n                return get_number<std::int64_t, true>(input_format_t::bson, value) and sax->number_integer(value);\n            }\n\n            default: // anything else not supported (yet)\n            {\n                std::array<char, 3> cr{{}};\n                (std::snprintf)(cr.data(), cr.size(), \"%.2hhX\", static_cast<unsigned char>(element_type));\n                return sax->parse_error(element_type_parse_position, std::string(cr.data()), parse_error::create(114, element_type_parse_position, \"Unsupported BSON record type 0x\" + std::string(cr.data())));\n            }\n        }\n    }\n\n    /*!\n    @brief Read a BSON element list (as specified in the BSON-spec)\n\n    The same binary layout is used for objects and arrays, hence it must be\n    indicated with the argument @a is_array which one is expected\n    (true --> array, false --> object).\n\n    @param[in] is_array Determines if the element list being read is to be\n                        treated as an object (@a is_array == false), or as an\n                        array (@a is_array == true).\n    @return whether a valid BSON-object/array was passed to the SAX parser\n    */\n    bool parse_bson_element_list(const bool is_array)\n    {\n        string_t key;\n        while (int element_type = get())\n        {\n            if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::bson, \"element list\")))\n            {\n                return false;\n            }\n\n            const std::size_t element_type_parse_position = chars_read;\n            if (JSON_HEDLEY_UNLIKELY(not get_bson_cstr(key)))\n            {\n                return false;\n            }\n\n            if (not is_array and not sax->key(key))\n            {\n                return false;\n            }\n\n            if (JSON_HEDLEY_UNLIKELY(not parse_bson_element_internal(element_type, element_type_parse_position)))\n            {\n                return false;\n            }\n\n            // get_bson_cstr only appends\n            key.clear();\n        }\n\n        return true;\n    }\n\n    /*!\n    @brief Reads an array from the BSON input and passes it to the SAX-parser.\n    @return whether a valid BSON-array was passed to the SAX parser\n    */\n    bool parse_bson_array()\n    {\n        std::int32_t document_size;\n        get_number<std::int32_t, true>(input_format_t::bson, document_size);\n\n        if (JSON_HEDLEY_UNLIKELY(not sax->start_array(std::size_t(-1))))\n        {\n            return false;\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(not parse_bson_element_list(/*is_array*/true)))\n        {\n            return false;\n        }\n\n        return sax->end_array();\n    }\n\n    //////////\n    // CBOR //\n    //////////\n\n    /*!\n    @param[in] get_char  whether a new character should be retrieved from the\n                         input (true, default) or whether the last read\n                         character should be considered instead\n\n    @return whether a valid CBOR value was passed to the SAX parser\n    */\n    bool parse_cbor_internal(const bool get_char = true)\n    {\n        switch (get_char ? get() : current)\n        {\n            // EOF\n            case std::char_traits<char>::eof():\n                return unexpect_eof(input_format_t::cbor, \"value\");\n\n            // Integer 0x00..0x17 (0..23)\n            case 0x00:\n            case 0x01:\n            case 0x02:\n            case 0x03:\n            case 0x04:\n            case 0x05:\n            case 0x06:\n            case 0x07:\n            case 0x08:\n            case 0x09:\n            case 0x0A:\n            case 0x0B:\n            case 0x0C:\n            case 0x0D:\n            case 0x0E:\n            case 0x0F:\n            case 0x10:\n            case 0x11:\n            case 0x12:\n            case 0x13:\n            case 0x14:\n            case 0x15:\n            case 0x16:\n            case 0x17:\n                return sax->number_unsigned(static_cast<number_unsigned_t>(current));\n\n            case 0x18: // Unsigned integer (one-byte uint8_t follows)\n            {\n                std::uint8_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_unsigned(number);\n            }\n\n            case 0x19: // Unsigned integer (two-byte uint16_t follows)\n            {\n                std::uint16_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_unsigned(number);\n            }\n\n            case 0x1A: // Unsigned integer (four-byte uint32_t follows)\n            {\n                std::uint32_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_unsigned(number);\n            }\n\n            case 0x1B: // Unsigned integer (eight-byte uint64_t follows)\n            {\n                std::uint64_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_unsigned(number);\n            }\n\n            // Negative integer -1-0x00..-1-0x17 (-1..-24)\n            case 0x20:\n            case 0x21:\n            case 0x22:\n            case 0x23:\n            case 0x24:\n            case 0x25:\n            case 0x26:\n            case 0x27:\n            case 0x28:\n            case 0x29:\n            case 0x2A:\n            case 0x2B:\n            case 0x2C:\n            case 0x2D:\n            case 0x2E:\n            case 0x2F:\n            case 0x30:\n            case 0x31:\n            case 0x32:\n            case 0x33:\n            case 0x34:\n            case 0x35:\n            case 0x36:\n            case 0x37:\n                return sax->number_integer(static_cast<std::int8_t>(0x20 - 1 - current));\n\n            case 0x38: // Negative integer (one-byte uint8_t follows)\n            {\n                std::uint8_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) - number);\n            }\n\n            case 0x39: // Negative integer -1-n (two-byte uint16_t follows)\n            {\n                std::uint16_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) - number);\n            }\n\n            case 0x3A: // Negative integer -1-n (four-byte uint32_t follows)\n            {\n                std::uint32_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1) - number);\n            }\n\n            case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows)\n            {\n                std::uint64_t number;\n                return get_number(input_format_t::cbor, number) and sax->number_integer(static_cast<number_integer_t>(-1)\n                        - static_cast<number_integer_t>(number));\n            }\n\n            // UTF-8 string (0x00..0x17 bytes follow)\n            case 0x60:\n            case 0x61:\n            case 0x62:\n            case 0x63:\n            case 0x64:\n            case 0x65:\n            case 0x66:\n            case 0x67:\n            case 0x68:\n            case 0x69:\n            case 0x6A:\n            case 0x6B:\n            case 0x6C:\n            case 0x6D:\n            case 0x6E:\n            case 0x6F:\n            case 0x70:\n            case 0x71:\n            case 0x72:\n            case 0x73:\n            case 0x74:\n            case 0x75:\n            case 0x76:\n            case 0x77:\n            case 0x78: // UTF-8 string (one-byte uint8_t for n follows)\n            case 0x79: // UTF-8 string (two-byte uint16_t for n follow)\n            case 0x7A: // UTF-8 string (four-byte uint32_t for n follow)\n            case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow)\n            case 0x7F: // UTF-8 string (indefinite length)\n            {\n                string_t s;\n                return get_cbor_string(s) and sax->string(s);\n            }\n\n            // array (0x00..0x17 data items follow)\n            case 0x80:\n            case 0x81:\n            case 0x82:\n            case 0x83:\n            case 0x84:\n            case 0x85:\n            case 0x86:\n            case 0x87:\n            case 0x88:\n            case 0x89:\n            case 0x8A:\n            case 0x8B:\n            case 0x8C:\n            case 0x8D:\n            case 0x8E:\n            case 0x8F:\n            case 0x90:\n            case 0x91:\n            case 0x92:\n            case 0x93:\n            case 0x94:\n            case 0x95:\n            case 0x96:\n            case 0x97:\n                return get_cbor_array(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu));\n\n            case 0x98: // array (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len));\n            }\n\n            case 0x99: // array (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len));\n            }\n\n            case 0x9A: // array (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len));\n            }\n\n            case 0x9B: // array (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_array(static_cast<std::size_t>(len));\n            }\n\n            case 0x9F: // array (indefinite length)\n                return get_cbor_array(std::size_t(-1));\n\n            // map (0x00..0x17 pairs of data items follow)\n            case 0xA0:\n            case 0xA1:\n            case 0xA2:\n            case 0xA3:\n            case 0xA4:\n            case 0xA5:\n            case 0xA6:\n            case 0xA7:\n            case 0xA8:\n            case 0xA9:\n            case 0xAA:\n            case 0xAB:\n            case 0xAC:\n            case 0xAD:\n            case 0xAE:\n            case 0xAF:\n            case 0xB0:\n            case 0xB1:\n            case 0xB2:\n            case 0xB3:\n            case 0xB4:\n            case 0xB5:\n            case 0xB6:\n            case 0xB7:\n                return get_cbor_object(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x1Fu));\n\n            case 0xB8: // map (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len));\n            }\n\n            case 0xB9: // map (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len));\n            }\n\n            case 0xBA: // map (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len));\n            }\n\n            case 0xBB: // map (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len;\n                return get_number(input_format_t::cbor, len) and get_cbor_object(static_cast<std::size_t>(len));\n            }\n\n            case 0xBF: // map (indefinite length)\n                return get_cbor_object(std::size_t(-1));\n\n            case 0xF4: // false\n                return sax->boolean(false);\n\n            case 0xF5: // true\n                return sax->boolean(true);\n\n            case 0xF6: // null\n                return sax->null();\n\n            case 0xF9: // Half-Precision Float (two-byte IEEE 754)\n            {\n                const int byte1_raw = get();\n                if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::cbor, \"number\")))\n                {\n                    return false;\n                }\n                const int byte2_raw = get();\n                if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::cbor, \"number\")))\n                {\n                    return false;\n                }\n\n                const auto byte1 = static_cast<unsigned char>(byte1_raw);\n                const auto byte2 = static_cast<unsigned char>(byte2_raw);\n\n                // code from RFC 7049, Appendix D, Figure 3:\n                // As half-precision floating-point numbers were only added\n                // to IEEE 754 in 2008, today's programming platforms often\n                // still only have limited support for them. It is very\n                // easy to include at least decoding support for them even\n                // without such support. An example of a small decoder for\n                // half-precision floating-point numbers in the C language\n                // is shown in Fig. 3.\n                const auto half = static_cast<unsigned int>((byte1 << 8u) + byte2);\n                const double val = [&half]\n                {\n                    const int exp = (half >> 10u) & 0x1Fu;\n                    const unsigned int mant = half & 0x3FFu;\n                    assert(0 <= exp and exp <= 32);\n                    assert(mant <= 1024);\n                    switch (exp)\n                    {\n                        case 0:\n                            return std::ldexp(mant, -24);\n                        case 31:\n                            return (mant == 0)\n                            ? std::numeric_limits<double>::infinity()\n                            : std::numeric_limits<double>::quiet_NaN();\n                        default:\n                            return std::ldexp(mant + 1024, exp - 25);\n                    }\n                }();\n                return sax->number_float((half & 0x8000u) != 0\n                                         ? static_cast<number_float_t>(-val)\n                                         : static_cast<number_float_t>(val), \"\");\n            }\n\n            case 0xFA: // Single-Precision Float (four-byte IEEE 754)\n            {\n                float number;\n                return get_number(input_format_t::cbor, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0xFB: // Double-Precision Float (eight-byte IEEE 754)\n            {\n                double number;\n                return get_number(input_format_t::cbor, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            default: // anything else (0xFF is handled inside the other types)\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::cbor, \"invalid byte: 0x\" + last_token, \"value\")));\n            }\n        }\n    }\n\n    /*!\n    @brief reads a CBOR string\n\n    This function first reads starting bytes to determine the expected\n    string length and then copies this number of bytes into a string.\n    Additionally, CBOR's strings with indefinite lengths are supported.\n\n    @param[out] result  created string\n\n    @return whether string creation completed\n    */\n    bool get_cbor_string(string_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::cbor, \"string\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            // UTF-8 string (0x00..0x17 bytes follow)\n            case 0x60:\n            case 0x61:\n            case 0x62:\n            case 0x63:\n            case 0x64:\n            case 0x65:\n            case 0x66:\n            case 0x67:\n            case 0x68:\n            case 0x69:\n            case 0x6A:\n            case 0x6B:\n            case 0x6C:\n            case 0x6D:\n            case 0x6E:\n            case 0x6F:\n            case 0x70:\n            case 0x71:\n            case 0x72:\n            case 0x73:\n            case 0x74:\n            case 0x75:\n            case 0x76:\n            case 0x77:\n            {\n                return get_string(input_format_t::cbor, static_cast<unsigned int>(current) & 0x1Fu, result);\n            }\n\n            case 0x78: // UTF-8 string (one-byte uint8_t for n follows)\n            {\n                std::uint8_t len;\n                return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x79: // UTF-8 string (two-byte uint16_t for n follow)\n            {\n                std::uint16_t len;\n                return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x7A: // UTF-8 string (four-byte uint32_t for n follow)\n            {\n                std::uint32_t len;\n                return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow)\n            {\n                std::uint64_t len;\n                return get_number(input_format_t::cbor, len) and get_string(input_format_t::cbor, len, result);\n            }\n\n            case 0x7F: // UTF-8 string (indefinite length)\n            {\n                while (get() != 0xFF)\n                {\n                    string_t chunk;\n                    if (not get_cbor_string(chunk))\n                    {\n                        return false;\n                    }\n                    result.append(chunk);\n                }\n                return true;\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::cbor, \"expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0x\" + last_token, \"string\")));\n            }\n        }\n    }\n\n    /*!\n    @param[in] len  the length of the array or std::size_t(-1) for an\n                    array of indefinite size\n    @return whether array creation completed\n    */\n    bool get_cbor_array(const std::size_t len)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not sax->start_array(len)))\n        {\n            return false;\n        }\n\n        if (len != std::size_t(-1))\n        {\n            for (std::size_t i = 0; i < len; ++i)\n            {\n                if (JSON_HEDLEY_UNLIKELY(not parse_cbor_internal()))\n                {\n                    return false;\n                }\n            }\n        }\n        else\n        {\n            while (get() != 0xFF)\n            {\n                if (JSON_HEDLEY_UNLIKELY(not parse_cbor_internal(false)))\n                {\n                    return false;\n                }\n            }\n        }\n\n        return sax->end_array();\n    }\n\n    /*!\n    @param[in] len  the length of the object or std::size_t(-1) for an\n                    object of indefinite size\n    @return whether object creation completed\n    */\n    bool get_cbor_object(const std::size_t len)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not sax->start_object(len)))\n        {\n            return false;\n        }\n\n        string_t key;\n        if (len != std::size_t(-1))\n        {\n            for (std::size_t i = 0; i < len; ++i)\n            {\n                get();\n                if (JSON_HEDLEY_UNLIKELY(not get_cbor_string(key) or not sax->key(key)))\n                {\n                    return false;\n                }\n\n                if (JSON_HEDLEY_UNLIKELY(not parse_cbor_internal()))\n                {\n                    return false;\n                }\n                key.clear();\n            }\n        }\n        else\n        {\n            while (get() != 0xFF)\n            {\n                if (JSON_HEDLEY_UNLIKELY(not get_cbor_string(key) or not sax->key(key)))\n                {\n                    return false;\n                }\n\n                if (JSON_HEDLEY_UNLIKELY(not parse_cbor_internal()))\n                {\n                    return false;\n                }\n                key.clear();\n            }\n        }\n\n        return sax->end_object();\n    }\n\n    /////////////\n    // MsgPack //\n    /////////////\n\n    /*!\n    @return whether a valid MessagePack value was passed to the SAX parser\n    */\n    bool parse_msgpack_internal()\n    {\n        switch (get())\n        {\n            // EOF\n            case std::char_traits<char>::eof():\n                return unexpect_eof(input_format_t::msgpack, \"value\");\n\n            // positive fixint\n            case 0x00:\n            case 0x01:\n            case 0x02:\n            case 0x03:\n            case 0x04:\n            case 0x05:\n            case 0x06:\n            case 0x07:\n            case 0x08:\n            case 0x09:\n            case 0x0A:\n            case 0x0B:\n            case 0x0C:\n            case 0x0D:\n            case 0x0E:\n            case 0x0F:\n            case 0x10:\n            case 0x11:\n            case 0x12:\n            case 0x13:\n            case 0x14:\n            case 0x15:\n            case 0x16:\n            case 0x17:\n            case 0x18:\n            case 0x19:\n            case 0x1A:\n            case 0x1B:\n            case 0x1C:\n            case 0x1D:\n            case 0x1E:\n            case 0x1F:\n            case 0x20:\n            case 0x21:\n            case 0x22:\n            case 0x23:\n            case 0x24:\n            case 0x25:\n            case 0x26:\n            case 0x27:\n            case 0x28:\n            case 0x29:\n            case 0x2A:\n            case 0x2B:\n            case 0x2C:\n            case 0x2D:\n            case 0x2E:\n            case 0x2F:\n            case 0x30:\n            case 0x31:\n            case 0x32:\n            case 0x33:\n            case 0x34:\n            case 0x35:\n            case 0x36:\n            case 0x37:\n            case 0x38:\n            case 0x39:\n            case 0x3A:\n            case 0x3B:\n            case 0x3C:\n            case 0x3D:\n            case 0x3E:\n            case 0x3F:\n            case 0x40:\n            case 0x41:\n            case 0x42:\n            case 0x43:\n            case 0x44:\n            case 0x45:\n            case 0x46:\n            case 0x47:\n            case 0x48:\n            case 0x49:\n            case 0x4A:\n            case 0x4B:\n            case 0x4C:\n            case 0x4D:\n            case 0x4E:\n            case 0x4F:\n            case 0x50:\n            case 0x51:\n            case 0x52:\n            case 0x53:\n            case 0x54:\n            case 0x55:\n            case 0x56:\n            case 0x57:\n            case 0x58:\n            case 0x59:\n            case 0x5A:\n            case 0x5B:\n            case 0x5C:\n            case 0x5D:\n            case 0x5E:\n            case 0x5F:\n            case 0x60:\n            case 0x61:\n            case 0x62:\n            case 0x63:\n            case 0x64:\n            case 0x65:\n            case 0x66:\n            case 0x67:\n            case 0x68:\n            case 0x69:\n            case 0x6A:\n            case 0x6B:\n            case 0x6C:\n            case 0x6D:\n            case 0x6E:\n            case 0x6F:\n            case 0x70:\n            case 0x71:\n            case 0x72:\n            case 0x73:\n            case 0x74:\n            case 0x75:\n            case 0x76:\n            case 0x77:\n            case 0x78:\n            case 0x79:\n            case 0x7A:\n            case 0x7B:\n            case 0x7C:\n            case 0x7D:\n            case 0x7E:\n            case 0x7F:\n                return sax->number_unsigned(static_cast<number_unsigned_t>(current));\n\n            // fixmap\n            case 0x80:\n            case 0x81:\n            case 0x82:\n            case 0x83:\n            case 0x84:\n            case 0x85:\n            case 0x86:\n            case 0x87:\n            case 0x88:\n            case 0x89:\n            case 0x8A:\n            case 0x8B:\n            case 0x8C:\n            case 0x8D:\n            case 0x8E:\n            case 0x8F:\n                return get_msgpack_object(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu));\n\n            // fixarray\n            case 0x90:\n            case 0x91:\n            case 0x92:\n            case 0x93:\n            case 0x94:\n            case 0x95:\n            case 0x96:\n            case 0x97:\n            case 0x98:\n            case 0x99:\n            case 0x9A:\n            case 0x9B:\n            case 0x9C:\n            case 0x9D:\n            case 0x9E:\n            case 0x9F:\n                return get_msgpack_array(static_cast<std::size_t>(static_cast<unsigned int>(current) & 0x0Fu));\n\n            // fixstr\n            case 0xA0:\n            case 0xA1:\n            case 0xA2:\n            case 0xA3:\n            case 0xA4:\n            case 0xA5:\n            case 0xA6:\n            case 0xA7:\n            case 0xA8:\n            case 0xA9:\n            case 0xAA:\n            case 0xAB:\n            case 0xAC:\n            case 0xAD:\n            case 0xAE:\n            case 0xAF:\n            case 0xB0:\n            case 0xB1:\n            case 0xB2:\n            case 0xB3:\n            case 0xB4:\n            case 0xB5:\n            case 0xB6:\n            case 0xB7:\n            case 0xB8:\n            case 0xB9:\n            case 0xBA:\n            case 0xBB:\n            case 0xBC:\n            case 0xBD:\n            case 0xBE:\n            case 0xBF:\n            case 0xD9: // str 8\n            case 0xDA: // str 16\n            case 0xDB: // str 32\n            {\n                string_t s;\n                return get_msgpack_string(s) and sax->string(s);\n            }\n\n            case 0xC0: // nil\n                return sax->null();\n\n            case 0xC2: // false\n                return sax->boolean(false);\n\n            case 0xC3: // true\n                return sax->boolean(true);\n\n            case 0xCA: // float 32\n            {\n                float number;\n                return get_number(input_format_t::msgpack, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0xCB: // float 64\n            {\n                double number;\n                return get_number(input_format_t::msgpack, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 0xCC: // uint 8\n            {\n                std::uint8_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number);\n            }\n\n            case 0xCD: // uint 16\n            {\n                std::uint16_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number);\n            }\n\n            case 0xCE: // uint 32\n            {\n                std::uint32_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number);\n            }\n\n            case 0xCF: // uint 64\n            {\n                std::uint64_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_unsigned(number);\n            }\n\n            case 0xD0: // int 8\n            {\n                std::int8_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_integer(number);\n            }\n\n            case 0xD1: // int 16\n            {\n                std::int16_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_integer(number);\n            }\n\n            case 0xD2: // int 32\n            {\n                std::int32_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_integer(number);\n            }\n\n            case 0xD3: // int 64\n            {\n                std::int64_t number;\n                return get_number(input_format_t::msgpack, number) and sax->number_integer(number);\n            }\n\n            case 0xDC: // array 16\n            {\n                std::uint16_t len;\n                return get_number(input_format_t::msgpack, len) and get_msgpack_array(static_cast<std::size_t>(len));\n            }\n\n            case 0xDD: // array 32\n            {\n                std::uint32_t len;\n                return get_number(input_format_t::msgpack, len) and get_msgpack_array(static_cast<std::size_t>(len));\n            }\n\n            case 0xDE: // map 16\n            {\n                std::uint16_t len;\n                return get_number(input_format_t::msgpack, len) and get_msgpack_object(static_cast<std::size_t>(len));\n            }\n\n            case 0xDF: // map 32\n            {\n                std::uint32_t len;\n                return get_number(input_format_t::msgpack, len) and get_msgpack_object(static_cast<std::size_t>(len));\n            }\n\n            // negative fixint\n            case 0xE0:\n            case 0xE1:\n            case 0xE2:\n            case 0xE3:\n            case 0xE4:\n            case 0xE5:\n            case 0xE6:\n            case 0xE7:\n            case 0xE8:\n            case 0xE9:\n            case 0xEA:\n            case 0xEB:\n            case 0xEC:\n            case 0xED:\n            case 0xEE:\n            case 0xEF:\n            case 0xF0:\n            case 0xF1:\n            case 0xF2:\n            case 0xF3:\n            case 0xF4:\n            case 0xF5:\n            case 0xF6:\n            case 0xF7:\n            case 0xF8:\n            case 0xF9:\n            case 0xFA:\n            case 0xFB:\n            case 0xFC:\n            case 0xFD:\n            case 0xFE:\n            case 0xFF:\n                return sax->number_integer(static_cast<std::int8_t>(current));\n\n            default: // anything else\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::msgpack, \"invalid byte: 0x\" + last_token, \"value\")));\n            }\n        }\n    }\n\n    /*!\n    @brief reads a MessagePack string\n\n    This function first reads starting bytes to determine the expected\n    string length and then copies this number of bytes into a string.\n\n    @param[out] result  created string\n\n    @return whether string creation completed\n    */\n    bool get_msgpack_string(string_t& result)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::msgpack, \"string\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            // fixstr\n            case 0xA0:\n            case 0xA1:\n            case 0xA2:\n            case 0xA3:\n            case 0xA4:\n            case 0xA5:\n            case 0xA6:\n            case 0xA7:\n            case 0xA8:\n            case 0xA9:\n            case 0xAA:\n            case 0xAB:\n            case 0xAC:\n            case 0xAD:\n            case 0xAE:\n            case 0xAF:\n            case 0xB0:\n            case 0xB1:\n            case 0xB2:\n            case 0xB3:\n            case 0xB4:\n            case 0xB5:\n            case 0xB6:\n            case 0xB7:\n            case 0xB8:\n            case 0xB9:\n            case 0xBA:\n            case 0xBB:\n            case 0xBC:\n            case 0xBD:\n            case 0xBE:\n            case 0xBF:\n            {\n                return get_string(input_format_t::msgpack, static_cast<unsigned int>(current) & 0x1Fu, result);\n            }\n\n            case 0xD9: // str 8\n            {\n                std::uint8_t len;\n                return get_number(input_format_t::msgpack, len) and get_string(input_format_t::msgpack, len, result);\n            }\n\n            case 0xDA: // str 16\n            {\n                std::uint16_t len;\n                return get_number(input_format_t::msgpack, len) and get_string(input_format_t::msgpack, len, result);\n            }\n\n            case 0xDB: // str 32\n            {\n                std::uint32_t len;\n                return get_number(input_format_t::msgpack, len) and get_string(input_format_t::msgpack, len, result);\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::msgpack, \"expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0x\" + last_token, \"string\")));\n            }\n        }\n    }\n\n    /*!\n    @param[in] len  the length of the array\n    @return whether array creation completed\n    */\n    bool get_msgpack_array(const std::size_t len)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not sax->start_array(len)))\n        {\n            return false;\n        }\n\n        for (std::size_t i = 0; i < len; ++i)\n        {\n            if (JSON_HEDLEY_UNLIKELY(not parse_msgpack_internal()))\n            {\n                return false;\n            }\n        }\n\n        return sax->end_array();\n    }\n\n    /*!\n    @param[in] len  the length of the object\n    @return whether object creation completed\n    */\n    bool get_msgpack_object(const std::size_t len)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not sax->start_object(len)))\n        {\n            return false;\n        }\n\n        string_t key;\n        for (std::size_t i = 0; i < len; ++i)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(not get_msgpack_string(key) or not sax->key(key)))\n            {\n                return false;\n            }\n\n            if (JSON_HEDLEY_UNLIKELY(not parse_msgpack_internal()))\n            {\n                return false;\n            }\n            key.clear();\n        }\n\n        return sax->end_object();\n    }\n\n    ////////////\n    // UBJSON //\n    ////////////\n\n    /*!\n    @param[in] get_char  whether a new character should be retrieved from the\n                         input (true, default) or whether the last read\n                         character should be considered instead\n\n    @return whether a valid UBJSON value was passed to the SAX parser\n    */\n    bool parse_ubjson_internal(const bool get_char = true)\n    {\n        return get_ubjson_value(get_char ? get_ignore_noop() : current);\n    }\n\n    /*!\n    @brief reads a UBJSON string\n\n    This function is either called after reading the 'S' byte explicitly\n    indicating a string, or in case of an object key where the 'S' byte can be\n    left out.\n\n    @param[out] result   created string\n    @param[in] get_char  whether a new character should be retrieved from the\n                         input (true, default) or whether the last read\n                         character should be considered instead\n\n    @return whether string creation completed\n    */\n    bool get_ubjson_string(string_t& result, const bool get_char = true)\n    {\n        if (get_char)\n        {\n            get();  // TODO(niels): may we ignore N here?\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::ubjson, \"value\")))\n        {\n            return false;\n        }\n\n        switch (current)\n        {\n            case 'U':\n            {\n                std::uint8_t len;\n                return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'i':\n            {\n                std::int8_t len;\n                return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'I':\n            {\n                std::int16_t len;\n                return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'l':\n            {\n                std::int32_t len;\n                return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result);\n            }\n\n            case 'L':\n            {\n                std::int64_t len;\n                return get_number(input_format_t::ubjson, len) and get_string(input_format_t::ubjson, len, result);\n            }\n\n            default:\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, \"expected length type specification (U, i, I, l, L); last byte: 0x\" + last_token, \"string\")));\n        }\n    }\n\n    /*!\n    @param[out] result  determined size\n    @return whether size determination completed\n    */\n    bool get_ubjson_size_value(std::size_t& result)\n    {\n        switch (get_ignore_noop())\n        {\n            case 'U':\n            {\n                std::uint8_t number;\n                if (JSON_HEDLEY_UNLIKELY(not get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'i':\n            {\n                std::int8_t number;\n                if (JSON_HEDLEY_UNLIKELY(not get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'I':\n            {\n                std::int16_t number;\n                if (JSON_HEDLEY_UNLIKELY(not get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'l':\n            {\n                std::int32_t number;\n                if (JSON_HEDLEY_UNLIKELY(not get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            case 'L':\n            {\n                std::int64_t number;\n                if (JSON_HEDLEY_UNLIKELY(not get_number(input_format_t::ubjson, number)))\n                {\n                    return false;\n                }\n                result = static_cast<std::size_t>(number);\n                return true;\n            }\n\n            default:\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, \"expected length type specification (U, i, I, l, L) after '#'; last byte: 0x\" + last_token, \"size\")));\n            }\n        }\n    }\n\n    /*!\n    @brief determine the type and size for a container\n\n    In the optimized UBJSON format, a type and a size can be provided to allow\n    for a more compact representation.\n\n    @param[out] result  pair of the size and the type\n\n    @return whether pair creation completed\n    */\n    bool get_ubjson_size_type(std::pair<std::size_t, int>& result)\n    {\n        result.first = string_t::npos; // size\n        result.second = 0; // type\n\n        get_ignore_noop();\n\n        if (current == '$')\n        {\n            result.second = get();  // must not ignore 'N', because 'N' maybe the type\n            if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::ubjson, \"type\")))\n            {\n                return false;\n            }\n\n            get_ignore_noop();\n            if (JSON_HEDLEY_UNLIKELY(current != '#'))\n            {\n                if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::ubjson, \"value\")))\n                {\n                    return false;\n                }\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, \"expected '#' after type information; last byte: 0x\" + last_token, \"size\")));\n            }\n\n            return get_ubjson_size_value(result.first);\n        }\n\n        if (current == '#')\n        {\n            return get_ubjson_size_value(result.first);\n        }\n\n        return true;\n    }\n\n    /*!\n    @param prefix  the previously read or set type prefix\n    @return whether value creation completed\n    */\n    bool get_ubjson_value(const int prefix)\n    {\n        switch (prefix)\n        {\n            case std::char_traits<char>::eof():  // EOF\n                return unexpect_eof(input_format_t::ubjson, \"value\");\n\n            case 'T':  // true\n                return sax->boolean(true);\n            case 'F':  // false\n                return sax->boolean(false);\n\n            case 'Z':  // null\n                return sax->null();\n\n            case 'U':\n            {\n                std::uint8_t number;\n                return get_number(input_format_t::ubjson, number) and sax->number_unsigned(number);\n            }\n\n            case 'i':\n            {\n                std::int8_t number;\n                return get_number(input_format_t::ubjson, number) and sax->number_integer(number);\n            }\n\n            case 'I':\n            {\n                std::int16_t number;\n                return get_number(input_format_t::ubjson, number) and sax->number_integer(number);\n            }\n\n            case 'l':\n            {\n                std::int32_t number;\n                return get_number(input_format_t::ubjson, number) and sax->number_integer(number);\n            }\n\n            case 'L':\n            {\n                std::int64_t number;\n                return get_number(input_format_t::ubjson, number) and sax->number_integer(number);\n            }\n\n            case 'd':\n            {\n                float number;\n                return get_number(input_format_t::ubjson, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 'D':\n            {\n                double number;\n                return get_number(input_format_t::ubjson, number) and sax->number_float(static_cast<number_float_t>(number), \"\");\n            }\n\n            case 'C':  // char\n            {\n                get();\n                if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(input_format_t::ubjson, \"char\")))\n                {\n                    return false;\n                }\n                if (JSON_HEDLEY_UNLIKELY(current > 127))\n                {\n                    auto last_token = get_token_string();\n                    return sax->parse_error(chars_read, last_token, parse_error::create(113, chars_read, exception_message(input_format_t::ubjson, \"byte after 'C' must be in range 0x00..0x7F; last byte: 0x\" + last_token, \"char\")));\n                }\n                string_t s(1, static_cast<char>(current));\n                return sax->string(s);\n            }\n\n            case 'S':  // string\n            {\n                string_t s;\n                return get_ubjson_string(s) and sax->string(s);\n            }\n\n            case '[':  // array\n                return get_ubjson_array();\n\n            case '{':  // object\n                return get_ubjson_object();\n\n            default: // anything else\n            {\n                auto last_token = get_token_string();\n                return sax->parse_error(chars_read, last_token, parse_error::create(112, chars_read, exception_message(input_format_t::ubjson, \"invalid byte: 0x\" + last_token, \"value\")));\n            }\n        }\n    }\n\n    /*!\n    @return whether array creation completed\n    */\n    bool get_ubjson_array()\n    {\n        std::pair<std::size_t, int> size_and_type;\n        if (JSON_HEDLEY_UNLIKELY(not get_ubjson_size_type(size_and_type)))\n        {\n            return false;\n        }\n\n        if (size_and_type.first != string_t::npos)\n        {\n            if (JSON_HEDLEY_UNLIKELY(not sax->start_array(size_and_type.first)))\n            {\n                return false;\n            }\n\n            if (size_and_type.second != 0)\n            {\n                if (size_and_type.second != 'N')\n                {\n                    for (std::size_t i = 0; i < size_and_type.first; ++i)\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not get_ubjson_value(size_and_type.second)))\n                        {\n                            return false;\n                        }\n                    }\n                }\n            }\n            else\n            {\n                for (std::size_t i = 0; i < size_and_type.first; ++i)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not parse_ubjson_internal()))\n                    {\n                        return false;\n                    }\n                }\n            }\n        }\n        else\n        {\n            if (JSON_HEDLEY_UNLIKELY(not sax->start_array(std::size_t(-1))))\n            {\n                return false;\n            }\n\n            while (current != ']')\n            {\n                if (JSON_HEDLEY_UNLIKELY(not parse_ubjson_internal(false)))\n                {\n                    return false;\n                }\n                get_ignore_noop();\n            }\n        }\n\n        return sax->end_array();\n    }\n\n    /*!\n    @return whether object creation completed\n    */\n    bool get_ubjson_object()\n    {\n        std::pair<std::size_t, int> size_and_type;\n        if (JSON_HEDLEY_UNLIKELY(not get_ubjson_size_type(size_and_type)))\n        {\n            return false;\n        }\n\n        string_t key;\n        if (size_and_type.first != string_t::npos)\n        {\n            if (JSON_HEDLEY_UNLIKELY(not sax->start_object(size_and_type.first)))\n            {\n                return false;\n            }\n\n            if (size_and_type.second != 0)\n            {\n                for (std::size_t i = 0; i < size_and_type.first; ++i)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not get_ubjson_string(key) or not sax->key(key)))\n                    {\n                        return false;\n                    }\n                    if (JSON_HEDLEY_UNLIKELY(not get_ubjson_value(size_and_type.second)))\n                    {\n                        return false;\n                    }\n                    key.clear();\n                }\n            }\n            else\n            {\n                for (std::size_t i = 0; i < size_and_type.first; ++i)\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not get_ubjson_string(key) or not sax->key(key)))\n                    {\n                        return false;\n                    }\n                    if (JSON_HEDLEY_UNLIKELY(not parse_ubjson_internal()))\n                    {\n                        return false;\n                    }\n                    key.clear();\n                }\n            }\n        }\n        else\n        {\n            if (JSON_HEDLEY_UNLIKELY(not sax->start_object(std::size_t(-1))))\n            {\n                return false;\n            }\n\n            while (current != '}')\n            {\n                if (JSON_HEDLEY_UNLIKELY(not get_ubjson_string(key, false) or not sax->key(key)))\n                {\n                    return false;\n                }\n                if (JSON_HEDLEY_UNLIKELY(not parse_ubjson_internal()))\n                {\n                    return false;\n                }\n                get_ignore_noop();\n                key.clear();\n            }\n        }\n\n        return sax->end_object();\n    }\n\n    ///////////////////////\n    // Utility functions //\n    ///////////////////////\n\n    /*!\n    @brief get next character from the input\n\n    This function provides the interface to the used input adapter. It does\n    not throw in case the input reached EOF, but returns a -'ve valued\n    `std::char_traits<char>::eof()` in that case.\n\n    @return character read from the input\n    */\n    int get()\n    {\n        ++chars_read;\n        return current = ia->get_character();\n    }\n\n    /*!\n    @return character read from the input after ignoring all 'N' entries\n    */\n    int get_ignore_noop()\n    {\n        do\n        {\n            get();\n        }\n        while (current == 'N');\n\n        return current;\n    }\n\n    /*\n    @brief read a number from the input\n\n    @tparam NumberType the type of the number\n    @param[in] format   the current format (for diagnostics)\n    @param[out] result  number of type @a NumberType\n\n    @return whether conversion completed\n\n    @note This function needs to respect the system's endianess, because\n          bytes in CBOR, MessagePack, and UBJSON are stored in network order\n          (big endian) and therefore need reordering on little endian systems.\n    */\n    template<typename NumberType, bool InputIsLittleEndian = false>\n    bool get_number(const input_format_t format, NumberType& result)\n    {\n        // step 1: read input into array with system's byte order\n        std::array<std::uint8_t, sizeof(NumberType)> vec;\n        for (std::size_t i = 0; i < sizeof(NumberType); ++i)\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(format, \"number\")))\n            {\n                return false;\n            }\n\n            // reverse byte order prior to conversion if necessary\n            if (is_little_endian != InputIsLittleEndian)\n            {\n                vec[sizeof(NumberType) - i - 1] = static_cast<std::uint8_t>(current);\n            }\n            else\n            {\n                vec[i] = static_cast<std::uint8_t>(current); // LCOV_EXCL_LINE\n            }\n        }\n\n        // step 2: convert array into number of type T and return\n        std::memcpy(&result, vec.data(), sizeof(NumberType));\n        return true;\n    }\n\n    /*!\n    @brief create a string by reading characters from the input\n\n    @tparam NumberType the type of the number\n    @param[in] format the current format (for diagnostics)\n    @param[in] len number of characters to read\n    @param[out] result string created by reading @a len bytes\n\n    @return whether string creation completed\n\n    @note We can not reserve @a len bytes for the result, because @a len\n          may be too large. Usually, @ref unexpect_eof() detects the end of\n          the input before we run out of string memory.\n    */\n    template<typename NumberType>\n    bool get_string(const input_format_t format,\n                    const NumberType len,\n                    string_t& result)\n    {\n        bool success = true;\n        std::generate_n(std::back_inserter(result), len, [this, &success, &format]()\n        {\n            get();\n            if (JSON_HEDLEY_UNLIKELY(not unexpect_eof(format, \"string\")))\n            {\n                success = false;\n            }\n            return static_cast<char>(current);\n        });\n        return success;\n    }\n\n    /*!\n    @param[in] format   the current format (for diagnostics)\n    @param[in] context  further context information (for diagnostics)\n    @return whether the last read character is not EOF\n    */\n    JSON_HEDLEY_NON_NULL(3)\n    bool unexpect_eof(const input_format_t format, const char* context) const\n    {\n        if (JSON_HEDLEY_UNLIKELY(current == std::char_traits<char>::eof()))\n        {\n            return sax->parse_error(chars_read, \"<end of file>\",\n                                    parse_error::create(110, chars_read, exception_message(format, \"unexpected end of input\", context)));\n        }\n        return true;\n    }\n\n    /*!\n    @return a string representation of the last read byte\n    */\n    std::string get_token_string() const\n    {\n        std::array<char, 3> cr{{}};\n        (std::snprintf)(cr.data(), cr.size(), \"%.2hhX\", static_cast<unsigned char>(current));\n        return std::string{cr.data()};\n    }\n\n    /*!\n    @param[in] format   the current format\n    @param[in] detail   a detailed error message\n    @param[in] context  further context information\n    @return a message string to use in the parse_error exceptions\n    */\n    std::string exception_message(const input_format_t format,\n                                  const std::string& detail,\n                                  const std::string& context) const\n    {\n        std::string error_msg = \"syntax error while parsing \";\n\n        switch (format)\n        {\n            case input_format_t::cbor:\n                error_msg += \"CBOR\";\n                break;\n\n            case input_format_t::msgpack:\n                error_msg += \"MessagePack\";\n                break;\n\n            case input_format_t::ubjson:\n                error_msg += \"UBJSON\";\n                break;\n\n            case input_format_t::bson:\n                error_msg += \"BSON\";\n                break;\n\n            default:            // LCOV_EXCL_LINE\n                assert(false);  // LCOV_EXCL_LINE\n        }\n\n        return error_msg + \" \" + context + \": \" + detail;\n    }\n\n  private:\n    /// input adapter\n    input_adapter_t ia = nullptr;\n\n    /// the current character\n    int current = std::char_traits<char>::eof();\n\n    /// the number of characters read\n    std::size_t chars_read = 0;\n\n    /// whether we can assume little endianess\n    const bool is_little_endian = little_endianess();\n\n    /// the SAX parser\n    json_sax_t* sax = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n// #include <nlohmann/detail/input/lexer.hpp>\n\n\n#include <array> // array\n#include <clocale> // localeconv\n#include <cstddef> // size_t\n#include <cstdio> // snprintf\n#include <cstdlib> // strtof, strtod, strtold, strtoll, strtoull\n#include <initializer_list> // initializer_list\n#include <string> // char_traits, string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n// #include <nlohmann/detail/input/position_t.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////\n// lexer //\n///////////\n\n/*!\n@brief lexical analysis\n\nThis class organizes the lexical analysis during JSON deserialization.\n*/\ntemplate<typename BasicJsonType>\nclass lexer\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n\n  public:\n    /// token types for the parser\n    enum class token_type\n    {\n        uninitialized,    ///< indicating the scanner is uninitialized\n        literal_true,     ///< the `true` literal\n        literal_false,    ///< the `false` literal\n        literal_null,     ///< the `null` literal\n        value_string,     ///< a string -- use get_string() for actual value\n        value_unsigned,   ///< an unsigned integer -- use get_number_unsigned() for actual value\n        value_integer,    ///< a signed integer -- use get_number_integer() for actual value\n        value_float,      ///< an floating point number -- use get_number_float() for actual value\n        begin_array,      ///< the character for array begin `[`\n        begin_object,     ///< the character for object begin `{`\n        end_array,        ///< the character for array end `]`\n        end_object,       ///< the character for object end `}`\n        name_separator,   ///< the name separator `:`\n        value_separator,  ///< the value separator `,`\n        parse_error,      ///< indicating a parse error\n        end_of_input,     ///< indicating the end of the input buffer\n        literal_or_value  ///< a literal or the begin of a value (only for diagnostics)\n    };\n\n    /// return name of values of type token_type (only used for errors)\n    JSON_HEDLEY_RETURNS_NON_NULL\n    JSON_HEDLEY_CONST\n    static const char* token_type_name(const token_type t) noexcept\n    {\n        switch (t)\n        {\n            case token_type::uninitialized:\n                return \"<uninitialized>\";\n            case token_type::literal_true:\n                return \"true literal\";\n            case token_type::literal_false:\n                return \"false literal\";\n            case token_type::literal_null:\n                return \"null literal\";\n            case token_type::value_string:\n                return \"string literal\";\n            case lexer::token_type::value_unsigned:\n            case lexer::token_type::value_integer:\n            case lexer::token_type::value_float:\n                return \"number literal\";\n            case token_type::begin_array:\n                return \"'['\";\n            case token_type::begin_object:\n                return \"'{'\";\n            case token_type::end_array:\n                return \"']'\";\n            case token_type::end_object:\n                return \"'}'\";\n            case token_type::name_separator:\n                return \"':'\";\n            case token_type::value_separator:\n                return \"','\";\n            case token_type::parse_error:\n                return \"<parse error>\";\n            case token_type::end_of_input:\n                return \"end of input\";\n            case token_type::literal_or_value:\n                return \"'[', '{', or a literal\";\n            // LCOV_EXCL_START\n            default: // catch non-enum values\n                return \"unknown token\";\n                // LCOV_EXCL_STOP\n        }\n    }\n\n    explicit lexer(detail::input_adapter_t&& adapter)\n        : ia(std::move(adapter)), decimal_point_char(get_decimal_point()) {}\n\n    // delete because of pointer members\n    lexer(const lexer&) = delete;\n    lexer(lexer&&) = delete;\n    lexer& operator=(lexer&) = delete;\n    lexer& operator=(lexer&&) = delete;\n    ~lexer() = default;\n\n  private:\n    /////////////////////\n    // locales\n    /////////////////////\n\n    /// return the locale-dependent decimal point\n    JSON_HEDLEY_PURE\n    static char get_decimal_point() noexcept\n    {\n        const auto loc = localeconv();\n        assert(loc != nullptr);\n        return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point);\n    }\n\n    /////////////////////\n    // scan functions\n    /////////////////////\n\n    /*!\n    @brief get codepoint from 4 hex characters following `\\u`\n\n    For input \"\\u c1 c2 c3 c4\" the codepoint is:\n      (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4\n    = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0)\n\n    Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f'\n    must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The\n    conversion is done by subtracting the offset (0x30, 0x37, and 0x57)\n    between the ASCII value of the character and the desired integer value.\n\n    @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or\n            non-hex character)\n    */\n    int get_codepoint()\n    {\n        // this function only makes sense after reading `\\u`\n        assert(current == 'u');\n        int codepoint = 0;\n\n        const auto factors = { 12u, 8u, 4u, 0u };\n        for (const auto factor : factors)\n        {\n            get();\n\n            if (current >= '0' and current <= '9')\n            {\n                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x30u) << factor);\n            }\n            else if (current >= 'A' and current <= 'F')\n            {\n                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x37u) << factor);\n            }\n            else if (current >= 'a' and current <= 'f')\n            {\n                codepoint += static_cast<int>((static_cast<unsigned int>(current) - 0x57u) << factor);\n            }\n            else\n            {\n                return -1;\n            }\n        }\n\n        assert(0x0000 <= codepoint and codepoint <= 0xFFFF);\n        return codepoint;\n    }\n\n    /*!\n    @brief check if the next byte(s) are inside a given range\n\n    Adds the current byte and, for each passed range, reads a new byte and\n    checks if it is inside the range. If a violation was detected, set up an\n    error message and return false. Otherwise, return true.\n\n    @param[in] ranges  list of integers; interpreted as list of pairs of\n                       inclusive lower and upper bound, respectively\n\n    @pre The passed list @a ranges must have 2, 4, or 6 elements; that is,\n         1, 2, or 3 pairs. This precondition is enforced by an assertion.\n\n    @return true if and only if no range violation was detected\n    */\n    bool next_byte_in_range(std::initializer_list<int> ranges)\n    {\n        assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6);\n        add(current);\n\n        for (auto range = ranges.begin(); range != ranges.end(); ++range)\n        {\n            get();\n            if (JSON_HEDLEY_LIKELY(*range <= current and current <= *(++range)))\n            {\n                add(current);\n            }\n            else\n            {\n                error_message = \"invalid string: ill-formed UTF-8 byte\";\n                return false;\n            }\n        }\n\n        return true;\n    }\n\n    /*!\n    @brief scan a string literal\n\n    This function scans a string according to Sect. 7 of RFC 7159. While\n    scanning, bytes are escaped and copied into buffer token_buffer. Then the\n    function returns successfully, token_buffer is *not* null-terminated (as it\n    may contain \\0 bytes), and token_buffer.size() is the number of bytes in the\n    string.\n\n    @return token_type::value_string if string could be successfully scanned,\n            token_type::parse_error otherwise\n\n    @note In case of errors, variable error_message contains a textual\n          description.\n    */\n    token_type scan_string()\n    {\n        // reset token_buffer (ignore opening quote)\n        reset();\n\n        // we entered the function by reading an open quote\n        assert(current == '\\\"');\n\n        while (true)\n        {\n            // get next character\n            switch (get())\n            {\n                // end of file while parsing string\n                case std::char_traits<char>::eof():\n                {\n                    error_message = \"invalid string: missing closing quote\";\n                    return token_type::parse_error;\n                }\n\n                // closing quote\n                case '\\\"':\n                {\n                    return token_type::value_string;\n                }\n\n                // escapes\n                case '\\\\':\n                {\n                    switch (get())\n                    {\n                        // quotation mark\n                        case '\\\"':\n                            add('\\\"');\n                            break;\n                        // reverse solidus\n                        case '\\\\':\n                            add('\\\\');\n                            break;\n                        // solidus\n                        case '/':\n                            add('/');\n                            break;\n                        // backspace\n                        case 'b':\n                            add('\\b');\n                            break;\n                        // form feed\n                        case 'f':\n                            add('\\f');\n                            break;\n                        // line feed\n                        case 'n':\n                            add('\\n');\n                            break;\n                        // carriage return\n                        case 'r':\n                            add('\\r');\n                            break;\n                        // tab\n                        case 't':\n                            add('\\t');\n                            break;\n\n                        // unicode escapes\n                        case 'u':\n                        {\n                            const int codepoint1 = get_codepoint();\n                            int codepoint = codepoint1; // start with codepoint1\n\n                            if (JSON_HEDLEY_UNLIKELY(codepoint1 == -1))\n                            {\n                                error_message = \"invalid string: '\\\\u' must be followed by 4 hex digits\";\n                                return token_type::parse_error;\n                            }\n\n                            // check if code point is a high surrogate\n                            if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF)\n                            {\n                                // expect next \\uxxxx entry\n                                if (JSON_HEDLEY_LIKELY(get() == '\\\\' and get() == 'u'))\n                                {\n                                    const int codepoint2 = get_codepoint();\n\n                                    if (JSON_HEDLEY_UNLIKELY(codepoint2 == -1))\n                                    {\n                                        error_message = \"invalid string: '\\\\u' must be followed by 4 hex digits\";\n                                        return token_type::parse_error;\n                                    }\n\n                                    // check if codepoint2 is a low surrogate\n                                    if (JSON_HEDLEY_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF))\n                                    {\n                                        // overwrite codepoint\n                                        codepoint = static_cast<int>(\n                                                        // high surrogate occupies the most significant 22 bits\n                                                        (static_cast<unsigned int>(codepoint1) << 10u)\n                                                        // low surrogate occupies the least significant 15 bits\n                                                        + static_cast<unsigned int>(codepoint2)\n                                                        // there is still the 0xD800, 0xDC00 and 0x10000 noise\n                                                        // in the result so we have to subtract with:\n                                                        // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00\n                                                        - 0x35FDC00u);\n                                    }\n                                    else\n                                    {\n                                        error_message = \"invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF\";\n                                        return token_type::parse_error;\n                                    }\n                                }\n                                else\n                                {\n                                    error_message = \"invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF\";\n                                    return token_type::parse_error;\n                                }\n                            }\n                            else\n                            {\n                                if (JSON_HEDLEY_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF))\n                                {\n                                    error_message = \"invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF\";\n                                    return token_type::parse_error;\n                                }\n                            }\n\n                            // result of the above calculation yields a proper codepoint\n                            assert(0x00 <= codepoint and codepoint <= 0x10FFFF);\n\n                            // translate codepoint into bytes\n                            if (codepoint < 0x80)\n                            {\n                                // 1-byte characters: 0xxxxxxx (ASCII)\n                                add(codepoint);\n                            }\n                            else if (codepoint <= 0x7FF)\n                            {\n                                // 2-byte characters: 110xxxxx 10xxxxxx\n                                add(static_cast<int>(0xC0u | (static_cast<unsigned int>(codepoint) >> 6u)));\n                                add(static_cast<int>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));\n                            }\n                            else if (codepoint <= 0xFFFF)\n                            {\n                                // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx\n                                add(static_cast<int>(0xE0u | (static_cast<unsigned int>(codepoint) >> 12u)));\n                                add(static_cast<int>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));\n                                add(static_cast<int>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));\n                            }\n                            else\n                            {\n                                // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n                                add(static_cast<int>(0xF0u | (static_cast<unsigned int>(codepoint) >> 18u)));\n                                add(static_cast<int>(0x80u | ((static_cast<unsigned int>(codepoint) >> 12u) & 0x3Fu)));\n                                add(static_cast<int>(0x80u | ((static_cast<unsigned int>(codepoint) >> 6u) & 0x3Fu)));\n                                add(static_cast<int>(0x80u | (static_cast<unsigned int>(codepoint) & 0x3Fu)));\n                            }\n\n                            break;\n                        }\n\n                        // other characters after escape\n                        default:\n                            error_message = \"invalid string: forbidden character after backslash\";\n                            return token_type::parse_error;\n                    }\n\n                    break;\n                }\n\n                // invalid control characters\n                case 0x00:\n                {\n                    error_message = \"invalid string: control character U+0000 (NUL) must be escaped to \\\\u0000\";\n                    return token_type::parse_error;\n                }\n\n                case 0x01:\n                {\n                    error_message = \"invalid string: control character U+0001 (SOH) must be escaped to \\\\u0001\";\n                    return token_type::parse_error;\n                }\n\n                case 0x02:\n                {\n                    error_message = \"invalid string: control character U+0002 (STX) must be escaped to \\\\u0002\";\n                    return token_type::parse_error;\n                }\n\n                case 0x03:\n                {\n                    error_message = \"invalid string: control character U+0003 (ETX) must be escaped to \\\\u0003\";\n                    return token_type::parse_error;\n                }\n\n                case 0x04:\n                {\n                    error_message = \"invalid string: control character U+0004 (EOT) must be escaped to \\\\u0004\";\n                    return token_type::parse_error;\n                }\n\n                case 0x05:\n                {\n                    error_message = \"invalid string: control character U+0005 (ENQ) must be escaped to \\\\u0005\";\n                    return token_type::parse_error;\n                }\n\n                case 0x06:\n                {\n                    error_message = \"invalid string: control character U+0006 (ACK) must be escaped to \\\\u0006\";\n                    return token_type::parse_error;\n                }\n\n                case 0x07:\n                {\n                    error_message = \"invalid string: control character U+0007 (BEL) must be escaped to \\\\u0007\";\n                    return token_type::parse_error;\n                }\n\n                case 0x08:\n                {\n                    error_message = \"invalid string: control character U+0008 (BS) must be escaped to \\\\u0008 or \\\\b\";\n                    return token_type::parse_error;\n                }\n\n                case 0x09:\n                {\n                    error_message = \"invalid string: control character U+0009 (HT) must be escaped to \\\\u0009 or \\\\t\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0A:\n                {\n                    error_message = \"invalid string: control character U+000A (LF) must be escaped to \\\\u000A or \\\\n\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0B:\n                {\n                    error_message = \"invalid string: control character U+000B (VT) must be escaped to \\\\u000B\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0C:\n                {\n                    error_message = \"invalid string: control character U+000C (FF) must be escaped to \\\\u000C or \\\\f\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0D:\n                {\n                    error_message = \"invalid string: control character U+000D (CR) must be escaped to \\\\u000D or \\\\r\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0E:\n                {\n                    error_message = \"invalid string: control character U+000E (SO) must be escaped to \\\\u000E\";\n                    return token_type::parse_error;\n                }\n\n                case 0x0F:\n                {\n                    error_message = \"invalid string: control character U+000F (SI) must be escaped to \\\\u000F\";\n                    return token_type::parse_error;\n                }\n\n                case 0x10:\n                {\n                    error_message = \"invalid string: control character U+0010 (DLE) must be escaped to \\\\u0010\";\n                    return token_type::parse_error;\n                }\n\n                case 0x11:\n                {\n                    error_message = \"invalid string: control character U+0011 (DC1) must be escaped to \\\\u0011\";\n                    return token_type::parse_error;\n                }\n\n                case 0x12:\n                {\n                    error_message = \"invalid string: control character U+0012 (DC2) must be escaped to \\\\u0012\";\n                    return token_type::parse_error;\n                }\n\n                case 0x13:\n                {\n                    error_message = \"invalid string: control character U+0013 (DC3) must be escaped to \\\\u0013\";\n                    return token_type::parse_error;\n                }\n\n                case 0x14:\n                {\n                    error_message = \"invalid string: control character U+0014 (DC4) must be escaped to \\\\u0014\";\n                    return token_type::parse_error;\n                }\n\n                case 0x15:\n                {\n                    error_message = \"invalid string: control character U+0015 (NAK) must be escaped to \\\\u0015\";\n                    return token_type::parse_error;\n                }\n\n                case 0x16:\n                {\n                    error_message = \"invalid string: control character U+0016 (SYN) must be escaped to \\\\u0016\";\n                    return token_type::parse_error;\n                }\n\n                case 0x17:\n                {\n                    error_message = \"invalid string: control character U+0017 (ETB) must be escaped to \\\\u0017\";\n                    return token_type::parse_error;\n                }\n\n                case 0x18:\n                {\n                    error_message = \"invalid string: control character U+0018 (CAN) must be escaped to \\\\u0018\";\n                    return token_type::parse_error;\n                }\n\n                case 0x19:\n                {\n                    error_message = \"invalid string: control character U+0019 (EM) must be escaped to \\\\u0019\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1A:\n                {\n                    error_message = \"invalid string: control character U+001A (SUB) must be escaped to \\\\u001A\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1B:\n                {\n                    error_message = \"invalid string: control character U+001B (ESC) must be escaped to \\\\u001B\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1C:\n                {\n                    error_message = \"invalid string: control character U+001C (FS) must be escaped to \\\\u001C\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1D:\n                {\n                    error_message = \"invalid string: control character U+001D (GS) must be escaped to \\\\u001D\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1E:\n                {\n                    error_message = \"invalid string: control character U+001E (RS) must be escaped to \\\\u001E\";\n                    return token_type::parse_error;\n                }\n\n                case 0x1F:\n                {\n                    error_message = \"invalid string: control character U+001F (US) must be escaped to \\\\u001F\";\n                    return token_type::parse_error;\n                }\n\n                // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace))\n                case 0x20:\n                case 0x21:\n                case 0x23:\n                case 0x24:\n                case 0x25:\n                case 0x26:\n                case 0x27:\n                case 0x28:\n                case 0x29:\n                case 0x2A:\n                case 0x2B:\n                case 0x2C:\n                case 0x2D:\n                case 0x2E:\n                case 0x2F:\n                case 0x30:\n                case 0x31:\n                case 0x32:\n                case 0x33:\n                case 0x34:\n                case 0x35:\n                case 0x36:\n                case 0x37:\n                case 0x38:\n                case 0x39:\n                case 0x3A:\n                case 0x3B:\n                case 0x3C:\n                case 0x3D:\n                case 0x3E:\n                case 0x3F:\n                case 0x40:\n                case 0x41:\n                case 0x42:\n                case 0x43:\n                case 0x44:\n                case 0x45:\n                case 0x46:\n                case 0x47:\n                case 0x48:\n                case 0x49:\n                case 0x4A:\n                case 0x4B:\n                case 0x4C:\n                case 0x4D:\n                case 0x4E:\n                case 0x4F:\n                case 0x50:\n                case 0x51:\n                case 0x52:\n                case 0x53:\n                case 0x54:\n                case 0x55:\n                case 0x56:\n                case 0x57:\n                case 0x58:\n                case 0x59:\n                case 0x5A:\n                case 0x5B:\n                case 0x5D:\n                case 0x5E:\n                case 0x5F:\n                case 0x60:\n                case 0x61:\n                case 0x62:\n                case 0x63:\n                case 0x64:\n                case 0x65:\n                case 0x66:\n                case 0x67:\n                case 0x68:\n                case 0x69:\n                case 0x6A:\n                case 0x6B:\n                case 0x6C:\n                case 0x6D:\n                case 0x6E:\n                case 0x6F:\n                case 0x70:\n                case 0x71:\n                case 0x72:\n                case 0x73:\n                case 0x74:\n                case 0x75:\n                case 0x76:\n                case 0x77:\n                case 0x78:\n                case 0x79:\n                case 0x7A:\n                case 0x7B:\n                case 0x7C:\n                case 0x7D:\n                case 0x7E:\n                case 0x7F:\n                {\n                    add(current);\n                    break;\n                }\n\n                // U+0080..U+07FF: bytes C2..DF 80..BF\n                case 0xC2:\n                case 0xC3:\n                case 0xC4:\n                case 0xC5:\n                case 0xC6:\n                case 0xC7:\n                case 0xC8:\n                case 0xC9:\n                case 0xCA:\n                case 0xCB:\n                case 0xCC:\n                case 0xCD:\n                case 0xCE:\n                case 0xCF:\n                case 0xD0:\n                case 0xD1:\n                case 0xD2:\n                case 0xD3:\n                case 0xD4:\n                case 0xD5:\n                case 0xD6:\n                case 0xD7:\n                case 0xD8:\n                case 0xD9:\n                case 0xDA:\n                case 0xDB:\n                case 0xDC:\n                case 0xDD:\n                case 0xDE:\n                case 0xDF:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not next_byte_in_range({0x80, 0xBF})))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+0800..U+0FFF: bytes E0 A0..BF 80..BF\n                case 0xE0:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not (next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF\n                // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF\n                case 0xE1:\n                case 0xE2:\n                case 0xE3:\n                case 0xE4:\n                case 0xE5:\n                case 0xE6:\n                case 0xE7:\n                case 0xE8:\n                case 0xE9:\n                case 0xEA:\n                case 0xEB:\n                case 0xEC:\n                case 0xEE:\n                case 0xEF:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+D000..U+D7FF: bytes ED 80..9F 80..BF\n                case 0xED:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not (next_byte_in_range({0x80, 0x9F, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF\n                case 0xF0:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not (next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF\n                case 0xF1:\n                case 0xF2:\n                case 0xF3:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF\n                case 0xF4:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not (next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF}))))\n                    {\n                        return token_type::parse_error;\n                    }\n                    break;\n                }\n\n                // remaining bytes (80..C1 and F5..FF) are ill-formed\n                default:\n                {\n                    error_message = \"invalid string: ill-formed UTF-8 byte\";\n                    return token_type::parse_error;\n                }\n            }\n        }\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    static void strtof(float& f, const char* str, char** endptr) noexcept\n    {\n        f = std::strtof(str, endptr);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    static void strtof(double& f, const char* str, char** endptr) noexcept\n    {\n        f = std::strtod(str, endptr);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    static void strtof(long double& f, const char* str, char** endptr) noexcept\n    {\n        f = std::strtold(str, endptr);\n    }\n\n    /*!\n    @brief scan a number literal\n\n    This function scans a string according to Sect. 6 of RFC 7159.\n\n    The function is realized with a deterministic finite state machine derived\n    from the grammar described in RFC 7159. Starting in state \"init\", the\n    input is read and used to determined the next state. Only state \"done\"\n    accepts the number. State \"error\" is a trap state to model errors. In the\n    table below, \"anything\" means any character but the ones listed before.\n\n    state    | 0        | 1-9      | e E      | +       | -       | .        | anything\n    ---------|----------|----------|----------|---------|---------|----------|-----------\n    init     | zero     | any1     | [error]  | [error] | minus   | [error]  | [error]\n    minus    | zero     | any1     | [error]  | [error] | [error] | [error]  | [error]\n    zero     | done     | done     | exponent | done    | done    | decimal1 | done\n    any1     | any1     | any1     | exponent | done    | done    | decimal1 | done\n    decimal1 | decimal2 | [error]  | [error]  | [error] | [error] | [error]  | [error]\n    decimal2 | decimal2 | decimal2 | exponent | done    | done    | done     | done\n    exponent | any2     | any2     | [error]  | sign    | sign    | [error]  | [error]\n    sign     | any2     | any2     | [error]  | [error] | [error] | [error]  | [error]\n    any2     | any2     | any2     | done     | done    | done    | done     | done\n\n    The state machine is realized with one label per state (prefixed with\n    \"scan_number_\") and `goto` statements between them. The state machine\n    contains cycles, but any cycle can be left when EOF is read. Therefore,\n    the function is guaranteed to terminate.\n\n    During scanning, the read bytes are stored in token_buffer. This string is\n    then converted to a signed integer, an unsigned integer, or a\n    floating-point number.\n\n    @return token_type::value_unsigned, token_type::value_integer, or\n            token_type::value_float if number could be successfully scanned,\n            token_type::parse_error otherwise\n\n    @note The scanner is independent of the current locale. Internally, the\n          locale's decimal point is used instead of `.` to work with the\n          locale-dependent converters.\n    */\n    token_type scan_number()  // lgtm [cpp/use-of-goto]\n    {\n        // reset token_buffer to store the number's bytes\n        reset();\n\n        // the type of the parsed number; initially set to unsigned; will be\n        // changed if minus sign, decimal point or exponent is read\n        token_type number_type = token_type::value_unsigned;\n\n        // state (init): we just found out we need to scan a number\n        switch (current)\n        {\n            case '-':\n            {\n                add(current);\n                goto scan_number_minus;\n            }\n\n            case '0':\n            {\n                add(current);\n                goto scan_number_zero;\n            }\n\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any1;\n            }\n\n            // all other characters are rejected outside scan_number()\n            default:            // LCOV_EXCL_LINE\n                assert(false);  // LCOV_EXCL_LINE\n        }\n\nscan_number_minus:\n        // state: we just parsed a leading minus sign\n        number_type = token_type::value_integer;\n        switch (get())\n        {\n            case '0':\n            {\n                add(current);\n                goto scan_number_zero;\n            }\n\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any1;\n            }\n\n            default:\n            {\n                error_message = \"invalid number; expected digit after '-'\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_zero:\n        // state: we just parse a zero (maybe with a leading minus sign)\n        switch (get())\n        {\n            case '.':\n            {\n                add(decimal_point_char);\n                goto scan_number_decimal1;\n            }\n\n            case 'e':\n            case 'E':\n            {\n                add(current);\n                goto scan_number_exponent;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_any1:\n        // state: we just parsed a number 0-9 (maybe with a leading minus sign)\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any1;\n            }\n\n            case '.':\n            {\n                add(decimal_point_char);\n                goto scan_number_decimal1;\n            }\n\n            case 'e':\n            case 'E':\n            {\n                add(current);\n                goto scan_number_exponent;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_decimal1:\n        // state: we just parsed a decimal point\n        number_type = token_type::value_float;\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_decimal2;\n            }\n\n            default:\n            {\n                error_message = \"invalid number; expected digit after '.'\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_decimal2:\n        // we just parsed at least one number after a decimal point\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_decimal2;\n            }\n\n            case 'e':\n            case 'E':\n            {\n                add(current);\n                goto scan_number_exponent;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_exponent:\n        // we just parsed an exponent\n        number_type = token_type::value_float;\n        switch (get())\n        {\n            case '+':\n            case '-':\n            {\n                add(current);\n                goto scan_number_sign;\n            }\n\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any2;\n            }\n\n            default:\n            {\n                error_message =\n                    \"invalid number; expected '+', '-', or digit after exponent\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_sign:\n        // we just parsed an exponent sign\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any2;\n            }\n\n            default:\n            {\n                error_message = \"invalid number; expected digit after exponent sign\";\n                return token_type::parse_error;\n            }\n        }\n\nscan_number_any2:\n        // we just parsed a number after the exponent or exponent sign\n        switch (get())\n        {\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n            {\n                add(current);\n                goto scan_number_any2;\n            }\n\n            default:\n                goto scan_number_done;\n        }\n\nscan_number_done:\n        // unget the character after the number (we only read it to know that\n        // we are done scanning a number)\n        unget();\n\n        char* endptr = nullptr;\n        errno = 0;\n\n        // try to parse integers first and fall back to floats\n        if (number_type == token_type::value_unsigned)\n        {\n            const auto x = std::strtoull(token_buffer.data(), &endptr, 10);\n\n            // we checked the number format before\n            assert(endptr == token_buffer.data() + token_buffer.size());\n\n            if (errno == 0)\n            {\n                value_unsigned = static_cast<number_unsigned_t>(x);\n                if (value_unsigned == x)\n                {\n                    return token_type::value_unsigned;\n                }\n            }\n        }\n        else if (number_type == token_type::value_integer)\n        {\n            const auto x = std::strtoll(token_buffer.data(), &endptr, 10);\n\n            // we checked the number format before\n            assert(endptr == token_buffer.data() + token_buffer.size());\n\n            if (errno == 0)\n            {\n                value_integer = static_cast<number_integer_t>(x);\n                if (value_integer == x)\n                {\n                    return token_type::value_integer;\n                }\n            }\n        }\n\n        // this code is reached if we parse a floating-point number or if an\n        // integer conversion above failed\n        strtof(value_float, token_buffer.data(), &endptr);\n\n        // we checked the number format before\n        assert(endptr == token_buffer.data() + token_buffer.size());\n\n        return token_type::value_float;\n    }\n\n    /*!\n    @param[in] literal_text  the literal text to expect\n    @param[in] length        the length of the passed literal text\n    @param[in] return_type   the token type to return on success\n    */\n    JSON_HEDLEY_NON_NULL(2)\n    token_type scan_literal(const char* literal_text, const std::size_t length,\n                            token_type return_type)\n    {\n        assert(current == literal_text[0]);\n        for (std::size_t i = 1; i < length; ++i)\n        {\n            if (JSON_HEDLEY_UNLIKELY(get() != literal_text[i]))\n            {\n                error_message = \"invalid literal\";\n                return token_type::parse_error;\n            }\n        }\n        return return_type;\n    }\n\n    /////////////////////\n    // input management\n    /////////////////////\n\n    /// reset token_buffer; current character is beginning of token\n    void reset() noexcept\n    {\n        token_buffer.clear();\n        token_string.clear();\n        token_string.push_back(std::char_traits<char>::to_char_type(current));\n    }\n\n    /*\n    @brief get next character from the input\n\n    This function provides the interface to the used input adapter. It does\n    not throw in case the input reached EOF, but returns a\n    `std::char_traits<char>::eof()` in that case.  Stores the scanned characters\n    for use in error messages.\n\n    @return character read from the input\n    */\n    std::char_traits<char>::int_type get()\n    {\n        ++position.chars_read_total;\n        ++position.chars_read_current_line;\n\n        if (next_unget)\n        {\n            // just reset the next_unget variable and work with current\n            next_unget = false;\n        }\n        else\n        {\n            current = ia->get_character();\n        }\n\n        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char>::eof()))\n        {\n            token_string.push_back(std::char_traits<char>::to_char_type(current));\n        }\n\n        if (current == '\\n')\n        {\n            ++position.lines_read;\n            position.chars_read_current_line = 0;\n        }\n\n        return current;\n    }\n\n    /*!\n    @brief unget current character (read it again on next get)\n\n    We implement unget by setting variable next_unget to true. The input is not\n    changed - we just simulate ungetting by modifying chars_read_total,\n    chars_read_current_line, and token_string. The next call to get() will\n    behave as if the unget character is read again.\n    */\n    void unget()\n    {\n        next_unget = true;\n\n        --position.chars_read_total;\n\n        // in case we \"unget\" a newline, we have to also decrement the lines_read\n        if (position.chars_read_current_line == 0)\n        {\n            if (position.lines_read > 0)\n            {\n                --position.lines_read;\n            }\n        }\n        else\n        {\n            --position.chars_read_current_line;\n        }\n\n        if (JSON_HEDLEY_LIKELY(current != std::char_traits<char>::eof()))\n        {\n            assert(not token_string.empty());\n            token_string.pop_back();\n        }\n    }\n\n    /// add a character to token_buffer\n    void add(int c)\n    {\n        token_buffer.push_back(std::char_traits<char>::to_char_type(c));\n    }\n\n  public:\n    /////////////////////\n    // value getters\n    /////////////////////\n\n    /// return integer value\n    constexpr number_integer_t get_number_integer() const noexcept\n    {\n        return value_integer;\n    }\n\n    /// return unsigned integer value\n    constexpr number_unsigned_t get_number_unsigned() const noexcept\n    {\n        return value_unsigned;\n    }\n\n    /// return floating-point value\n    constexpr number_float_t get_number_float() const noexcept\n    {\n        return value_float;\n    }\n\n    /// return current string value (implicitly resets the token; useful only once)\n    string_t& get_string()\n    {\n        return token_buffer;\n    }\n\n    /////////////////////\n    // diagnostics\n    /////////////////////\n\n    /// return position of last read token\n    constexpr position_t get_position() const noexcept\n    {\n        return position;\n    }\n\n    /// return the last read token (for errors only).  Will never contain EOF\n    /// (an arbitrary value that is not a valid char value, often -1), because\n    /// 255 may legitimately occur.  May contain NUL, which should be escaped.\n    std::string get_token_string() const\n    {\n        // escape control characters\n        std::string result;\n        for (const auto c : token_string)\n        {\n            if ('\\x00' <= c and c <= '\\x1F')\n            {\n                // escape control characters\n                std::array<char, 9> cs{{}};\n                (std::snprintf)(cs.data(), cs.size(), \"<U+%.4X>\", static_cast<unsigned char>(c));\n                result += cs.data();\n            }\n            else\n            {\n                // add character as is\n                result.push_back(c);\n            }\n        }\n\n        return result;\n    }\n\n    /// return syntax error message\n    JSON_HEDLEY_RETURNS_NON_NULL\n    constexpr const char* get_error_message() const noexcept\n    {\n        return error_message;\n    }\n\n    /////////////////////\n    // actual scanner\n    /////////////////////\n\n    /*!\n    @brief skip the UTF-8 byte order mark\n    @return true iff there is no BOM or the correct BOM has been skipped\n    */\n    bool skip_bom()\n    {\n        if (get() == 0xEF)\n        {\n            // check if we completely parse the BOM\n            return get() == 0xBB and get() == 0xBF;\n        }\n\n        // the first character is not the beginning of the BOM; unget it to\n        // process is later\n        unget();\n        return true;\n    }\n\n    token_type scan()\n    {\n        // initially, skip the BOM\n        if (position.chars_read_total == 0 and not skip_bom())\n        {\n            error_message = \"invalid BOM; must be 0xEF 0xBB 0xBF if given\";\n            return token_type::parse_error;\n        }\n\n        // read next character and ignore whitespace\n        do\n        {\n            get();\n        }\n        while (current == ' ' or current == '\\t' or current == '\\n' or current == '\\r');\n\n        switch (current)\n        {\n            // structural characters\n            case '[':\n                return token_type::begin_array;\n            case ']':\n                return token_type::end_array;\n            case '{':\n                return token_type::begin_object;\n            case '}':\n                return token_type::end_object;\n            case ':':\n                return token_type::name_separator;\n            case ',':\n                return token_type::value_separator;\n\n            // literals\n            case 't':\n                return scan_literal(\"true\", 4, token_type::literal_true);\n            case 'f':\n                return scan_literal(\"false\", 5, token_type::literal_false);\n            case 'n':\n                return scan_literal(\"null\", 4, token_type::literal_null);\n\n            // string\n            case '\\\"':\n                return scan_string();\n\n            // number\n            case '-':\n            case '0':\n            case '1':\n            case '2':\n            case '3':\n            case '4':\n            case '5':\n            case '6':\n            case '7':\n            case '8':\n            case '9':\n                return scan_number();\n\n            // end of input (the null byte is needed when parsing from\n            // string literals)\n            case '\\0':\n            case std::char_traits<char>::eof():\n                return token_type::end_of_input;\n\n            // error\n            default:\n                error_message = \"invalid literal\";\n                return token_type::parse_error;\n        }\n    }\n\n  private:\n    /// input adapter\n    detail::input_adapter_t ia = nullptr;\n\n    /// the current character\n    std::char_traits<char>::int_type current = std::char_traits<char>::eof();\n\n    /// whether the next get() call should just return current\n    bool next_unget = false;\n\n    /// the start position of the current token\n    position_t position {};\n\n    /// raw input token string (for error messages)\n    std::vector<char> token_string {};\n\n    /// buffer for variable-length tokens (numbers, strings)\n    string_t token_buffer {};\n\n    /// a description of occurred lexer errors\n    const char* error_message = \"\";\n\n    // number values\n    number_integer_t value_integer = 0;\n    number_unsigned_t value_unsigned = 0;\n    number_float_t value_float = 0;\n\n    /// the decimal point\n    const char decimal_point_char = '.';\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/input/parser.hpp>\n\n\n#include <cassert> // assert\n#include <cmath> // isfinite\n#include <cstdint> // uint8_t\n#include <functional> // function\n#include <string> // string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/input/input_adapters.hpp>\n\n// #include <nlohmann/detail/input/json_sax.hpp>\n\n// #include <nlohmann/detail/input/lexer.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/is_sax.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n////////////\n// parser //\n////////////\n\n/*!\n@brief syntax analysis\n\nThis class implements a recursive decent parser.\n*/\ntemplate<typename BasicJsonType>\nclass parser\n{\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using string_t = typename BasicJsonType::string_t;\n    using lexer_t = lexer<BasicJsonType>;\n    using token_type = typename lexer_t::token_type;\n\n  public:\n    enum class parse_event_t : uint8_t\n    {\n        /// the parser read `{` and started to process a JSON object\n        object_start,\n        /// the parser read `}` and finished processing a JSON object\n        object_end,\n        /// the parser read `[` and started to process a JSON array\n        array_start,\n        /// the parser read `]` and finished processing a JSON array\n        array_end,\n        /// the parser read a key of a value in an object\n        key,\n        /// the parser finished reading a JSON value\n        value\n    };\n\n    using parser_callback_t =\n        std::function<bool(int depth, parse_event_t event, BasicJsonType& parsed)>;\n\n    /// a parser reading from an input adapter\n    explicit parser(detail::input_adapter_t&& adapter,\n                    const parser_callback_t cb = nullptr,\n                    const bool allow_exceptions_ = true)\n        : callback(cb), m_lexer(std::move(adapter)), allow_exceptions(allow_exceptions_)\n    {\n        // read first token\n        get_token();\n    }\n\n    /*!\n    @brief public parser interface\n\n    @param[in] strict      whether to expect the last token to be EOF\n    @param[in,out] result  parsed JSON value\n\n    @throw parse_error.101 in case of an unexpected token\n    @throw parse_error.102 if to_unicode fails or surrogate error\n    @throw parse_error.103 if to_unicode fails\n    */\n    void parse(const bool strict, BasicJsonType& result)\n    {\n        if (callback)\n        {\n            json_sax_dom_callback_parser<BasicJsonType> sdp(result, callback, allow_exceptions);\n            sax_parse_internal(&sdp);\n            result.assert_invariant();\n\n            // in strict mode, input must be completely read\n            if (strict and (get_token() != token_type::end_of_input))\n            {\n                sdp.parse_error(m_lexer.get_position(),\n                                m_lexer.get_token_string(),\n                                parse_error::create(101, m_lexer.get_position(),\n                                                    exception_message(token_type::end_of_input, \"value\")));\n            }\n\n            // in case of an error, return discarded value\n            if (sdp.is_errored())\n            {\n                result = value_t::discarded;\n                return;\n            }\n\n            // set top-level value to null if it was discarded by the callback\n            // function\n            if (result.is_discarded())\n            {\n                result = nullptr;\n            }\n        }\n        else\n        {\n            json_sax_dom_parser<BasicJsonType> sdp(result, allow_exceptions);\n            sax_parse_internal(&sdp);\n            result.assert_invariant();\n\n            // in strict mode, input must be completely read\n            if (strict and (get_token() != token_type::end_of_input))\n            {\n                sdp.parse_error(m_lexer.get_position(),\n                                m_lexer.get_token_string(),\n                                parse_error::create(101, m_lexer.get_position(),\n                                                    exception_message(token_type::end_of_input, \"value\")));\n            }\n\n            // in case of an error, return discarded value\n            if (sdp.is_errored())\n            {\n                result = value_t::discarded;\n                return;\n            }\n        }\n    }\n\n    /*!\n    @brief public accept interface\n\n    @param[in] strict  whether to expect the last token to be EOF\n    @return whether the input is a proper JSON text\n    */\n    bool accept(const bool strict = true)\n    {\n        json_sax_acceptor<BasicJsonType> sax_acceptor;\n        return sax_parse(&sax_acceptor, strict);\n    }\n\n    template <typename SAX>\n    JSON_HEDLEY_NON_NULL(2)\n    bool sax_parse(SAX* sax, const bool strict = true)\n    {\n        (void)detail::is_sax_static_asserts<SAX, BasicJsonType> {};\n        const bool result = sax_parse_internal(sax);\n\n        // strict mode: next byte must be EOF\n        if (result and strict and (get_token() != token_type::end_of_input))\n        {\n            return sax->parse_error(m_lexer.get_position(),\n                                    m_lexer.get_token_string(),\n                                    parse_error::create(101, m_lexer.get_position(),\n                                            exception_message(token_type::end_of_input, \"value\")));\n        }\n\n        return result;\n    }\n\n  private:\n    template <typename SAX>\n    JSON_HEDLEY_NON_NULL(2)\n    bool sax_parse_internal(SAX* sax)\n    {\n        // stack to remember the hierarchy of structured values we are parsing\n        // true = array; false = object\n        std::vector<bool> states;\n        // value to avoid a goto (see comment where set to true)\n        bool skip_to_state_evaluation = false;\n\n        while (true)\n        {\n            if (not skip_to_state_evaluation)\n            {\n                // invariant: get_token() was called before each iteration\n                switch (last_token)\n                {\n                    case token_type::begin_object:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->start_object(std::size_t(-1))))\n                        {\n                            return false;\n                        }\n\n                        // closing } -> we are done\n                        if (get_token() == token_type::end_object)\n                        {\n                            if (JSON_HEDLEY_UNLIKELY(not sax->end_object()))\n                            {\n                                return false;\n                            }\n                            break;\n                        }\n\n                        // parse key\n                        if (JSON_HEDLEY_UNLIKELY(last_token != token_type::value_string))\n                        {\n                            return sax->parse_error(m_lexer.get_position(),\n                                                    m_lexer.get_token_string(),\n                                                    parse_error::create(101, m_lexer.get_position(),\n                                                            exception_message(token_type::value_string, \"object key\")));\n                        }\n                        if (JSON_HEDLEY_UNLIKELY(not sax->key(m_lexer.get_string())))\n                        {\n                            return false;\n                        }\n\n                        // parse separator (:)\n                        if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator))\n                        {\n                            return sax->parse_error(m_lexer.get_position(),\n                                                    m_lexer.get_token_string(),\n                                                    parse_error::create(101, m_lexer.get_position(),\n                                                            exception_message(token_type::name_separator, \"object separator\")));\n                        }\n\n                        // remember we are now inside an object\n                        states.push_back(false);\n\n                        // parse values\n                        get_token();\n                        continue;\n                    }\n\n                    case token_type::begin_array:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->start_array(std::size_t(-1))))\n                        {\n                            return false;\n                        }\n\n                        // closing ] -> we are done\n                        if (get_token() == token_type::end_array)\n                        {\n                            if (JSON_HEDLEY_UNLIKELY(not sax->end_array()))\n                            {\n                                return false;\n                            }\n                            break;\n                        }\n\n                        // remember we are now inside an array\n                        states.push_back(true);\n\n                        // parse values (no need to call get_token)\n                        continue;\n                    }\n\n                    case token_type::value_float:\n                    {\n                        const auto res = m_lexer.get_number_float();\n\n                        if (JSON_HEDLEY_UNLIKELY(not std::isfinite(res)))\n                        {\n                            return sax->parse_error(m_lexer.get_position(),\n                                                    m_lexer.get_token_string(),\n                                                    out_of_range::create(406, \"number overflow parsing '\" + m_lexer.get_token_string() + \"'\"));\n                        }\n\n                        if (JSON_HEDLEY_UNLIKELY(not sax->number_float(res, m_lexer.get_string())))\n                        {\n                            return false;\n                        }\n\n                        break;\n                    }\n\n                    case token_type::literal_false:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->boolean(false)))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::literal_null:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->null()))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::literal_true:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->boolean(true)))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::value_integer:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->number_integer(m_lexer.get_number_integer())))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::value_string:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->string(m_lexer.get_string())))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::value_unsigned:\n                    {\n                        if (JSON_HEDLEY_UNLIKELY(not sax->number_unsigned(m_lexer.get_number_unsigned())))\n                        {\n                            return false;\n                        }\n                        break;\n                    }\n\n                    case token_type::parse_error:\n                    {\n                        // using \"uninitialized\" to avoid \"expected\" message\n                        return sax->parse_error(m_lexer.get_position(),\n                                                m_lexer.get_token_string(),\n                                                parse_error::create(101, m_lexer.get_position(),\n                                                        exception_message(token_type::uninitialized, \"value\")));\n                    }\n\n                    default: // the last token was unexpected\n                    {\n                        return sax->parse_error(m_lexer.get_position(),\n                                                m_lexer.get_token_string(),\n                                                parse_error::create(101, m_lexer.get_position(),\n                                                        exception_message(token_type::literal_or_value, \"value\")));\n                    }\n                }\n            }\n            else\n            {\n                skip_to_state_evaluation = false;\n            }\n\n            // we reached this line after we successfully parsed a value\n            if (states.empty())\n            {\n                // empty stack: we reached the end of the hierarchy: done\n                return true;\n            }\n\n            if (states.back())  // array\n            {\n                // comma -> next value\n                if (get_token() == token_type::value_separator)\n                {\n                    // parse a new value\n                    get_token();\n                    continue;\n                }\n\n                // closing ]\n                if (JSON_HEDLEY_LIKELY(last_token == token_type::end_array))\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not sax->end_array()))\n                    {\n                        return false;\n                    }\n\n                    // We are done with this array. Before we can parse a\n                    // new value, we need to evaluate the new state first.\n                    // By setting skip_to_state_evaluation to false, we\n                    // are effectively jumping to the beginning of this if.\n                    assert(not states.empty());\n                    states.pop_back();\n                    skip_to_state_evaluation = true;\n                    continue;\n                }\n\n                return sax->parse_error(m_lexer.get_position(),\n                                        m_lexer.get_token_string(),\n                                        parse_error::create(101, m_lexer.get_position(),\n                                                exception_message(token_type::end_array, \"array\")));\n            }\n            else  // object\n            {\n                // comma -> next value\n                if (get_token() == token_type::value_separator)\n                {\n                    // parse key\n                    if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::value_string))\n                    {\n                        return sax->parse_error(m_lexer.get_position(),\n                                                m_lexer.get_token_string(),\n                                                parse_error::create(101, m_lexer.get_position(),\n                                                        exception_message(token_type::value_string, \"object key\")));\n                    }\n\n                    if (JSON_HEDLEY_UNLIKELY(not sax->key(m_lexer.get_string())))\n                    {\n                        return false;\n                    }\n\n                    // parse separator (:)\n                    if (JSON_HEDLEY_UNLIKELY(get_token() != token_type::name_separator))\n                    {\n                        return sax->parse_error(m_lexer.get_position(),\n                                                m_lexer.get_token_string(),\n                                                parse_error::create(101, m_lexer.get_position(),\n                                                        exception_message(token_type::name_separator, \"object separator\")));\n                    }\n\n                    // parse values\n                    get_token();\n                    continue;\n                }\n\n                // closing }\n                if (JSON_HEDLEY_LIKELY(last_token == token_type::end_object))\n                {\n                    if (JSON_HEDLEY_UNLIKELY(not sax->end_object()))\n                    {\n                        return false;\n                    }\n\n                    // We are done with this object. Before we can parse a\n                    // new value, we need to evaluate the new state first.\n                    // By setting skip_to_state_evaluation to false, we\n                    // are effectively jumping to the beginning of this if.\n                    assert(not states.empty());\n                    states.pop_back();\n                    skip_to_state_evaluation = true;\n                    continue;\n                }\n\n                return sax->parse_error(m_lexer.get_position(),\n                                        m_lexer.get_token_string(),\n                                        parse_error::create(101, m_lexer.get_position(),\n                                                exception_message(token_type::end_object, \"object\")));\n            }\n        }\n    }\n\n    /// get next token from lexer\n    token_type get_token()\n    {\n        return last_token = m_lexer.scan();\n    }\n\n    std::string exception_message(const token_type expected, const std::string& context)\n    {\n        std::string error_msg = \"syntax error \";\n\n        if (not context.empty())\n        {\n            error_msg += \"while parsing \" + context + \" \";\n        }\n\n        error_msg += \"- \";\n\n        if (last_token == token_type::parse_error)\n        {\n            error_msg += std::string(m_lexer.get_error_message()) + \"; last read: '\" +\n                         m_lexer.get_token_string() + \"'\";\n        }\n        else\n        {\n            error_msg += \"unexpected \" + std::string(lexer_t::token_type_name(last_token));\n        }\n\n        if (expected != token_type::uninitialized)\n        {\n            error_msg += \"; expected \" + std::string(lexer_t::token_type_name(expected));\n        }\n\n        return error_msg;\n    }\n\n  private:\n    /// callback function\n    const parser_callback_t callback = nullptr;\n    /// the type of the last read token\n    token_type last_token = token_type::uninitialized;\n    /// the lexer\n    lexer_t m_lexer;\n    /// whether to throw exceptions in case of errors\n    const bool allow_exceptions = true;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/internal_iterator.hpp>\n\n\n// #include <nlohmann/detail/iterators/primitive_iterator.hpp>\n\n\n#include <cstddef> // ptrdiff_t\n#include <limits>  // numeric_limits\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/*\n@brief an iterator for primitive JSON types\n\nThis class models an iterator for primitive JSON types (boolean, number,\nstring). It's only purpose is to allow the iterator/const_iterator classes\nto \"iterate\" over primitive values. Internally, the iterator is modeled by\na `difference_type` variable. Value begin_value (`0`) models the begin,\nend_value (`1`) models past the end.\n*/\nclass primitive_iterator_t\n{\n  private:\n    using difference_type = std::ptrdiff_t;\n    static constexpr difference_type begin_value = 0;\n    static constexpr difference_type end_value = begin_value + 1;\n\n    /// iterator as signed integer type\n    difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)();\n\n  public:\n    constexpr difference_type get_value() const noexcept\n    {\n        return m_it;\n    }\n\n    /// set iterator to a defined beginning\n    void set_begin() noexcept\n    {\n        m_it = begin_value;\n    }\n\n    /// set iterator to a defined past the end\n    void set_end() noexcept\n    {\n        m_it = end_value;\n    }\n\n    /// return whether the iterator can be dereferenced\n    constexpr bool is_begin() const noexcept\n    {\n        return m_it == begin_value;\n    }\n\n    /// return whether the iterator is at end\n    constexpr bool is_end() const noexcept\n    {\n        return m_it == end_value;\n    }\n\n    friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept\n    {\n        return lhs.m_it == rhs.m_it;\n    }\n\n    friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept\n    {\n        return lhs.m_it < rhs.m_it;\n    }\n\n    primitive_iterator_t operator+(difference_type n) noexcept\n    {\n        auto result = *this;\n        result += n;\n        return result;\n    }\n\n    friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept\n    {\n        return lhs.m_it - rhs.m_it;\n    }\n\n    primitive_iterator_t& operator++() noexcept\n    {\n        ++m_it;\n        return *this;\n    }\n\n    primitive_iterator_t const operator++(int) noexcept\n    {\n        auto result = *this;\n        ++m_it;\n        return result;\n    }\n\n    primitive_iterator_t& operator--() noexcept\n    {\n        --m_it;\n        return *this;\n    }\n\n    primitive_iterator_t const operator--(int) noexcept\n    {\n        auto result = *this;\n        --m_it;\n        return result;\n    }\n\n    primitive_iterator_t& operator+=(difference_type n) noexcept\n    {\n        m_it += n;\n        return *this;\n    }\n\n    primitive_iterator_t& operator-=(difference_type n) noexcept\n    {\n        m_it -= n;\n        return *this;\n    }\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/*!\n@brief an iterator value\n\n@note This structure could easily be a union, but MSVC currently does not allow\nunions members with complex constructors, see https://github.com/nlohmann/json/pull/105.\n*/\ntemplate<typename BasicJsonType> struct internal_iterator\n{\n    /// iterator for JSON objects\n    typename BasicJsonType::object_t::iterator object_iterator {};\n    /// iterator for JSON arrays\n    typename BasicJsonType::array_t::iterator array_iterator {};\n    /// generic iterator for all other types\n    primitive_iterator_t primitive_iterator {};\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/iter_impl.hpp>\n\n\n#include <ciso646> // not\n#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next\n#include <type_traits> // conditional, is_const, remove_const\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/iterators/internal_iterator.hpp>\n\n// #include <nlohmann/detail/iterators/primitive_iterator.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n// forward declare, to be able to friend it later on\ntemplate<typename IteratorType> class iteration_proxy;\ntemplate<typename IteratorType> class iteration_proxy_value;\n\n/*!\n@brief a template for a bidirectional iterator for the @ref basic_json class\nThis class implements a both iterators (iterator and const_iterator) for the\n@ref basic_json class.\n@note An iterator is called *initialized* when a pointer to a JSON value has\n      been set (e.g., by a constructor or a copy assignment). If the iterator is\n      default-constructed, it is *uninitialized* and most methods are undefined.\n      **The library uses assertions to detect calls on uninitialized iterators.**\n@requirement The class satisfies the following concept requirements:\n-\n[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator):\n  The iterator that can be moved can be moved in both directions (i.e.\n  incremented and decremented).\n@since version 1.0.0, simplified in version 2.0.9, change to bidirectional\n       iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593)\n*/\ntemplate<typename BasicJsonType>\nclass iter_impl\n{\n    /// allow basic_json to access private members\n    friend iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>;\n    friend BasicJsonType;\n    friend iteration_proxy<iter_impl>;\n    friend iteration_proxy_value<iter_impl>;\n\n    using object_t = typename BasicJsonType::object_t;\n    using array_t = typename BasicJsonType::array_t;\n    // make sure BasicJsonType is basic_json or const basic_json\n    static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value,\n                  \"iter_impl only accepts (const) basic_json\");\n\n  public:\n\n    /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17.\n    /// The C++ Standard has never required user-defined iterators to derive from std::iterator.\n    /// A user-defined iterator should provide publicly accessible typedefs named\n    /// iterator_category, value_type, difference_type, pointer, and reference.\n    /// Note that value_type is required to be non-const, even for constant iterators.\n    using iterator_category = std::bidirectional_iterator_tag;\n\n    /// the type of the values when the iterator is dereferenced\n    using value_type = typename BasicJsonType::value_type;\n    /// a type to represent differences between iterators\n    using difference_type = typename BasicJsonType::difference_type;\n    /// defines a pointer to the type iterated over (value_type)\n    using pointer = typename std::conditional<std::is_const<BasicJsonType>::value,\n          typename BasicJsonType::const_pointer,\n          typename BasicJsonType::pointer>::type;\n    /// defines a reference to the type iterated over (value_type)\n    using reference =\n        typename std::conditional<std::is_const<BasicJsonType>::value,\n        typename BasicJsonType::const_reference,\n        typename BasicJsonType::reference>::type;\n\n    /// default constructor\n    iter_impl() = default;\n\n    /*!\n    @brief constructor for a given JSON instance\n    @param[in] object  pointer to a JSON object for this iterator\n    @pre object != nullptr\n    @post The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    explicit iter_impl(pointer object) noexcept : m_object(object)\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                m_it.object_iterator = typename object_t::iterator();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_it.array_iterator = typename array_t::iterator();\n                break;\n            }\n\n            default:\n            {\n                m_it.primitive_iterator = primitive_iterator_t();\n                break;\n            }\n        }\n    }\n\n    /*!\n    @note The conventional copy constructor and copy assignment are implicitly\n          defined. Combined with the following converting constructor and\n          assignment, they support: (1) copy from iterator to iterator, (2)\n          copy from const iterator to const iterator, and (3) conversion from\n          iterator to const iterator. However conversion from const iterator\n          to iterator is not defined.\n    */\n\n    /*!\n    @brief const copy constructor\n    @param[in] other const iterator to copy from\n    @note This copy constructor had to be defined explicitly to circumvent a bug\n          occurring on msvc v19.0 compiler (VS 2015) debug build. For more\n          information refer to: https://github.com/nlohmann/json/issues/1608\n    */\n    iter_impl(const iter_impl<const BasicJsonType>& other) noexcept\n        : m_object(other.m_object), m_it(other.m_it)\n    {}\n\n    /*!\n    @brief converting assignment\n    @param[in] other const iterator to copy from\n    @return const/non-const iterator\n    @note It is not checked whether @a other is initialized.\n    */\n    iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept\n    {\n        m_object = other.m_object;\n        m_it = other.m_it;\n        return *this;\n    }\n\n    /*!\n    @brief converting constructor\n    @param[in] other  non-const iterator to copy from\n    @note It is not checked whether @a other is initialized.\n    */\n    iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept\n        : m_object(other.m_object), m_it(other.m_it)\n    {}\n\n    /*!\n    @brief converting assignment\n    @param[in] other  non-const iterator to copy from\n    @return const/non-const iterator\n    @note It is not checked whether @a other is initialized.\n    */\n    iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept\n    {\n        m_object = other.m_object;\n        m_it = other.m_it;\n        return *this;\n    }\n\n  private:\n    /*!\n    @brief set the iterator to the first value\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    void set_begin() noexcept\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                m_it.object_iterator = m_object->m_value.object->begin();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_it.array_iterator = m_object->m_value.array->begin();\n                break;\n            }\n\n            case value_t::null:\n            {\n                // set to end so begin()==end() is true: null is empty\n                m_it.primitive_iterator.set_end();\n                break;\n            }\n\n            default:\n            {\n                m_it.primitive_iterator.set_begin();\n                break;\n            }\n        }\n    }\n\n    /*!\n    @brief set the iterator past the last value\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    void set_end() noexcept\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                m_it.object_iterator = m_object->m_value.object->end();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_it.array_iterator = m_object->m_value.array->end();\n                break;\n            }\n\n            default:\n            {\n                m_it.primitive_iterator.set_end();\n                break;\n            }\n        }\n    }\n\n  public:\n    /*!\n    @brief return a reference to the value pointed to by the iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    reference operator*() const\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                assert(m_it.object_iterator != m_object->m_value.object->end());\n                return m_it.object_iterator->second;\n            }\n\n            case value_t::array:\n            {\n                assert(m_it.array_iterator != m_object->m_value.array->end());\n                return *m_it.array_iterator;\n            }\n\n            case value_t::null:\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\"));\n\n            default:\n            {\n                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))\n                {\n                    return *m_object;\n                }\n\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\"));\n            }\n        }\n    }\n\n    /*!\n    @brief dereference the iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    pointer operator->() const\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                assert(m_it.object_iterator != m_object->m_value.object->end());\n                return &(m_it.object_iterator->second);\n            }\n\n            case value_t::array:\n            {\n                assert(m_it.array_iterator != m_object->m_value.array->end());\n                return &*m_it.array_iterator;\n            }\n\n            default:\n            {\n                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))\n                {\n                    return m_object;\n                }\n\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\"));\n            }\n        }\n    }\n\n    /*!\n    @brief post-increment (it++)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl const operator++(int)\n    {\n        auto result = *this;\n        ++(*this);\n        return result;\n    }\n\n    /*!\n    @brief pre-increment (++it)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator++()\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                std::advance(m_it.object_iterator, 1);\n                break;\n            }\n\n            case value_t::array:\n            {\n                std::advance(m_it.array_iterator, 1);\n                break;\n            }\n\n            default:\n            {\n                ++m_it.primitive_iterator;\n                break;\n            }\n        }\n\n        return *this;\n    }\n\n    /*!\n    @brief post-decrement (it--)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl const operator--(int)\n    {\n        auto result = *this;\n        --(*this);\n        return result;\n    }\n\n    /*!\n    @brief pre-decrement (--it)\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator--()\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n            {\n                std::advance(m_it.object_iterator, -1);\n                break;\n            }\n\n            case value_t::array:\n            {\n                std::advance(m_it.array_iterator, -1);\n                break;\n            }\n\n            default:\n            {\n                --m_it.primitive_iterator;\n                break;\n            }\n        }\n\n        return *this;\n    }\n\n    /*!\n    @brief  comparison: equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator==(const iter_impl& other) const\n    {\n        // if objects are not the same, the comparison is undefined\n        if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(212, \"cannot compare iterators of different containers\"));\n        }\n\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                return (m_it.object_iterator == other.m_it.object_iterator);\n\n            case value_t::array:\n                return (m_it.array_iterator == other.m_it.array_iterator);\n\n            default:\n                return (m_it.primitive_iterator == other.m_it.primitive_iterator);\n        }\n    }\n\n    /*!\n    @brief  comparison: not equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator!=(const iter_impl& other) const\n    {\n        return not operator==(other);\n    }\n\n    /*!\n    @brief  comparison: smaller\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator<(const iter_impl& other) const\n    {\n        // if objects are not the same, the comparison is undefined\n        if (JSON_HEDLEY_UNLIKELY(m_object != other.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(212, \"cannot compare iterators of different containers\"));\n        }\n\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(213, \"cannot compare order of object iterators\"));\n\n            case value_t::array:\n                return (m_it.array_iterator < other.m_it.array_iterator);\n\n            default:\n                return (m_it.primitive_iterator < other.m_it.primitive_iterator);\n        }\n    }\n\n    /*!\n    @brief  comparison: less than or equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator<=(const iter_impl& other) const\n    {\n        return not other.operator < (*this);\n    }\n\n    /*!\n    @brief  comparison: greater than\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator>(const iter_impl& other) const\n    {\n        return not operator<=(other);\n    }\n\n    /*!\n    @brief  comparison: greater than or equal\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    bool operator>=(const iter_impl& other) const\n    {\n        return not operator<(other);\n    }\n\n    /*!\n    @brief  add to iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator+=(difference_type i)\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(209, \"cannot use offsets with object iterators\"));\n\n            case value_t::array:\n            {\n                std::advance(m_it.array_iterator, i);\n                break;\n            }\n\n            default:\n            {\n                m_it.primitive_iterator += i;\n                break;\n            }\n        }\n\n        return *this;\n    }\n\n    /*!\n    @brief  subtract from iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl& operator-=(difference_type i)\n    {\n        return operator+=(-i);\n    }\n\n    /*!\n    @brief  add to iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl operator+(difference_type i) const\n    {\n        auto result = *this;\n        result += i;\n        return result;\n    }\n\n    /*!\n    @brief  addition of distance and iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    friend iter_impl operator+(difference_type i, const iter_impl& it)\n    {\n        auto result = it;\n        result += i;\n        return result;\n    }\n\n    /*!\n    @brief  subtract from iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    iter_impl operator-(difference_type i) const\n    {\n        auto result = *this;\n        result -= i;\n        return result;\n    }\n\n    /*!\n    @brief  return difference\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    difference_type operator-(const iter_impl& other) const\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(209, \"cannot use offsets with object iterators\"));\n\n            case value_t::array:\n                return m_it.array_iterator - other.m_it.array_iterator;\n\n            default:\n                return m_it.primitive_iterator - other.m_it.primitive_iterator;\n        }\n    }\n\n    /*!\n    @brief  access to successor\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    reference operator[](difference_type n) const\n    {\n        assert(m_object != nullptr);\n\n        switch (m_object->m_type)\n        {\n            case value_t::object:\n                JSON_THROW(invalid_iterator::create(208, \"cannot use operator[] for object iterators\"));\n\n            case value_t::array:\n                return *std::next(m_it.array_iterator, n);\n\n            case value_t::null:\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\"));\n\n            default:\n            {\n                if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.get_value() == -n))\n                {\n                    return *m_object;\n                }\n\n                JSON_THROW(invalid_iterator::create(214, \"cannot get value\"));\n            }\n        }\n    }\n\n    /*!\n    @brief  return the key of an object iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    const typename object_t::key_type& key() const\n    {\n        assert(m_object != nullptr);\n\n        if (JSON_HEDLEY_LIKELY(m_object->is_object()))\n        {\n            return m_it.object_iterator->first;\n        }\n\n        JSON_THROW(invalid_iterator::create(207, \"cannot use key() for non-object iterators\"));\n    }\n\n    /*!\n    @brief  return the value of an iterator\n    @pre The iterator is initialized; i.e. `m_object != nullptr`.\n    */\n    reference value() const\n    {\n        return operator*();\n    }\n\n  private:\n    /// associated JSON instance\n    pointer m_object = nullptr;\n    /// the actual iterator of the associated instance\n    internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it {};\n};\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/iteration_proxy.hpp>\n\n// #include <nlohmann/detail/iterators/json_reverse_iterator.hpp>\n\n\n#include <cstddef> // ptrdiff_t\n#include <iterator> // reverse_iterator\n#include <utility> // declval\n\nnamespace nlohmann\n{\nnamespace detail\n{\n//////////////////////\n// reverse_iterator //\n//////////////////////\n\n/*!\n@brief a template for a reverse iterator class\n\n@tparam Base the base iterator type to reverse. Valid types are @ref\niterator (to create @ref reverse_iterator) and @ref const_iterator (to\ncreate @ref const_reverse_iterator).\n\n@requirement The class satisfies the following concept requirements:\n-\n[BidirectionalIterator](https://en.cppreference.com/w/cpp/named_req/BidirectionalIterator):\n  The iterator that can be moved can be moved in both directions (i.e.\n  incremented and decremented).\n- [OutputIterator](https://en.cppreference.com/w/cpp/named_req/OutputIterator):\n  It is possible to write to the pointed-to element (only if @a Base is\n  @ref iterator).\n\n@since version 1.0.0\n*/\ntemplate<typename Base>\nclass json_reverse_iterator : public std::reverse_iterator<Base>\n{\n  public:\n    using difference_type = std::ptrdiff_t;\n    /// shortcut to the reverse iterator adapter\n    using base_iterator = std::reverse_iterator<Base>;\n    /// the reference type for the pointed-to element\n    using reference = typename Base::reference;\n\n    /// create reverse iterator from iterator\n    explicit json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept\n        : base_iterator(it) {}\n\n    /// create reverse iterator from base class\n    explicit json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {}\n\n    /// post-increment (it++)\n    json_reverse_iterator const operator++(int)\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator++(1));\n    }\n\n    /// pre-increment (++it)\n    json_reverse_iterator& operator++()\n    {\n        return static_cast<json_reverse_iterator&>(base_iterator::operator++());\n    }\n\n    /// post-decrement (it--)\n    json_reverse_iterator const operator--(int)\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator--(1));\n    }\n\n    /// pre-decrement (--it)\n    json_reverse_iterator& operator--()\n    {\n        return static_cast<json_reverse_iterator&>(base_iterator::operator--());\n    }\n\n    /// add to iterator\n    json_reverse_iterator& operator+=(difference_type i)\n    {\n        return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i));\n    }\n\n    /// add to iterator\n    json_reverse_iterator operator+(difference_type i) const\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator+(i));\n    }\n\n    /// subtract from iterator\n    json_reverse_iterator operator-(difference_type i) const\n    {\n        return static_cast<json_reverse_iterator>(base_iterator::operator-(i));\n    }\n\n    /// return difference\n    difference_type operator-(const json_reverse_iterator& other) const\n    {\n        return base_iterator(*this) - base_iterator(other);\n    }\n\n    /// access to successor\n    reference operator[](difference_type n) const\n    {\n        return *(this->operator+(n));\n    }\n\n    /// return the key of an object iterator\n    auto key() const -> decltype(std::declval<Base>().key())\n    {\n        auto it = --this->base();\n        return it.key();\n    }\n\n    /// return the value of an iterator\n    reference value() const\n    {\n        auto it = --this->base();\n        return it.operator * ();\n    }\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/iterators/primitive_iterator.hpp>\n\n// #include <nlohmann/detail/json_pointer.hpp>\n\n\n#include <algorithm> // all_of\n#include <cassert> // assert\n#include <cctype> // isdigit\n#include <numeric> // accumulate\n#include <string> // string\n#include <utility> // move\n#include <vector> // vector\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\ntemplate<typename BasicJsonType>\nclass json_pointer\n{\n    // allow basic_json to access private members\n    NLOHMANN_BASIC_JSON_TPL_DECLARATION\n    friend class basic_json;\n\n  public:\n    /*!\n    @brief create JSON pointer\n\n    Create a JSON pointer according to the syntax described in\n    [Section 3 of RFC6901](https://tools.ietf.org/html/rfc6901#section-3).\n\n    @param[in] s  string representing the JSON pointer; if omitted, the empty\n                  string is assumed which references the whole JSON value\n\n    @throw parse_error.107 if the given JSON pointer @a s is nonempty and does\n                           not begin with a slash (`/`); see example below\n\n    @throw parse_error.108 if a tilde (`~`) in the given JSON pointer @a s is\n    not followed by `0` (representing `~`) or `1` (representing `/`); see\n    example below\n\n    @liveexample{The example shows the construction several valid JSON pointers\n    as well as the exceptional behavior.,json_pointer}\n\n    @since version 2.0.0\n    */\n    explicit json_pointer(const std::string& s = \"\")\n        : reference_tokens(split(s))\n    {}\n\n    /*!\n    @brief return a string representation of the JSON pointer\n\n    @invariant For each JSON pointer `ptr`, it holds:\n    @code {.cpp}\n    ptr == json_pointer(ptr.to_string());\n    @endcode\n\n    @return a string representation of the JSON pointer\n\n    @liveexample{The example shows the result of `to_string`.,json_pointer__to_string}\n\n    @since version 2.0.0\n    */\n    std::string to_string() const\n    {\n        return std::accumulate(reference_tokens.begin(), reference_tokens.end(),\n                               std::string{},\n                               [](const std::string & a, const std::string & b)\n        {\n            return a + \"/\" + escape(b);\n        });\n    }\n\n    /// @copydoc to_string()\n    operator std::string() const\n    {\n        return to_string();\n    }\n\n    /*!\n    @brief append another JSON pointer at the end of this JSON pointer\n\n    @param[in] ptr  JSON pointer to append\n    @return JSON pointer with @a ptr appended\n\n    @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}\n\n    @complexity Linear in the length of @a ptr.\n\n    @sa @ref operator/=(std::string) to append a reference token\n    @sa @ref operator/=(std::size_t) to append an array index\n    @sa @ref operator/(const json_pointer&, const json_pointer&) for a binary operator\n\n    @since version 3.6.0\n    */\n    json_pointer& operator/=(const json_pointer& ptr)\n    {\n        reference_tokens.insert(reference_tokens.end(),\n                                ptr.reference_tokens.begin(),\n                                ptr.reference_tokens.end());\n        return *this;\n    }\n\n    /*!\n    @brief append an unescaped reference token at the end of this JSON pointer\n\n    @param[in] token  reference token to append\n    @return JSON pointer with @a token appended without escaping @a token\n\n    @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}\n\n    @complexity Amortized constant.\n\n    @sa @ref operator/=(const json_pointer&) to append a JSON pointer\n    @sa @ref operator/=(std::size_t) to append an array index\n    @sa @ref operator/(const json_pointer&, std::size_t) for a binary operator\n\n    @since version 3.6.0\n    */\n    json_pointer& operator/=(std::string token)\n    {\n        push_back(std::move(token));\n        return *this;\n    }\n\n    /*!\n    @brief append an array index at the end of this JSON pointer\n\n    @param[in] array_index  array index to append\n    @return JSON pointer with @a array_index appended\n\n    @liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}\n\n    @complexity Amortized constant.\n\n    @sa @ref operator/=(const json_pointer&) to append a JSON pointer\n    @sa @ref operator/=(std::string) to append a reference token\n    @sa @ref operator/(const json_pointer&, std::string) for a binary operator\n\n    @since version 3.6.0\n    */\n    json_pointer& operator/=(std::size_t array_index)\n    {\n        return *this /= std::to_string(array_index);\n    }\n\n    /*!\n    @brief create a new JSON pointer by appending the right JSON pointer at the end of the left JSON pointer\n\n    @param[in] lhs  JSON pointer\n    @param[in] rhs  JSON pointer\n    @return a new JSON pointer with @a rhs appended to @a lhs\n\n    @liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary}\n\n    @complexity Linear in the length of @a lhs and @a rhs.\n\n    @sa @ref operator/=(const json_pointer&) to append a JSON pointer\n\n    @since version 3.6.0\n    */\n    friend json_pointer operator/(const json_pointer& lhs,\n                                  const json_pointer& rhs)\n    {\n        return json_pointer(lhs) /= rhs;\n    }\n\n    /*!\n    @brief create a new JSON pointer by appending the unescaped token at the end of the JSON pointer\n\n    @param[in] ptr  JSON pointer\n    @param[in] token  reference token\n    @return a new JSON pointer with unescaped @a token appended to @a ptr\n\n    @liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary}\n\n    @complexity Linear in the length of @a ptr.\n\n    @sa @ref operator/=(std::string) to append a reference token\n\n    @since version 3.6.0\n    */\n    friend json_pointer operator/(const json_pointer& ptr, std::string token)\n    {\n        return json_pointer(ptr) /= std::move(token);\n    }\n\n    /*!\n    @brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer\n\n    @param[in] ptr  JSON pointer\n    @param[in] array_index  array index\n    @return a new JSON pointer with @a array_index appended to @a ptr\n\n    @liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary}\n\n    @complexity Linear in the length of @a ptr.\n\n    @sa @ref operator/=(std::size_t) to append an array index\n\n    @since version 3.6.0\n    */\n    friend json_pointer operator/(const json_pointer& ptr, std::size_t array_index)\n    {\n        return json_pointer(ptr) /= array_index;\n    }\n\n    /*!\n    @brief returns the parent of this JSON pointer\n\n    @return parent of this JSON pointer; in case this JSON pointer is the root,\n            the root itself is returned\n\n    @complexity Linear in the length of the JSON pointer.\n\n    @liveexample{The example shows the result of `parent_pointer` for different\n    JSON Pointers.,json_pointer__parent_pointer}\n\n    @since version 3.6.0\n    */\n    json_pointer parent_pointer() const\n    {\n        if (empty())\n        {\n            return *this;\n        }\n\n        json_pointer res = *this;\n        res.pop_back();\n        return res;\n    }\n\n    /*!\n    @brief remove last reference token\n\n    @pre not `empty()`\n\n    @liveexample{The example shows the usage of `pop_back`.,json_pointer__pop_back}\n\n    @complexity Constant.\n\n    @throw out_of_range.405 if JSON pointer has no parent\n\n    @since version 3.6.0\n    */\n    void pop_back()\n    {\n        if (JSON_HEDLEY_UNLIKELY(empty()))\n        {\n            JSON_THROW(detail::out_of_range::create(405, \"JSON pointer has no parent\"));\n        }\n\n        reference_tokens.pop_back();\n    }\n\n    /*!\n    @brief return last reference token\n\n    @pre not `empty()`\n    @return last reference token\n\n    @liveexample{The example shows the usage of `back`.,json_pointer__back}\n\n    @complexity Constant.\n\n    @throw out_of_range.405 if JSON pointer has no parent\n\n    @since version 3.6.0\n    */\n    const std::string& back() const\n    {\n        if (JSON_HEDLEY_UNLIKELY(empty()))\n        {\n            JSON_THROW(detail::out_of_range::create(405, \"JSON pointer has no parent\"));\n        }\n\n        return reference_tokens.back();\n    }\n\n    /*!\n    @brief append an unescaped token at the end of the reference pointer\n\n    @param[in] token  token to add\n\n    @complexity Amortized constant.\n\n    @liveexample{The example shows the result of `push_back` for different\n    JSON Pointers.,json_pointer__push_back}\n\n    @since version 3.6.0\n    */\n    void push_back(const std::string& token)\n    {\n        reference_tokens.push_back(token);\n    }\n\n    /// @copydoc push_back(const std::string&)\n    void push_back(std::string&& token)\n    {\n        reference_tokens.push_back(std::move(token));\n    }\n\n    /*!\n    @brief return whether pointer points to the root document\n\n    @return true iff the JSON pointer points to the root document\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @liveexample{The example shows the result of `empty` for different JSON\n    Pointers.,json_pointer__empty}\n\n    @since version 3.6.0\n    */\n    bool empty() const noexcept\n    {\n        return reference_tokens.empty();\n    }\n\n  private:\n    /*!\n    @param[in] s  reference token to be converted into an array index\n\n    @return integer representation of @a s\n\n    @throw out_of_range.404 if string @a s could not be converted to an integer\n    */\n    static int array_index(const std::string& s)\n    {\n        std::size_t processed_chars = 0;\n        const int res = std::stoi(s, &processed_chars);\n\n        // check if the string was completely read\n        if (JSON_HEDLEY_UNLIKELY(processed_chars != s.size()))\n        {\n            JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + s + \"'\"));\n        }\n\n        return res;\n    }\n\n    json_pointer top() const\n    {\n        if (JSON_HEDLEY_UNLIKELY(empty()))\n        {\n            JSON_THROW(detail::out_of_range::create(405, \"JSON pointer has no parent\"));\n        }\n\n        json_pointer result = *this;\n        result.reference_tokens = {reference_tokens[0]};\n        return result;\n    }\n\n    /*!\n    @brief create and return a reference to the pointed to value\n\n    @complexity Linear in the number of reference tokens.\n\n    @throw parse_error.109 if array index is not a number\n    @throw type_error.313 if value cannot be unflattened\n    */\n    BasicJsonType& get_and_create(BasicJsonType& j) const\n    {\n        using size_type = typename BasicJsonType::size_type;\n        auto result = &j;\n\n        // in case no reference tokens exist, return a reference to the JSON value\n        // j which will be overwritten by a primitive value\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (result->type())\n            {\n                case detail::value_t::null:\n                {\n                    if (reference_token == \"0\")\n                    {\n                        // start a new array if reference token is 0\n                        result = &result->operator[](0);\n                    }\n                    else\n                    {\n                        // start a new object otherwise\n                        result = &result->operator[](reference_token);\n                    }\n                    break;\n                }\n\n                case detail::value_t::object:\n                {\n                    // create an entry in the object\n                    result = &result->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    // create an entry in the array\n                    JSON_TRY\n                    {\n                        result = &result->operator[](static_cast<size_type>(array_index(reference_token)));\n                    }\n                    JSON_CATCH(std::invalid_argument&)\n                    {\n                        JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + reference_token + \"' is not a number\"));\n                    }\n                    break;\n                }\n\n                /*\n                The following code is only reached if there exists a reference\n                token _and_ the current value is primitive. In this case, we have\n                an error situation, because primitive values may only occur as\n                single value; that is, with an empty list of reference tokens.\n                */\n                default:\n                    JSON_THROW(detail::type_error::create(313, \"invalid value to unflatten\"));\n            }\n        }\n\n        return *result;\n    }\n\n    /*!\n    @brief return a reference to the pointed to value\n\n    @note This version does not throw if a value is not present, but tries to\n          create nested values instead. For instance, calling this function\n          with pointer `\"/this/that\"` on a null value is equivalent to calling\n          `operator[](\"this\").operator[](\"that\")` on that value, effectively\n          changing the null value to an object.\n\n    @param[in] ptr  a JSON value\n\n    @return reference to the JSON value pointed to by the JSON pointer\n\n    @complexity Linear in the length of the JSON pointer.\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    BasicJsonType& get_unchecked(BasicJsonType* ptr) const\n    {\n        using size_type = typename BasicJsonType::size_type;\n        for (const auto& reference_token : reference_tokens)\n        {\n            // convert null values to arrays or objects before continuing\n            if (ptr->is_null())\n            {\n                // check if reference token is a number\n                const bool nums =\n                    std::all_of(reference_token.begin(), reference_token.end(),\n                                [](const unsigned char x)\n                {\n                    return std::isdigit(x);\n                });\n\n                // change value to array for numbers or \"-\" or to object otherwise\n                *ptr = (nums or reference_token == \"-\")\n                       ? detail::value_t::array\n                       : detail::value_t::object;\n            }\n\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // use unchecked object access\n                    ptr = &ptr->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    // error condition (cf. RFC 6901, Sect. 4)\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))\n                    {\n                        JSON_THROW(detail::parse_error::create(106, 0,\n                                                               \"array index '\" + reference_token +\n                                                               \"' must not begin with '0'\"));\n                    }\n\n                    if (reference_token == \"-\")\n                    {\n                        // explicitly treat \"-\" as index beyond the end\n                        ptr = &ptr->operator[](ptr->m_value.array->size());\n                    }\n                    else\n                    {\n                        // convert array index to number; unchecked access\n                        JSON_TRY\n                        {\n                            ptr = &ptr->operator[](\n                                static_cast<size_type>(array_index(reference_token)));\n                        }\n                        JSON_CATCH(std::invalid_argument&)\n                        {\n                            JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + reference_token + \"' is not a number\"));\n                        }\n                    }\n                    break;\n                }\n\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\"));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    BasicJsonType& get_checked(BasicJsonType* ptr) const\n    {\n        using size_type = typename BasicJsonType::size_type;\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // note: at performs range check\n                    ptr = &ptr->at(reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" always fails the range check\n                        JSON_THROW(detail::out_of_range::create(402,\n                                                                \"array index '-' (\" + std::to_string(ptr->m_value.array->size()) +\n                                                                \") is out of range\"));\n                    }\n\n                    // error condition (cf. RFC 6901, Sect. 4)\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))\n                    {\n                        JSON_THROW(detail::parse_error::create(106, 0,\n                                                               \"array index '\" + reference_token +\n                                                               \"' must not begin with '0'\"));\n                    }\n\n                    // note: at performs range check\n                    JSON_TRY\n                    {\n                        ptr = &ptr->at(static_cast<size_type>(array_index(reference_token)));\n                    }\n                    JSON_CATCH(std::invalid_argument&)\n                    {\n                        JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + reference_token + \"' is not a number\"));\n                    }\n                    break;\n                }\n\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\"));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @brief return a const reference to the pointed to value\n\n    @param[in] ptr  a JSON value\n\n    @return const reference to the JSON value pointed to by the JSON\n    pointer\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const\n    {\n        using size_type = typename BasicJsonType::size_type;\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // use unchecked object access\n                    ptr = &ptr->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" cannot be used for const access\n                        JSON_THROW(detail::out_of_range::create(402,\n                                                                \"array index '-' (\" + std::to_string(ptr->m_value.array->size()) +\n                                                                \") is out of range\"));\n                    }\n\n                    // error condition (cf. RFC 6901, Sect. 4)\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))\n                    {\n                        JSON_THROW(detail::parse_error::create(106, 0,\n                                                               \"array index '\" + reference_token +\n                                                               \"' must not begin with '0'\"));\n                    }\n\n                    // use unchecked array access\n                    JSON_TRY\n                    {\n                        ptr = &ptr->operator[](\n                            static_cast<size_type>(array_index(reference_token)));\n                    }\n                    JSON_CATCH(std::invalid_argument&)\n                    {\n                        JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + reference_token + \"' is not a number\"));\n                    }\n                    break;\n                }\n\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\"));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n    */\n    const BasicJsonType& get_checked(const BasicJsonType* ptr) const\n    {\n        using size_type = typename BasicJsonType::size_type;\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    // note: at performs range check\n                    ptr = &ptr->at(reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" always fails the range check\n                        JSON_THROW(detail::out_of_range::create(402,\n                                                                \"array index '-' (\" + std::to_string(ptr->m_value.array->size()) +\n                                                                \") is out of range\"));\n                    }\n\n                    // error condition (cf. RFC 6901, Sect. 4)\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))\n                    {\n                        JSON_THROW(detail::parse_error::create(106, 0,\n                                                               \"array index '\" + reference_token +\n                                                               \"' must not begin with '0'\"));\n                    }\n\n                    // note: at performs range check\n                    JSON_TRY\n                    {\n                        ptr = &ptr->at(static_cast<size_type>(array_index(reference_token)));\n                    }\n                    JSON_CATCH(std::invalid_argument&)\n                    {\n                        JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + reference_token + \"' is not a number\"));\n                    }\n                    break;\n                }\n\n                default:\n                    JSON_THROW(detail::out_of_range::create(404, \"unresolved reference token '\" + reference_token + \"'\"));\n            }\n        }\n\n        return *ptr;\n    }\n\n    /*!\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    */\n    bool contains(const BasicJsonType* ptr) const\n    {\n        using size_type = typename BasicJsonType::size_type;\n        for (const auto& reference_token : reference_tokens)\n        {\n            switch (ptr->type())\n            {\n                case detail::value_t::object:\n                {\n                    if (not ptr->contains(reference_token))\n                    {\n                        // we did not find the key in the object\n                        return false;\n                    }\n\n                    ptr = &ptr->operator[](reference_token);\n                    break;\n                }\n\n                case detail::value_t::array:\n                {\n                    if (JSON_HEDLEY_UNLIKELY(reference_token == \"-\"))\n                    {\n                        // \"-\" always fails the range check\n                        return false;\n                    }\n\n                    // error condition (cf. RFC 6901, Sect. 4)\n                    if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))\n                    {\n                        JSON_THROW(detail::parse_error::create(106, 0,\n                                                               \"array index '\" + reference_token +\n                                                               \"' must not begin with '0'\"));\n                    }\n\n                    JSON_TRY\n                    {\n                        const auto idx = static_cast<size_type>(array_index(reference_token));\n                        if (idx >= ptr->size())\n                        {\n                            // index out of range\n                            return false;\n                        }\n\n                        ptr = &ptr->operator[](idx);\n                        break;\n                    }\n                    JSON_CATCH(std::invalid_argument&)\n                    {\n                        JSON_THROW(detail::parse_error::create(109, 0, \"array index '\" + reference_token + \"' is not a number\"));\n                    }\n                    break;\n                }\n\n                default:\n                {\n                    // we do not expect primitive values if there is still a\n                    // reference token to process\n                    return false;\n                }\n            }\n        }\n\n        // no reference token left means we found a primitive value\n        return true;\n    }\n\n    /*!\n    @brief split the string input to reference tokens\n\n    @note This function is only called by the json_pointer constructor.\n          All exceptions below are documented there.\n\n    @throw parse_error.107  if the pointer is not empty or begins with '/'\n    @throw parse_error.108  if character '~' is not followed by '0' or '1'\n    */\n    static std::vector<std::string> split(const std::string& reference_string)\n    {\n        std::vector<std::string> result;\n\n        // special case: empty reference string -> no reference tokens\n        if (reference_string.empty())\n        {\n            return result;\n        }\n\n        // check if nonempty reference string begins with slash\n        if (JSON_HEDLEY_UNLIKELY(reference_string[0] != '/'))\n        {\n            JSON_THROW(detail::parse_error::create(107, 1,\n                                                   \"JSON pointer must be empty or begin with '/' - was: '\" +\n                                                   reference_string + \"'\"));\n        }\n\n        // extract the reference tokens:\n        // - slash: position of the last read slash (or end of string)\n        // - start: position after the previous slash\n        for (\n            // search for the first slash after the first character\n            std::size_t slash = reference_string.find_first_of('/', 1),\n            // set the beginning of the first reference token\n            start = 1;\n            // we can stop if start == 0 (if slash == std::string::npos)\n            start != 0;\n            // set the beginning of the next reference token\n            // (will eventually be 0 if slash == std::string::npos)\n            start = (slash == std::string::npos) ? 0 : slash + 1,\n            // find next slash\n            slash = reference_string.find_first_of('/', start))\n        {\n            // use the text between the beginning of the reference token\n            // (start) and the last slash (slash).\n            auto reference_token = reference_string.substr(start, slash - start);\n\n            // check reference tokens are properly escaped\n            for (std::size_t pos = reference_token.find_first_of('~');\n                    pos != std::string::npos;\n                    pos = reference_token.find_first_of('~', pos + 1))\n            {\n                assert(reference_token[pos] == '~');\n\n                // ~ must be followed by 0 or 1\n                if (JSON_HEDLEY_UNLIKELY(pos == reference_token.size() - 1 or\n                                         (reference_token[pos + 1] != '0' and\n                                          reference_token[pos + 1] != '1')))\n                {\n                    JSON_THROW(detail::parse_error::create(108, 0, \"escape character '~' must be followed with '0' or '1'\"));\n                }\n            }\n\n            // finally, store the reference token\n            unescape(reference_token);\n            result.push_back(reference_token);\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief replace all occurrences of a substring by another string\n\n    @param[in,out] s  the string to manipulate; changed so that all\n                   occurrences of @a f are replaced with @a t\n    @param[in]     f  the substring to replace with @a t\n    @param[in]     t  the string to replace @a f\n\n    @pre The search string @a f must not be empty. **This precondition is\n    enforced with an assertion.**\n\n    @since version 2.0.0\n    */\n    static void replace_substring(std::string& s, const std::string& f,\n                                  const std::string& t)\n    {\n        assert(not f.empty());\n        for (auto pos = s.find(f);                // find first occurrence of f\n                pos != std::string::npos;         // make sure f was found\n                s.replace(pos, f.size(), t),      // replace with t, and\n                pos = s.find(f, pos + t.size()))  // find next occurrence of f\n        {}\n    }\n\n    /// escape \"~\" to \"~0\" and \"/\" to \"~1\"\n    static std::string escape(std::string s)\n    {\n        replace_substring(s, \"~\", \"~0\");\n        replace_substring(s, \"/\", \"~1\");\n        return s;\n    }\n\n    /// unescape \"~1\" to tilde and \"~0\" to slash (order is important!)\n    static void unescape(std::string& s)\n    {\n        replace_substring(s, \"~1\", \"/\");\n        replace_substring(s, \"~0\", \"~\");\n    }\n\n    /*!\n    @param[in] reference_string  the reference string to the current value\n    @param[in] value             the value to consider\n    @param[in,out] result        the result object to insert values to\n\n    @note Empty objects or arrays are flattened to `null`.\n    */\n    static void flatten(const std::string& reference_string,\n                        const BasicJsonType& value,\n                        BasicJsonType& result)\n    {\n        switch (value.type())\n        {\n            case detail::value_t::array:\n            {\n                if (value.m_value.array->empty())\n                {\n                    // flatten empty array as null\n                    result[reference_string] = nullptr;\n                }\n                else\n                {\n                    // iterate array and use index as reference string\n                    for (std::size_t i = 0; i < value.m_value.array->size(); ++i)\n                    {\n                        flatten(reference_string + \"/\" + std::to_string(i),\n                                value.m_value.array->operator[](i), result);\n                    }\n                }\n                break;\n            }\n\n            case detail::value_t::object:\n            {\n                if (value.m_value.object->empty())\n                {\n                    // flatten empty object as null\n                    result[reference_string] = nullptr;\n                }\n                else\n                {\n                    // iterate object and use keys as reference string\n                    for (const auto& element : *value.m_value.object)\n                    {\n                        flatten(reference_string + \"/\" + escape(element.first), element.second, result);\n                    }\n                }\n                break;\n            }\n\n            default:\n            {\n                // add primitive value with its reference string\n                result[reference_string] = value;\n                break;\n            }\n        }\n    }\n\n    /*!\n    @param[in] value  flattened JSON\n\n    @return unflattened JSON\n\n    @throw parse_error.109 if array index is not a number\n    @throw type_error.314  if value is not an object\n    @throw type_error.315  if object values are not primitive\n    @throw type_error.313  if value cannot be unflattened\n    */\n    static BasicJsonType\n    unflatten(const BasicJsonType& value)\n    {\n        if (JSON_HEDLEY_UNLIKELY(not value.is_object()))\n        {\n            JSON_THROW(detail::type_error::create(314, \"only objects can be unflattened\"));\n        }\n\n        BasicJsonType result;\n\n        // iterate the JSON object values\n        for (const auto& element : *value.m_value.object)\n        {\n            if (JSON_HEDLEY_UNLIKELY(not element.second.is_primitive()))\n            {\n                JSON_THROW(detail::type_error::create(315, \"values in object must be primitive\"));\n            }\n\n            // assign value to reference pointed to by JSON pointer; Note that if\n            // the JSON pointer is \"\" (i.e., points to the whole value), function\n            // get_and_create returns a reference to result itself. An assignment\n            // will then create a primitive value.\n            json_pointer(element.first).get_and_create(result) = element.second;\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief compares two JSON pointers for equality\n\n    @param[in] lhs  JSON pointer to compare\n    @param[in] rhs  JSON pointer to compare\n    @return whether @a lhs is equal to @a rhs\n\n    @complexity Linear in the length of the JSON pointer\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n    */\n    friend bool operator==(json_pointer const& lhs,\n                           json_pointer const& rhs) noexcept\n    {\n        return lhs.reference_tokens == rhs.reference_tokens;\n    }\n\n    /*!\n    @brief compares two JSON pointers for inequality\n\n    @param[in] lhs  JSON pointer to compare\n    @param[in] rhs  JSON pointer to compare\n    @return whether @a lhs is not equal @a rhs\n\n    @complexity Linear in the length of the JSON pointer\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n    */\n    friend bool operator!=(json_pointer const& lhs,\n                           json_pointer const& rhs) noexcept\n    {\n        return not (lhs == rhs);\n    }\n\n    /// the reference tokens\n    std::vector<std::string> reference_tokens;\n};\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/json_ref.hpp>\n\n\n#include <initializer_list>\n#include <utility>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\ntemplate<typename BasicJsonType>\nclass json_ref\n{\n  public:\n    using value_type = BasicJsonType;\n\n    json_ref(value_type&& value)\n        : owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true)\n    {}\n\n    json_ref(const value_type& value)\n        : value_ref(const_cast<value_type*>(&value)), is_rvalue(false)\n    {}\n\n    json_ref(std::initializer_list<json_ref> init)\n        : owned_value(init), value_ref(&owned_value), is_rvalue(true)\n    {}\n\n    template <\n        class... Args,\n        enable_if_t<std::is_constructible<value_type, Args...>::value, int> = 0 >\n    json_ref(Args && ... args)\n        : owned_value(std::forward<Args>(args)...), value_ref(&owned_value),\n          is_rvalue(true) {}\n\n    // class should be movable only\n    json_ref(json_ref&&) = default;\n    json_ref(const json_ref&) = delete;\n    json_ref& operator=(const json_ref&) = delete;\n    json_ref& operator=(json_ref&&) = delete;\n    ~json_ref() = default;\n\n    value_type moved_or_copied() const\n    {\n        if (is_rvalue)\n        {\n            return std::move(*value_ref);\n        }\n        return *value_ref;\n    }\n\n    value_type const& operator*() const\n    {\n        return *static_cast<value_type const*>(value_ref);\n    }\n\n    value_type const* operator->() const\n    {\n        return static_cast<value_type const*>(value_ref);\n    }\n\n  private:\n    mutable value_type owned_value = nullptr;\n    value_type* value_ref = nullptr;\n    const bool is_rvalue;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/meta/type_traits.hpp>\n\n// #include <nlohmann/detail/output/binary_writer.hpp>\n\n\n#include <algorithm> // reverse\n#include <array> // array\n#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t\n#include <cstring> // memcpy\n#include <limits> // numeric_limits\n#include <string> // string\n\n// #include <nlohmann/detail/input/binary_reader.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/output/output_adapters.hpp>\n\n\n#include <algorithm> // copy\n#include <cstddef> // size_t\n#include <ios> // streamsize\n#include <iterator> // back_inserter\n#include <memory> // shared_ptr, make_shared\n#include <ostream> // basic_ostream\n#include <string> // basic_string\n#include <vector> // vector\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n/// abstract output adapter interface\ntemplate<typename CharType> struct output_adapter_protocol\n{\n    virtual void write_character(CharType c) = 0;\n    virtual void write_characters(const CharType* s, std::size_t length) = 0;\n    virtual ~output_adapter_protocol() = default;\n};\n\n/// a type to simplify interfaces\ntemplate<typename CharType>\nusing output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>;\n\n/// output adapter for byte vectors\ntemplate<typename CharType>\nclass output_vector_adapter : public output_adapter_protocol<CharType>\n{\n  public:\n    explicit output_vector_adapter(std::vector<CharType>& vec) noexcept\n        : v(vec)\n    {}\n\n    void write_character(CharType c) override\n    {\n        v.push_back(c);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    void write_characters(const CharType* s, std::size_t length) override\n    {\n        std::copy(s, s + length, std::back_inserter(v));\n    }\n\n  private:\n    std::vector<CharType>& v;\n};\n\n/// output adapter for output streams\ntemplate<typename CharType>\nclass output_stream_adapter : public output_adapter_protocol<CharType>\n{\n  public:\n    explicit output_stream_adapter(std::basic_ostream<CharType>& s) noexcept\n        : stream(s)\n    {}\n\n    void write_character(CharType c) override\n    {\n        stream.put(c);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    void write_characters(const CharType* s, std::size_t length) override\n    {\n        stream.write(s, static_cast<std::streamsize>(length));\n    }\n\n  private:\n    std::basic_ostream<CharType>& stream;\n};\n\n/// output adapter for basic_string\ntemplate<typename CharType, typename StringType = std::basic_string<CharType>>\nclass output_string_adapter : public output_adapter_protocol<CharType>\n{\n  public:\n    explicit output_string_adapter(StringType& s) noexcept\n        : str(s)\n    {}\n\n    void write_character(CharType c) override\n    {\n        str.push_back(c);\n    }\n\n    JSON_HEDLEY_NON_NULL(2)\n    void write_characters(const CharType* s, std::size_t length) override\n    {\n        str.append(s, length);\n    }\n\n  private:\n    StringType& str;\n};\n\ntemplate<typename CharType, typename StringType = std::basic_string<CharType>>\nclass output_adapter\n{\n  public:\n    output_adapter(std::vector<CharType>& vec)\n        : oa(std::make_shared<output_vector_adapter<CharType>>(vec)) {}\n\n    output_adapter(std::basic_ostream<CharType>& s)\n        : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {}\n\n    output_adapter(StringType& s)\n        : oa(std::make_shared<output_string_adapter<CharType, StringType>>(s)) {}\n\n    operator output_adapter_t<CharType>()\n    {\n        return oa;\n    }\n\n  private:\n    output_adapter_t<CharType> oa = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////\n// binary writer //\n///////////////////\n\n/*!\n@brief serialization to CBOR and MessagePack values\n*/\ntemplate<typename BasicJsonType, typename CharType>\nclass binary_writer\n{\n    using string_t = typename BasicJsonType::string_t;\n\n  public:\n    /*!\n    @brief create a binary writer\n\n    @param[in] adapter  output adapter to write to\n    */\n    explicit binary_writer(output_adapter_t<CharType> adapter) : oa(adapter)\n    {\n        assert(oa);\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    @pre       j.type() == value_t::object\n    */\n    void write_bson(const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::object:\n            {\n                write_bson_object(*j.m_value.object);\n                break;\n            }\n\n            default:\n            {\n                JSON_THROW(type_error::create(317, \"to serialize to BSON, top-level type must be object, but is \" + std::string(j.type_name())));\n            }\n        }\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    */\n    void write_cbor(const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::null:\n            {\n                oa->write_character(to_char_type(0xF6));\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                oa->write_character(j.m_value.boolean\n                                    ? to_char_type(0xF5)\n                                    : to_char_type(0xF4));\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                if (j.m_value.number_integer >= 0)\n                {\n                    // CBOR does not differentiate between positive signed\n                    // integers and unsigned integers. Therefore, we used the\n                    // code from the value_t::number_unsigned case here.\n                    if (j.m_value.number_integer <= 0x17)\n                    {\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x18));\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x19));\n                        write_number(static_cast<std::uint16_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x1A));\n                        write_number(static_cast<std::uint32_t>(j.m_value.number_integer));\n                    }\n                    else\n                    {\n                        oa->write_character(to_char_type(0x1B));\n                        write_number(static_cast<std::uint64_t>(j.m_value.number_integer));\n                    }\n                }\n                else\n                {\n                    // The conversions below encode the sign in the first\n                    // byte, and the value is converted to a positive number.\n                    const auto positive_number = -1 - j.m_value.number_integer;\n                    if (j.m_value.number_integer >= -24)\n                    {\n                        write_number(static_cast<std::uint8_t>(0x20 + positive_number));\n                    }\n                    else if (positive_number <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x38));\n                        write_number(static_cast<std::uint8_t>(positive_number));\n                    }\n                    else if (positive_number <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x39));\n                        write_number(static_cast<std::uint16_t>(positive_number));\n                    }\n                    else if (positive_number <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        oa->write_character(to_char_type(0x3A));\n                        write_number(static_cast<std::uint32_t>(positive_number));\n                    }\n                    else\n                    {\n                        oa->write_character(to_char_type(0x3B));\n                        write_number(static_cast<std::uint64_t>(positive_number));\n                    }\n                }\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                if (j.m_value.number_unsigned <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x18));\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_unsigned));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x19));\n                    write_number(static_cast<std::uint16_t>(j.m_value.number_unsigned));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x1A));\n                    write_number(static_cast<std::uint32_t>(j.m_value.number_unsigned));\n                }\n                else\n                {\n                    oa->write_character(to_char_type(0x1B));\n                    write_number(static_cast<std::uint64_t>(j.m_value.number_unsigned));\n                }\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                oa->write_character(get_cbor_float_prefix(j.m_value.number_float));\n                write_number(j.m_value.number_float);\n                break;\n            }\n\n            case value_t::string:\n            {\n                // step 1: write control byte and the string length\n                const auto N = j.m_value.string->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0x60 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x78));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x79));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x7A));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x7B));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write the string\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.string->c_str()),\n                    j.m_value.string->size());\n                break;\n            }\n\n            case value_t::array:\n            {\n                // step 1: write control byte and the array size\n                const auto N = j.m_value.array->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0x80 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x98));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x99));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x9A));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0x9B));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.array)\n                {\n                    write_cbor(el);\n                }\n                break;\n            }\n\n            case value_t::object:\n            {\n                // step 1: write control byte and the object size\n                const auto N = j.m_value.object->size();\n                if (N <= 0x17)\n                {\n                    write_number(static_cast<std::uint8_t>(0xA0 + N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xB8));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xB9));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xBA));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n                // LCOV_EXCL_START\n                else if (N <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    oa->write_character(to_char_type(0xBB));\n                    write_number(static_cast<std::uint64_t>(N));\n                }\n                // LCOV_EXCL_STOP\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.object)\n                {\n                    write_cbor(el.first);\n                    write_cbor(el.second);\n                }\n                break;\n            }\n\n            default:\n                break;\n        }\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    */\n    void write_msgpack(const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::null: // nil\n            {\n                oa->write_character(to_char_type(0xC0));\n                break;\n            }\n\n            case value_t::boolean: // true and false\n            {\n                oa->write_character(j.m_value.boolean\n                                    ? to_char_type(0xC3)\n                                    : to_char_type(0xC2));\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                if (j.m_value.number_integer >= 0)\n                {\n                    // MessagePack does not differentiate between positive\n                    // signed integers and unsigned integers. Therefore, we used\n                    // the code from the value_t::number_unsigned case here.\n                    if (j.m_value.number_unsigned < 128)\n                    {\n                        // positive fixnum\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)())\n                    {\n                        // uint 8\n                        oa->write_character(to_char_type(0xCC));\n                        write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)())\n                    {\n                        // uint 16\n                        oa->write_character(to_char_type(0xCD));\n                        write_number(static_cast<std::uint16_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)())\n                    {\n                        // uint 32\n                        oa->write_character(to_char_type(0xCE));\n                        write_number(static_cast<std::uint32_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)())\n                    {\n                        // uint 64\n                        oa->write_character(to_char_type(0xCF));\n                        write_number(static_cast<std::uint64_t>(j.m_value.number_integer));\n                    }\n                }\n                else\n                {\n                    if (j.m_value.number_integer >= -32)\n                    {\n                        // negative fixnum\n                        write_number(static_cast<std::int8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int8_t>::min)() and\n                             j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)())\n                    {\n                        // int 8\n                        oa->write_character(to_char_type(0xD0));\n                        write_number(static_cast<std::int8_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int16_t>::min)() and\n                             j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)())\n                    {\n                        // int 16\n                        oa->write_character(to_char_type(0xD1));\n                        write_number(static_cast<std::int16_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int32_t>::min)() and\n                             j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)())\n                    {\n                        // int 32\n                        oa->write_character(to_char_type(0xD2));\n                        write_number(static_cast<std::int32_t>(j.m_value.number_integer));\n                    }\n                    else if (j.m_value.number_integer >= (std::numeric_limits<std::int64_t>::min)() and\n                             j.m_value.number_integer <= (std::numeric_limits<std::int64_t>::max)())\n                    {\n                        // int 64\n                        oa->write_character(to_char_type(0xD3));\n                        write_number(static_cast<std::int64_t>(j.m_value.number_integer));\n                    }\n                }\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                if (j.m_value.number_unsigned < 128)\n                {\n                    // positive fixnum\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    // uint 8\n                    oa->write_character(to_char_type(0xCC));\n                    write_number(static_cast<std::uint8_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // uint 16\n                    oa->write_character(to_char_type(0xCD));\n                    write_number(static_cast<std::uint16_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // uint 32\n                    oa->write_character(to_char_type(0xCE));\n                    write_number(static_cast<std::uint32_t>(j.m_value.number_integer));\n                }\n                else if (j.m_value.number_unsigned <= (std::numeric_limits<std::uint64_t>::max)())\n                {\n                    // uint 64\n                    oa->write_character(to_char_type(0xCF));\n                    write_number(static_cast<std::uint64_t>(j.m_value.number_integer));\n                }\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                oa->write_character(get_msgpack_float_prefix(j.m_value.number_float));\n                write_number(j.m_value.number_float);\n                break;\n            }\n\n            case value_t::string:\n            {\n                // step 1: write control byte and the string length\n                const auto N = j.m_value.string->size();\n                if (N <= 31)\n                {\n                    // fixstr\n                    write_number(static_cast<std::uint8_t>(0xA0 | N));\n                }\n                else if (N <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    // str 8\n                    oa->write_character(to_char_type(0xD9));\n                    write_number(static_cast<std::uint8_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // str 16\n                    oa->write_character(to_char_type(0xDA));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // str 32\n                    oa->write_character(to_char_type(0xDB));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 2: write the string\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.string->c_str()),\n                    j.m_value.string->size());\n                break;\n            }\n\n            case value_t::array:\n            {\n                // step 1: write control byte and the array size\n                const auto N = j.m_value.array->size();\n                if (N <= 15)\n                {\n                    // fixarray\n                    write_number(static_cast<std::uint8_t>(0x90 | N));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // array 16\n                    oa->write_character(to_char_type(0xDC));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // array 32\n                    oa->write_character(to_char_type(0xDD));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.array)\n                {\n                    write_msgpack(el);\n                }\n                break;\n            }\n\n            case value_t::object:\n            {\n                // step 1: write control byte and the object size\n                const auto N = j.m_value.object->size();\n                if (N <= 15)\n                {\n                    // fixmap\n                    write_number(static_cast<std::uint8_t>(0x80 | (N & 0xF)));\n                }\n                else if (N <= (std::numeric_limits<std::uint16_t>::max)())\n                {\n                    // map 16\n                    oa->write_character(to_char_type(0xDE));\n                    write_number(static_cast<std::uint16_t>(N));\n                }\n                else if (N <= (std::numeric_limits<std::uint32_t>::max)())\n                {\n                    // map 32\n                    oa->write_character(to_char_type(0xDF));\n                    write_number(static_cast<std::uint32_t>(N));\n                }\n\n                // step 2: write each element\n                for (const auto& el : *j.m_value.object)\n                {\n                    write_msgpack(el.first);\n                    write_msgpack(el.second);\n                }\n                break;\n            }\n\n            default:\n                break;\n        }\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    @param[in] use_count   whether to use '#' prefixes (optimized format)\n    @param[in] use_type    whether to use '$' prefixes (optimized format)\n    @param[in] add_prefix  whether prefixes need to be used for this value\n    */\n    void write_ubjson(const BasicJsonType& j, const bool use_count,\n                      const bool use_type, const bool add_prefix = true)\n    {\n        switch (j.type())\n        {\n            case value_t::null:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('Z'));\n                }\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(j.m_value.boolean\n                                        ? to_char_type('T')\n                                        : to_char_type('F'));\n                }\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                write_number_with_ubjson_prefix(j.m_value.number_integer, add_prefix);\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                write_number_with_ubjson_prefix(j.m_value.number_unsigned, add_prefix);\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                write_number_with_ubjson_prefix(j.m_value.number_float, add_prefix);\n                break;\n            }\n\n            case value_t::string:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('S'));\n                }\n                write_number_with_ubjson_prefix(j.m_value.string->size(), true);\n                oa->write_characters(\n                    reinterpret_cast<const CharType*>(j.m_value.string->c_str()),\n                    j.m_value.string->size());\n                break;\n            }\n\n            case value_t::array:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('['));\n                }\n\n                bool prefix_required = true;\n                if (use_type and not j.m_value.array->empty())\n                {\n                    assert(use_count);\n                    const CharType first_prefix = ubjson_prefix(j.front());\n                    const bool same_prefix = std::all_of(j.begin() + 1, j.end(),\n                                                         [this, first_prefix](const BasicJsonType & v)\n                    {\n                        return ubjson_prefix(v) == first_prefix;\n                    });\n\n                    if (same_prefix)\n                    {\n                        prefix_required = false;\n                        oa->write_character(to_char_type('$'));\n                        oa->write_character(first_prefix);\n                    }\n                }\n\n                if (use_count)\n                {\n                    oa->write_character(to_char_type('#'));\n                    write_number_with_ubjson_prefix(j.m_value.array->size(), true);\n                }\n\n                for (const auto& el : *j.m_value.array)\n                {\n                    write_ubjson(el, use_count, use_type, prefix_required);\n                }\n\n                if (not use_count)\n                {\n                    oa->write_character(to_char_type(']'));\n                }\n\n                break;\n            }\n\n            case value_t::object:\n            {\n                if (add_prefix)\n                {\n                    oa->write_character(to_char_type('{'));\n                }\n\n                bool prefix_required = true;\n                if (use_type and not j.m_value.object->empty())\n                {\n                    assert(use_count);\n                    const CharType first_prefix = ubjson_prefix(j.front());\n                    const bool same_prefix = std::all_of(j.begin(), j.end(),\n                                                         [this, first_prefix](const BasicJsonType & v)\n                    {\n                        return ubjson_prefix(v) == first_prefix;\n                    });\n\n                    if (same_prefix)\n                    {\n                        prefix_required = false;\n                        oa->write_character(to_char_type('$'));\n                        oa->write_character(first_prefix);\n                    }\n                }\n\n                if (use_count)\n                {\n                    oa->write_character(to_char_type('#'));\n                    write_number_with_ubjson_prefix(j.m_value.object->size(), true);\n                }\n\n                for (const auto& el : *j.m_value.object)\n                {\n                    write_number_with_ubjson_prefix(el.first.size(), true);\n                    oa->write_characters(\n                        reinterpret_cast<const CharType*>(el.first.c_str()),\n                        el.first.size());\n                    write_ubjson(el.second, use_count, use_type, prefix_required);\n                }\n\n                if (not use_count)\n                {\n                    oa->write_character(to_char_type('}'));\n                }\n\n                break;\n            }\n\n            default:\n                break;\n        }\n    }\n\n  private:\n    //////////\n    // BSON //\n    //////////\n\n    /*!\n    @return The size of a BSON document entry header, including the id marker\n            and the entry name size (and its null-terminator).\n    */\n    static std::size_t calc_bson_entry_header_size(const string_t& name)\n    {\n        const auto it = name.find(static_cast<typename string_t::value_type>(0));\n        if (JSON_HEDLEY_UNLIKELY(it != BasicJsonType::string_t::npos))\n        {\n            JSON_THROW(out_of_range::create(409,\n                                            \"BSON key cannot contain code point U+0000 (at byte \" + std::to_string(it) + \")\"));\n        }\n\n        return /*id*/ 1ul + name.size() + /*zero-terminator*/1u;\n    }\n\n    /*!\n    @brief Writes the given @a element_type and @a name to the output adapter\n    */\n    void write_bson_entry_header(const string_t& name,\n                                 const std::uint8_t element_type)\n    {\n        oa->write_character(to_char_type(element_type)); // boolean\n        oa->write_characters(\n            reinterpret_cast<const CharType*>(name.c_str()),\n            name.size() + 1u);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and boolean value @a value\n    */\n    void write_bson_boolean(const string_t& name,\n                            const bool value)\n    {\n        write_bson_entry_header(name, 0x08);\n        oa->write_character(value ? to_char_type(0x01) : to_char_type(0x00));\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and double value @a value\n    */\n    void write_bson_double(const string_t& name,\n                           const double value)\n    {\n        write_bson_entry_header(name, 0x01);\n        write_number<double, true>(value);\n    }\n\n    /*!\n    @return The size of the BSON-encoded string in @a value\n    */\n    static std::size_t calc_bson_string_size(const string_t& value)\n    {\n        return sizeof(std::int32_t) + value.size() + 1ul;\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and string value @a value\n    */\n    void write_bson_string(const string_t& name,\n                           const string_t& value)\n    {\n        write_bson_entry_header(name, 0x02);\n\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size() + 1ul));\n        oa->write_characters(\n            reinterpret_cast<const CharType*>(value.c_str()),\n            value.size() + 1);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and null value\n    */\n    void write_bson_null(const string_t& name)\n    {\n        write_bson_entry_header(name, 0x0A);\n    }\n\n    /*!\n    @return The size of the BSON-encoded integer @a value\n    */\n    static std::size_t calc_bson_integer_size(const std::int64_t value)\n    {\n        return (std::numeric_limits<std::int32_t>::min)() <= value and value <= (std::numeric_limits<std::int32_t>::max)()\n               ? sizeof(std::int32_t)\n               : sizeof(std::int64_t);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and integer @a value\n    */\n    void write_bson_integer(const string_t& name,\n                            const std::int64_t value)\n    {\n        if ((std::numeric_limits<std::int32_t>::min)() <= value and value <= (std::numeric_limits<std::int32_t>::max)())\n        {\n            write_bson_entry_header(name, 0x10); // int32\n            write_number<std::int32_t, true>(static_cast<std::int32_t>(value));\n        }\n        else\n        {\n            write_bson_entry_header(name, 0x12); // int64\n            write_number<std::int64_t, true>(static_cast<std::int64_t>(value));\n        }\n    }\n\n    /*!\n    @return The size of the BSON-encoded unsigned integer in @a j\n    */\n    static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept\n    {\n        return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n               ? sizeof(std::int32_t)\n               : sizeof(std::int64_t);\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and unsigned @a value\n    */\n    void write_bson_unsigned(const string_t& name,\n                             const std::uint64_t value)\n    {\n        if (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n        {\n            write_bson_entry_header(name, 0x10 /* int32 */);\n            write_number<std::int32_t, true>(static_cast<std::int32_t>(value));\n        }\n        else if (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))\n        {\n            write_bson_entry_header(name, 0x12 /* int64 */);\n            write_number<std::int64_t, true>(static_cast<std::int64_t>(value));\n        }\n        else\n        {\n            JSON_THROW(out_of_range::create(407, \"integer number \" + std::to_string(value) + \" cannot be represented by BSON as it does not fit int64\"));\n        }\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and object @a value\n    */\n    void write_bson_object_entry(const string_t& name,\n                                 const typename BasicJsonType::object_t& value)\n    {\n        write_bson_entry_header(name, 0x03); // object\n        write_bson_object(value);\n    }\n\n    /*!\n    @return The size of the BSON-encoded array @a value\n    */\n    static std::size_t calc_bson_array_size(const typename BasicJsonType::array_t& value)\n    {\n        std::size_t array_index = 0ul;\n\n        const std::size_t embedded_document_size = std::accumulate(std::begin(value), std::end(value), 0ul, [&array_index](std::size_t result, const typename BasicJsonType::array_t::value_type & el)\n        {\n            return result + calc_bson_element_size(std::to_string(array_index++), el);\n        });\n\n        return sizeof(std::int32_t) + embedded_document_size + 1ul;\n    }\n\n    /*!\n    @brief Writes a BSON element with key @a name and array @a value\n    */\n    void write_bson_array(const string_t& name,\n                          const typename BasicJsonType::array_t& value)\n    {\n        write_bson_entry_header(name, 0x04); // array\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_array_size(value)));\n\n        std::size_t array_index = 0ul;\n\n        for (const auto& el : value)\n        {\n            write_bson_element(std::to_string(array_index++), el);\n        }\n\n        oa->write_character(to_char_type(0x00));\n    }\n\n    /*!\n    @brief Calculates the size necessary to serialize the JSON value @a j with its @a name\n    @return The calculated size for the BSON document entry for @a j with the given @a name.\n    */\n    static std::size_t calc_bson_element_size(const string_t& name,\n            const BasicJsonType& j)\n    {\n        const auto header_size = calc_bson_entry_header_size(name);\n        switch (j.type())\n        {\n            case value_t::object:\n                return header_size + calc_bson_object_size(*j.m_value.object);\n\n            case value_t::array:\n                return header_size + calc_bson_array_size(*j.m_value.array);\n\n            case value_t::boolean:\n                return header_size + 1ul;\n\n            case value_t::number_float:\n                return header_size + 8ul;\n\n            case value_t::number_integer:\n                return header_size + calc_bson_integer_size(j.m_value.number_integer);\n\n            case value_t::number_unsigned:\n                return header_size + calc_bson_unsigned_size(j.m_value.number_unsigned);\n\n            case value_t::string:\n                return header_size + calc_bson_string_size(*j.m_value.string);\n\n            case value_t::null:\n                return header_size + 0ul;\n\n            // LCOV_EXCL_START\n            default:\n                assert(false);\n                return 0ul;\n                // LCOV_EXCL_STOP\n        }\n    }\n\n    /*!\n    @brief Serializes the JSON value @a j to BSON and associates it with the\n           key @a name.\n    @param name The name to associate with the JSON entity @a j within the\n                current BSON document\n    @return The size of the BSON entry\n    */\n    void write_bson_element(const string_t& name,\n                            const BasicJsonType& j)\n    {\n        switch (j.type())\n        {\n            case value_t::object:\n                return write_bson_object_entry(name, *j.m_value.object);\n\n            case value_t::array:\n                return write_bson_array(name, *j.m_value.array);\n\n            case value_t::boolean:\n                return write_bson_boolean(name, j.m_value.boolean);\n\n            case value_t::number_float:\n                return write_bson_double(name, j.m_value.number_float);\n\n            case value_t::number_integer:\n                return write_bson_integer(name, j.m_value.number_integer);\n\n            case value_t::number_unsigned:\n                return write_bson_unsigned(name, j.m_value.number_unsigned);\n\n            case value_t::string:\n                return write_bson_string(name, *j.m_value.string);\n\n            case value_t::null:\n                return write_bson_null(name);\n\n            // LCOV_EXCL_START\n            default:\n                assert(false);\n                return;\n                // LCOV_EXCL_STOP\n        }\n    }\n\n    /*!\n    @brief Calculates the size of the BSON serialization of the given\n           JSON-object @a j.\n    @param[in] j  JSON value to serialize\n    @pre       j.type() == value_t::object\n    */\n    static std::size_t calc_bson_object_size(const typename BasicJsonType::object_t& value)\n    {\n        std::size_t document_size = std::accumulate(value.begin(), value.end(), 0ul,\n                                    [](size_t result, const typename BasicJsonType::object_t::value_type & el)\n        {\n            return result += calc_bson_element_size(el.first, el.second);\n        });\n\n        return sizeof(std::int32_t) + document_size + 1ul;\n    }\n\n    /*!\n    @param[in] j  JSON value to serialize\n    @pre       j.type() == value_t::object\n    */\n    void write_bson_object(const typename BasicJsonType::object_t& value)\n    {\n        write_number<std::int32_t, true>(static_cast<std::int32_t>(calc_bson_object_size(value)));\n\n        for (const auto& el : value)\n        {\n            write_bson_element(el.first, el.second);\n        }\n\n        oa->write_character(to_char_type(0x00));\n    }\n\n    //////////\n    // CBOR //\n    //////////\n\n    static constexpr CharType get_cbor_float_prefix(float /*unused*/)\n    {\n        return to_char_type(0xFA);  // Single-Precision Float\n    }\n\n    static constexpr CharType get_cbor_float_prefix(double /*unused*/)\n    {\n        return to_char_type(0xFB);  // Double-Precision Float\n    }\n\n    /////////////\n    // MsgPack //\n    /////////////\n\n    static constexpr CharType get_msgpack_float_prefix(float /*unused*/)\n    {\n        return to_char_type(0xCA);  // float 32\n    }\n\n    static constexpr CharType get_msgpack_float_prefix(double /*unused*/)\n    {\n        return to_char_type(0xCB);  // float 64\n    }\n\n    ////////////\n    // UBJSON //\n    ////////////\n\n    // UBJSON: write number (floating point)\n    template<typename NumberType, typename std::enable_if<\n                 std::is_floating_point<NumberType>::value, int>::type = 0>\n    void write_number_with_ubjson_prefix(const NumberType n,\n                                         const bool add_prefix)\n    {\n        if (add_prefix)\n        {\n            oa->write_character(get_ubjson_float_prefix(n));\n        }\n        write_number(n);\n    }\n\n    // UBJSON: write number (unsigned integer)\n    template<typename NumberType, typename std::enable_if<\n                 std::is_unsigned<NumberType>::value, int>::type = 0>\n    void write_number_with_ubjson_prefix(const NumberType n,\n                                         const bool add_prefix)\n    {\n        if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('i'));  // int8\n            }\n            write_number(static_cast<std::uint8_t>(n));\n        }\n        else if (n <= (std::numeric_limits<std::uint8_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('U'));  // uint8\n            }\n            write_number(static_cast<std::uint8_t>(n));\n        }\n        else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('I'));  // int16\n            }\n            write_number(static_cast<std::int16_t>(n));\n        }\n        else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('l'));  // int32\n            }\n            write_number(static_cast<std::int32_t>(n));\n        }\n        else if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int64_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('L'));  // int64\n            }\n            write_number(static_cast<std::int64_t>(n));\n        }\n        else\n        {\n            JSON_THROW(out_of_range::create(407, \"integer number \" + std::to_string(n) + \" cannot be represented by UBJSON as it does not fit int64\"));\n        }\n    }\n\n    // UBJSON: write number (signed integer)\n    template<typename NumberType, typename std::enable_if<\n                 std::is_signed<NumberType>::value and\n                 not std::is_floating_point<NumberType>::value, int>::type = 0>\n    void write_number_with_ubjson_prefix(const NumberType n,\n                                         const bool add_prefix)\n    {\n        if ((std::numeric_limits<std::int8_t>::min)() <= n and n <= (std::numeric_limits<std::int8_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('i'));  // int8\n            }\n            write_number(static_cast<std::int8_t>(n));\n        }\n        else if (static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::min)()) <= n and n <= static_cast<std::int64_t>((std::numeric_limits<std::uint8_t>::max)()))\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('U'));  // uint8\n            }\n            write_number(static_cast<std::uint8_t>(n));\n        }\n        else if ((std::numeric_limits<std::int16_t>::min)() <= n and n <= (std::numeric_limits<std::int16_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('I'));  // int16\n            }\n            write_number(static_cast<std::int16_t>(n));\n        }\n        else if ((std::numeric_limits<std::int32_t>::min)() <= n and n <= (std::numeric_limits<std::int32_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('l'));  // int32\n            }\n            write_number(static_cast<std::int32_t>(n));\n        }\n        else if ((std::numeric_limits<std::int64_t>::min)() <= n and n <= (std::numeric_limits<std::int64_t>::max)())\n        {\n            if (add_prefix)\n            {\n                oa->write_character(to_char_type('L'));  // int64\n            }\n            write_number(static_cast<std::int64_t>(n));\n        }\n        // LCOV_EXCL_START\n        else\n        {\n            JSON_THROW(out_of_range::create(407, \"integer number \" + std::to_string(n) + \" cannot be represented by UBJSON as it does not fit int64\"));\n        }\n        // LCOV_EXCL_STOP\n    }\n\n    /*!\n    @brief determine the type prefix of container values\n\n    @note This function does not need to be 100% accurate when it comes to\n          integer limits. In case a number exceeds the limits of int64_t,\n          this will be detected by a later call to function\n          write_number_with_ubjson_prefix. Therefore, we return 'L' for any\n          value that does not fit the previous limits.\n    */\n    CharType ubjson_prefix(const BasicJsonType& j) const noexcept\n    {\n        switch (j.type())\n        {\n            case value_t::null:\n                return 'Z';\n\n            case value_t::boolean:\n                return j.m_value.boolean ? 'T' : 'F';\n\n            case value_t::number_integer:\n            {\n                if ((std::numeric_limits<std::int8_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::int8_t>::max)())\n                {\n                    return 'i';\n                }\n                if ((std::numeric_limits<std::uint8_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::uint8_t>::max)())\n                {\n                    return 'U';\n                }\n                if ((std::numeric_limits<std::int16_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::int16_t>::max)())\n                {\n                    return 'I';\n                }\n                if ((std::numeric_limits<std::int32_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<std::int32_t>::max)())\n                {\n                    return 'l';\n                }\n                // no check and assume int64_t (see note above)\n                return 'L';\n            }\n\n            case value_t::number_unsigned:\n            {\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))\n                {\n                    return 'i';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::uint8_t>::max)()))\n                {\n                    return 'U';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int16_t>::max)()))\n                {\n                    return 'I';\n                }\n                if (j.m_value.number_unsigned <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))\n                {\n                    return 'l';\n                }\n                // no check and assume int64_t (see note above)\n                return 'L';\n            }\n\n            case value_t::number_float:\n                return get_ubjson_float_prefix(j.m_value.number_float);\n\n            case value_t::string:\n                return 'S';\n\n            case value_t::array:\n                return '[';\n\n            case value_t::object:\n                return '{';\n\n            default:  // discarded values\n                return 'N';\n        }\n    }\n\n    static constexpr CharType get_ubjson_float_prefix(float /*unused*/)\n    {\n        return 'd';  // float 32\n    }\n\n    static constexpr CharType get_ubjson_float_prefix(double /*unused*/)\n    {\n        return 'D';  // float 64\n    }\n\n    ///////////////////////\n    // Utility functions //\n    ///////////////////////\n\n    /*\n    @brief write a number to output input\n    @param[in] n number of type @a NumberType\n    @tparam NumberType the type of the number\n    @tparam OutputIsLittleEndian Set to true if output data is\n                                 required to be little endian\n\n    @note This function needs to respect the system's endianess, because bytes\n          in CBOR, MessagePack, and UBJSON are stored in network order (big\n          endian) and therefore need reordering on little endian systems.\n    */\n    template<typename NumberType, bool OutputIsLittleEndian = false>\n    void write_number(const NumberType n)\n    {\n        // step 1: write number to array of length NumberType\n        std::array<CharType, sizeof(NumberType)> vec;\n        std::memcpy(vec.data(), &n, sizeof(NumberType));\n\n        // step 2: write array to output (with possible reordering)\n        if (is_little_endian != OutputIsLittleEndian)\n        {\n            // reverse byte order prior to conversion if necessary\n            std::reverse(vec.begin(), vec.end());\n        }\n\n        oa->write_characters(vec.data(), sizeof(NumberType));\n    }\n\n  public:\n    // The following to_char_type functions are implement the conversion\n    // between uint8_t and CharType. In case CharType is not unsigned,\n    // such a conversion is required to allow values greater than 128.\n    // See <https://github.com/nlohmann/json/issues/1286> for a discussion.\n    template < typename C = CharType,\n               enable_if_t < std::is_signed<C>::value and std::is_signed<char>::value > * = nullptr >\n    static constexpr CharType to_char_type(std::uint8_t x) noexcept\n    {\n        return *reinterpret_cast<char*>(&x);\n    }\n\n    template < typename C = CharType,\n               enable_if_t < std::is_signed<C>::value and std::is_unsigned<char>::value > * = nullptr >\n    static CharType to_char_type(std::uint8_t x) noexcept\n    {\n        static_assert(sizeof(std::uint8_t) == sizeof(CharType), \"size of CharType must be equal to std::uint8_t\");\n        static_assert(std::is_pod<CharType>::value, \"CharType must be POD\");\n        CharType result;\n        std::memcpy(&result, &x, sizeof(x));\n        return result;\n    }\n\n    template<typename C = CharType,\n             enable_if_t<std::is_unsigned<C>::value>* = nullptr>\n    static constexpr CharType to_char_type(std::uint8_t x) noexcept\n    {\n        return x;\n    }\n\n    template < typename InputCharType, typename C = CharType,\n               enable_if_t <\n                   std::is_signed<C>::value and\n                   std::is_signed<char>::value and\n                   std::is_same<char, typename std::remove_cv<InputCharType>::type>::value\n                   > * = nullptr >\n    static constexpr CharType to_char_type(InputCharType x) noexcept\n    {\n        return x;\n    }\n\n  private:\n    /// whether we can assume little endianess\n    const bool is_little_endian = binary_reader<BasicJsonType>::little_endianess();\n\n    /// the output\n    output_adapter_t<CharType> oa = nullptr;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/output/output_adapters.hpp>\n\n// #include <nlohmann/detail/output/serializer.hpp>\n\n\n#include <algorithm> // reverse, remove, fill, find, none_of\n#include <array> // array\n#include <cassert> // assert\n#include <ciso646> // and, or\n#include <clocale> // localeconv, lconv\n#include <cmath> // labs, isfinite, isnan, signbit\n#include <cstddef> // size_t, ptrdiff_t\n#include <cstdint> // uint8_t\n#include <cstdio> // snprintf\n#include <limits> // numeric_limits\n#include <string> // string\n#include <type_traits> // is_same\n#include <utility> // move\n\n// #include <nlohmann/detail/conversions/to_chars.hpp>\n\n\n#include <array> // array\n#include <cassert> // assert\n#include <ciso646> // or, and, not\n#include <cmath>   // signbit, isfinite\n#include <cstdint> // intN_t, uintN_t\n#include <cstring> // memcpy, memmove\n#include <limits> // numeric_limits\n#include <type_traits> // conditional\n// #include <nlohmann/detail/macro_scope.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n\n/*!\n@brief implements the Grisu2 algorithm for binary to decimal floating-point\nconversion.\n\nThis implementation is a slightly modified version of the reference\nimplementation which may be obtained from\nhttp://florian.loitsch.com/publications (bench.tar.gz).\n\nThe code is distributed under the MIT license, Copyright (c) 2009 Florian Loitsch.\n\nFor a detailed description of the algorithm see:\n\n[1] Loitsch, \"Printing Floating-Point Numbers Quickly and Accurately with\n    Integers\", Proceedings of the ACM SIGPLAN 2010 Conference on Programming\n    Language Design and Implementation, PLDI 2010\n[2] Burger, Dybvig, \"Printing Floating-Point Numbers Quickly and Accurately\",\n    Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language\n    Design and Implementation, PLDI 1996\n*/\nnamespace dtoa_impl\n{\n\ntemplate <typename Target, typename Source>\nTarget reinterpret_bits(const Source source)\n{\n    static_assert(sizeof(Target) == sizeof(Source), \"size mismatch\");\n\n    Target target;\n    std::memcpy(&target, &source, sizeof(Source));\n    return target;\n}\n\nstruct diyfp // f * 2^e\n{\n    static constexpr int kPrecision = 64; // = q\n\n    std::uint64_t f = 0;\n    int e = 0;\n\n    constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {}\n\n    /*!\n    @brief returns x - y\n    @pre x.e == y.e and x.f >= y.f\n    */\n    static diyfp sub(const diyfp& x, const diyfp& y) noexcept\n    {\n        assert(x.e == y.e);\n        assert(x.f >= y.f);\n\n        return {x.f - y.f, x.e};\n    }\n\n    /*!\n    @brief returns x * y\n    @note The result is rounded. (Only the upper q bits are returned.)\n    */\n    static diyfp mul(const diyfp& x, const diyfp& y) noexcept\n    {\n        static_assert(kPrecision == 64, \"internal error\");\n\n        // Computes:\n        //  f = round((x.f * y.f) / 2^q)\n        //  e = x.e + y.e + q\n\n        // Emulate the 64-bit * 64-bit multiplication:\n        //\n        // p = u * v\n        //   = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi)\n        //   = (u_lo v_lo         ) + 2^32 ((u_lo v_hi         ) + (u_hi v_lo         )) + 2^64 (u_hi v_hi         )\n        //   = (p0                ) + 2^32 ((p1                ) + (p2                )) + 2^64 (p3                )\n        //   = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3                )\n        //   = (p0_lo             ) + 2^32 (p0_hi + p1_lo + p2_lo                      ) + 2^64 (p1_hi + p2_hi + p3)\n        //   = (p0_lo             ) + 2^32 (Q                                          ) + 2^64 (H                 )\n        //   = (p0_lo             ) + 2^32 (Q_lo + 2^32 Q_hi                           ) + 2^64 (H                 )\n        //\n        // (Since Q might be larger than 2^32 - 1)\n        //\n        //   = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H)\n        //\n        // (Q_hi + H does not overflow a 64-bit int)\n        //\n        //   = p_lo + 2^64 p_hi\n\n        const std::uint64_t u_lo = x.f & 0xFFFFFFFFu;\n        const std::uint64_t u_hi = x.f >> 32u;\n        const std::uint64_t v_lo = y.f & 0xFFFFFFFFu;\n        const std::uint64_t v_hi = y.f >> 32u;\n\n        const std::uint64_t p0 = u_lo * v_lo;\n        const std::uint64_t p1 = u_lo * v_hi;\n        const std::uint64_t p2 = u_hi * v_lo;\n        const std::uint64_t p3 = u_hi * v_hi;\n\n        const std::uint64_t p0_hi = p0 >> 32u;\n        const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu;\n        const std::uint64_t p1_hi = p1 >> 32u;\n        const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu;\n        const std::uint64_t p2_hi = p2 >> 32u;\n\n        std::uint64_t Q = p0_hi + p1_lo + p2_lo;\n\n        // The full product might now be computed as\n        //\n        // p_hi = p3 + p2_hi + p1_hi + (Q >> 32)\n        // p_lo = p0_lo + (Q << 32)\n        //\n        // But in this particular case here, the full p_lo is not required.\n        // Effectively we only need to add the highest bit in p_lo to p_hi (and\n        // Q_hi + 1 does not overflow).\n\n        Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up\n\n        const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u);\n\n        return {h, x.e + y.e + 64};\n    }\n\n    /*!\n    @brief normalize x such that the significand is >= 2^(q-1)\n    @pre x.f != 0\n    */\n    static diyfp normalize(diyfp x) noexcept\n    {\n        assert(x.f != 0);\n\n        while ((x.f >> 63u) == 0)\n        {\n            x.f <<= 1u;\n            x.e--;\n        }\n\n        return x;\n    }\n\n    /*!\n    @brief normalize x such that the result has the exponent E\n    @pre e >= x.e and the upper e - x.e bits of x.f must be zero.\n    */\n    static diyfp normalize_to(const diyfp& x, const int target_exponent) noexcept\n    {\n        const int delta = x.e - target_exponent;\n\n        assert(delta >= 0);\n        assert(((x.f << delta) >> delta) == x.f);\n\n        return {x.f << delta, target_exponent};\n    }\n};\n\nstruct boundaries\n{\n    diyfp w;\n    diyfp minus;\n    diyfp plus;\n};\n\n/*!\nCompute the (normalized) diyfp representing the input number 'value' and its\nboundaries.\n\n@pre value must be finite and positive\n*/\ntemplate <typename FloatType>\nboundaries compute_boundaries(FloatType value)\n{\n    assert(std::isfinite(value));\n    assert(value > 0);\n\n    // Convert the IEEE representation into a diyfp.\n    //\n    // If v is denormal:\n    //      value = 0.F * 2^(1 - bias) = (          F) * 2^(1 - bias - (p-1))\n    // If v is normalized:\n    //      value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1))\n\n    static_assert(std::numeric_limits<FloatType>::is_iec559,\n                  \"internal error: dtoa_short requires an IEEE-754 floating-point implementation\");\n\n    constexpr int      kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit)\n    constexpr int      kBias      = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1);\n    constexpr int      kMinExp    = 1 - kBias;\n    constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1)\n\n    using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type;\n\n    const std::uint64_t bits = reinterpret_bits<bits_type>(value);\n    const std::uint64_t E = bits >> (kPrecision - 1);\n    const std::uint64_t F = bits & (kHiddenBit - 1);\n\n    const bool is_denormal = E == 0;\n    const diyfp v = is_denormal\n                    ? diyfp(F, kMinExp)\n                    : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias);\n\n    // Compute the boundaries m- and m+ of the floating-point value\n    // v = f * 2^e.\n    //\n    // Determine v- and v+, the floating-point predecessor and successor if v,\n    // respectively.\n    //\n    //      v- = v - 2^e        if f != 2^(p-1) or e == e_min                (A)\n    //         = v - 2^(e-1)    if f == 2^(p-1) and e > e_min                (B)\n    //\n    //      v+ = v + 2^e\n    //\n    // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_\n    // between m- and m+ round to v, regardless of how the input rounding\n    // algorithm breaks ties.\n    //\n    //      ---+-------------+-------------+-------------+-------------+---  (A)\n    //         v-            m-            v             m+            v+\n    //\n    //      -----------------+------+------+-------------+-------------+---  (B)\n    //                       v-     m-     v             m+            v+\n\n    const bool lower_boundary_is_closer = F == 0 and E > 1;\n    const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1);\n    const diyfp m_minus = lower_boundary_is_closer\n                          ? diyfp(4 * v.f - 1, v.e - 2)  // (B)\n                          : diyfp(2 * v.f - 1, v.e - 1); // (A)\n\n    // Determine the normalized w+ = m+.\n    const diyfp w_plus = diyfp::normalize(m_plus);\n\n    // Determine w- = m- such that e_(w-) = e_(w+).\n    const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e);\n\n    return {diyfp::normalize(v), w_minus, w_plus};\n}\n\n// Given normalized diyfp w, Grisu needs to find a (normalized) cached\n// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies\n// within a certain range [alpha, gamma] (Definition 3.2 from [1])\n//\n//      alpha <= e = e_c + e_w + q <= gamma\n//\n// or\n//\n//      f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q\n//                          <= f_c * f_w * 2^gamma\n//\n// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies\n//\n//      2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma\n//\n// or\n//\n//      2^(q - 2 + alpha) <= c * w < 2^(q + gamma)\n//\n// The choice of (alpha,gamma) determines the size of the table and the form of\n// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well\n// in practice:\n//\n// The idea is to cut the number c * w = f * 2^e into two parts, which can be\n// processed independently: An integral part p1, and a fractional part p2:\n//\n//      f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e\n//              = (f div 2^-e) + (f mod 2^-e) * 2^e\n//              = p1 + p2 * 2^e\n//\n// The conversion of p1 into decimal form requires a series of divisions and\n// modulos by (a power of) 10. These operations are faster for 32-bit than for\n// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be\n// achieved by choosing\n//\n//      -e >= 32   or   e <= -32 := gamma\n//\n// In order to convert the fractional part\n//\n//      p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ...\n//\n// into decimal form, the fraction is repeatedly multiplied by 10 and the digits\n// d[-i] are extracted in order:\n//\n//      (10 * p2) div 2^-e = d[-1]\n//      (10 * p2) mod 2^-e = d[-2] / 10^1 + ...\n//\n// The multiplication by 10 must not overflow. It is sufficient to choose\n//\n//      10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64.\n//\n// Since p2 = f mod 2^-e < 2^-e,\n//\n//      -e <= 60   or   e >= -60 := alpha\n\nconstexpr int kAlpha = -60;\nconstexpr int kGamma = -32;\n\nstruct cached_power // c = f * 2^e ~= 10^k\n{\n    std::uint64_t f;\n    int e;\n    int k;\n};\n\n/*!\nFor a normalized diyfp w = f * 2^e, this function returns a (normalized) cached\npower-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c\nsatisfies (Definition 3.2 from [1])\n\n     alpha <= e_c + e + q <= gamma.\n*/\ninline cached_power get_cached_power_for_binary_exponent(int e)\n{\n    // Now\n    //\n    //      alpha <= e_c + e + q <= gamma                                    (1)\n    //      ==> f_c * 2^alpha <= c * 2^e * 2^q\n    //\n    // and since the c's are normalized, 2^(q-1) <= f_c,\n    //\n    //      ==> 2^(q - 1 + alpha) <= c * 2^(e + q)\n    //      ==> 2^(alpha - e - 1) <= c\n    //\n    // If c were an exact power of ten, i.e. c = 10^k, one may determine k as\n    //\n    //      k = ceil( log_10( 2^(alpha - e - 1) ) )\n    //        = ceil( (alpha - e - 1) * log_10(2) )\n    //\n    // From the paper:\n    // \"In theory the result of the procedure could be wrong since c is rounded,\n    //  and the computation itself is approximated [...]. In practice, however,\n    //  this simple function is sufficient.\"\n    //\n    // For IEEE double precision floating-point numbers converted into\n    // normalized diyfp's w = f * 2^e, with q = 64,\n    //\n    //      e >= -1022      (min IEEE exponent)\n    //           -52        (p - 1)\n    //           -52        (p - 1, possibly normalize denormal IEEE numbers)\n    //           -11        (normalize the diyfp)\n    //         = -1137\n    //\n    // and\n    //\n    //      e <= +1023      (max IEEE exponent)\n    //           -52        (p - 1)\n    //           -11        (normalize the diyfp)\n    //         = 960\n    //\n    // This binary exponent range [-1137,960] results in a decimal exponent\n    // range [-307,324]. One does not need to store a cached power for each\n    // k in this range. For each such k it suffices to find a cached power\n    // such that the exponent of the product lies in [alpha,gamma].\n    // This implies that the difference of the decimal exponents of adjacent\n    // table entries must be less than or equal to\n    //\n    //      floor( (gamma - alpha) * log_10(2) ) = 8.\n    //\n    // (A smaller distance gamma-alpha would require a larger table.)\n\n    // NB:\n    // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.\n\n    constexpr int kCachedPowersMinDecExp = -300;\n    constexpr int kCachedPowersDecStep = 8;\n\n    static constexpr std::array<cached_power, 79> kCachedPowers =\n    {\n        {\n            { 0xAB70FE17C79AC6CA, -1060, -300 },\n            { 0xFF77B1FCBEBCDC4F, -1034, -292 },\n            { 0xBE5691EF416BD60C, -1007, -284 },\n            { 0x8DD01FAD907FFC3C,  -980, -276 },\n            { 0xD3515C2831559A83,  -954, -268 },\n            { 0x9D71AC8FADA6C9B5,  -927, -260 },\n            { 0xEA9C227723EE8BCB,  -901, -252 },\n            { 0xAECC49914078536D,  -874, -244 },\n            { 0x823C12795DB6CE57,  -847, -236 },\n            { 0xC21094364DFB5637,  -821, -228 },\n            { 0x9096EA6F3848984F,  -794, -220 },\n            { 0xD77485CB25823AC7,  -768, -212 },\n            { 0xA086CFCD97BF97F4,  -741, -204 },\n            { 0xEF340A98172AACE5,  -715, -196 },\n            { 0xB23867FB2A35B28E,  -688, -188 },\n            { 0x84C8D4DFD2C63F3B,  -661, -180 },\n            { 0xC5DD44271AD3CDBA,  -635, -172 },\n            { 0x936B9FCEBB25C996,  -608, -164 },\n            { 0xDBAC6C247D62A584,  -582, -156 },\n            { 0xA3AB66580D5FDAF6,  -555, -148 },\n            { 0xF3E2F893DEC3F126,  -529, -140 },\n            { 0xB5B5ADA8AAFF80B8,  -502, -132 },\n            { 0x87625F056C7C4A8B,  -475, -124 },\n            { 0xC9BCFF6034C13053,  -449, -116 },\n            { 0x964E858C91BA2655,  -422, -108 },\n            { 0xDFF9772470297EBD,  -396, -100 },\n            { 0xA6DFBD9FB8E5B88F,  -369,  -92 },\n            { 0xF8A95FCF88747D94,  -343,  -84 },\n            { 0xB94470938FA89BCF,  -316,  -76 },\n            { 0x8A08F0F8BF0F156B,  -289,  -68 },\n            { 0xCDB02555653131B6,  -263,  -60 },\n            { 0x993FE2C6D07B7FAC,  -236,  -52 },\n            { 0xE45C10C42A2B3B06,  -210,  -44 },\n            { 0xAA242499697392D3,  -183,  -36 },\n            { 0xFD87B5F28300CA0E,  -157,  -28 },\n            { 0xBCE5086492111AEB,  -130,  -20 },\n            { 0x8CBCCC096F5088CC,  -103,  -12 },\n            { 0xD1B71758E219652C,   -77,   -4 },\n            { 0x9C40000000000000,   -50,    4 },\n            { 0xE8D4A51000000000,   -24,   12 },\n            { 0xAD78EBC5AC620000,     3,   20 },\n            { 0x813F3978F8940984,    30,   28 },\n            { 0xC097CE7BC90715B3,    56,   36 },\n            { 0x8F7E32CE7BEA5C70,    83,   44 },\n            { 0xD5D238A4ABE98068,   109,   52 },\n            { 0x9F4F2726179A2245,   136,   60 },\n            { 0xED63A231D4C4FB27,   162,   68 },\n            { 0xB0DE65388CC8ADA8,   189,   76 },\n            { 0x83C7088E1AAB65DB,   216,   84 },\n            { 0xC45D1DF942711D9A,   242,   92 },\n            { 0x924D692CA61BE758,   269,  100 },\n            { 0xDA01EE641A708DEA,   295,  108 },\n            { 0xA26DA3999AEF774A,   322,  116 },\n            { 0xF209787BB47D6B85,   348,  124 },\n            { 0xB454E4A179DD1877,   375,  132 },\n            { 0x865B86925B9BC5C2,   402,  140 },\n            { 0xC83553C5C8965D3D,   428,  148 },\n            { 0x952AB45CFA97A0B3,   455,  156 },\n            { 0xDE469FBD99A05FE3,   481,  164 },\n            { 0xA59BC234DB398C25,   508,  172 },\n            { 0xF6C69A72A3989F5C,   534,  180 },\n            { 0xB7DCBF5354E9BECE,   561,  188 },\n            { 0x88FCF317F22241E2,   588,  196 },\n            { 0xCC20CE9BD35C78A5,   614,  204 },\n            { 0x98165AF37B2153DF,   641,  212 },\n            { 0xE2A0B5DC971F303A,   667,  220 },\n            { 0xA8D9D1535CE3B396,   694,  228 },\n            { 0xFB9B7CD9A4A7443C,   720,  236 },\n            { 0xBB764C4CA7A44410,   747,  244 },\n            { 0x8BAB8EEFB6409C1A,   774,  252 },\n            { 0xD01FEF10A657842C,   800,  260 },\n            { 0x9B10A4E5E9913129,   827,  268 },\n            { 0xE7109BFBA19C0C9D,   853,  276 },\n            { 0xAC2820D9623BF429,   880,  284 },\n            { 0x80444B5E7AA7CF85,   907,  292 },\n            { 0xBF21E44003ACDD2D,   933,  300 },\n            { 0x8E679C2F5E44FF8F,   960,  308 },\n            { 0xD433179D9C8CB841,   986,  316 },\n            { 0x9E19DB92B4E31BA9,  1013,  324 },\n        }\n    };\n\n    // This computation gives exactly the same results for k as\n    //      k = ceil((kAlpha - e - 1) * 0.30102999566398114)\n    // for |e| <= 1500, but doesn't require floating-point operations.\n    // NB: log_10(2) ~= 78913 / 2^18\n    assert(e >= -1500);\n    assert(e <=  1500);\n    const int f = kAlpha - e - 1;\n    const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);\n\n    const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;\n    assert(index >= 0);\n    assert(static_cast<std::size_t>(index) < kCachedPowers.size());\n\n    const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];\n    assert(kAlpha <= cached.e + e + 64);\n    assert(kGamma >= cached.e + e + 64);\n\n    return cached;\n}\n\n/*!\nFor n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k.\nFor n == 0, returns 1 and sets pow10 := 1.\n*/\ninline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10)\n{\n    // LCOV_EXCL_START\n    if (n >= 1000000000)\n    {\n        pow10 = 1000000000;\n        return 10;\n    }\n    // LCOV_EXCL_STOP\n    else if (n >= 100000000)\n    {\n        pow10 = 100000000;\n        return  9;\n    }\n    else if (n >= 10000000)\n    {\n        pow10 = 10000000;\n        return  8;\n    }\n    else if (n >= 1000000)\n    {\n        pow10 = 1000000;\n        return  7;\n    }\n    else if (n >= 100000)\n    {\n        pow10 = 100000;\n        return  6;\n    }\n    else if (n >= 10000)\n    {\n        pow10 = 10000;\n        return  5;\n    }\n    else if (n >= 1000)\n    {\n        pow10 = 1000;\n        return  4;\n    }\n    else if (n >= 100)\n    {\n        pow10 = 100;\n        return  3;\n    }\n    else if (n >= 10)\n    {\n        pow10 = 10;\n        return  2;\n    }\n    else\n    {\n        pow10 = 1;\n        return 1;\n    }\n}\n\ninline void grisu2_round(char* buf, int len, std::uint64_t dist, std::uint64_t delta,\n                         std::uint64_t rest, std::uint64_t ten_k)\n{\n    assert(len >= 1);\n    assert(dist <= delta);\n    assert(rest <= delta);\n    assert(ten_k > 0);\n\n    //               <--------------------------- delta ---->\n    //                                  <---- dist --------->\n    // --------------[------------------+-------------------]--------------\n    //               M-                 w                   M+\n    //\n    //                                  ten_k\n    //                                <------>\n    //                                       <---- rest ---->\n    // --------------[------------------+----+--------------]--------------\n    //                                  w    V\n    //                                       = buf * 10^k\n    //\n    // ten_k represents a unit-in-the-last-place in the decimal representation\n    // stored in buf.\n    // Decrement buf by ten_k while this takes buf closer to w.\n\n    // The tests are written in this order to avoid overflow in unsigned\n    // integer arithmetic.\n\n    while (rest < dist\n            and delta - rest >= ten_k\n            and (rest + ten_k < dist or dist - rest > rest + ten_k - dist))\n    {\n        assert(buf[len - 1] != '0');\n        buf[len - 1]--;\n        rest += ten_k;\n    }\n}\n\n/*!\nGenerates V = buffer * 10^decimal_exponent, such that M- <= V <= M+.\nM- and M+ must be normalized and share the same exponent -60 <= e <= -32.\n*/\ninline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent,\n                             diyfp M_minus, diyfp w, diyfp M_plus)\n{\n    static_assert(kAlpha >= -60, \"internal error\");\n    static_assert(kGamma <= -32, \"internal error\");\n\n    // Generates the digits (and the exponent) of a decimal floating-point\n    // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's\n    // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma.\n    //\n    //               <--------------------------- delta ---->\n    //                                  <---- dist --------->\n    // --------------[------------------+-------------------]--------------\n    //               M-                 w                   M+\n    //\n    // Grisu2 generates the digits of M+ from left to right and stops as soon as\n    // V is in [M-,M+].\n\n    assert(M_plus.e >= kAlpha);\n    assert(M_plus.e <= kGamma);\n\n    std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e)\n    std::uint64_t dist  = diyfp::sub(M_plus, w      ).f; // (significand of (M+ - w ), implicit exponent is e)\n\n    // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0):\n    //\n    //      M+ = f * 2^e\n    //         = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e\n    //         = ((p1        ) * 2^-e + (p2        )) * 2^e\n    //         = p1 + p2 * 2^e\n\n    const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e);\n\n    auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.)\n    std::uint64_t p2 = M_plus.f & (one.f - 1);                    // p2 = f mod 2^-e\n\n    // 1)\n    //\n    // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0]\n\n    assert(p1 > 0);\n\n    std::uint32_t pow10;\n    const int k = find_largest_pow10(p1, pow10);\n\n    //      10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1)\n    //\n    //      p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1))\n    //         = (d[k-1]         ) * 10^(k-1) + (p1 mod 10^(k-1))\n    //\n    //      M+ = p1                                             + p2 * 2^e\n    //         = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1))          + p2 * 2^e\n    //         = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e\n    //         = d[k-1] * 10^(k-1) + (                         rest) * 2^e\n    //\n    // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0)\n    //\n    //      p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0]\n    //\n    // but stop as soon as\n    //\n    //      rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e\n\n    int n = k;\n    while (n > 0)\n    {\n        // Invariants:\n        //      M+ = buffer * 10^n + (p1 + p2 * 2^e)    (buffer = 0 for n = k)\n        //      pow10 = 10^(n-1) <= p1 < 10^n\n        //\n        const std::uint32_t d = p1 / pow10;  // d = p1 div 10^(n-1)\n        const std::uint32_t r = p1 % pow10;  // r = p1 mod 10^(n-1)\n        //\n        //      M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e\n        //         = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e)\n        //\n        assert(d <= 9);\n        buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d\n        //\n        //      M+ = buffer * 10^(n-1) + (r + p2 * 2^e)\n        //\n        p1 = r;\n        n--;\n        //\n        //      M+ = buffer * 10^n + (p1 + p2 * 2^e)\n        //      pow10 = 10^n\n        //\n\n        // Now check if enough digits have been generated.\n        // Compute\n        //\n        //      p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e\n        //\n        // Note:\n        // Since rest and delta share the same exponent e, it suffices to\n        // compare the significands.\n        const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2;\n        if (rest <= delta)\n        {\n            // V = buffer * 10^n, with M- <= V <= M+.\n\n            decimal_exponent += n;\n\n            // We may now just stop. But instead look if the buffer could be\n            // decremented to bring V closer to w.\n            //\n            // pow10 = 10^n is now 1 ulp in the decimal representation V.\n            // The rounding procedure works with diyfp's with an implicit\n            // exponent of e.\n            //\n            //      10^n = (10^n * 2^-e) * 2^e = ulp * 2^e\n            //\n            const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e;\n            grisu2_round(buffer, length, dist, delta, rest, ten_n);\n\n            return;\n        }\n\n        pow10 /= 10;\n        //\n        //      pow10 = 10^(n-1) <= p1 < 10^n\n        // Invariants restored.\n    }\n\n    // 2)\n    //\n    // The digits of the integral part have been generated:\n    //\n    //      M+ = d[k-1]...d[1]d[0] + p2 * 2^e\n    //         = buffer            + p2 * 2^e\n    //\n    // Now generate the digits of the fractional part p2 * 2^e.\n    //\n    // Note:\n    // No decimal point is generated: the exponent is adjusted instead.\n    //\n    // p2 actually represents the fraction\n    //\n    //      p2 * 2^e\n    //          = p2 / 2^-e\n    //          = d[-1] / 10^1 + d[-2] / 10^2 + ...\n    //\n    // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...)\n    //\n    //      p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m\n    //                      + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...)\n    //\n    // using\n    //\n    //      10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e)\n    //                = (                   d) * 2^-e + (                   r)\n    //\n    // or\n    //      10^m * p2 * 2^e = d + r * 2^e\n    //\n    // i.e.\n    //\n    //      M+ = buffer + p2 * 2^e\n    //         = buffer + 10^-m * (d + r * 2^e)\n    //         = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e\n    //\n    // and stop as soon as 10^-m * r * 2^e <= delta * 2^e\n\n    assert(p2 > delta);\n\n    int m = 0;\n    for (;;)\n    {\n        // Invariant:\n        //      M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e\n        //         = buffer * 10^-m + 10^-m * (p2                                 ) * 2^e\n        //         = buffer * 10^-m + 10^-m * (1/10 * (10 * p2)                   ) * 2^e\n        //         = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e\n        //\n        assert(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10);\n        p2 *= 10;\n        const std::uint64_t d = p2 >> -one.e;     // d = (10 * p2) div 2^-e\n        const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e\n        //\n        //      M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e\n        //         = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e))\n        //         = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e\n        //\n        assert(d <= 9);\n        buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d\n        //\n        //      M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e\n        //\n        p2 = r;\n        m++;\n        //\n        //      M+ = buffer * 10^-m + 10^-m * p2 * 2^e\n        // Invariant restored.\n\n        // Check if enough digits have been generated.\n        //\n        //      10^-m * p2 * 2^e <= delta * 2^e\n        //              p2 * 2^e <= 10^m * delta * 2^e\n        //                    p2 <= 10^m * delta\n        delta *= 10;\n        dist  *= 10;\n        if (p2 <= delta)\n        {\n            break;\n        }\n    }\n\n    // V = buffer * 10^-m, with M- <= V <= M+.\n\n    decimal_exponent -= m;\n\n    // 1 ulp in the decimal representation is now 10^-m.\n    // Since delta and dist are now scaled by 10^m, we need to do the\n    // same with ulp in order to keep the units in sync.\n    //\n    //      10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e\n    //\n    const std::uint64_t ten_m = one.f;\n    grisu2_round(buffer, length, dist, delta, p2, ten_m);\n\n    // By construction this algorithm generates the shortest possible decimal\n    // number (Loitsch, Theorem 6.2) which rounds back to w.\n    // For an input number of precision p, at least\n    //\n    //      N = 1 + ceil(p * log_10(2))\n    //\n    // decimal digits are sufficient to identify all binary floating-point\n    // numbers (Matula, \"In-and-Out conversions\").\n    // This implies that the algorithm does not produce more than N decimal\n    // digits.\n    //\n    //      N = 17 for p = 53 (IEEE double precision)\n    //      N = 9  for p = 24 (IEEE single precision)\n}\n\n/*!\nv = buf * 10^decimal_exponent\nlen is the length of the buffer (number of decimal digits)\nThe buffer must be large enough, i.e. >= max_digits10.\n*/\nJSON_HEDLEY_NON_NULL(1)\ninline void grisu2(char* buf, int& len, int& decimal_exponent,\n                   diyfp m_minus, diyfp v, diyfp m_plus)\n{\n    assert(m_plus.e == m_minus.e);\n    assert(m_plus.e == v.e);\n\n    //  --------(-----------------------+-----------------------)--------    (A)\n    //          m-                      v                       m+\n    //\n    //  --------------------(-----------+-----------------------)--------    (B)\n    //                      m-          v                       m+\n    //\n    // First scale v (and m- and m+) such that the exponent is in the range\n    // [alpha, gamma].\n\n    const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e);\n\n    const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k\n\n    // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma]\n    const diyfp w       = diyfp::mul(v,       c_minus_k);\n    const diyfp w_minus = diyfp::mul(m_minus, c_minus_k);\n    const diyfp w_plus  = diyfp::mul(m_plus,  c_minus_k);\n\n    //  ----(---+---)---------------(---+---)---------------(---+---)----\n    //          w-                      w                       w+\n    //          = c*m-                  = c*v                   = c*m+\n    //\n    // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and\n    // w+ are now off by a small amount.\n    // In fact:\n    //\n    //      w - v * 10^k < 1 ulp\n    //\n    // To account for this inaccuracy, add resp. subtract 1 ulp.\n    //\n    //  --------+---[---------------(---+---)---------------]---+--------\n    //          w-  M-                  w                   M+  w+\n    //\n    // Now any number in [M-, M+] (bounds included) will round to w when input,\n    // regardless of how the input rounding algorithm breaks ties.\n    //\n    // And digit_gen generates the shortest possible such number in [M-, M+].\n    // Note that this does not mean that Grisu2 always generates the shortest\n    // possible number in the interval (m-, m+).\n    const diyfp M_minus(w_minus.f + 1, w_minus.e);\n    const diyfp M_plus (w_plus.f  - 1, w_plus.e );\n\n    decimal_exponent = -cached.k; // = -(-k) = k\n\n    grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus);\n}\n\n/*!\nv = buf * 10^decimal_exponent\nlen is the length of the buffer (number of decimal digits)\nThe buffer must be large enough, i.e. >= max_digits10.\n*/\ntemplate <typename FloatType>\nJSON_HEDLEY_NON_NULL(1)\nvoid grisu2(char* buf, int& len, int& decimal_exponent, FloatType value)\n{\n    static_assert(diyfp::kPrecision >= std::numeric_limits<FloatType>::digits + 3,\n                  \"internal error: not enough precision\");\n\n    assert(std::isfinite(value));\n    assert(value > 0);\n\n    // If the neighbors (and boundaries) of 'value' are always computed for double-precision\n    // numbers, all float's can be recovered using strtod (and strtof). However, the resulting\n    // decimal representations are not exactly \"short\".\n    //\n    // The documentation for 'std::to_chars' (https://en.cppreference.com/w/cpp/utility/to_chars)\n    // says \"value is converted to a string as if by std::sprintf in the default (\"C\") locale\"\n    // and since sprintf promotes float's to double's, I think this is exactly what 'std::to_chars'\n    // does.\n    // On the other hand, the documentation for 'std::to_chars' requires that \"parsing the\n    // representation using the corresponding std::from_chars function recovers value exactly\". That\n    // indicates that single precision floating-point numbers should be recovered using\n    // 'std::strtof'.\n    //\n    // NB: If the neighbors are computed for single-precision numbers, there is a single float\n    //     (7.0385307e-26f) which can't be recovered using strtod. The resulting double precision\n    //     value is off by 1 ulp.\n#if 0\n    const boundaries w = compute_boundaries(static_cast<double>(value));\n#else\n    const boundaries w = compute_boundaries(value);\n#endif\n\n    grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus);\n}\n\n/*!\n@brief appends a decimal representation of e to buf\n@return a pointer to the element following the exponent.\n@pre -1000 < e < 1000\n*/\nJSON_HEDLEY_NON_NULL(1)\nJSON_HEDLEY_RETURNS_NON_NULL\ninline char* append_exponent(char* buf, int e)\n{\n    assert(e > -1000);\n    assert(e <  1000);\n\n    if (e < 0)\n    {\n        e = -e;\n        *buf++ = '-';\n    }\n    else\n    {\n        *buf++ = '+';\n    }\n\n    auto k = static_cast<std::uint32_t>(e);\n    if (k < 10)\n    {\n        // Always print at least two digits in the exponent.\n        // This is for compatibility with printf(\"%g\").\n        *buf++ = '0';\n        *buf++ = static_cast<char>('0' + k);\n    }\n    else if (k < 100)\n    {\n        *buf++ = static_cast<char>('0' + k / 10);\n        k %= 10;\n        *buf++ = static_cast<char>('0' + k);\n    }\n    else\n    {\n        *buf++ = static_cast<char>('0' + k / 100);\n        k %= 100;\n        *buf++ = static_cast<char>('0' + k / 10);\n        k %= 10;\n        *buf++ = static_cast<char>('0' + k);\n    }\n\n    return buf;\n}\n\n/*!\n@brief prettify v = buf * 10^decimal_exponent\n\nIf v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point\nnotation. Otherwise it will be printed in exponential notation.\n\n@pre min_exp < 0\n@pre max_exp > 0\n*/\nJSON_HEDLEY_NON_NULL(1)\nJSON_HEDLEY_RETURNS_NON_NULL\ninline char* format_buffer(char* buf, int len, int decimal_exponent,\n                           int min_exp, int max_exp)\n{\n    assert(min_exp < 0);\n    assert(max_exp > 0);\n\n    const int k = len;\n    const int n = len + decimal_exponent;\n\n    // v = buf * 10^(n-k)\n    // k is the length of the buffer (number of decimal digits)\n    // n is the position of the decimal point relative to the start of the buffer.\n\n    if (k <= n and n <= max_exp)\n    {\n        // digits[000]\n        // len <= max_exp + 2\n\n        std::memset(buf + k, '0', static_cast<size_t>(n - k));\n        // Make it look like a floating-point number (#362, #378)\n        buf[n + 0] = '.';\n        buf[n + 1] = '0';\n        return buf + (n + 2);\n    }\n\n    if (0 < n and n <= max_exp)\n    {\n        // dig.its\n        // len <= max_digits10 + 1\n\n        assert(k > n);\n\n        std::memmove(buf + (n + 1), buf + n, static_cast<size_t>(k - n));\n        buf[n] = '.';\n        return buf + (k + 1);\n    }\n\n    if (min_exp < n and n <= 0)\n    {\n        // 0.[000]digits\n        // len <= 2 + (-min_exp - 1) + max_digits10\n\n        std::memmove(buf + (2 + -n), buf, static_cast<size_t>(k));\n        buf[0] = '0';\n        buf[1] = '.';\n        std::memset(buf + 2, '0', static_cast<size_t>(-n));\n        return buf + (2 + (-n) + k);\n    }\n\n    if (k == 1)\n    {\n        // dE+123\n        // len <= 1 + 5\n\n        buf += 1;\n    }\n    else\n    {\n        // d.igitsE+123\n        // len <= max_digits10 + 1 + 5\n\n        std::memmove(buf + 2, buf + 1, static_cast<size_t>(k - 1));\n        buf[1] = '.';\n        buf += 1 + k;\n    }\n\n    *buf++ = 'e';\n    return append_exponent(buf, n - 1);\n}\n\n} // namespace dtoa_impl\n\n/*!\n@brief generates a decimal representation of the floating-point number value in [first, last).\n\nThe format of the resulting decimal representation is similar to printf's %g\nformat. Returns an iterator pointing past-the-end of the decimal representation.\n\n@note The input number must be finite, i.e. NaN's and Inf's are not supported.\n@note The buffer must be large enough.\n@note The result is NOT null-terminated.\n*/\ntemplate <typename FloatType>\nJSON_HEDLEY_NON_NULL(1, 2)\nJSON_HEDLEY_RETURNS_NON_NULL\nchar* to_chars(char* first, const char* last, FloatType value)\n{\n    static_cast<void>(last); // maybe unused - fix warning\n    assert(std::isfinite(value));\n\n    // Use signbit(value) instead of (value < 0) since signbit works for -0.\n    if (std::signbit(value))\n    {\n        value = -value;\n        *first++ = '-';\n    }\n\n    if (value == 0) // +-0\n    {\n        *first++ = '0';\n        // Make it look like a floating-point number (#362, #378)\n        *first++ = '.';\n        *first++ = '0';\n        return first;\n    }\n\n    assert(last - first >= std::numeric_limits<FloatType>::max_digits10);\n\n    // Compute v = buffer * 10^decimal_exponent.\n    // The decimal digits are stored in the buffer, which needs to be interpreted\n    // as an unsigned decimal integer.\n    // len is the length of the buffer, i.e. the number of decimal digits.\n    int len = 0;\n    int decimal_exponent = 0;\n    dtoa_impl::grisu2(first, len, decimal_exponent, value);\n\n    assert(len <= std::numeric_limits<FloatType>::max_digits10);\n\n    // Format the buffer like printf(\"%.*g\", prec, value)\n    constexpr int kMinExp = -4;\n    // Use digits10 here to increase compatibility with version 2.\n    constexpr int kMaxExp = std::numeric_limits<FloatType>::digits10;\n\n    assert(last - first >= kMaxExp + 2);\n    assert(last - first >= 2 + (-kMinExp - 1) + std::numeric_limits<FloatType>::max_digits10);\n    assert(last - first >= std::numeric_limits<FloatType>::max_digits10 + 6);\n\n    return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, kMaxExp);\n}\n\n} // namespace detail\n} // namespace nlohmann\n\n// #include <nlohmann/detail/exceptions.hpp>\n\n// #include <nlohmann/detail/macro_scope.hpp>\n\n// #include <nlohmann/detail/meta/cpp_future.hpp>\n\n// #include <nlohmann/detail/output/binary_writer.hpp>\n\n// #include <nlohmann/detail/output/output_adapters.hpp>\n\n// #include <nlohmann/detail/value_t.hpp>\n\n\nnamespace nlohmann\n{\nnamespace detail\n{\n///////////////////\n// serialization //\n///////////////////\n\n/// how to treat decoding errors\nenum class error_handler_t\n{\n    strict,  ///< throw a type_error exception in case of invalid UTF-8\n    replace, ///< replace invalid UTF-8 sequences with U+FFFD\n    ignore   ///< ignore invalid UTF-8 sequences\n};\n\ntemplate<typename BasicJsonType>\nclass serializer\n{\n    using string_t = typename BasicJsonType::string_t;\n    using number_float_t = typename BasicJsonType::number_float_t;\n    using number_integer_t = typename BasicJsonType::number_integer_t;\n    using number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n    static constexpr std::uint8_t UTF8_ACCEPT = 0;\n    static constexpr std::uint8_t UTF8_REJECT = 1;\n\n  public:\n    /*!\n    @param[in] s  output stream to serialize to\n    @param[in] ichar  indentation character to use\n    @param[in] error_handler_  how to react on decoding errors\n    */\n    serializer(output_adapter_t<char> s, const char ichar,\n               error_handler_t error_handler_ = error_handler_t::strict)\n        : o(std::move(s))\n        , loc(std::localeconv())\n        , thousands_sep(loc->thousands_sep == nullptr ? '\\0' : * (loc->thousands_sep))\n        , decimal_point(loc->decimal_point == nullptr ? '\\0' : * (loc->decimal_point))\n        , indent_char(ichar)\n        , indent_string(512, indent_char)\n        , error_handler(error_handler_)\n    {}\n\n    // delete because of pointer members\n    serializer(const serializer&) = delete;\n    serializer& operator=(const serializer&) = delete;\n    serializer(serializer&&) = delete;\n    serializer& operator=(serializer&&) = delete;\n    ~serializer() = default;\n\n    /*!\n    @brief internal implementation of the serialization function\n\n    This function is called by the public member function dump and organizes\n    the serialization internally. The indentation level is propagated as\n    additional parameter. In case of arrays and objects, the function is\n    called recursively.\n\n    - strings and object keys are escaped using `escape_string()`\n    - integer numbers are converted implicitly via `operator<<`\n    - floating-point numbers are converted to a string using `\"%g\"` format\n\n    @param[in] val             value to serialize\n    @param[in] pretty_print    whether the output shall be pretty-printed\n    @param[in] indent_step     the indent level\n    @param[in] current_indent  the current indent level (only used internally)\n    */\n    void dump(const BasicJsonType& val, const bool pretty_print,\n              const bool ensure_ascii,\n              const unsigned int indent_step,\n              const unsigned int current_indent = 0)\n    {\n        switch (val.m_type)\n        {\n            case value_t::object:\n            {\n                if (val.m_value.object->empty())\n                {\n                    o->write_characters(\"{}\", 2);\n                    return;\n                }\n\n                if (pretty_print)\n                {\n                    o->write_characters(\"{\\n\", 2);\n\n                    // variable to hold indentation for recursive calls\n                    const auto new_indent = current_indent + indent_step;\n                    if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))\n                    {\n                        indent_string.resize(indent_string.size() * 2, ' ');\n                    }\n\n                    // first n-1 elements\n                    auto i = val.m_value.object->cbegin();\n                    for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i)\n                    {\n                        o->write_characters(indent_string.c_str(), new_indent);\n                        o->write_character('\\\"');\n                        dump_escaped(i->first, ensure_ascii);\n                        o->write_characters(\"\\\": \", 3);\n                        dump(i->second, true, ensure_ascii, indent_step, new_indent);\n                        o->write_characters(\",\\n\", 2);\n                    }\n\n                    // last element\n                    assert(i != val.m_value.object->cend());\n                    assert(std::next(i) == val.m_value.object->cend());\n                    o->write_characters(indent_string.c_str(), new_indent);\n                    o->write_character('\\\"');\n                    dump_escaped(i->first, ensure_ascii);\n                    o->write_characters(\"\\\": \", 3);\n                    dump(i->second, true, ensure_ascii, indent_step, new_indent);\n\n                    o->write_character('\\n');\n                    o->write_characters(indent_string.c_str(), current_indent);\n                    o->write_character('}');\n                }\n                else\n                {\n                    o->write_character('{');\n\n                    // first n-1 elements\n                    auto i = val.m_value.object->cbegin();\n                    for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i)\n                    {\n                        o->write_character('\\\"');\n                        dump_escaped(i->first, ensure_ascii);\n                        o->write_characters(\"\\\":\", 2);\n                        dump(i->second, false, ensure_ascii, indent_step, current_indent);\n                        o->write_character(',');\n                    }\n\n                    // last element\n                    assert(i != val.m_value.object->cend());\n                    assert(std::next(i) == val.m_value.object->cend());\n                    o->write_character('\\\"');\n                    dump_escaped(i->first, ensure_ascii);\n                    o->write_characters(\"\\\":\", 2);\n                    dump(i->second, false, ensure_ascii, indent_step, current_indent);\n\n                    o->write_character('}');\n                }\n\n                return;\n            }\n\n            case value_t::array:\n            {\n                if (val.m_value.array->empty())\n                {\n                    o->write_characters(\"[]\", 2);\n                    return;\n                }\n\n                if (pretty_print)\n                {\n                    o->write_characters(\"[\\n\", 2);\n\n                    // variable to hold indentation for recursive calls\n                    const auto new_indent = current_indent + indent_step;\n                    if (JSON_HEDLEY_UNLIKELY(indent_string.size() < new_indent))\n                    {\n                        indent_string.resize(indent_string.size() * 2, ' ');\n                    }\n\n                    // first n-1 elements\n                    for (auto i = val.m_value.array->cbegin();\n                            i != val.m_value.array->cend() - 1; ++i)\n                    {\n                        o->write_characters(indent_string.c_str(), new_indent);\n                        dump(*i, true, ensure_ascii, indent_step, new_indent);\n                        o->write_characters(\",\\n\", 2);\n                    }\n\n                    // last element\n                    assert(not val.m_value.array->empty());\n                    o->write_characters(indent_string.c_str(), new_indent);\n                    dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent);\n\n                    o->write_character('\\n');\n                    o->write_characters(indent_string.c_str(), current_indent);\n                    o->write_character(']');\n                }\n                else\n                {\n                    o->write_character('[');\n\n                    // first n-1 elements\n                    for (auto i = val.m_value.array->cbegin();\n                            i != val.m_value.array->cend() - 1; ++i)\n                    {\n                        dump(*i, false, ensure_ascii, indent_step, current_indent);\n                        o->write_character(',');\n                    }\n\n                    // last element\n                    assert(not val.m_value.array->empty());\n                    dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent);\n\n                    o->write_character(']');\n                }\n\n                return;\n            }\n\n            case value_t::string:\n            {\n                o->write_character('\\\"');\n                dump_escaped(*val.m_value.string, ensure_ascii);\n                o->write_character('\\\"');\n                return;\n            }\n\n            case value_t::boolean:\n            {\n                if (val.m_value.boolean)\n                {\n                    o->write_characters(\"true\", 4);\n                }\n                else\n                {\n                    o->write_characters(\"false\", 5);\n                }\n                return;\n            }\n\n            case value_t::number_integer:\n            {\n                dump_integer(val.m_value.number_integer);\n                return;\n            }\n\n            case value_t::number_unsigned:\n            {\n                dump_integer(val.m_value.number_unsigned);\n                return;\n            }\n\n            case value_t::number_float:\n            {\n                dump_float(val.m_value.number_float);\n                return;\n            }\n\n            case value_t::discarded:\n            {\n                o->write_characters(\"<discarded>\", 11);\n                return;\n            }\n\n            case value_t::null:\n            {\n                o->write_characters(\"null\", 4);\n                return;\n            }\n\n            default:            // LCOV_EXCL_LINE\n                assert(false);  // LCOV_EXCL_LINE\n        }\n    }\n\n  private:\n    /*!\n    @brief dump escaped string\n\n    Escape a string by replacing certain special characters by a sequence of an\n    escape character (backslash) and another character and other control\n    characters by a sequence of \"\\u\" followed by a four-digit hex\n    representation. The escaped string is written to output stream @a o.\n\n    @param[in] s  the string to escape\n    @param[in] ensure_ascii  whether to escape non-ASCII characters with\n                             \\uXXXX sequences\n\n    @complexity Linear in the length of string @a s.\n    */\n    void dump_escaped(const string_t& s, const bool ensure_ascii)\n    {\n        std::uint32_t codepoint;\n        std::uint8_t state = UTF8_ACCEPT;\n        std::size_t bytes = 0;  // number of bytes written to string_buffer\n\n        // number of bytes written at the point of the last valid byte\n        std::size_t bytes_after_last_accept = 0;\n        std::size_t undumped_chars = 0;\n\n        for (std::size_t i = 0; i < s.size(); ++i)\n        {\n            const auto byte = static_cast<uint8_t>(s[i]);\n\n            switch (decode(state, codepoint, byte))\n            {\n                case UTF8_ACCEPT:  // decode found a new code point\n                {\n                    switch (codepoint)\n                    {\n                        case 0x08: // backspace\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'b';\n                            break;\n                        }\n\n                        case 0x09: // horizontal tab\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 't';\n                            break;\n                        }\n\n                        case 0x0A: // newline\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'n';\n                            break;\n                        }\n\n                        case 0x0C: // formfeed\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'f';\n                            break;\n                        }\n\n                        case 0x0D: // carriage return\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = 'r';\n                            break;\n                        }\n\n                        case 0x22: // quotation mark\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = '\\\"';\n                            break;\n                        }\n\n                        case 0x5C: // reverse solidus\n                        {\n                            string_buffer[bytes++] = '\\\\';\n                            string_buffer[bytes++] = '\\\\';\n                            break;\n                        }\n\n                        default:\n                        {\n                            // escape control characters (0x00..0x1F) or, if\n                            // ensure_ascii parameter is used, non-ASCII characters\n                            if ((codepoint <= 0x1F) or (ensure_ascii and (codepoint >= 0x7F)))\n                            {\n                                if (codepoint <= 0xFFFF)\n                                {\n                                    (std::snprintf)(string_buffer.data() + bytes, 7, \"\\\\u%04x\",\n                                                    static_cast<std::uint16_t>(codepoint));\n                                    bytes += 6;\n                                }\n                                else\n                                {\n                                    (std::snprintf)(string_buffer.data() + bytes, 13, \"\\\\u%04x\\\\u%04x\",\n                                                    static_cast<std::uint16_t>(0xD7C0u + (codepoint >> 10u)),\n                                                    static_cast<std::uint16_t>(0xDC00u + (codepoint & 0x3FFu)));\n                                    bytes += 12;\n                                }\n                            }\n                            else\n                            {\n                                // copy byte to buffer (all previous bytes\n                                // been copied have in default case above)\n                                string_buffer[bytes++] = s[i];\n                            }\n                            break;\n                        }\n                    }\n\n                    // write buffer and reset index; there must be 13 bytes\n                    // left, as this is the maximal number of bytes to be\n                    // written (\"\\uxxxx\\uxxxx\\0\") for one code point\n                    if (string_buffer.size() - bytes < 13)\n                    {\n                        o->write_characters(string_buffer.data(), bytes);\n                        bytes = 0;\n                    }\n\n                    // remember the byte position of this accept\n                    bytes_after_last_accept = bytes;\n                    undumped_chars = 0;\n                    break;\n                }\n\n                case UTF8_REJECT:  // decode found invalid UTF-8 byte\n                {\n                    switch (error_handler)\n                    {\n                        case error_handler_t::strict:\n                        {\n                            std::string sn(3, '\\0');\n                            (std::snprintf)(&sn[0], sn.size(), \"%.2X\", byte);\n                            JSON_THROW(type_error::create(316, \"invalid UTF-8 byte at index \" + std::to_string(i) + \": 0x\" + sn));\n                        }\n\n                        case error_handler_t::ignore:\n                        case error_handler_t::replace:\n                        {\n                            // in case we saw this character the first time, we\n                            // would like to read it again, because the byte\n                            // may be OK for itself, but just not OK for the\n                            // previous sequence\n                            if (undumped_chars > 0)\n                            {\n                                --i;\n                            }\n\n                            // reset length buffer to the last accepted index;\n                            // thus removing/ignoring the invalid characters\n                            bytes = bytes_after_last_accept;\n\n                            if (error_handler == error_handler_t::replace)\n                            {\n                                // add a replacement character\n                                if (ensure_ascii)\n                                {\n                                    string_buffer[bytes++] = '\\\\';\n                                    string_buffer[bytes++] = 'u';\n                                    string_buffer[bytes++] = 'f';\n                                    string_buffer[bytes++] = 'f';\n                                    string_buffer[bytes++] = 'f';\n                                    string_buffer[bytes++] = 'd';\n                                }\n                                else\n                                {\n                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\\xEF');\n                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\\xBF');\n                                    string_buffer[bytes++] = detail::binary_writer<BasicJsonType, char>::to_char_type('\\xBD');\n                                }\n\n                                // write buffer and reset index; there must be 13 bytes\n                                // left, as this is the maximal number of bytes to be\n                                // written (\"\\uxxxx\\uxxxx\\0\") for one code point\n                                if (string_buffer.size() - bytes < 13)\n                                {\n                                    o->write_characters(string_buffer.data(), bytes);\n                                    bytes = 0;\n                                }\n\n                                bytes_after_last_accept = bytes;\n                            }\n\n                            undumped_chars = 0;\n\n                            // continue processing the string\n                            state = UTF8_ACCEPT;\n                            break;\n                        }\n\n                        default:            // LCOV_EXCL_LINE\n                            assert(false);  // LCOV_EXCL_LINE\n                    }\n                    break;\n                }\n\n                default:  // decode found yet incomplete multi-byte code point\n                {\n                    if (not ensure_ascii)\n                    {\n                        // code point will not be escaped - copy byte to buffer\n                        string_buffer[bytes++] = s[i];\n                    }\n                    ++undumped_chars;\n                    break;\n                }\n            }\n        }\n\n        // we finished processing the string\n        if (JSON_HEDLEY_LIKELY(state == UTF8_ACCEPT))\n        {\n            // write buffer\n            if (bytes > 0)\n            {\n                o->write_characters(string_buffer.data(), bytes);\n            }\n        }\n        else\n        {\n            // we finish reading, but do not accept: string was incomplete\n            switch (error_handler)\n            {\n                case error_handler_t::strict:\n                {\n                    std::string sn(3, '\\0');\n                    (std::snprintf)(&sn[0], sn.size(), \"%.2X\", static_cast<std::uint8_t>(s.back()));\n                    JSON_THROW(type_error::create(316, \"incomplete UTF-8 string; last byte: 0x\" + sn));\n                }\n\n                case error_handler_t::ignore:\n                {\n                    // write all accepted bytes\n                    o->write_characters(string_buffer.data(), bytes_after_last_accept);\n                    break;\n                }\n\n                case error_handler_t::replace:\n                {\n                    // write all accepted bytes\n                    o->write_characters(string_buffer.data(), bytes_after_last_accept);\n                    // add a replacement character\n                    if (ensure_ascii)\n                    {\n                        o->write_characters(\"\\\\ufffd\", 6);\n                    }\n                    else\n                    {\n                        o->write_characters(\"\\xEF\\xBF\\xBD\", 3);\n                    }\n                    break;\n                }\n\n                default:            // LCOV_EXCL_LINE\n                    assert(false);  // LCOV_EXCL_LINE\n            }\n        }\n    }\n\n    /*!\n    @brief count digits\n\n    Count the number of decimal (base 10) digits for an input unsigned integer.\n\n    @param[in] x  unsigned integer number to count its digits\n    @return    number of decimal digits\n    */\n    inline unsigned int count_digits(number_unsigned_t x) noexcept\n    {\n        unsigned int n_digits = 1;\n        for (;;)\n        {\n            if (x < 10)\n            {\n                return n_digits;\n            }\n            if (x < 100)\n            {\n                return n_digits + 1;\n            }\n            if (x < 1000)\n            {\n                return n_digits + 2;\n            }\n            if (x < 10000)\n            {\n                return n_digits + 3;\n            }\n            x = x / 10000u;\n            n_digits += 4;\n        }\n    }\n\n    /*!\n    @brief dump an integer\n\n    Dump a given integer to output stream @a o. Works internally with\n    @a number_buffer.\n\n    @param[in] x  integer number (signed or unsigned) to dump\n    @tparam NumberType either @a number_integer_t or @a number_unsigned_t\n    */\n    template<typename NumberType, detail::enable_if_t<\n                 std::is_same<NumberType, number_unsigned_t>::value or\n                 std::is_same<NumberType, number_integer_t>::value,\n                 int> = 0>\n    void dump_integer(NumberType x)\n    {\n        static constexpr std::array<std::array<char, 2>, 100> digits_to_99\n        {\n            {\n                {{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},\n                {{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},\n                {{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},\n                {{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},\n                {{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},\n                {{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},\n                {{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},\n                {{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},\n                {{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},\n                {{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},\n            }\n        };\n\n        // special case for \"0\"\n        if (x == 0)\n        {\n            o->write_character('0');\n            return;\n        }\n\n        // use a pointer to fill the buffer\n        auto buffer_ptr = number_buffer.begin();\n\n        const bool is_negative = std::is_same<NumberType, number_integer_t>::value and not(x >= 0); // see issue #755\n        number_unsigned_t abs_value;\n\n        unsigned int n_chars;\n\n        if (is_negative)\n        {\n            *buffer_ptr = '-';\n            abs_value = remove_sign(x);\n\n            // account one more byte for the minus sign\n            n_chars = 1 + count_digits(abs_value);\n        }\n        else\n        {\n            abs_value = static_cast<number_unsigned_t>(x);\n            n_chars = count_digits(abs_value);\n        }\n\n        // spare 1 byte for '\\0'\n        assert(n_chars < number_buffer.size() - 1);\n\n        // jump to the end to generate the string from backward\n        // so we later avoid reversing the result\n        buffer_ptr += n_chars;\n\n        // Fast int2ascii implementation inspired by \"Fastware\" talk by Andrei Alexandrescu\n        // See: https://www.youtube.com/watch?v=o4-CwDo2zpg\n        while (abs_value >= 100)\n        {\n            const auto digits_index = static_cast<unsigned>((abs_value % 100));\n            abs_value /= 100;\n            *(--buffer_ptr) = digits_to_99[digits_index][1];\n            *(--buffer_ptr) = digits_to_99[digits_index][0];\n        }\n\n        if (abs_value >= 10)\n        {\n            const auto digits_index = static_cast<unsigned>(abs_value);\n            *(--buffer_ptr) = digits_to_99[digits_index][1];\n            *(--buffer_ptr) = digits_to_99[digits_index][0];\n        }\n        else\n        {\n            *(--buffer_ptr) = static_cast<char>('0' + abs_value);\n        }\n\n        o->write_characters(number_buffer.data(), n_chars);\n    }\n\n    /*!\n    @brief dump a floating-point number\n\n    Dump a given floating-point number to output stream @a o. Works internally\n    with @a number_buffer.\n\n    @param[in] x  floating-point number to dump\n    */\n    void dump_float(number_float_t x)\n    {\n        // NaN / inf\n        if (not std::isfinite(x))\n        {\n            o->write_characters(\"null\", 4);\n            return;\n        }\n\n        // If number_float_t is an IEEE-754 single or double precision number,\n        // use the Grisu2 algorithm to produce short numbers which are\n        // guaranteed to round-trip, using strtof and strtod, resp.\n        //\n        // NB: The test below works if <long double> == <double>.\n        static constexpr bool is_ieee_single_or_double\n            = (std::numeric_limits<number_float_t>::is_iec559 and std::numeric_limits<number_float_t>::digits == 24 and std::numeric_limits<number_float_t>::max_exponent == 128) or\n              (std::numeric_limits<number_float_t>::is_iec559 and std::numeric_limits<number_float_t>::digits == 53 and std::numeric_limits<number_float_t>::max_exponent == 1024);\n\n        dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());\n    }\n\n    void dump_float(number_float_t x, std::true_type /*is_ieee_single_or_double*/)\n    {\n        char* begin = number_buffer.data();\n        char* end = ::nlohmann::detail::to_chars(begin, begin + number_buffer.size(), x);\n\n        o->write_characters(begin, static_cast<size_t>(end - begin));\n    }\n\n    void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_double*/)\n    {\n        // get number of digits for a float -> text -> float round-trip\n        static constexpr auto d = std::numeric_limits<number_float_t>::max_digits10;\n\n        // the actual conversion\n        std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), \"%.*g\", d, x);\n\n        // negative value indicates an error\n        assert(len > 0);\n        // check if buffer was large enough\n        assert(static_cast<std::size_t>(len) < number_buffer.size());\n\n        // erase thousands separator\n        if (thousands_sep != '\\0')\n        {\n            const auto end = std::remove(number_buffer.begin(),\n                                         number_buffer.begin() + len, thousands_sep);\n            std::fill(end, number_buffer.end(), '\\0');\n            assert((end - number_buffer.begin()) <= len);\n            len = (end - number_buffer.begin());\n        }\n\n        // convert decimal point to '.'\n        if (decimal_point != '\\0' and decimal_point != '.')\n        {\n            const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point);\n            if (dec_pos != number_buffer.end())\n            {\n                *dec_pos = '.';\n            }\n        }\n\n        o->write_characters(number_buffer.data(), static_cast<std::size_t>(len));\n\n        // determine if need to append \".0\"\n        const bool value_is_int_like =\n            std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1,\n                         [](char c)\n        {\n            return c == '.' or c == 'e';\n        });\n\n        if (value_is_int_like)\n        {\n            o->write_characters(\".0\", 2);\n        }\n    }\n\n    /*!\n    @brief check whether a string is UTF-8 encoded\n\n    The function checks each byte of a string whether it is UTF-8 encoded. The\n    result of the check is stored in the @a state parameter. The function must\n    be called initially with state 0 (accept). State 1 means the string must\n    be rejected, because the current byte is not allowed. If the string is\n    completely processed, but the state is non-zero, the string ended\n    prematurely; that is, the last byte indicated more bytes should have\n    followed.\n\n    @param[in,out] state  the state of the decoding\n    @param[in,out] codep  codepoint (valid only if resulting state is UTF8_ACCEPT)\n    @param[in] byte       next byte to decode\n    @return               new state\n\n    @note The function has been edited: a std::array is used.\n\n    @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>\n    @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/\n    */\n    static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, const std::uint8_t byte) noexcept\n    {\n        static const std::array<std::uint8_t, 400> utf8d =\n        {\n            {\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F\n                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F\n                1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F\n                7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF\n                8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF\n                0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF\n                0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF\n                0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0\n                1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2\n                1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4\n                1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6\n                1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8\n            }\n        };\n\n        const std::uint8_t type = utf8d[byte];\n\n        codep = (state != UTF8_ACCEPT)\n                ? (byte & 0x3fu) | (codep << 6u)\n                : (0xFFu >> type) & (byte);\n\n        state = utf8d[256u + state * 16u + type];\n        return state;\n    }\n\n    /*\n     * Overload to make the compiler happy while it is instantiating\n     * dump_integer for number_unsigned_t.\n     * Must never be called.\n     */\n    number_unsigned_t remove_sign(number_unsigned_t x)\n    {\n        assert(false); // LCOV_EXCL_LINE\n        return x; // LCOV_EXCL_LINE\n    }\n\n    /*\n     * Helper function for dump_integer\n     *\n     * This function takes a negative signed integer and returns its absolute\n     * value as unsigned integer. The plus/minus shuffling is necessary as we can\n     * not directly remove the sign of an arbitrary signed integer as the\n     * absolute values of INT_MIN and INT_MAX are usually not the same. See\n     * #1708 for details.\n     */\n    inline number_unsigned_t remove_sign(number_integer_t x) noexcept\n    {\n        assert(x < 0 and x < (std::numeric_limits<number_integer_t>::max)());\n        return static_cast<number_unsigned_t>(-(x + 1)) + 1;\n    }\n\n  private:\n    /// the output of the serializer\n    output_adapter_t<char> o = nullptr;\n\n    /// a (hopefully) large enough character buffer\n    std::array<char, 64> number_buffer{{}};\n\n    /// the locale\n    const std::lconv* loc = nullptr;\n    /// the locale's thousand separator character\n    const char thousands_sep = '\\0';\n    /// the locale's decimal point character\n    const char decimal_point = '\\0';\n\n    /// string buffer\n    std::array<char, 512> string_buffer{{}};\n\n    /// the indentation character\n    const char indent_char;\n    /// the indentation string\n    string_t indent_string;\n\n    /// error_handler how to react on decoding errors\n    const error_handler_t error_handler;\n};\n}  // namespace detail\n}  // namespace nlohmann\n\n// #include <nlohmann/detail/value_t.hpp>\n\n// #include <nlohmann/json_fwd.hpp>\n\n\n/*!\n@brief namespace for Niels Lohmann\n@see https://github.com/nlohmann\n@since version 1.0.0\n*/\nnamespace nlohmann\n{\n\n/*!\n@brief a class to store JSON values\n\n@tparam ObjectType type for JSON objects (`std::map` by default; will be used\nin @ref object_t)\n@tparam ArrayType type for JSON arrays (`std::vector` by default; will be used\nin @ref array_t)\n@tparam StringType type for JSON strings and object keys (`std::string` by\ndefault; will be used in @ref string_t)\n@tparam BooleanType type for JSON booleans (`bool` by default; will be used\nin @ref boolean_t)\n@tparam NumberIntegerType type for JSON integer numbers (`int64_t` by\ndefault; will be used in @ref number_integer_t)\n@tparam NumberUnsignedType type for JSON unsigned integer numbers (@c\n`uint64_t` by default; will be used in @ref number_unsigned_t)\n@tparam NumberFloatType type for JSON floating-point numbers (`double` by\ndefault; will be used in @ref number_float_t)\n@tparam AllocatorType type of the allocator to use (`std::allocator` by\ndefault)\n@tparam JSONSerializer the serializer to resolve internal calls to `to_json()`\nand `from_json()` (@ref adl_serializer by default)\n\n@requirement The class satisfies the following concept requirements:\n- Basic\n - [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible):\n   JSON values can be default constructed. The result will be a JSON null\n   value.\n - [MoveConstructible](https://en.cppreference.com/w/cpp/named_req/MoveConstructible):\n   A JSON value can be constructed from an rvalue argument.\n - [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible):\n   A JSON value can be copy-constructed from an lvalue expression.\n - [MoveAssignable](https://en.cppreference.com/w/cpp/named_req/MoveAssignable):\n   A JSON value van be assigned from an rvalue argument.\n - [CopyAssignable](https://en.cppreference.com/w/cpp/named_req/CopyAssignable):\n   A JSON value can be copy-assigned from an lvalue expression.\n - [Destructible](https://en.cppreference.com/w/cpp/named_req/Destructible):\n   JSON values can be destructed.\n- Layout\n - [StandardLayoutType](https://en.cppreference.com/w/cpp/named_req/StandardLayoutType):\n   JSON values have\n   [standard layout](https://en.cppreference.com/w/cpp/language/data_members#Standard_layout):\n   All non-static data members are private and standard layout types, the\n   class has no virtual functions or (virtual) base classes.\n- Library-wide\n - [EqualityComparable](https://en.cppreference.com/w/cpp/named_req/EqualityComparable):\n   JSON values can be compared with `==`, see @ref\n   operator==(const_reference,const_reference).\n - [LessThanComparable](https://en.cppreference.com/w/cpp/named_req/LessThanComparable):\n   JSON values can be compared with `<`, see @ref\n   operator<(const_reference,const_reference).\n - [Swappable](https://en.cppreference.com/w/cpp/named_req/Swappable):\n   Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of\n   other compatible types, using unqualified function call @ref swap().\n - [NullablePointer](https://en.cppreference.com/w/cpp/named_req/NullablePointer):\n   JSON values can be compared against `std::nullptr_t` objects which are used\n   to model the `null` value.\n- Container\n - [Container](https://en.cppreference.com/w/cpp/named_req/Container):\n   JSON values can be used like STL containers and provide iterator access.\n - [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer);\n   JSON values can be used like STL containers and provide reverse iterator\n   access.\n\n@invariant The member variables @a m_value and @a m_type have the following\nrelationship:\n- If `m_type == value_t::object`, then `m_value.object != nullptr`.\n- If `m_type == value_t::array`, then `m_value.array != nullptr`.\n- If `m_type == value_t::string`, then `m_value.string != nullptr`.\nThe invariants are checked by member function assert_invariant().\n\n@internal\n@note ObjectType trick from http://stackoverflow.com/a/9860911\n@endinternal\n\n@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange\nFormat](http://rfc7159.net/rfc7159)\n\n@since version 1.0.0\n\n@nosubgrouping\n*/\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nclass basic_json\n{\n  private:\n    template<detail::value_t> friend struct detail::external_constructor;\n    friend ::nlohmann::json_pointer<basic_json>;\n    friend ::nlohmann::detail::parser<basic_json>;\n    friend ::nlohmann::detail::serializer<basic_json>;\n    template<typename BasicJsonType>\n    friend class ::nlohmann::detail::iter_impl;\n    template<typename BasicJsonType, typename CharType>\n    friend class ::nlohmann::detail::binary_writer;\n    template<typename BasicJsonType, typename SAX>\n    friend class ::nlohmann::detail::binary_reader;\n    template<typename BasicJsonType>\n    friend class ::nlohmann::detail::json_sax_dom_parser;\n    template<typename BasicJsonType>\n    friend class ::nlohmann::detail::json_sax_dom_callback_parser;\n\n    /// workaround type for MSVC\n    using basic_json_t = NLOHMANN_BASIC_JSON_TPL;\n\n    // convenience aliases for types residing in namespace detail;\n    using lexer = ::nlohmann::detail::lexer<basic_json>;\n    using parser = ::nlohmann::detail::parser<basic_json>;\n\n    using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t;\n    template<typename BasicJsonType>\n    using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>;\n    template<typename BasicJsonType>\n    using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>;\n    template<typename Iterator>\n    using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>;\n    template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>;\n\n    template<typename CharType>\n    using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>;\n\n    using binary_reader = ::nlohmann::detail::binary_reader<basic_json>;\n    template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>;\n\n    using serializer = ::nlohmann::detail::serializer<basic_json>;\n\n  public:\n    using value_t = detail::value_t;\n    /// JSON Pointer, see @ref nlohmann::json_pointer\n    using json_pointer = ::nlohmann::json_pointer<basic_json>;\n    template<typename T, typename SFINAE>\n    using json_serializer = JSONSerializer<T, SFINAE>;\n    /// how to treat decoding errors\n    using error_handler_t = detail::error_handler_t;\n    /// helper type for initializer lists of basic_json values\n    using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>;\n\n    using input_format_t = detail::input_format_t;\n    /// SAX interface type, see @ref nlohmann::json_sax\n    using json_sax_t = json_sax<basic_json>;\n\n    ////////////////\n    // exceptions //\n    ////////////////\n\n    /// @name exceptions\n    /// Classes to implement user-defined exceptions.\n    /// @{\n\n    /// @copydoc detail::exception\n    using exception = detail::exception;\n    /// @copydoc detail::parse_error\n    using parse_error = detail::parse_error;\n    /// @copydoc detail::invalid_iterator\n    using invalid_iterator = detail::invalid_iterator;\n    /// @copydoc detail::type_error\n    using type_error = detail::type_error;\n    /// @copydoc detail::out_of_range\n    using out_of_range = detail::out_of_range;\n    /// @copydoc detail::other_error\n    using other_error = detail::other_error;\n\n    /// @}\n\n\n    /////////////////////\n    // container types //\n    /////////////////////\n\n    /// @name container types\n    /// The canonic container types to use @ref basic_json like any other STL\n    /// container.\n    /// @{\n\n    /// the type of elements in a basic_json container\n    using value_type = basic_json;\n\n    /// the type of an element reference\n    using reference = value_type&;\n    /// the type of an element const reference\n    using const_reference = const value_type&;\n\n    /// a type to represent differences between iterators\n    using difference_type = std::ptrdiff_t;\n    /// a type to represent container sizes\n    using size_type = std::size_t;\n\n    /// the allocator type\n    using allocator_type = AllocatorType<basic_json>;\n\n    /// the type of an element pointer\n    using pointer = typename std::allocator_traits<allocator_type>::pointer;\n    /// the type of an element const pointer\n    using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer;\n\n    /// an iterator for a basic_json container\n    using iterator = iter_impl<basic_json>;\n    /// a const iterator for a basic_json container\n    using const_iterator = iter_impl<const basic_json>;\n    /// a reverse iterator for a basic_json container\n    using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>;\n    /// a const reverse iterator for a basic_json container\n    using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>;\n\n    /// @}\n\n\n    /*!\n    @brief returns the allocator associated with the container\n    */\n    static allocator_type get_allocator()\n    {\n        return allocator_type();\n    }\n\n    /*!\n    @brief returns version information on the library\n\n    This function returns a JSON object with information about the library,\n    including the version number and information on the platform and compiler.\n\n    @return JSON object holding version information\n    key         | description\n    ----------- | ---------------\n    `compiler`  | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version).\n    `copyright` | The copyright line for the library as string.\n    `name`      | The name of the library as string.\n    `platform`  | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`.\n    `url`       | The URL of the project as string.\n    `version`   | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string).\n\n    @liveexample{The following code shows an example output of the `meta()`\n    function.,meta}\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @complexity Constant.\n\n    @since 2.1.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json meta()\n    {\n        basic_json result;\n\n        result[\"copyright\"] = \"(C) 2013-2017 Niels Lohmann\";\n        result[\"name\"] = \"JSON for Modern C++\";\n        result[\"url\"] = \"https://github.com/nlohmann/json\";\n        result[\"version\"][\"string\"] =\n            std::to_string(NLOHMANN_JSON_VERSION_MAJOR) + \".\" +\n            std::to_string(NLOHMANN_JSON_VERSION_MINOR) + \".\" +\n            std::to_string(NLOHMANN_JSON_VERSION_PATCH);\n        result[\"version\"][\"major\"] = NLOHMANN_JSON_VERSION_MAJOR;\n        result[\"version\"][\"minor\"] = NLOHMANN_JSON_VERSION_MINOR;\n        result[\"version\"][\"patch\"] = NLOHMANN_JSON_VERSION_PATCH;\n\n#ifdef _WIN32\n        result[\"platform\"] = \"win32\";\n#elif defined __linux__\n        result[\"platform\"] = \"linux\";\n#elif defined __APPLE__\n        result[\"platform\"] = \"apple\";\n#elif defined __unix__\n        result[\"platform\"] = \"unix\";\n#else\n        result[\"platform\"] = \"unknown\";\n#endif\n\n#if defined(__ICC) || defined(__INTEL_COMPILER)\n        result[\"compiler\"] = {{\"family\", \"icc\"}, {\"version\", __INTEL_COMPILER}};\n#elif defined(__clang__)\n        result[\"compiler\"] = {{\"family\", \"clang\"}, {\"version\", __clang_version__}};\n#elif defined(__GNUC__) || defined(__GNUG__)\n        result[\"compiler\"] = {{\"family\", \"gcc\"}, {\"version\", std::to_string(__GNUC__) + \".\" + std::to_string(__GNUC_MINOR__) + \".\" + std::to_string(__GNUC_PATCHLEVEL__)}};\n#elif defined(__HP_cc) || defined(__HP_aCC)\n        result[\"compiler\"] = \"hp\"\n#elif defined(__IBMCPP__)\n        result[\"compiler\"] = {{\"family\", \"ilecpp\"}, {\"version\", __IBMCPP__}};\n#elif defined(_MSC_VER)\n        result[\"compiler\"] = {{\"family\", \"msvc\"}, {\"version\", _MSC_VER}};\n#elif defined(__PGI)\n        result[\"compiler\"] = {{\"family\", \"pgcpp\"}, {\"version\", __PGI}};\n#elif defined(__SUNPRO_CC)\n        result[\"compiler\"] = {{\"family\", \"sunpro\"}, {\"version\", __SUNPRO_CC}};\n#else\n        result[\"compiler\"] = {{\"family\", \"unknown\"}, {\"version\", \"unknown\"}};\n#endif\n\n#ifdef __cplusplus\n        result[\"compiler\"][\"c++\"] = std::to_string(__cplusplus);\n#else\n        result[\"compiler\"][\"c++\"] = \"unknown\";\n#endif\n        return result;\n    }\n\n\n    ///////////////////////////\n    // JSON value data types //\n    ///////////////////////////\n\n    /// @name JSON value data types\n    /// The data types to store a JSON value. These types are derived from\n    /// the template arguments passed to class @ref basic_json.\n    /// @{\n\n#if defined(JSON_HAS_CPP_14)\n    // Use transparent comparator if possible, combined with perfect forwarding\n    // on find() and count() calls prevents unnecessary string construction.\n    using object_comparator_t = std::less<>;\n#else\n    using object_comparator_t = std::less<StringType>;\n#endif\n\n    /*!\n    @brief a type for an object\n\n    [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows:\n    > An object is an unordered collection of zero or more name/value pairs,\n    > where a name is a string and a value is a string, number, boolean, null,\n    > object, or array.\n\n    To store objects in C++, a type is defined by the template parameters\n    described below.\n\n    @tparam ObjectType  the container to store objects (e.g., `std::map` or\n    `std::unordered_map`)\n    @tparam StringType the type of the keys or names (e.g., `std::string`).\n    The comparison function `std::less<StringType>` is used to order elements\n    inside the container.\n    @tparam AllocatorType the allocator to use for objects (e.g.,\n    `std::allocator`)\n\n    #### Default type\n\n    With the default values for @a ObjectType (`std::map`), @a StringType\n    (`std::string`), and @a AllocatorType (`std::allocator`), the default\n    value for @a object_t is:\n\n    @code {.cpp}\n    std::map<\n      std::string, // key_type\n      basic_json, // value_type\n      std::less<std::string>, // key_compare\n      std::allocator<std::pair<const std::string, basic_json>> // allocator_type\n    >\n    @endcode\n\n    #### Behavior\n\n    The choice of @a object_t influences the behavior of the JSON class. With\n    the default type, objects have the following behavior:\n\n    - When all names are unique, objects will be interoperable in the sense\n      that all software implementations receiving that object will agree on\n      the name-value mappings.\n    - When the names within an object are not unique, it is unspecified which\n      one of the values for a given key will be chosen. For instance,\n      `{\"key\": 2, \"key\": 1}` could be equal to either `{\"key\": 1}` or\n      `{\"key\": 2}`.\n    - Internally, name/value pairs are stored in lexicographical order of the\n      names. Objects will also be serialized (see @ref dump) in this order.\n      For instance, `{\"b\": 1, \"a\": 2}` and `{\"a\": 2, \"b\": 1}` will be stored\n      and serialized as `{\"a\": 2, \"b\": 1}`.\n    - When comparing objects, the order of the name/value pairs is irrelevant.\n      This makes objects interoperable in the sense that they will not be\n      affected by these differences. For instance, `{\"b\": 1, \"a\": 2}` and\n      `{\"a\": 2, \"b\": 1}` will be treated as equal.\n\n    #### Limits\n\n    [RFC 7159](http://rfc7159.net/rfc7159) specifies:\n    > An implementation may set limits on the maximum depth of nesting.\n\n    In this class, the object's limit of nesting is not explicitly constrained.\n    However, a maximum depth of nesting may be introduced by the compiler or\n    runtime environment. A theoretical limit can be queried by calling the\n    @ref max_size function of a JSON object.\n\n    #### Storage\n\n    Objects are stored as pointers in a @ref basic_json type. That is, for any\n    access to object values, a pointer of type `object_t*` must be\n    dereferenced.\n\n    @sa @ref array_t -- type for an array value\n\n    @since version 1.0.0\n\n    @note The order name/value pairs are added to the object is *not*\n    preserved by the library. Therefore, iterating an object may return\n    name/value pairs in a different order than they were originally stored. In\n    fact, keys will be traversed in alphabetical order as `std::map` with\n    `std::less` is used by default. Please note this behavior conforms to [RFC\n    7159](http://rfc7159.net/rfc7159), because any order implements the\n    specified \"unordered\" nature of JSON objects.\n    */\n    using object_t = ObjectType<StringType,\n          basic_json,\n          object_comparator_t,\n          AllocatorType<std::pair<const StringType,\n          basic_json>>>;\n\n    /*!\n    @brief a type for an array\n\n    [RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows:\n    > An array is an ordered sequence of zero or more values.\n\n    To store objects in C++, a type is defined by the template parameters\n    explained below.\n\n    @tparam ArrayType  container type to store arrays (e.g., `std::vector` or\n    `std::list`)\n    @tparam AllocatorType allocator to use for arrays (e.g., `std::allocator`)\n\n    #### Default type\n\n    With the default values for @a ArrayType (`std::vector`) and @a\n    AllocatorType (`std::allocator`), the default value for @a array_t is:\n\n    @code {.cpp}\n    std::vector<\n      basic_json, // value_type\n      std::allocator<basic_json> // allocator_type\n    >\n    @endcode\n\n    #### Limits\n\n    [RFC 7159](http://rfc7159.net/rfc7159) specifies:\n    > An implementation may set limits on the maximum depth of nesting.\n\n    In this class, the array's limit of nesting is not explicitly constrained.\n    However, a maximum depth of nesting may be introduced by the compiler or\n    runtime environment. A theoretical limit can be queried by calling the\n    @ref max_size function of a JSON array.\n\n    #### Storage\n\n    Arrays are stored as pointers in a @ref basic_json type. That is, for any\n    access to array values, a pointer of type `array_t*` must be dereferenced.\n\n    @sa @ref object_t -- type for an object value\n\n    @since version 1.0.0\n    */\n    using array_t = ArrayType<basic_json, AllocatorType<basic_json>>;\n\n    /*!\n    @brief a type for a string\n\n    [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows:\n    > A string is a sequence of zero or more Unicode characters.\n\n    To store objects in C++, a type is defined by the template parameter\n    described below. Unicode values are split by the JSON class into\n    byte-sized characters during deserialization.\n\n    @tparam StringType  the container to store strings (e.g., `std::string`).\n    Note this container is used for keys/names in objects, see @ref object_t.\n\n    #### Default type\n\n    With the default values for @a StringType (`std::string`), the default\n    value for @a string_t is:\n\n    @code {.cpp}\n    std::string\n    @endcode\n\n    #### Encoding\n\n    Strings are stored in UTF-8 encoding. Therefore, functions like\n    `std::string::size()` or `std::string::length()` return the number of\n    bytes in the string rather than the number of characters or glyphs.\n\n    #### String comparison\n\n    [RFC 7159](http://rfc7159.net/rfc7159) states:\n    > Software implementations are typically required to test names of object\n    > members for equality. Implementations that transform the textual\n    > representation into sequences of Unicode code units and then perform the\n    > comparison numerically, code unit by code unit, are interoperable in the\n    > sense that implementations will agree in all cases on equality or\n    > inequality of two strings. For example, implementations that compare\n    > strings with escaped characters unconverted may incorrectly find that\n    > `\"a\\\\b\"` and `\"a\\u005Cb\"` are not equal.\n\n    This implementation is interoperable as it does compare strings code unit\n    by code unit.\n\n    #### Storage\n\n    String values are stored as pointers in a @ref basic_json type. That is,\n    for any access to string values, a pointer of type `string_t*` must be\n    dereferenced.\n\n    @since version 1.0.0\n    */\n    using string_t = StringType;\n\n    /*!\n    @brief a type for a boolean\n\n    [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a\n    type which differentiates the two literals `true` and `false`.\n\n    To store objects in C++, a type is defined by the template parameter @a\n    BooleanType which chooses the type to use.\n\n    #### Default type\n\n    With the default values for @a BooleanType (`bool`), the default value for\n    @a boolean_t is:\n\n    @code {.cpp}\n    bool\n    @endcode\n\n    #### Storage\n\n    Boolean values are stored directly inside a @ref basic_json type.\n\n    @since version 1.0.0\n    */\n    using boolean_t = BooleanType;\n\n    /*!\n    @brief a type for a number (integer)\n\n    [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows:\n    > The representation of numbers is similar to that used in most\n    > programming languages. A number is represented in base 10 using decimal\n    > digits. It contains an integer component that may be prefixed with an\n    > optional minus sign, which may be followed by a fraction part and/or an\n    > exponent part. Leading zeros are not allowed. (...) Numeric values that\n    > cannot be represented in the grammar below (such as Infinity and NaN)\n    > are not permitted.\n\n    This description includes both integer and floating-point numbers.\n    However, C++ allows more precise storage if it is known whether the number\n    is a signed integer, an unsigned integer or a floating-point number.\n    Therefore, three different types, @ref number_integer_t, @ref\n    number_unsigned_t and @ref number_float_t are used.\n\n    To store integer numbers in C++, a type is defined by the template\n    parameter @a NumberIntegerType which chooses the type to use.\n\n    #### Default type\n\n    With the default values for @a NumberIntegerType (`int64_t`), the default\n    value for @a number_integer_t is:\n\n    @code {.cpp}\n    int64_t\n    @endcode\n\n    #### Default behavior\n\n    - The restrictions about leading zeros is not enforced in C++. Instead,\n      leading zeros in integer literals lead to an interpretation as octal\n      number. Internally, the value will be stored as decimal number. For\n      instance, the C++ integer literal `010` will be serialized to `8`.\n      During deserialization, leading zeros yield an error.\n    - Not-a-number (NaN) values will be serialized to `null`.\n\n    #### Limits\n\n    [RFC 7159](http://rfc7159.net/rfc7159) specifies:\n    > An implementation may set limits on the range and precision of numbers.\n\n    When the default type is used, the maximal integer number that can be\n    stored is `9223372036854775807` (INT64_MAX) and the minimal integer number\n    that can be stored is `-9223372036854775808` (INT64_MIN). Integer numbers\n    that are out of range will yield over/underflow when used in a\n    constructor. During deserialization, too large or small integer numbers\n    will be automatically be stored as @ref number_unsigned_t or @ref\n    number_float_t.\n\n    [RFC 7159](http://rfc7159.net/rfc7159) further states:\n    > Note that when such software is used, numbers that are integers and are\n    > in the range \\f$[-2^{53}+1, 2^{53}-1]\\f$ are interoperable in the sense\n    > that implementations will agree exactly on their numeric values.\n\n    As this range is a subrange of the exactly supported range [INT64_MIN,\n    INT64_MAX], this class's integer type is interoperable.\n\n    #### Storage\n\n    Integer number values are stored directly inside a @ref basic_json type.\n\n    @sa @ref number_float_t -- type for number values (floating-point)\n\n    @sa @ref number_unsigned_t -- type for number values (unsigned integer)\n\n    @since version 1.0.0\n    */\n    using number_integer_t = NumberIntegerType;\n\n    /*!\n    @brief a type for a number (unsigned)\n\n    [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows:\n    > The representation of numbers is similar to that used in most\n    > programming languages. A number is represented in base 10 using decimal\n    > digits. It contains an integer component that may be prefixed with an\n    > optional minus sign, which may be followed by a fraction part and/or an\n    > exponent part. Leading zeros are not allowed. (...) Numeric values that\n    > cannot be represented in the grammar below (such as Infinity and NaN)\n    > are not permitted.\n\n    This description includes both integer and floating-point numbers.\n    However, C++ allows more precise storage if it is known whether the number\n    is a signed integer, an unsigned integer or a floating-point number.\n    Therefore, three different types, @ref number_integer_t, @ref\n    number_unsigned_t and @ref number_float_t are used.\n\n    To store unsigned integer numbers in C++, a type is defined by the\n    template parameter @a NumberUnsignedType which chooses the type to use.\n\n    #### Default type\n\n    With the default values for @a NumberUnsignedType (`uint64_t`), the\n    default value for @a number_unsigned_t is:\n\n    @code {.cpp}\n    uint64_t\n    @endcode\n\n    #### Default behavior\n\n    - The restrictions about leading zeros is not enforced in C++. Instead,\n      leading zeros in integer literals lead to an interpretation as octal\n      number. Internally, the value will be stored as decimal number. For\n      instance, the C++ integer literal `010` will be serialized to `8`.\n      During deserialization, leading zeros yield an error.\n    - Not-a-number (NaN) values will be serialized to `null`.\n\n    #### Limits\n\n    [RFC 7159](http://rfc7159.net/rfc7159) specifies:\n    > An implementation may set limits on the range and precision of numbers.\n\n    When the default type is used, the maximal integer number that can be\n    stored is `18446744073709551615` (UINT64_MAX) and the minimal integer\n    number that can be stored is `0`. Integer numbers that are out of range\n    will yield over/underflow when used in a constructor. During\n    deserialization, too large or small integer numbers will be automatically\n    be stored as @ref number_integer_t or @ref number_float_t.\n\n    [RFC 7159](http://rfc7159.net/rfc7159) further states:\n    > Note that when such software is used, numbers that are integers and are\n    > in the range \\f$[-2^{53}+1, 2^{53}-1]\\f$ are interoperable in the sense\n    > that implementations will agree exactly on their numeric values.\n\n    As this range is a subrange (when considered in conjunction with the\n    number_integer_t type) of the exactly supported range [0, UINT64_MAX],\n    this class's integer type is interoperable.\n\n    #### Storage\n\n    Integer number values are stored directly inside a @ref basic_json type.\n\n    @sa @ref number_float_t -- type for number values (floating-point)\n    @sa @ref number_integer_t -- type for number values (integer)\n\n    @since version 2.0.0\n    */\n    using number_unsigned_t = NumberUnsignedType;\n\n    /*!\n    @brief a type for a number (floating-point)\n\n    [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows:\n    > The representation of numbers is similar to that used in most\n    > programming languages. A number is represented in base 10 using decimal\n    > digits. It contains an integer component that may be prefixed with an\n    > optional minus sign, which may be followed by a fraction part and/or an\n    > exponent part. Leading zeros are not allowed. (...) Numeric values that\n    > cannot be represented in the grammar below (such as Infinity and NaN)\n    > are not permitted.\n\n    This description includes both integer and floating-point numbers.\n    However, C++ allows more precise storage if it is known whether the number\n    is a signed integer, an unsigned integer or a floating-point number.\n    Therefore, three different types, @ref number_integer_t, @ref\n    number_unsigned_t and @ref number_float_t are used.\n\n    To store floating-point numbers in C++, a type is defined by the template\n    parameter @a NumberFloatType which chooses the type to use.\n\n    #### Default type\n\n    With the default values for @a NumberFloatType (`double`), the default\n    value for @a number_float_t is:\n\n    @code {.cpp}\n    double\n    @endcode\n\n    #### Default behavior\n\n    - The restrictions about leading zeros is not enforced in C++. Instead,\n      leading zeros in floating-point literals will be ignored. Internally,\n      the value will be stored as decimal number. For instance, the C++\n      floating-point literal `01.2` will be serialized to `1.2`. During\n      deserialization, leading zeros yield an error.\n    - Not-a-number (NaN) values will be serialized to `null`.\n\n    #### Limits\n\n    [RFC 7159](http://rfc7159.net/rfc7159) states:\n    > This specification allows implementations to set limits on the range and\n    > precision of numbers accepted. Since software that implements IEEE\n    > 754-2008 binary64 (double precision) numbers is generally available and\n    > widely used, good interoperability can be achieved by implementations\n    > that expect no more precision or range than these provide, in the sense\n    > that implementations will approximate JSON numbers within the expected\n    > precision.\n\n    This implementation does exactly follow this approach, as it uses double\n    precision floating-point numbers. Note values smaller than\n    `-1.79769313486232e+308` and values greater than `1.79769313486232e+308`\n    will be stored as NaN internally and be serialized to `null`.\n\n    #### Storage\n\n    Floating-point number values are stored directly inside a @ref basic_json\n    type.\n\n    @sa @ref number_integer_t -- type for number values (integer)\n\n    @sa @ref number_unsigned_t -- type for number values (unsigned integer)\n\n    @since version 1.0.0\n    */\n    using number_float_t = NumberFloatType;\n\n    /// @}\n\n  private:\n\n    /// helper for exception-safe object creation\n    template<typename T, typename... Args>\n    JSON_HEDLEY_RETURNS_NON_NULL\n    static T* create(Args&& ... args)\n    {\n        AllocatorType<T> alloc;\n        using AllocatorTraits = std::allocator_traits<AllocatorType<T>>;\n\n        auto deleter = [&](T * object)\n        {\n            AllocatorTraits::deallocate(alloc, object, 1);\n        };\n        std::unique_ptr<T, decltype(deleter)> object(AllocatorTraits::allocate(alloc, 1), deleter);\n        AllocatorTraits::construct(alloc, object.get(), std::forward<Args>(args)...);\n        assert(object != nullptr);\n        return object.release();\n    }\n\n    ////////////////////////\n    // JSON value storage //\n    ////////////////////////\n\n    /*!\n    @brief a JSON value\n\n    The actual storage for a JSON value of the @ref basic_json class. This\n    union combines the different storage types for the JSON value types\n    defined in @ref value_t.\n\n    JSON type | value_t type    | used type\n    --------- | --------------- | ------------------------\n    object    | object          | pointer to @ref object_t\n    array     | array           | pointer to @ref array_t\n    string    | string          | pointer to @ref string_t\n    boolean   | boolean         | @ref boolean_t\n    number    | number_integer  | @ref number_integer_t\n    number    | number_unsigned | @ref number_unsigned_t\n    number    | number_float    | @ref number_float_t\n    null      | null            | *no value is stored*\n\n    @note Variable-length types (objects, arrays, and strings) are stored as\n    pointers. The size of the union should not exceed 64 bits if the default\n    value types are used.\n\n    @since version 1.0.0\n    */\n    union json_value\n    {\n        /// object (stored with pointer to save storage)\n        object_t* object;\n        /// array (stored with pointer to save storage)\n        array_t* array;\n        /// string (stored with pointer to save storage)\n        string_t* string;\n        /// boolean\n        boolean_t boolean;\n        /// number (integer)\n        number_integer_t number_integer;\n        /// number (unsigned integer)\n        number_unsigned_t number_unsigned;\n        /// number (floating-point)\n        number_float_t number_float;\n\n        /// default constructor (for null values)\n        json_value() = default;\n        /// constructor for booleans\n        json_value(boolean_t v) noexcept : boolean(v) {}\n        /// constructor for numbers (integer)\n        json_value(number_integer_t v) noexcept : number_integer(v) {}\n        /// constructor for numbers (unsigned)\n        json_value(number_unsigned_t v) noexcept : number_unsigned(v) {}\n        /// constructor for numbers (floating-point)\n        json_value(number_float_t v) noexcept : number_float(v) {}\n        /// constructor for empty values of a given type\n        json_value(value_t t)\n        {\n            switch (t)\n            {\n                case value_t::object:\n                {\n                    object = create<object_t>();\n                    break;\n                }\n\n                case value_t::array:\n                {\n                    array = create<array_t>();\n                    break;\n                }\n\n                case value_t::string:\n                {\n                    string = create<string_t>(\"\");\n                    break;\n                }\n\n                case value_t::boolean:\n                {\n                    boolean = boolean_t(false);\n                    break;\n                }\n\n                case value_t::number_integer:\n                {\n                    number_integer = number_integer_t(0);\n                    break;\n                }\n\n                case value_t::number_unsigned:\n                {\n                    number_unsigned = number_unsigned_t(0);\n                    break;\n                }\n\n                case value_t::number_float:\n                {\n                    number_float = number_float_t(0.0);\n                    break;\n                }\n\n                case value_t::null:\n                {\n                    object = nullptr;  // silence warning, see #821\n                    break;\n                }\n\n                default:\n                {\n                    object = nullptr;  // silence warning, see #821\n                    if (JSON_HEDLEY_UNLIKELY(t == value_t::null))\n                    {\n                        JSON_THROW(other_error::create(500, \"961c151d2e87f2686a955a9be24d316f1362bf21 3.7.0\")); // LCOV_EXCL_LINE\n                    }\n                    break;\n                }\n            }\n        }\n\n        /// constructor for strings\n        json_value(const string_t& value)\n        {\n            string = create<string_t>(value);\n        }\n\n        /// constructor for rvalue strings\n        json_value(string_t&& value)\n        {\n            string = create<string_t>(std::move(value));\n        }\n\n        /// constructor for objects\n        json_value(const object_t& value)\n        {\n            object = create<object_t>(value);\n        }\n\n        /// constructor for rvalue objects\n        json_value(object_t&& value)\n        {\n            object = create<object_t>(std::move(value));\n        }\n\n        /// constructor for arrays\n        json_value(const array_t& value)\n        {\n            array = create<array_t>(value);\n        }\n\n        /// constructor for rvalue arrays\n        json_value(array_t&& value)\n        {\n            array = create<array_t>(std::move(value));\n        }\n\n        void destroy(value_t t) noexcept\n        {\n            switch (t)\n            {\n                case value_t::object:\n                {\n                    AllocatorType<object_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, object);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1);\n                    break;\n                }\n\n                case value_t::array:\n                {\n                    AllocatorType<array_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, array);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1);\n                    break;\n                }\n\n                case value_t::string:\n                {\n                    AllocatorType<string_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, string);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1);\n                    break;\n                }\n\n                default:\n                {\n                    break;\n                }\n            }\n        }\n    };\n\n    /*!\n    @brief checks the class invariants\n\n    This function asserts the class invariants. It needs to be called at the\n    end of every constructor to make sure that created objects respect the\n    invariant. Furthermore, it has to be called each time the type of a JSON\n    value is changed, because the invariant expresses a relationship between\n    @a m_type and @a m_value.\n    */\n    void assert_invariant() const noexcept\n    {\n        assert(m_type != value_t::object or m_value.object != nullptr);\n        assert(m_type != value_t::array or m_value.array != nullptr);\n        assert(m_type != value_t::string or m_value.string != nullptr);\n    }\n\n  public:\n    //////////////////////////\n    // JSON parser callback //\n    //////////////////////////\n\n    /*!\n    @brief parser event types\n\n    The parser callback distinguishes the following events:\n    - `object_start`: the parser read `{` and started to process a JSON object\n    - `key`: the parser read a key of a value in an object\n    - `object_end`: the parser read `}` and finished processing a JSON object\n    - `array_start`: the parser read `[` and started to process a JSON array\n    - `array_end`: the parser read `]` and finished processing a JSON array\n    - `value`: the parser finished reading a JSON value\n\n    @image html callback_events.png \"Example when certain parse events are triggered\"\n\n    @sa @ref parser_callback_t for more information and examples\n    */\n    using parse_event_t = typename parser::parse_event_t;\n\n    /*!\n    @brief per-element parser callback type\n\n    With a parser callback function, the result of parsing a JSON text can be\n    influenced. When passed to @ref parse, it is called on certain events\n    (passed as @ref parse_event_t via parameter @a event) with a set recursion\n    depth @a depth and context JSON value @a parsed. The return value of the\n    callback function is a boolean indicating whether the element that emitted\n    the callback shall be kept or not.\n\n    We distinguish six scenarios (determined by the event type) in which the\n    callback function can be called. The following table describes the values\n    of the parameters @a depth, @a event, and @a parsed.\n\n    parameter @a event | description | parameter @a depth | parameter @a parsed\n    ------------------ | ----------- | ------------------ | -------------------\n    parse_event_t::object_start | the parser read `{` and started to process a JSON object | depth of the parent of the JSON object | a JSON value with type discarded\n    parse_event_t::key | the parser read a key of a value in an object | depth of the currently parsed JSON object | a JSON string containing the key\n    parse_event_t::object_end | the parser read `}` and finished processing a JSON object | depth of the parent of the JSON object | the parsed JSON object\n    parse_event_t::array_start | the parser read `[` and started to process a JSON array | depth of the parent of the JSON array | a JSON value with type discarded\n    parse_event_t::array_end | the parser read `]` and finished processing a JSON array | depth of the parent of the JSON array | the parsed JSON array\n    parse_event_t::value | the parser finished reading a JSON value | depth of the value | the parsed JSON value\n\n    @image html callback_events.png \"Example when certain parse events are triggered\"\n\n    Discarding a value (i.e., returning `false`) has different effects\n    depending on the context in which function was called:\n\n    - Discarded values in structured types are skipped. That is, the parser\n      will behave as if the discarded value was never read.\n    - In case a value outside a structured type is skipped, it is replaced\n      with `null`. This case happens if the top-level element is skipped.\n\n    @param[in] depth  the depth of the recursion during parsing\n\n    @param[in] event  an event of type parse_event_t indicating the context in\n    the callback function has been called\n\n    @param[in,out] parsed  the current intermediate parse result; note that\n    writing to this value has no effect for parse_event_t::key events\n\n    @return Whether the JSON value which called the function during parsing\n    should be kept (`true`) or not (`false`). In the latter case, it is either\n    skipped completely or replaced by an empty discarded object.\n\n    @sa @ref parse for examples\n\n    @since version 1.0.0\n    */\n    using parser_callback_t = typename parser::parser_callback_t;\n\n    //////////////////\n    // constructors //\n    //////////////////\n\n    /// @name constructors and destructors\n    /// Constructors of class @ref basic_json, copy/move constructor, copy\n    /// assignment, static functions creating objects, and the destructor.\n    /// @{\n\n    /*!\n    @brief create an empty value with a given type\n\n    Create an empty JSON value with a given type. The value will be default\n    initialized with an empty value which depends on the type:\n\n    Value type  | initial value\n    ----------- | -------------\n    null        | `null`\n    boolean     | `false`\n    string      | `\"\"`\n    number      | `0`\n    object      | `{}`\n    array       | `[]`\n\n    @param[in] v  the type of the value to create\n\n    @complexity Constant.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @liveexample{The following code shows the constructor for different @ref\n    value_t values,basic_json__value_t}\n\n    @sa @ref clear() -- restores the postcondition of this constructor\n\n    @since version 1.0.0\n    */\n    basic_json(const value_t v)\n        : m_type(v), m_value(v)\n    {\n        assert_invariant();\n    }\n\n    /*!\n    @brief create a null object\n\n    Create a `null` JSON value. It either takes a null pointer as parameter\n    (explicitly creating `null`) or no parameter (implicitly creating `null`).\n    The passed null pointer itself is not read -- it is only used to choose\n    the right constructor.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this constructor never throws\n    exceptions.\n\n    @liveexample{The following code shows the constructor with and without a\n    null pointer parameter.,basic_json__nullptr_t}\n\n    @since version 1.0.0\n    */\n    basic_json(std::nullptr_t = nullptr) noexcept\n        : basic_json(value_t::null)\n    {\n        assert_invariant();\n    }\n\n    /*!\n    @brief create a JSON value\n\n    This is a \"catch all\" constructor for all compatible JSON types; that is,\n    types for which a `to_json()` method exists. The constructor forwards the\n    parameter @a val to that method (to `json_serializer<U>::to_json` method\n    with `U = uncvref_t<CompatibleType>`, to be exact).\n\n    Template type @a CompatibleType includes, but is not limited to, the\n    following types:\n    - **arrays**: @ref array_t and all kinds of compatible containers such as\n      `std::vector`, `std::deque`, `std::list`, `std::forward_list`,\n      `std::array`, `std::valarray`, `std::set`, `std::unordered_set`,\n      `std::multiset`, and `std::unordered_multiset` with a `value_type` from\n      which a @ref basic_json value can be constructed.\n    - **objects**: @ref object_t and all kinds of compatible associative\n      containers such as `std::map`, `std::unordered_map`, `std::multimap`,\n      and `std::unordered_multimap` with a `key_type` compatible to\n      @ref string_t and a `value_type` from which a @ref basic_json value can\n      be constructed.\n    - **strings**: @ref string_t, string literals, and all compatible string\n      containers can be used.\n    - **numbers**: @ref number_integer_t, @ref number_unsigned_t,\n      @ref number_float_t, and all convertible number types such as `int`,\n      `size_t`, `int64_t`, `float` or `double` can be used.\n    - **boolean**: @ref boolean_t / `bool` can be used.\n\n    See the examples below.\n\n    @tparam CompatibleType a type such that:\n    - @a CompatibleType is not derived from `std::istream`,\n    - @a CompatibleType is not @ref basic_json (to avoid hijacking copy/move\n         constructors),\n    - @a CompatibleType is not a different @ref basic_json type (i.e. with different template arguments)\n    - @a CompatibleType is not a @ref basic_json nested type (e.g.,\n         @ref json_pointer, @ref iterator, etc ...)\n    - @ref @ref json_serializer<U> has a\n         `to_json(basic_json_t&, CompatibleType&&)` method\n\n    @tparam U = `uncvref_t<CompatibleType>`\n\n    @param[in] val the value to be forwarded to the respective constructor\n\n    @complexity Usually linear in the size of the passed @a val, also\n                depending on the implementation of the called `to_json()`\n                method.\n\n    @exceptionsafety Depends on the called constructor. For types directly\n    supported by the library (i.e., all types for which no `to_json()` function\n    was provided), strong guarantee holds: if an exception is thrown, there are\n    no changes to any JSON value.\n\n    @liveexample{The following code shows the constructor with several\n    compatible types.,basic_json__CompatibleType}\n\n    @since version 2.1.0\n    */\n    template <typename CompatibleType,\n              typename U = detail::uncvref_t<CompatibleType>,\n              detail::enable_if_t<\n                  not detail::is_basic_json<U>::value and detail::is_compatible_type<basic_json_t, U>::value, int> = 0>\n    basic_json(CompatibleType && val) noexcept(noexcept(\n                JSONSerializer<U>::to_json(std::declval<basic_json_t&>(),\n                                           std::forward<CompatibleType>(val))))\n    {\n        JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val));\n        assert_invariant();\n    }\n\n    /*!\n    @brief create a JSON value from an existing one\n\n    This is a constructor for existing @ref basic_json types.\n    It does not hijack copy/move constructors, since the parameter has different\n    template arguments than the current ones.\n\n    The constructor tries to convert the internal @ref m_value of the parameter.\n\n    @tparam BasicJsonType a type such that:\n    - @a BasicJsonType is a @ref basic_json type.\n    - @a BasicJsonType has different template arguments than @ref basic_json_t.\n\n    @param[in] val the @ref basic_json value to be converted.\n\n    @complexity Usually linear in the size of the passed @a val, also\n                depending on the implementation of the called `to_json()`\n                method.\n\n    @exceptionsafety Depends on the called constructor. For types directly\n    supported by the library (i.e., all types for which no `to_json()` function\n    was provided), strong guarantee holds: if an exception is thrown, there are\n    no changes to any JSON value.\n\n    @since version 3.2.0\n    */\n    template <typename BasicJsonType,\n              detail::enable_if_t<\n                  detail::is_basic_json<BasicJsonType>::value and not std::is_same<basic_json, BasicJsonType>::value, int> = 0>\n    basic_json(const BasicJsonType& val)\n    {\n        using other_boolean_t = typename BasicJsonType::boolean_t;\n        using other_number_float_t = typename BasicJsonType::number_float_t;\n        using other_number_integer_t = typename BasicJsonType::number_integer_t;\n        using other_number_unsigned_t = typename BasicJsonType::number_unsigned_t;\n        using other_string_t = typename BasicJsonType::string_t;\n        using other_object_t = typename BasicJsonType::object_t;\n        using other_array_t = typename BasicJsonType::array_t;\n\n        switch (val.type())\n        {\n            case value_t::boolean:\n                JSONSerializer<other_boolean_t>::to_json(*this, val.template get<other_boolean_t>());\n                break;\n            case value_t::number_float:\n                JSONSerializer<other_number_float_t>::to_json(*this, val.template get<other_number_float_t>());\n                break;\n            case value_t::number_integer:\n                JSONSerializer<other_number_integer_t>::to_json(*this, val.template get<other_number_integer_t>());\n                break;\n            case value_t::number_unsigned:\n                JSONSerializer<other_number_unsigned_t>::to_json(*this, val.template get<other_number_unsigned_t>());\n                break;\n            case value_t::string:\n                JSONSerializer<other_string_t>::to_json(*this, val.template get_ref<const other_string_t&>());\n                break;\n            case value_t::object:\n                JSONSerializer<other_object_t>::to_json(*this, val.template get_ref<const other_object_t&>());\n                break;\n            case value_t::array:\n                JSONSerializer<other_array_t>::to_json(*this, val.template get_ref<const other_array_t&>());\n                break;\n            case value_t::null:\n                *this = nullptr;\n                break;\n            case value_t::discarded:\n                m_type = value_t::discarded;\n                break;\n            default:            // LCOV_EXCL_LINE\n                assert(false);  // LCOV_EXCL_LINE\n        }\n        assert_invariant();\n    }\n\n    /*!\n    @brief create a container (array or object) from an initializer list\n\n    Creates a JSON value of type array or object from the passed initializer\n    list @a init. In case @a type_deduction is `true` (default), the type of\n    the JSON value to be created is deducted from the initializer list @a init\n    according to the following rules:\n\n    1. If the list is empty, an empty JSON object value `{}` is created.\n    2. If the list consists of pairs whose first element is a string, a JSON\n       object value is created where the first elements of the pairs are\n       treated as keys and the second elements are as values.\n    3. In all other cases, an array is created.\n\n    The rules aim to create the best fit between a C++ initializer list and\n    JSON values. The rationale is as follows:\n\n    1. The empty initializer list is written as `{}` which is exactly an empty\n       JSON object.\n    2. C++ has no way of describing mapped types other than to list a list of\n       pairs. As JSON requires that keys must be of type string, rule 2 is the\n       weakest constraint one can pose on initializer lists to interpret them\n       as an object.\n    3. In all other cases, the initializer list could not be interpreted as\n       JSON object type, so interpreting it as JSON array type is safe.\n\n    With the rules described above, the following JSON values cannot be\n    expressed by an initializer list:\n\n    - the empty array (`[]`): use @ref array(initializer_list_t)\n      with an empty initializer list in this case\n    - arrays whose elements satisfy rule 2: use @ref\n      array(initializer_list_t) with the same initializer list\n      in this case\n\n    @note When used without parentheses around an empty initializer list, @ref\n    basic_json() is called instead of this function, yielding the JSON null\n    value.\n\n    @param[in] init  initializer list with JSON values\n\n    @param[in] type_deduction internal parameter; when set to `true`, the type\n    of the JSON value is deducted from the initializer list @a init; when set\n    to `false`, the type provided via @a manual_type is forced. This mode is\n    used by the functions @ref array(initializer_list_t) and\n    @ref object(initializer_list_t).\n\n    @param[in] manual_type internal parameter; when @a type_deduction is set\n    to `false`, the created JSON value will use the provided type (only @ref\n    value_t::array and @ref value_t::object are valid); when @a type_deduction\n    is set to `true`, this parameter has no effect\n\n    @throw type_error.301 if @a type_deduction is `false`, @a manual_type is\n    `value_t::object`, but @a init contains an element which is not a pair\n    whose first element is a string. In this case, the constructor could not\n    create an object. If @a type_deduction would have be `true`, an array\n    would have been created. See @ref object(initializer_list_t)\n    for an example.\n\n    @complexity Linear in the size of the initializer list @a init.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @liveexample{The example below shows how JSON values are created from\n    initializer lists.,basic_json__list_init_t}\n\n    @sa @ref array(initializer_list_t) -- create a JSON array\n    value from an initializer list\n    @sa @ref object(initializer_list_t) -- create a JSON object\n    value from an initializer list\n\n    @since version 1.0.0\n    */\n    basic_json(initializer_list_t init,\n               bool type_deduction = true,\n               value_t manual_type = value_t::array)\n    {\n        // check if each element is an array with two elements whose first\n        // element is a string\n        bool is_an_object = std::all_of(init.begin(), init.end(),\n                                        [](const detail::json_ref<basic_json>& element_ref)\n        {\n            return element_ref->is_array() and element_ref->size() == 2 and (*element_ref)[0].is_string();\n        });\n\n        // adjust type if type deduction is not wanted\n        if (not type_deduction)\n        {\n            // if array is wanted, do not create an object though possible\n            if (manual_type == value_t::array)\n            {\n                is_an_object = false;\n            }\n\n            // if object is wanted but impossible, throw an exception\n            if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object and not is_an_object))\n            {\n                JSON_THROW(type_error::create(301, \"cannot create object from initializer list\"));\n            }\n        }\n\n        if (is_an_object)\n        {\n            // the initializer list is a list of pairs -> create object\n            m_type = value_t::object;\n            m_value = value_t::object;\n\n            std::for_each(init.begin(), init.end(), [this](const detail::json_ref<basic_json>& element_ref)\n            {\n                auto element = element_ref.moved_or_copied();\n                m_value.object->emplace(\n                    std::move(*((*element.m_value.array)[0].m_value.string)),\n                    std::move((*element.m_value.array)[1]));\n            });\n        }\n        else\n        {\n            // the initializer list describes an array -> create array\n            m_type = value_t::array;\n            m_value.array = create<array_t>(init.begin(), init.end());\n        }\n\n        assert_invariant();\n    }\n\n    /*!\n    @brief explicitly create an array from an initializer list\n\n    Creates a JSON array value from a given initializer list. That is, given a\n    list of values `a, b, c`, creates the JSON value `[a, b, c]`. If the\n    initializer list is empty, the empty array `[]` is created.\n\n    @note This function is only needed to express two edge cases that cannot\n    be realized with the initializer list constructor (@ref\n    basic_json(initializer_list_t, bool, value_t)). These cases\n    are:\n    1. creating an array whose elements are all pairs whose first element is a\n    string -- in this case, the initializer list constructor would create an\n    object, taking the first elements as keys\n    2. creating an empty array -- passing the empty initializer list to the\n    initializer list constructor yields an empty object\n\n    @param[in] init  initializer list with JSON values to create an array from\n    (optional)\n\n    @return JSON array value\n\n    @complexity Linear in the size of @a init.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @liveexample{The following code shows an example for the `array`\n    function.,array}\n\n    @sa @ref basic_json(initializer_list_t, bool, value_t) --\n    create a JSON value from an initializer list\n    @sa @ref object(initializer_list_t) -- create a JSON object\n    value from an initializer list\n\n    @since version 1.0.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json array(initializer_list_t init = {})\n    {\n        return basic_json(init, false, value_t::array);\n    }\n\n    /*!\n    @brief explicitly create an object from an initializer list\n\n    Creates a JSON object value from a given initializer list. The initializer\n    lists elements must be pairs, and their first elements must be strings. If\n    the initializer list is empty, the empty object `{}` is created.\n\n    @note This function is only added for symmetry reasons. In contrast to the\n    related function @ref array(initializer_list_t), there are\n    no cases which can only be expressed by this function. That is, any\n    initializer list @a init can also be passed to the initializer list\n    constructor @ref basic_json(initializer_list_t, bool, value_t).\n\n    @param[in] init  initializer list to create an object from (optional)\n\n    @return JSON object value\n\n    @throw type_error.301 if @a init is not a list of pairs whose first\n    elements are strings. In this case, no object can be created. When such a\n    value is passed to @ref basic_json(initializer_list_t, bool, value_t),\n    an array would have been created from the passed initializer list @a init.\n    See example below.\n\n    @complexity Linear in the size of @a init.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @liveexample{The following code shows an example for the `object`\n    function.,object}\n\n    @sa @ref basic_json(initializer_list_t, bool, value_t) --\n    create a JSON value from an initializer list\n    @sa @ref array(initializer_list_t) -- create a JSON array\n    value from an initializer list\n\n    @since version 1.0.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json object(initializer_list_t init = {})\n    {\n        return basic_json(init, false, value_t::object);\n    }\n\n    /*!\n    @brief construct an array with count copies of given value\n\n    Constructs a JSON array value by creating @a cnt copies of a passed value.\n    In case @a cnt is `0`, an empty array is created.\n\n    @param[in] cnt  the number of JSON copies of @a val to create\n    @param[in] val  the JSON value to copy\n\n    @post `std::distance(begin(),end()) == cnt` holds.\n\n    @complexity Linear in @a cnt.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @liveexample{The following code shows examples for the @ref\n    basic_json(size_type\\, const basic_json&)\n    constructor.,basic_json__size_type_basic_json}\n\n    @since version 1.0.0\n    */\n    basic_json(size_type cnt, const basic_json& val)\n        : m_type(value_t::array)\n    {\n        m_value.array = create<array_t>(cnt, val);\n        assert_invariant();\n    }\n\n    /*!\n    @brief construct a JSON container given an iterator range\n\n    Constructs the JSON value with the contents of the range `[first, last)`.\n    The semantics depends on the different types a JSON value can have:\n    - In case of a null type, invalid_iterator.206 is thrown.\n    - In case of other primitive types (number, boolean, or string), @a first\n      must be `begin()` and @a last must be `end()`. In this case, the value is\n      copied. Otherwise, invalid_iterator.204 is thrown.\n    - In case of structured types (array, object), the constructor behaves as\n      similar versions for `std::vector` or `std::map`; that is, a JSON array\n      or object is constructed from the values in the range.\n\n    @tparam InputIT an input iterator type (@ref iterator or @ref\n    const_iterator)\n\n    @param[in] first begin of the range to copy from (included)\n    @param[in] last end of the range to copy from (excluded)\n\n    @pre Iterators @a first and @a last must be initialized. **This\n         precondition is enforced with an assertion (see warning).** If\n         assertions are switched off, a violation of this precondition yields\n         undefined behavior.\n\n    @pre Range `[first, last)` is valid. Usually, this precondition cannot be\n         checked efficiently. Only certain edge cases are detected; see the\n         description of the exceptions below. A violation of this precondition\n         yields undefined behavior.\n\n    @warning A precondition is enforced with a runtime assertion that will\n             result in calling `std::abort` if this precondition is not met.\n             Assertions can be disabled by defining `NDEBUG` at compile time.\n             See https://en.cppreference.com/w/cpp/error/assert for more\n             information.\n\n    @throw invalid_iterator.201 if iterators @a first and @a last are not\n    compatible (i.e., do not belong to the same JSON value). In this case,\n    the range `[first, last)` is undefined.\n    @throw invalid_iterator.204 if iterators @a first and @a last belong to a\n    primitive type (number, boolean, or string), but @a first does not point\n    to the first element any more. In this case, the range `[first, last)` is\n    undefined. See example code below.\n    @throw invalid_iterator.206 if iterators @a first and @a last belong to a\n    null value. In this case, the range `[first, last)` is undefined.\n\n    @complexity Linear in distance between @a first and @a last.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @liveexample{The example below shows several ways to create JSON values by\n    specifying a subrange with iterators.,basic_json__InputIt_InputIt}\n\n    @since version 1.0.0\n    */\n    template<class InputIT, typename std::enable_if<\n                 std::is_same<InputIT, typename basic_json_t::iterator>::value or\n                 std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int>::type = 0>\n    basic_json(InputIT first, InputIT last)\n    {\n        assert(first.m_object != nullptr);\n        assert(last.m_object != nullptr);\n\n        // make sure iterator fits the current value\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(201, \"iterators are not compatible\"));\n        }\n\n        // copy type from first iterator\n        m_type = first.m_object->m_type;\n\n        // check if iterator range is complete for primitive values\n        switch (m_type)\n        {\n            case value_t::boolean:\n            case value_t::number_float:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::string:\n            {\n                if (JSON_HEDLEY_UNLIKELY(not first.m_it.primitive_iterator.is_begin()\n                                         or not last.m_it.primitive_iterator.is_end()))\n                {\n                    JSON_THROW(invalid_iterator::create(204, \"iterators out of range\"));\n                }\n                break;\n            }\n\n            default:\n                break;\n        }\n\n        switch (m_type)\n        {\n            case value_t::number_integer:\n            {\n                m_value.number_integer = first.m_object->m_value.number_integer;\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                m_value.number_unsigned = first.m_object->m_value.number_unsigned;\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                m_value.number_float = first.m_object->m_value.number_float;\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                m_value.boolean = first.m_object->m_value.boolean;\n                break;\n            }\n\n            case value_t::string:\n            {\n                m_value = *first.m_object->m_value.string;\n                break;\n            }\n\n            case value_t::object:\n            {\n                m_value.object = create<object_t>(first.m_it.object_iterator,\n                                                  last.m_it.object_iterator);\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_value.array = create<array_t>(first.m_it.array_iterator,\n                                                last.m_it.array_iterator);\n                break;\n            }\n\n            default:\n                JSON_THROW(invalid_iterator::create(206, \"cannot construct with iterators from \" +\n                                                    std::string(first.m_object->type_name())));\n        }\n\n        assert_invariant();\n    }\n\n\n    ///////////////////////////////////////\n    // other constructors and destructor //\n    ///////////////////////////////////////\n\n    /// @private\n    basic_json(const detail::json_ref<basic_json>& ref)\n        : basic_json(ref.moved_or_copied())\n    {}\n\n    /*!\n    @brief copy constructor\n\n    Creates a copy of a given JSON value.\n\n    @param[in] other  the JSON value to copy\n\n    @post `*this == other`\n\n    @complexity Linear in the size of @a other.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes to any JSON value.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is linear.\n    - As postcondition, it holds: `other == basic_json(other)`.\n\n    @liveexample{The following code shows an example for the copy\n    constructor.,basic_json__basic_json}\n\n    @since version 1.0.0\n    */\n    basic_json(const basic_json& other)\n        : m_type(other.m_type)\n    {\n        // check of passed value is valid\n        other.assert_invariant();\n\n        switch (m_type)\n        {\n            case value_t::object:\n            {\n                m_value = *other.m_value.object;\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_value = *other.m_value.array;\n                break;\n            }\n\n            case value_t::string:\n            {\n                m_value = *other.m_value.string;\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                m_value = other.m_value.boolean;\n                break;\n            }\n\n            case value_t::number_integer:\n            {\n                m_value = other.m_value.number_integer;\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                m_value = other.m_value.number_unsigned;\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                m_value = other.m_value.number_float;\n                break;\n            }\n\n            default:\n                break;\n        }\n\n        assert_invariant();\n    }\n\n    /*!\n    @brief move constructor\n\n    Move constructor. Constructs a JSON value with the contents of the given\n    value @a other using move semantics. It \"steals\" the resources from @a\n    other and leaves it as JSON null value.\n\n    @param[in,out] other  value to move to this object\n\n    @post `*this` has the same value as @a other before the call.\n    @post @a other is a JSON null value.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this constructor never throws\n    exceptions.\n\n    @requirement This function helps `basic_json` satisfying the\n    [MoveConstructible](https://en.cppreference.com/w/cpp/named_req/MoveConstructible)\n    requirements.\n\n    @liveexample{The code below shows the move constructor explicitly called\n    via std::move.,basic_json__moveconstructor}\n\n    @since version 1.0.0\n    */\n    basic_json(basic_json&& other) noexcept\n        : m_type(std::move(other.m_type)),\n          m_value(std::move(other.m_value))\n    {\n        // check that passed value is valid\n        other.assert_invariant();\n\n        // invalidate payload\n        other.m_type = value_t::null;\n        other.m_value = {};\n\n        assert_invariant();\n    }\n\n    /*!\n    @brief copy assignment\n\n    Copy assignment operator. Copies a JSON value via the \"copy and swap\"\n    strategy: It is expressed in terms of the copy constructor, destructor,\n    and the `swap()` member function.\n\n    @param[in] other  value to copy from\n\n    @complexity Linear.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is linear.\n\n    @liveexample{The code below shows and example for the copy assignment. It\n    creates a copy of value `a` which is then swapped with `b`. Finally\\, the\n    copy of `a` (which is the null value after the swap) is\n    destroyed.,basic_json__copyassignment}\n\n    @since version 1.0.0\n    */\n    basic_json& operator=(basic_json other) noexcept (\n        std::is_nothrow_move_constructible<value_t>::value and\n        std::is_nothrow_move_assignable<value_t>::value and\n        std::is_nothrow_move_constructible<json_value>::value and\n        std::is_nothrow_move_assignable<json_value>::value\n    )\n    {\n        // check that passed value is valid\n        other.assert_invariant();\n\n        using std::swap;\n        swap(m_type, other.m_type);\n        swap(m_value, other.m_value);\n\n        assert_invariant();\n        return *this;\n    }\n\n    /*!\n    @brief destructor\n\n    Destroys the JSON value and frees all allocated memory.\n\n    @complexity Linear.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is linear.\n    - All stored elements are destroyed and all memory is freed.\n\n    @since version 1.0.0\n    */\n    ~basic_json() noexcept\n    {\n        assert_invariant();\n        m_value.destroy(m_type);\n    }\n\n    /// @}\n\n  public:\n    ///////////////////////\n    // object inspection //\n    ///////////////////////\n\n    /// @name object inspection\n    /// Functions to inspect the type of a JSON value.\n    /// @{\n\n    /*!\n    @brief serialization\n\n    Serialization function for JSON values. The function tries to mimic\n    Python's `json.dumps()` function, and currently supports its @a indent\n    and @a ensure_ascii parameters.\n\n    @param[in] indent If indent is nonnegative, then array elements and object\n    members will be pretty-printed with that indent level. An indent level of\n    `0` will only insert newlines. `-1` (the default) selects the most compact\n    representation.\n    @param[in] indent_char The character to use for indentation if @a indent is\n    greater than `0`. The default is ` ` (space).\n    @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters\n    in the output are escaped with `\\uXXXX` sequences, and the result consists\n    of ASCII characters only.\n    @param[in] error_handler  how to react on decoding errors; there are three\n    possible values: `strict` (throws and exception in case a decoding error\n    occurs; default), `replace` (replace invalid UTF-8 sequences with U+FFFD),\n    and `ignore` (ignore invalid UTF-8 sequences during serialization).\n\n    @return string containing the serialization of the JSON value\n\n    @throw type_error.316 if a string stored inside the JSON value is not\n                          UTF-8 encoded\n\n    @complexity Linear.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @liveexample{The following example shows the effect of different @a indent\\,\n    @a indent_char\\, and @a ensure_ascii parameters to the result of the\n    serialization.,dump}\n\n    @see https://docs.python.org/2/library/json.html#json.dump\n\n    @since version 1.0.0; indentation character @a indent_char, option\n           @a ensure_ascii and exceptions added in version 3.0.0; error\n           handlers added in version 3.4.0.\n    */\n    string_t dump(const int indent = -1,\n                  const char indent_char = ' ',\n                  const bool ensure_ascii = false,\n                  const error_handler_t error_handler = error_handler_t::strict) const\n    {\n        string_t result;\n        serializer s(detail::output_adapter<char, string_t>(result), indent_char, error_handler);\n\n        if (indent >= 0)\n        {\n            s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent));\n        }\n        else\n        {\n            s.dump(*this, false, ensure_ascii, 0);\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief return the type of the JSON value (explicit)\n\n    Return the type of the JSON value as a value from the @ref value_t\n    enumeration.\n\n    @return the type of the JSON value\n            Value type                | return value\n            ------------------------- | -------------------------\n            null                      | value_t::null\n            boolean                   | value_t::boolean\n            string                    | value_t::string\n            number (integer)          | value_t::number_integer\n            number (unsigned integer) | value_t::number_unsigned\n            number (floating-point)   | value_t::number_float\n            object                    | value_t::object\n            array                     | value_t::array\n            discarded                 | value_t::discarded\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `type()` for all JSON\n    types.,type}\n\n    @sa @ref operator value_t() -- return the type of the JSON value (implicit)\n    @sa @ref type_name() -- return the type as string\n\n    @since version 1.0.0\n    */\n    constexpr value_t type() const noexcept\n    {\n        return m_type;\n    }\n\n    /*!\n    @brief return whether type is primitive\n\n    This function returns true if and only if the JSON type is primitive\n    (string, number, boolean, or null).\n\n    @return `true` if type is primitive (string, number, boolean, or null),\n    `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_primitive()` for all JSON\n    types.,is_primitive}\n\n    @sa @ref is_structured() -- returns whether JSON value is structured\n    @sa @ref is_null() -- returns whether JSON value is `null`\n    @sa @ref is_string() -- returns whether JSON value is a string\n    @sa @ref is_boolean() -- returns whether JSON value is a boolean\n    @sa @ref is_number() -- returns whether JSON value is a number\n\n    @since version 1.0.0\n    */\n    constexpr bool is_primitive() const noexcept\n    {\n        return is_null() or is_string() or is_boolean() or is_number();\n    }\n\n    /*!\n    @brief return whether type is structured\n\n    This function returns true if and only if the JSON type is structured\n    (array or object).\n\n    @return `true` if type is structured (array or object), `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_structured()` for all JSON\n    types.,is_structured}\n\n    @sa @ref is_primitive() -- returns whether value is primitive\n    @sa @ref is_array() -- returns whether value is an array\n    @sa @ref is_object() -- returns whether value is an object\n\n    @since version 1.0.0\n    */\n    constexpr bool is_structured() const noexcept\n    {\n        return is_array() or is_object();\n    }\n\n    /*!\n    @brief return whether value is null\n\n    This function returns true if and only if the JSON value is null.\n\n    @return `true` if type is null, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_null()` for all JSON\n    types.,is_null}\n\n    @since version 1.0.0\n    */\n    constexpr bool is_null() const noexcept\n    {\n        return m_type == value_t::null;\n    }\n\n    /*!\n    @brief return whether value is a boolean\n\n    This function returns true if and only if the JSON value is a boolean.\n\n    @return `true` if type is boolean, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_boolean()` for all JSON\n    types.,is_boolean}\n\n    @since version 1.0.0\n    */\n    constexpr bool is_boolean() const noexcept\n    {\n        return m_type == value_t::boolean;\n    }\n\n    /*!\n    @brief return whether value is a number\n\n    This function returns true if and only if the JSON value is a number. This\n    includes both integer (signed and unsigned) and floating-point values.\n\n    @return `true` if type is number (regardless whether integer, unsigned\n    integer or floating-type), `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_number()` for all JSON\n    types.,is_number}\n\n    @sa @ref is_number_integer() -- check if value is an integer or unsigned\n    integer number\n    @sa @ref is_number_unsigned() -- check if value is an unsigned integer\n    number\n    @sa @ref is_number_float() -- check if value is a floating-point number\n\n    @since version 1.0.0\n    */\n    constexpr bool is_number() const noexcept\n    {\n        return is_number_integer() or is_number_float();\n    }\n\n    /*!\n    @brief return whether value is an integer number\n\n    This function returns true if and only if the JSON value is a signed or\n    unsigned integer number. This excludes floating-point values.\n\n    @return `true` if type is an integer or unsigned integer number, `false`\n    otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_number_integer()` for all\n    JSON types.,is_number_integer}\n\n    @sa @ref is_number() -- check if value is a number\n    @sa @ref is_number_unsigned() -- check if value is an unsigned integer\n    number\n    @sa @ref is_number_float() -- check if value is a floating-point number\n\n    @since version 1.0.0\n    */\n    constexpr bool is_number_integer() const noexcept\n    {\n        return m_type == value_t::number_integer or m_type == value_t::number_unsigned;\n    }\n\n    /*!\n    @brief return whether value is an unsigned integer number\n\n    This function returns true if and only if the JSON value is an unsigned\n    integer number. This excludes floating-point and signed integer values.\n\n    @return `true` if type is an unsigned integer number, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_number_unsigned()` for all\n    JSON types.,is_number_unsigned}\n\n    @sa @ref is_number() -- check if value is a number\n    @sa @ref is_number_integer() -- check if value is an integer or unsigned\n    integer number\n    @sa @ref is_number_float() -- check if value is a floating-point number\n\n    @since version 2.0.0\n    */\n    constexpr bool is_number_unsigned() const noexcept\n    {\n        return m_type == value_t::number_unsigned;\n    }\n\n    /*!\n    @brief return whether value is a floating-point number\n\n    This function returns true if and only if the JSON value is a\n    floating-point number. This excludes signed and unsigned integer values.\n\n    @return `true` if type is a floating-point number, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_number_float()` for all\n    JSON types.,is_number_float}\n\n    @sa @ref is_number() -- check if value is number\n    @sa @ref is_number_integer() -- check if value is an integer number\n    @sa @ref is_number_unsigned() -- check if value is an unsigned integer\n    number\n\n    @since version 1.0.0\n    */\n    constexpr bool is_number_float() const noexcept\n    {\n        return m_type == value_t::number_float;\n    }\n\n    /*!\n    @brief return whether value is an object\n\n    This function returns true if and only if the JSON value is an object.\n\n    @return `true` if type is object, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_object()` for all JSON\n    types.,is_object}\n\n    @since version 1.0.0\n    */\n    constexpr bool is_object() const noexcept\n    {\n        return m_type == value_t::object;\n    }\n\n    /*!\n    @brief return whether value is an array\n\n    This function returns true if and only if the JSON value is an array.\n\n    @return `true` if type is array, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_array()` for all JSON\n    types.,is_array}\n\n    @since version 1.0.0\n    */\n    constexpr bool is_array() const noexcept\n    {\n        return m_type == value_t::array;\n    }\n\n    /*!\n    @brief return whether value is a string\n\n    This function returns true if and only if the JSON value is a string.\n\n    @return `true` if type is string, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_string()` for all JSON\n    types.,is_string}\n\n    @since version 1.0.0\n    */\n    constexpr bool is_string() const noexcept\n    {\n        return m_type == value_t::string;\n    }\n\n    /*!\n    @brief return whether value is discarded\n\n    This function returns true if and only if the JSON value was discarded\n    during parsing with a callback function (see @ref parser_callback_t).\n\n    @note This function will always be `false` for JSON values after parsing.\n    That is, discarded values can only occur during parsing, but will be\n    removed when inside a structured value or replaced by null in other cases.\n\n    @return `true` if type is discarded, `false` otherwise.\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies `is_discarded()` for all JSON\n    types.,is_discarded}\n\n    @since version 1.0.0\n    */\n    constexpr bool is_discarded() const noexcept\n    {\n        return m_type == value_t::discarded;\n    }\n\n    /*!\n    @brief return the type of the JSON value (implicit)\n\n    Implicitly return the type of the JSON value as a value from the @ref\n    value_t enumeration.\n\n    @return the type of the JSON value\n\n    @complexity Constant.\n\n    @exceptionsafety No-throw guarantee: this member function never throws\n    exceptions.\n\n    @liveexample{The following code exemplifies the @ref value_t operator for\n    all JSON types.,operator__value_t}\n\n    @sa @ref type() -- return the type of the JSON value (explicit)\n    @sa @ref type_name() -- return the type as string\n\n    @since version 1.0.0\n    */\n    constexpr operator value_t() const noexcept\n    {\n        return m_type;\n    }\n\n    /// @}\n\n  private:\n    //////////////////\n    // value access //\n    //////////////////\n\n    /// get a boolean (explicit)\n    boolean_t get_impl(boolean_t* /*unused*/) const\n    {\n        if (JSON_HEDLEY_LIKELY(is_boolean()))\n        {\n            return m_value.boolean;\n        }\n\n        JSON_THROW(type_error::create(302, \"type must be boolean, but is \" + std::string(type_name())));\n    }\n\n    /// get a pointer to the value (object)\n    object_t* get_impl_ptr(object_t* /*unused*/) noexcept\n    {\n        return is_object() ? m_value.object : nullptr;\n    }\n\n    /// get a pointer to the value (object)\n    constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept\n    {\n        return is_object() ? m_value.object : nullptr;\n    }\n\n    /// get a pointer to the value (array)\n    array_t* get_impl_ptr(array_t* /*unused*/) noexcept\n    {\n        return is_array() ? m_value.array : nullptr;\n    }\n\n    /// get a pointer to the value (array)\n    constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept\n    {\n        return is_array() ? m_value.array : nullptr;\n    }\n\n    /// get a pointer to the value (string)\n    string_t* get_impl_ptr(string_t* /*unused*/) noexcept\n    {\n        return is_string() ? m_value.string : nullptr;\n    }\n\n    /// get a pointer to the value (string)\n    constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept\n    {\n        return is_string() ? m_value.string : nullptr;\n    }\n\n    /// get a pointer to the value (boolean)\n    boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept\n    {\n        return is_boolean() ? &m_value.boolean : nullptr;\n    }\n\n    /// get a pointer to the value (boolean)\n    constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept\n    {\n        return is_boolean() ? &m_value.boolean : nullptr;\n    }\n\n    /// get a pointer to the value (integer number)\n    number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept\n    {\n        return is_number_integer() ? &m_value.number_integer : nullptr;\n    }\n\n    /// get a pointer to the value (integer number)\n    constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept\n    {\n        return is_number_integer() ? &m_value.number_integer : nullptr;\n    }\n\n    /// get a pointer to the value (unsigned number)\n    number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept\n    {\n        return is_number_unsigned() ? &m_value.number_unsigned : nullptr;\n    }\n\n    /// get a pointer to the value (unsigned number)\n    constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept\n    {\n        return is_number_unsigned() ? &m_value.number_unsigned : nullptr;\n    }\n\n    /// get a pointer to the value (floating-point number)\n    number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept\n    {\n        return is_number_float() ? &m_value.number_float : nullptr;\n    }\n\n    /// get a pointer to the value (floating-point number)\n    constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept\n    {\n        return is_number_float() ? &m_value.number_float : nullptr;\n    }\n\n    /*!\n    @brief helper function to implement get_ref()\n\n    This function helps to implement get_ref() without code duplication for\n    const and non-const overloads\n\n    @tparam ThisType will be deduced as `basic_json` or `const basic_json`\n\n    @throw type_error.303 if ReferenceType does not match underlying value\n    type of the current JSON\n    */\n    template<typename ReferenceType, typename ThisType>\n    static ReferenceType get_ref_impl(ThisType& obj)\n    {\n        // delegate the call to get_ptr<>()\n        auto ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();\n\n        if (JSON_HEDLEY_LIKELY(ptr != nullptr))\n        {\n            return *ptr;\n        }\n\n        JSON_THROW(type_error::create(303, \"incompatible ReferenceType for get_ref, actual type is \" + std::string(obj.type_name())));\n    }\n\n  public:\n    /// @name value access\n    /// Direct access to the stored value of a JSON value.\n    /// @{\n\n    /*!\n    @brief get special-case overload\n\n    This overloads avoids a lot of template boilerplate, it can be seen as the\n    identity method\n\n    @tparam BasicJsonType == @ref basic_json\n\n    @return a copy of *this\n\n    @complexity Constant.\n\n    @since version 2.1.0\n    */\n    template<typename BasicJsonType, detail::enable_if_t<\n                 std::is_same<typename std::remove_const<BasicJsonType>::type, basic_json_t>::value,\n                 int> = 0>\n    basic_json get() const\n    {\n        return *this;\n    }\n\n    /*!\n    @brief get special-case overload\n\n    This overloads converts the current @ref basic_json in a different\n    @ref basic_json type\n\n    @tparam BasicJsonType == @ref basic_json\n\n    @return a copy of *this, converted into @tparam BasicJsonType\n\n    @complexity Depending on the implementation of the called `from_json()`\n                method.\n\n    @since version 3.2.0\n    */\n    template<typename BasicJsonType, detail::enable_if_t<\n                 not std::is_same<BasicJsonType, basic_json>::value and\n                 detail::is_basic_json<BasicJsonType>::value, int> = 0>\n    BasicJsonType get() const\n    {\n        return *this;\n    }\n\n    /*!\n    @brief get a value (explicit)\n\n    Explicit type conversion between the JSON value and a compatible value\n    which is [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible)\n    and [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible).\n    The value is converted by calling the @ref json_serializer<ValueType>\n    `from_json()` method.\n\n    The function is equivalent to executing\n    @code {.cpp}\n    ValueType ret;\n    JSONSerializer<ValueType>::from_json(*this, ret);\n    return ret;\n    @endcode\n\n    This overloads is chosen if:\n    - @a ValueType is not @ref basic_json,\n    - @ref json_serializer<ValueType> has a `from_json()` method of the form\n      `void from_json(const basic_json&, ValueType&)`, and\n    - @ref json_serializer<ValueType> does not have a `from_json()` method of\n      the form `ValueType from_json(const basic_json&)`\n\n    @tparam ValueTypeCV the provided value type\n    @tparam ValueType the returned value type\n\n    @return copy of the JSON value, converted to @a ValueType\n\n    @throw what @ref json_serializer<ValueType> `from_json()` method throws\n\n    @liveexample{The example below shows several conversions from JSON values\n    to other types. There a few things to note: (1) Floating-point numbers can\n    be converted to integers\\, (2) A JSON array can be converted to a standard\n    `std::vector<short>`\\, (3) A JSON object can be converted to C++\n    associative containers such as `std::unordered_map<std::string\\,\n    json>`.,get__ValueType_const}\n\n    @since version 2.1.0\n    */\n    template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>,\n             detail::enable_if_t <\n                 not detail::is_basic_json<ValueType>::value and\n                 detail::has_from_json<basic_json_t, ValueType>::value and\n                 not detail::has_non_default_from_json<basic_json_t, ValueType>::value,\n                 int> = 0>\n    ValueType get() const noexcept(noexcept(\n                                       JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))\n    {\n        // we cannot static_assert on ValueTypeCV being non-const, because\n        // there is support for get<const basic_json_t>(), which is why we\n        // still need the uncvref\n        static_assert(not std::is_reference<ValueTypeCV>::value,\n                      \"get() cannot be used with reference types, you might want to use get_ref()\");\n        static_assert(std::is_default_constructible<ValueType>::value,\n                      \"types must be DefaultConstructible when used with get()\");\n\n        ValueType ret;\n        JSONSerializer<ValueType>::from_json(*this, ret);\n        return ret;\n    }\n\n    /*!\n    @brief get a value (explicit); special case\n\n    Explicit type conversion between the JSON value and a compatible value\n    which is **not** [CopyConstructible](https://en.cppreference.com/w/cpp/named_req/CopyConstructible)\n    and **not** [DefaultConstructible](https://en.cppreference.com/w/cpp/named_req/DefaultConstructible).\n    The value is converted by calling the @ref json_serializer<ValueType>\n    `from_json()` method.\n\n    The function is equivalent to executing\n    @code {.cpp}\n    return JSONSerializer<ValueTypeCV>::from_json(*this);\n    @endcode\n\n    This overloads is chosen if:\n    - @a ValueType is not @ref basic_json and\n    - @ref json_serializer<ValueType> has a `from_json()` method of the form\n      `ValueType from_json(const basic_json&)`\n\n    @note If @ref json_serializer<ValueType> has both overloads of\n    `from_json()`, this one is chosen.\n\n    @tparam ValueTypeCV the provided value type\n    @tparam ValueType the returned value type\n\n    @return copy of the JSON value, converted to @a ValueType\n\n    @throw what @ref json_serializer<ValueType> `from_json()` method throws\n\n    @since version 2.1.0\n    */\n    template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>,\n             detail::enable_if_t<not std::is_same<basic_json_t, ValueType>::value and\n                                 detail::has_non_default_from_json<basic_json_t, ValueType>::value,\n                                 int> = 0>\n    ValueType get() const noexcept(noexcept(\n                                       JSONSerializer<ValueTypeCV>::from_json(std::declval<const basic_json_t&>())))\n    {\n        static_assert(not std::is_reference<ValueTypeCV>::value,\n                      \"get() cannot be used with reference types, you might want to use get_ref()\");\n        return JSONSerializer<ValueTypeCV>::from_json(*this);\n    }\n\n    /*!\n    @brief get a value (explicit)\n\n    Explicit type conversion between the JSON value and a compatible value.\n    The value is filled into the input parameter by calling the @ref json_serializer<ValueType>\n    `from_json()` method.\n\n    The function is equivalent to executing\n    @code {.cpp}\n    ValueType v;\n    JSONSerializer<ValueType>::from_json(*this, v);\n    @endcode\n\n    This overloads is chosen if:\n    - @a ValueType is not @ref basic_json,\n    - @ref json_serializer<ValueType> has a `from_json()` method of the form\n      `void from_json(const basic_json&, ValueType&)`, and\n\n    @tparam ValueType the input parameter type.\n\n    @return the input parameter, allowing chaining calls.\n\n    @throw what @ref json_serializer<ValueType> `from_json()` method throws\n\n    @liveexample{The example below shows several conversions from JSON values\n    to other types. There a few things to note: (1) Floating-point numbers can\n    be converted to integers\\, (2) A JSON array can be converted to a standard\n    `std::vector<short>`\\, (3) A JSON object can be converted to C++\n    associative containers such as `std::unordered_map<std::string\\,\n    json>`.,get_to}\n\n    @since version 3.3.0\n    */\n    template<typename ValueType,\n             detail::enable_if_t <\n                 not detail::is_basic_json<ValueType>::value and\n                 detail::has_from_json<basic_json_t, ValueType>::value,\n                 int> = 0>\n    ValueType & get_to(ValueType& v) const noexcept(noexcept(\n                JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), v)))\n    {\n        JSONSerializer<ValueType>::from_json(*this, v);\n        return v;\n    }\n\n    template <\n        typename T, std::size_t N,\n        typename Array = T (&)[N],\n        detail::enable_if_t <\n            detail::has_from_json<basic_json_t, Array>::value, int > = 0 >\n    Array get_to(T (&v)[N]) const\n    noexcept(noexcept(JSONSerializer<Array>::from_json(\n                          std::declval<const basic_json_t&>(), v)))\n    {\n        JSONSerializer<Array>::from_json(*this, v);\n        return v;\n    }\n\n\n    /*!\n    @brief get a pointer value (implicit)\n\n    Implicit pointer access to the internally stored JSON value. No copies are\n    made.\n\n    @warning Writing data to the pointee of the result yields an undefined\n    state.\n\n    @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref\n    object_t, @ref string_t, @ref boolean_t, @ref number_integer_t,\n    @ref number_unsigned_t, or @ref number_float_t. Enforced by a static\n    assertion.\n\n    @return pointer to the internally stored JSON value if the requested\n    pointer type @a PointerType fits to the JSON value; `nullptr` otherwise\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how pointers to internal values of a\n    JSON value can be requested. Note that no type conversions are made and a\n    `nullptr` is returned if the value and the requested pointer type does not\n    match.,get_ptr}\n\n    @since version 1.0.0\n    */\n    template<typename PointerType, typename std::enable_if<\n                 std::is_pointer<PointerType>::value, int>::type = 0>\n    auto get_ptr() noexcept -> decltype(std::declval<basic_json_t&>().get_impl_ptr(std::declval<PointerType>()))\n    {\n        // delegate the call to get_impl_ptr<>()\n        return get_impl_ptr(static_cast<PointerType>(nullptr));\n    }\n\n    /*!\n    @brief get a pointer value (implicit)\n    @copydoc get_ptr()\n    */\n    template<typename PointerType, typename std::enable_if<\n                 std::is_pointer<PointerType>::value and\n                 std::is_const<typename std::remove_pointer<PointerType>::type>::value, int>::type = 0>\n    constexpr auto get_ptr() const noexcept -> decltype(std::declval<const basic_json_t&>().get_impl_ptr(std::declval<PointerType>()))\n    {\n        // delegate the call to get_impl_ptr<>() const\n        return get_impl_ptr(static_cast<PointerType>(nullptr));\n    }\n\n    /*!\n    @brief get a pointer value (explicit)\n\n    Explicit pointer access to the internally stored JSON value. No copies are\n    made.\n\n    @warning The pointer becomes invalid if the underlying JSON object\n    changes.\n\n    @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref\n    object_t, @ref string_t, @ref boolean_t, @ref number_integer_t,\n    @ref number_unsigned_t, or @ref number_float_t.\n\n    @return pointer to the internally stored JSON value if the requested\n    pointer type @a PointerType fits to the JSON value; `nullptr` otherwise\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how pointers to internal values of a\n    JSON value can be requested. Note that no type conversions are made and a\n    `nullptr` is returned if the value and the requested pointer type does not\n    match.,get__PointerType}\n\n    @sa @ref get_ptr() for explicit pointer-member access\n\n    @since version 1.0.0\n    */\n    template<typename PointerType, typename std::enable_if<\n                 std::is_pointer<PointerType>::value, int>::type = 0>\n    auto get() noexcept -> decltype(std::declval<basic_json_t&>().template get_ptr<PointerType>())\n    {\n        // delegate the call to get_ptr\n        return get_ptr<PointerType>();\n    }\n\n    /*!\n    @brief get a pointer value (explicit)\n    @copydoc get()\n    */\n    template<typename PointerType, typename std::enable_if<\n                 std::is_pointer<PointerType>::value, int>::type = 0>\n    constexpr auto get() const noexcept -> decltype(std::declval<const basic_json_t&>().template get_ptr<PointerType>())\n    {\n        // delegate the call to get_ptr\n        return get_ptr<PointerType>();\n    }\n\n    /*!\n    @brief get a reference value (implicit)\n\n    Implicit reference access to the internally stored JSON value. No copies\n    are made.\n\n    @warning Writing data to the referee of the result yields an undefined\n    state.\n\n    @tparam ReferenceType reference type; must be a reference to @ref array_t,\n    @ref object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, or\n    @ref number_float_t. Enforced by static assertion.\n\n    @return reference to the internally stored JSON value if the requested\n    reference type @a ReferenceType fits to the JSON value; throws\n    type_error.303 otherwise\n\n    @throw type_error.303 in case passed type @a ReferenceType is incompatible\n    with the stored JSON value; see example below\n\n    @complexity Constant.\n\n    @liveexample{The example shows several calls to `get_ref()`.,get_ref}\n\n    @since version 1.1.0\n    */\n    template<typename ReferenceType, typename std::enable_if<\n                 std::is_reference<ReferenceType>::value, int>::type = 0>\n    ReferenceType get_ref()\n    {\n        // delegate call to get_ref_impl\n        return get_ref_impl<ReferenceType>(*this);\n    }\n\n    /*!\n    @brief get a reference value (implicit)\n    @copydoc get_ref()\n    */\n    template<typename ReferenceType, typename std::enable_if<\n                 std::is_reference<ReferenceType>::value and\n                 std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int>::type = 0>\n    ReferenceType get_ref() const\n    {\n        // delegate call to get_ref_impl\n        return get_ref_impl<ReferenceType>(*this);\n    }\n\n    /*!\n    @brief get a value (implicit)\n\n    Implicit type conversion between the JSON value and a compatible value.\n    The call is realized by calling @ref get() const.\n\n    @tparam ValueType non-pointer type compatible to the JSON value, for\n    instance `int` for JSON integer numbers, `bool` for JSON booleans, or\n    `std::vector` types for JSON arrays. The character type of @ref string_t\n    as well as an initializer list of this type is excluded to avoid\n    ambiguities as these types implicitly convert to `std::string`.\n\n    @return copy of the JSON value, converted to type @a ValueType\n\n    @throw type_error.302 in case passed type @a ValueType is incompatible\n    to the JSON value type (e.g., the JSON value is of type boolean, but a\n    string is requested); see example below\n\n    @complexity Linear in the size of the JSON value.\n\n    @liveexample{The example below shows several conversions from JSON values\n    to other types. There a few things to note: (1) Floating-point numbers can\n    be converted to integers\\, (2) A JSON array can be converted to a standard\n    `std::vector<short>`\\, (3) A JSON object can be converted to C++\n    associative containers such as `std::unordered_map<std::string\\,\n    json>`.,operator__ValueType}\n\n    @since version 1.0.0\n    */\n    template < typename ValueType, typename std::enable_if <\n                   not std::is_pointer<ValueType>::value and\n                   not std::is_same<ValueType, detail::json_ref<basic_json>>::value and\n                   not std::is_same<ValueType, typename string_t::value_type>::value and\n                   not detail::is_basic_json<ValueType>::value\n\n#ifndef _MSC_VER  // fix for issue #167 operator<< ambiguity under VS2015\n                   and not std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>::value\n#if defined(JSON_HAS_CPP_17) && (defined(__GNUC__) || (defined(_MSC_VER) and _MSC_VER <= 1914))\n                   and not std::is_same<ValueType, typename std::string_view>::value\n#endif\n#endif\n                   and detail::is_detected<detail::get_template_function, const basic_json_t&, ValueType>::value\n                   , int >::type = 0 >\n    operator ValueType() const\n    {\n        // delegate the call to get<>() const\n        return get<ValueType>();\n    }\n\n    /// @}\n\n\n    ////////////////////\n    // element access //\n    ////////////////////\n\n    /// @name element access\n    /// Access to the JSON value.\n    /// @{\n\n    /*!\n    @brief access specified array element with bounds checking\n\n    Returns a reference to the element at specified location @a idx, with\n    bounds checking.\n\n    @param[in] idx  index of the element to access\n\n    @return reference to the element at index @a idx\n\n    @throw type_error.304 if the JSON value is not an array; in this case,\n    calling `at` with an index makes no sense. See example below.\n    @throw out_of_range.401 if the index @a idx is out of range of the array;\n    that is, `idx >= size()`. See example below.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Constant.\n\n    @since version 1.0.0\n\n    @liveexample{The example below shows how array elements can be read and\n    written using `at()`. It also demonstrates the different exceptions that\n    can be thrown.,at__size_type}\n    */\n    reference at(size_type idx)\n    {\n        // at only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            JSON_TRY\n            {\n                return m_value.array->at(idx);\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\"));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name())));\n        }\n    }\n\n    /*!\n    @brief access specified array element with bounds checking\n\n    Returns a const reference to the element at specified location @a idx,\n    with bounds checking.\n\n    @param[in] idx  index of the element to access\n\n    @return const reference to the element at index @a idx\n\n    @throw type_error.304 if the JSON value is not an array; in this case,\n    calling `at` with an index makes no sense. See example below.\n    @throw out_of_range.401 if the index @a idx is out of range of the array;\n    that is, `idx >= size()`. See example below.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Constant.\n\n    @since version 1.0.0\n\n    @liveexample{The example below shows how array elements can be read using\n    `at()`. It also demonstrates the different exceptions that can be thrown.,\n    at__size_type_const}\n    */\n    const_reference at(size_type idx) const\n    {\n        // at only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            JSON_TRY\n            {\n                return m_value.array->at(idx);\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\"));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name())));\n        }\n    }\n\n    /*!\n    @brief access specified object element with bounds checking\n\n    Returns a reference to the element at with specified key @a key, with\n    bounds checking.\n\n    @param[in] key  key of the element to access\n\n    @return reference to the element at key @a key\n\n    @throw type_error.304 if the JSON value is not an object; in this case,\n    calling `at` with a key makes no sense. See example below.\n    @throw out_of_range.403 if the key @a key is is not stored in the object;\n    that is, `find(key) == end()`. See example below.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Logarithmic in the size of the container.\n\n    @sa @ref operator[](const typename object_t::key_type&) for unchecked\n    access by reference\n    @sa @ref value() for access by value with a default value\n\n    @since version 1.0.0\n\n    @liveexample{The example below shows how object elements can be read and\n    written using `at()`. It also demonstrates the different exceptions that\n    can be thrown.,at__object_t_key_type}\n    */\n    reference at(const typename object_t::key_type& key)\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            JSON_TRY\n            {\n                return m_value.object->at(key);\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(403, \"key '\" + key + \"' not found\"));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name())));\n        }\n    }\n\n    /*!\n    @brief access specified object element with bounds checking\n\n    Returns a const reference to the element at with specified key @a key,\n    with bounds checking.\n\n    @param[in] key  key of the element to access\n\n    @return const reference to the element at key @a key\n\n    @throw type_error.304 if the JSON value is not an object; in this case,\n    calling `at` with a key makes no sense. See example below.\n    @throw out_of_range.403 if the key @a key is is not stored in the object;\n    that is, `find(key) == end()`. See example below.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Logarithmic in the size of the container.\n\n    @sa @ref operator[](const typename object_t::key_type&) for unchecked\n    access by reference\n    @sa @ref value() for access by value with a default value\n\n    @since version 1.0.0\n\n    @liveexample{The example below shows how object elements can be read using\n    `at()`. It also demonstrates the different exceptions that can be thrown.,\n    at__object_t_key_type_const}\n    */\n    const_reference at(const typename object_t::key_type& key) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            JSON_TRY\n            {\n                return m_value.object->at(key);\n            }\n            JSON_CATCH (std::out_of_range&)\n            {\n                // create better exception explanation\n                JSON_THROW(out_of_range::create(403, \"key '\" + key + \"' not found\"));\n            }\n        }\n        else\n        {\n            JSON_THROW(type_error::create(304, \"cannot use at() with \" + std::string(type_name())));\n        }\n    }\n\n    /*!\n    @brief access specified array element\n\n    Returns a reference to the element at specified location @a idx.\n\n    @note If @a idx is beyond the range of the array (i.e., `idx >= size()`),\n    then the array is silently filled up with `null` values to make `idx` a\n    valid reference to the last stored element.\n\n    @param[in] idx  index of the element to access\n\n    @return reference to the element at index @a idx\n\n    @throw type_error.305 if the JSON value is not an array or null; in that\n    cases, using the [] operator with an index makes no sense.\n\n    @complexity Constant if @a idx is in the range of the array. Otherwise\n    linear in `idx - size()`.\n\n    @liveexample{The example below shows how array elements can be read and\n    written using `[]` operator. Note the addition of `null`\n    values.,operatorarray__size_type}\n\n    @since version 1.0.0\n    */\n    reference operator[](size_type idx)\n    {\n        // implicitly convert null value to an empty array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value.array = create<array_t>();\n            assert_invariant();\n        }\n\n        // operator[] only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            // fill up array with null values if given idx is outside range\n            if (idx >= m_value.array->size())\n            {\n                m_value.array->insert(m_value.array->end(),\n                                      idx - m_value.array->size() + 1,\n                                      basic_json());\n            }\n\n            return m_value.array->operator[](idx);\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a numeric argument with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief access specified array element\n\n    Returns a const reference to the element at specified location @a idx.\n\n    @param[in] idx  index of the element to access\n\n    @return const reference to the element at index @a idx\n\n    @throw type_error.305 if the JSON value is not an array; in that case,\n    using the [] operator with an index makes no sense.\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how array elements can be read using\n    the `[]` operator.,operatorarray__size_type_const}\n\n    @since version 1.0.0\n    */\n    const_reference operator[](size_type idx) const\n    {\n        // const operator[] only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            return m_value.array->operator[](idx);\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a numeric argument with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief access specified object element\n\n    Returns a reference to the element at with specified key @a key.\n\n    @note If @a key is not found in the object, then it is silently added to\n    the object and filled with a `null` value to make `key` a valid reference.\n    In case the value was `null` before, it is converted to an object.\n\n    @param[in] key  key of the element to access\n\n    @return reference to the element at key @a key\n\n    @throw type_error.305 if the JSON value is not an object or null; in that\n    cases, using the [] operator with a key makes no sense.\n\n    @complexity Logarithmic in the size of the container.\n\n    @liveexample{The example below shows how object elements can be read and\n    written using the `[]` operator.,operatorarray__key_type}\n\n    @sa @ref at(const typename object_t::key_type&) for access by reference\n    with range checking\n    @sa @ref value() for access by value with a default value\n\n    @since version 1.0.0\n    */\n    reference operator[](const typename object_t::key_type& key)\n    {\n        // implicitly convert null value to an empty object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value.object = create<object_t>();\n            assert_invariant();\n        }\n\n        // operator[] only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            return m_value.object->operator[](key);\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief read-only access specified object element\n\n    Returns a const reference to the element at with specified key @a key. No\n    bounds checking is performed.\n\n    @warning If the element with key @a key does not exist, the behavior is\n    undefined.\n\n    @param[in] key  key of the element to access\n\n    @return const reference to the element at key @a key\n\n    @pre The element with key @a key must exist. **This precondition is\n         enforced with an assertion.**\n\n    @throw type_error.305 if the JSON value is not an object; in that case,\n    using the [] operator with a key makes no sense.\n\n    @complexity Logarithmic in the size of the container.\n\n    @liveexample{The example below shows how object elements can be read using\n    the `[]` operator.,operatorarray__key_type_const}\n\n    @sa @ref at(const typename object_t::key_type&) for access by reference\n    with range checking\n    @sa @ref value() for access by value with a default value\n\n    @since version 1.0.0\n    */\n    const_reference operator[](const typename object_t::key_type& key) const\n    {\n        // const operator[] only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            assert(m_value.object->find(key) != m_value.object->end());\n            return m_value.object->find(key)->second;\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief access specified object element\n\n    Returns a reference to the element at with specified key @a key.\n\n    @note If @a key is not found in the object, then it is silently added to\n    the object and filled with a `null` value to make `key` a valid reference.\n    In case the value was `null` before, it is converted to an object.\n\n    @param[in] key  key of the element to access\n\n    @return reference to the element at key @a key\n\n    @throw type_error.305 if the JSON value is not an object or null; in that\n    cases, using the [] operator with a key makes no sense.\n\n    @complexity Logarithmic in the size of the container.\n\n    @liveexample{The example below shows how object elements can be read and\n    written using the `[]` operator.,operatorarray__key_type}\n\n    @sa @ref at(const typename object_t::key_type&) for access by reference\n    with range checking\n    @sa @ref value() for access by value with a default value\n\n    @since version 1.1.0\n    */\n    template<typename T>\n    JSON_HEDLEY_NON_NULL(2)\n    reference operator[](T* key)\n    {\n        // implicitly convert null to object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value = value_t::object;\n            assert_invariant();\n        }\n\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            return m_value.object->operator[](key);\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief read-only access specified object element\n\n    Returns a const reference to the element at with specified key @a key. No\n    bounds checking is performed.\n\n    @warning If the element with key @a key does not exist, the behavior is\n    undefined.\n\n    @param[in] key  key of the element to access\n\n    @return const reference to the element at key @a key\n\n    @pre The element with key @a key must exist. **This precondition is\n         enforced with an assertion.**\n\n    @throw type_error.305 if the JSON value is not an object; in that case,\n    using the [] operator with a key makes no sense.\n\n    @complexity Logarithmic in the size of the container.\n\n    @liveexample{The example below shows how object elements can be read using\n    the `[]` operator.,operatorarray__key_type_const}\n\n    @sa @ref at(const typename object_t::key_type&) for access by reference\n    with range checking\n    @sa @ref value() for access by value with a default value\n\n    @since version 1.1.0\n    */\n    template<typename T>\n    JSON_HEDLEY_NON_NULL(2)\n    const_reference operator[](T* key) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            assert(m_value.object->find(key) != m_value.object->end());\n            return m_value.object->find(key)->second;\n        }\n\n        JSON_THROW(type_error::create(305, \"cannot use operator[] with a string argument with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief access specified object element with default value\n\n    Returns either a copy of an object's element at the specified key @a key\n    or a given default value if no element with key @a key exists.\n\n    The function is basically equivalent to executing\n    @code {.cpp}\n    try {\n        return at(key);\n    } catch(out_of_range) {\n        return default_value;\n    }\n    @endcode\n\n    @note Unlike @ref at(const typename object_t::key_type&), this function\n    does not throw if the given key @a key was not found.\n\n    @note Unlike @ref operator[](const typename object_t::key_type& key), this\n    function does not implicitly add an element to the position defined by @a\n    key. This function is furthermore also applicable to const objects.\n\n    @param[in] key  key of the element to access\n    @param[in] default_value  the value to return if @a key is not found\n\n    @tparam ValueType type compatible to JSON values, for instance `int` for\n    JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for\n    JSON arrays. Note the type of the expected value at @a key and the default\n    value @a default_value must be compatible.\n\n    @return copy of the element at key @a key or @a default_value if @a key\n    is not found\n\n    @throw type_error.302 if @a default_value does not match the type of the\n    value at @a key\n    @throw type_error.306 if the JSON value is not an object; in that case,\n    using `value()` with a key makes no sense.\n\n    @complexity Logarithmic in the size of the container.\n\n    @liveexample{The example below shows how object elements can be queried\n    with a default value.,basic_json__value}\n\n    @sa @ref at(const typename object_t::key_type&) for access by reference\n    with range checking\n    @sa @ref operator[](const typename object_t::key_type&) for unchecked\n    access by reference\n\n    @since version 1.0.0\n    */\n    template<class ValueType, typename std::enable_if<\n                 std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0>\n    ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            // if key is found, return value and given default value otherwise\n            const auto it = find(key);\n            if (it != end())\n            {\n                return *it;\n            }\n\n            return default_value;\n        }\n\n        JSON_THROW(type_error::create(306, \"cannot use value() with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief overload for a default value of type const char*\n    @copydoc basic_json::value(const typename object_t::key_type&, const ValueType&) const\n    */\n    string_t value(const typename object_t::key_type& key, const char* default_value) const\n    {\n        return value(key, string_t(default_value));\n    }\n\n    /*!\n    @brief access specified object element via JSON Pointer with default value\n\n    Returns either a copy of an object's element at the specified key @a key\n    or a given default value if no element with key @a key exists.\n\n    The function is basically equivalent to executing\n    @code {.cpp}\n    try {\n        return at(ptr);\n    } catch(out_of_range) {\n        return default_value;\n    }\n    @endcode\n\n    @note Unlike @ref at(const json_pointer&), this function does not throw\n    if the given key @a key was not found.\n\n    @param[in] ptr  a JSON pointer to the element to access\n    @param[in] default_value  the value to return if @a ptr found no value\n\n    @tparam ValueType type compatible to JSON values, for instance `int` for\n    JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for\n    JSON arrays. Note the type of the expected value at @a key and the default\n    value @a default_value must be compatible.\n\n    @return copy of the element at key @a key or @a default_value if @a key\n    is not found\n\n    @throw type_error.302 if @a default_value does not match the type of the\n    value at @a ptr\n    @throw type_error.306 if the JSON value is not an object; in that case,\n    using `value()` with a key makes no sense.\n\n    @complexity Logarithmic in the size of the container.\n\n    @liveexample{The example below shows how object elements can be queried\n    with a default value.,basic_json__value_ptr}\n\n    @sa @ref operator[](const json_pointer&) for unchecked access by reference\n\n    @since version 2.0.2\n    */\n    template<class ValueType, typename std::enable_if<\n                 std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0>\n    ValueType value(const json_pointer& ptr, const ValueType& default_value) const\n    {\n        // at only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            // if pointer resolves a value, return it or use default value\n            JSON_TRY\n            {\n                return ptr.get_checked(this);\n            }\n            JSON_INTERNAL_CATCH (out_of_range&)\n            {\n                return default_value;\n            }\n        }\n\n        JSON_THROW(type_error::create(306, \"cannot use value() with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief overload for a default value of type const char*\n    @copydoc basic_json::value(const json_pointer&, ValueType) const\n    */\n    JSON_HEDLEY_NON_NULL(3)\n    string_t value(const json_pointer& ptr, const char* default_value) const\n    {\n        return value(ptr, string_t(default_value));\n    }\n\n    /*!\n    @brief access the first element\n\n    Returns a reference to the first element in the container. For a JSON\n    container `c`, the expression `c.front()` is equivalent to `*c.begin()`.\n\n    @return In case of a structured type (array or object), a reference to the\n    first element is returned. In case of number, string, or boolean values, a\n    reference to the value is returned.\n\n    @complexity Constant.\n\n    @pre The JSON value must not be `null` (would throw `std::out_of_range`)\n    or an empty array or object (undefined behavior, **guarded by\n    assertions**).\n    @post The JSON value remains unchanged.\n\n    @throw invalid_iterator.214 when called on `null` value\n\n    @liveexample{The following code shows an example for `front()`.,front}\n\n    @sa @ref back() -- access the last element\n\n    @since version 1.0.0\n    */\n    reference front()\n    {\n        return *begin();\n    }\n\n    /*!\n    @copydoc basic_json::front()\n    */\n    const_reference front() const\n    {\n        return *cbegin();\n    }\n\n    /*!\n    @brief access the last element\n\n    Returns a reference to the last element in the container. For a JSON\n    container `c`, the expression `c.back()` is equivalent to\n    @code {.cpp}\n    auto tmp = c.end();\n    --tmp;\n    return *tmp;\n    @endcode\n\n    @return In case of a structured type (array or object), a reference to the\n    last element is returned. In case of number, string, or boolean values, a\n    reference to the value is returned.\n\n    @complexity Constant.\n\n    @pre The JSON value must not be `null` (would throw `std::out_of_range`)\n    or an empty array or object (undefined behavior, **guarded by\n    assertions**).\n    @post The JSON value remains unchanged.\n\n    @throw invalid_iterator.214 when called on a `null` value. See example\n    below.\n\n    @liveexample{The following code shows an example for `back()`.,back}\n\n    @sa @ref front() -- access the first element\n\n    @since version 1.0.0\n    */\n    reference back()\n    {\n        auto tmp = end();\n        --tmp;\n        return *tmp;\n    }\n\n    /*!\n    @copydoc basic_json::back()\n    */\n    const_reference back() const\n    {\n        auto tmp = cend();\n        --tmp;\n        return *tmp;\n    }\n\n    /*!\n    @brief remove element given an iterator\n\n    Removes the element specified by iterator @a pos. The iterator @a pos must\n    be valid and dereferenceable. Thus the `end()` iterator (which is valid,\n    but is not dereferenceable) cannot be used as a value for @a pos.\n\n    If called on a primitive type other than `null`, the resulting JSON value\n    will be `null`.\n\n    @param[in] pos iterator to the element to remove\n    @return Iterator following the last removed element. If the iterator @a\n    pos refers to the last element, the `end()` iterator is returned.\n\n    @tparam IteratorType an @ref iterator or @ref const_iterator\n\n    @post Invalidates iterators and references at or after the point of the\n    erase, including the `end()` iterator.\n\n    @throw type_error.307 if called on a `null` value; example: `\"cannot use\n    erase() with null\"`\n    @throw invalid_iterator.202 if called on an iterator which does not belong\n    to the current JSON value; example: `\"iterator does not fit current\n    value\"`\n    @throw invalid_iterator.205 if called on a primitive type with invalid\n    iterator (i.e., any iterator which is not `begin()`); example: `\"iterator\n    out of range\"`\n\n    @complexity The complexity depends on the type:\n    - objects: amortized constant\n    - arrays: linear in distance between @a pos and the end of the container\n    - strings: linear in the length of the string\n    - other types: constant\n\n    @liveexample{The example shows the result of `erase()` for different JSON\n    types.,erase__IteratorType}\n\n    @sa @ref erase(IteratorType, IteratorType) -- removes the elements in\n    the given range\n    @sa @ref erase(const typename object_t::key_type&) -- removes the element\n    from an object at the given key\n    @sa @ref erase(const size_type) -- removes the element from an array at\n    the given index\n\n    @since version 1.0.0\n    */\n    template<class IteratorType, typename std::enable_if<\n                 std::is_same<IteratorType, typename basic_json_t::iterator>::value or\n                 std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type\n             = 0>\n    IteratorType erase(IteratorType pos)\n    {\n        // make sure iterator fits the current value\n        if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\"));\n        }\n\n        IteratorType result = end();\n\n        switch (m_type)\n        {\n            case value_t::boolean:\n            case value_t::number_float:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::string:\n            {\n                if (JSON_HEDLEY_UNLIKELY(not pos.m_it.primitive_iterator.is_begin()))\n                {\n                    JSON_THROW(invalid_iterator::create(205, \"iterator out of range\"));\n                }\n\n                if (is_string())\n                {\n                    AllocatorType<string_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);\n                    m_value.string = nullptr;\n                }\n\n                m_type = value_t::null;\n                assert_invariant();\n                break;\n            }\n\n            case value_t::object:\n            {\n                result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator);\n                break;\n            }\n\n            case value_t::array:\n            {\n                result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator);\n                break;\n            }\n\n            default:\n                JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name())));\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief remove elements given an iterator range\n\n    Removes the element specified by the range `[first; last)`. The iterator\n    @a first does not need to be dereferenceable if `first == last`: erasing\n    an empty range is a no-op.\n\n    If called on a primitive type other than `null`, the resulting JSON value\n    will be `null`.\n\n    @param[in] first iterator to the beginning of the range to remove\n    @param[in] last iterator past the end of the range to remove\n    @return Iterator following the last removed element. If the iterator @a\n    second refers to the last element, the `end()` iterator is returned.\n\n    @tparam IteratorType an @ref iterator or @ref const_iterator\n\n    @post Invalidates iterators and references at or after the point of the\n    erase, including the `end()` iterator.\n\n    @throw type_error.307 if called on a `null` value; example: `\"cannot use\n    erase() with null\"`\n    @throw invalid_iterator.203 if called on iterators which does not belong\n    to the current JSON value; example: `\"iterators do not fit current value\"`\n    @throw invalid_iterator.204 if called on a primitive type with invalid\n    iterators (i.e., if `first != begin()` and `last != end()`); example:\n    `\"iterators out of range\"`\n\n    @complexity The complexity depends on the type:\n    - objects: `log(size()) + std::distance(first, last)`\n    - arrays: linear in the distance between @a first and @a last, plus linear\n      in the distance between @a last and end of the container\n    - strings: linear in the length of the string\n    - other types: constant\n\n    @liveexample{The example shows the result of `erase()` for different JSON\n    types.,erase__IteratorType_IteratorType}\n\n    @sa @ref erase(IteratorType) -- removes the element at a given position\n    @sa @ref erase(const typename object_t::key_type&) -- removes the element\n    from an object at the given key\n    @sa @ref erase(const size_type) -- removes the element from an array at\n    the given index\n\n    @since version 1.0.0\n    */\n    template<class IteratorType, typename std::enable_if<\n                 std::is_same<IteratorType, typename basic_json_t::iterator>::value or\n                 std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type\n             = 0>\n    IteratorType erase(IteratorType first, IteratorType last)\n    {\n        // make sure iterator fits the current value\n        if (JSON_HEDLEY_UNLIKELY(this != first.m_object or this != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(203, \"iterators do not fit current value\"));\n        }\n\n        IteratorType result = end();\n\n        switch (m_type)\n        {\n            case value_t::boolean:\n            case value_t::number_float:\n            case value_t::number_integer:\n            case value_t::number_unsigned:\n            case value_t::string:\n            {\n                if (JSON_HEDLEY_LIKELY(not first.m_it.primitive_iterator.is_begin()\n                                       or not last.m_it.primitive_iterator.is_end()))\n                {\n                    JSON_THROW(invalid_iterator::create(204, \"iterators out of range\"));\n                }\n\n                if (is_string())\n                {\n                    AllocatorType<string_t> alloc;\n                    std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string);\n                    std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1);\n                    m_value.string = nullptr;\n                }\n\n                m_type = value_t::null;\n                assert_invariant();\n                break;\n            }\n\n            case value_t::object:\n            {\n                result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator,\n                                              last.m_it.object_iterator);\n                break;\n            }\n\n            case value_t::array:\n            {\n                result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator,\n                                             last.m_it.array_iterator);\n                break;\n            }\n\n            default:\n                JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name())));\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief remove element from a JSON object given a key\n\n    Removes elements from a JSON object with the key value @a key.\n\n    @param[in] key value of the elements to remove\n\n    @return Number of elements removed. If @a ObjectType is the default\n    `std::map` type, the return value will always be `0` (@a key was not\n    found) or `1` (@a key was found).\n\n    @post References and iterators to the erased elements are invalidated.\n    Other references and iterators are not affected.\n\n    @throw type_error.307 when called on a type other than JSON object;\n    example: `\"cannot use erase() with null\"`\n\n    @complexity `log(size()) + count(key)`\n\n    @liveexample{The example shows the effect of `erase()`.,erase__key_type}\n\n    @sa @ref erase(IteratorType) -- removes the element at a given position\n    @sa @ref erase(IteratorType, IteratorType) -- removes the elements in\n    the given range\n    @sa @ref erase(const size_type) -- removes the element from an array at\n    the given index\n\n    @since version 1.0.0\n    */\n    size_type erase(const typename object_t::key_type& key)\n    {\n        // this erase only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            return m_value.object->erase(key);\n        }\n\n        JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief remove element from a JSON array given an index\n\n    Removes element from a JSON array at the index @a idx.\n\n    @param[in] idx index of the element to remove\n\n    @throw type_error.307 when called on a type other than JSON object;\n    example: `\"cannot use erase() with null\"`\n    @throw out_of_range.401 when `idx >= size()`; example: `\"array index 17\n    is out of range\"`\n\n    @complexity Linear in distance between @a idx and the end of the container.\n\n    @liveexample{The example shows the effect of `erase()`.,erase__size_type}\n\n    @sa @ref erase(IteratorType) -- removes the element at a given position\n    @sa @ref erase(IteratorType, IteratorType) -- removes the elements in\n    the given range\n    @sa @ref erase(const typename object_t::key_type&) -- removes the element\n    from an object at the given key\n\n    @since version 1.0.0\n    */\n    void erase(const size_type idx)\n    {\n        // this erase only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            if (JSON_HEDLEY_UNLIKELY(idx >= size()))\n            {\n                JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\"));\n            }\n\n            m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx));\n        }\n        else\n        {\n            JSON_THROW(type_error::create(307, \"cannot use erase() with \" + std::string(type_name())));\n        }\n    }\n\n    /// @}\n\n\n    ////////////\n    // lookup //\n    ////////////\n\n    /// @name lookup\n    /// @{\n\n    /*!\n    @brief find an element in a JSON object\n\n    Finds an element in a JSON object with key equivalent to @a key. If the\n    element is not found or the JSON value is not an object, end() is\n    returned.\n\n    @note This method always returns @ref end() when executed on a JSON type\n          that is not an object.\n\n    @param[in] key key value of the element to search for.\n\n    @return Iterator to an element with key equivalent to @a key. If no such\n    element is found or the JSON value is not an object, past-the-end (see\n    @ref end()) iterator is returned.\n\n    @complexity Logarithmic in the size of the JSON object.\n\n    @liveexample{The example shows how `find()` is used.,find__key_type}\n\n    @sa @ref contains(KeyT&&) const -- checks whether a key exists\n\n    @since version 1.0.0\n    */\n    template<typename KeyT>\n    iterator find(KeyT&& key)\n    {\n        auto result = end();\n\n        if (is_object())\n        {\n            result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key));\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief find an element in a JSON object\n    @copydoc find(KeyT&&)\n    */\n    template<typename KeyT>\n    const_iterator find(KeyT&& key) const\n    {\n        auto result = cend();\n\n        if (is_object())\n        {\n            result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key));\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief returns the number of occurrences of a key in a JSON object\n\n    Returns the number of elements with key @a key. If ObjectType is the\n    default `std::map` type, the return value will always be `0` (@a key was\n    not found) or `1` (@a key was found).\n\n    @note This method always returns `0` when executed on a JSON type that is\n          not an object.\n\n    @param[in] key key value of the element to count\n\n    @return Number of elements with key @a key. If the JSON value is not an\n    object, the return value will be `0`.\n\n    @complexity Logarithmic in the size of the JSON object.\n\n    @liveexample{The example shows how `count()` is used.,count}\n\n    @since version 1.0.0\n    */\n    template<typename KeyT>\n    size_type count(KeyT&& key) const\n    {\n        // return 0 for all nonobject types\n        return is_object() ? m_value.object->count(std::forward<KeyT>(key)) : 0;\n    }\n\n    /*!\n    @brief check the existence of an element in a JSON object\n\n    Check whether an element exists in a JSON object with key equivalent to\n    @a key. If the element is not found or the JSON value is not an object,\n    false is returned.\n\n    @note This method always returns false when executed on a JSON type\n          that is not an object.\n\n    @param[in] key key value to check its existence.\n\n    @return true if an element with specified @a key exists. If no such\n    element with such key is found or the JSON value is not an object,\n    false is returned.\n\n    @complexity Logarithmic in the size of the JSON object.\n\n    @liveexample{The following code shows an example for `contains()`.,contains}\n\n    @sa @ref find(KeyT&&) -- returns an iterator to an object element\n    @sa @ref contains(const json_pointer&) const -- checks the existence for a JSON pointer\n\n    @since version 3.6.0\n    */\n    template<typename KeyT, typename std::enable_if<\n                 not std::is_same<typename std::decay<KeyT>::type, json_pointer>::value, int>::type = 0>\n    bool contains(KeyT && key) const\n    {\n        return is_object() and m_value.object->find(std::forward<KeyT>(key)) != m_value.object->end();\n    }\n\n    /*!\n    @brief check the existence of an element in a JSON object given a JSON pointer\n\n    Check whether the given JSON pointer @a ptr can be resolved in the current\n    JSON value.\n\n    @note This method can be executed on any JSON value type.\n\n    @param[in] ptr JSON pointer to check its existence.\n\n    @return true if the JSON pointer can be resolved to a stored value, false\n    otherwise.\n\n    @post If `j.contains(ptr)` returns true, it is safe to call `j[ptr]`.\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n\n    @complexity Logarithmic in the size of the JSON object.\n\n    @liveexample{The following code shows an example for `contains()`.,contains_json_pointer}\n\n    @sa @ref contains(KeyT &&) const -- checks the existence of a key\n\n    @since version 3.7.0\n    */\n    bool contains(const json_pointer& ptr) const\n    {\n        return ptr.contains(this);\n    }\n\n    /// @}\n\n\n    ///////////////\n    // iterators //\n    ///////////////\n\n    /// @name iterators\n    /// @{\n\n    /*!\n    @brief returns an iterator to the first element\n\n    Returns an iterator to the first element.\n\n    @image html range-begin-end.svg \"Illustration from cppreference.com\"\n\n    @return iterator to the first element\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n\n    @liveexample{The following code shows an example for `begin()`.,begin}\n\n    @sa @ref cbegin() -- returns a const iterator to the beginning\n    @sa @ref end() -- returns an iterator to the end\n    @sa @ref cend() -- returns a const iterator to the end\n\n    @since version 1.0.0\n    */\n    iterator begin() noexcept\n    {\n        iterator result(this);\n        result.set_begin();\n        return result;\n    }\n\n    /*!\n    @copydoc basic_json::cbegin()\n    */\n    const_iterator begin() const noexcept\n    {\n        return cbegin();\n    }\n\n    /*!\n    @brief returns a const iterator to the first element\n\n    Returns a const iterator to the first element.\n\n    @image html range-begin-end.svg \"Illustration from cppreference.com\"\n\n    @return const iterator to the first element\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `const_cast<const basic_json&>(*this).begin()`.\n\n    @liveexample{The following code shows an example for `cbegin()`.,cbegin}\n\n    @sa @ref begin() -- returns an iterator to the beginning\n    @sa @ref end() -- returns an iterator to the end\n    @sa @ref cend() -- returns a const iterator to the end\n\n    @since version 1.0.0\n    */\n    const_iterator cbegin() const noexcept\n    {\n        const_iterator result(this);\n        result.set_begin();\n        return result;\n    }\n\n    /*!\n    @brief returns an iterator to one past the last element\n\n    Returns an iterator to one past the last element.\n\n    @image html range-begin-end.svg \"Illustration from cppreference.com\"\n\n    @return iterator one past the last element\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n\n    @liveexample{The following code shows an example for `end()`.,end}\n\n    @sa @ref cend() -- returns a const iterator to the end\n    @sa @ref begin() -- returns an iterator to the beginning\n    @sa @ref cbegin() returns a const iterator to the beginning\n\n    @since version 1.0.0\n    */\n    iterator end() noexcept\n    {\n        iterator result(this);\n        result.set_end();\n        return result;\n    }\n\n    /*!\n    @copydoc basic_json::cend()\n    */\n    const_iterator end() const noexcept\n    {\n        return cend();\n    }\n\n    /*!\n    @brief returns a const iterator to one past the last element\n\n    Returns a const iterator to one past the last element.\n\n    @image html range-begin-end.svg \"Illustration from cppreference.com\"\n\n    @return const iterator one past the last element\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `const_cast<const basic_json&>(*this).end()`.\n\n    @liveexample{The following code shows an example for `cend()`.,cend}\n\n    @sa @ref end() -- returns an iterator to the end\n    @sa @ref begin() -- returns an iterator to the beginning\n    @sa @ref cbegin() -- returns a const iterator to the beginning\n\n    @since version 1.0.0\n    */\n    const_iterator cend() const noexcept\n    {\n        const_iterator result(this);\n        result.set_end();\n        return result;\n    }\n\n    /*!\n    @brief returns an iterator to the reverse-beginning\n\n    Returns an iterator to the reverse-beginning; that is, the last element.\n\n    @image html range-rbegin-rend.svg \"Illustration from cppreference.com\"\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `reverse_iterator(end())`.\n\n    @liveexample{The following code shows an example for `rbegin()`.,rbegin}\n\n    @sa @ref crbegin() -- returns a const reverse iterator to the beginning\n    @sa @ref rend() -- returns a reverse iterator to the end\n    @sa @ref crend() -- returns a const reverse iterator to the end\n\n    @since version 1.0.0\n    */\n    reverse_iterator rbegin() noexcept\n    {\n        return reverse_iterator(end());\n    }\n\n    /*!\n    @copydoc basic_json::crbegin()\n    */\n    const_reverse_iterator rbegin() const noexcept\n    {\n        return crbegin();\n    }\n\n    /*!\n    @brief returns an iterator to the reverse-end\n\n    Returns an iterator to the reverse-end; that is, one before the first\n    element.\n\n    @image html range-rbegin-rend.svg \"Illustration from cppreference.com\"\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `reverse_iterator(begin())`.\n\n    @liveexample{The following code shows an example for `rend()`.,rend}\n\n    @sa @ref crend() -- returns a const reverse iterator to the end\n    @sa @ref rbegin() -- returns a reverse iterator to the beginning\n    @sa @ref crbegin() -- returns a const reverse iterator to the beginning\n\n    @since version 1.0.0\n    */\n    reverse_iterator rend() noexcept\n    {\n        return reverse_iterator(begin());\n    }\n\n    /*!\n    @copydoc basic_json::crend()\n    */\n    const_reverse_iterator rend() const noexcept\n    {\n        return crend();\n    }\n\n    /*!\n    @brief returns a const reverse iterator to the last element\n\n    Returns a const iterator to the reverse-beginning; that is, the last\n    element.\n\n    @image html range-rbegin-rend.svg \"Illustration from cppreference.com\"\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `const_cast<const basic_json&>(*this).rbegin()`.\n\n    @liveexample{The following code shows an example for `crbegin()`.,crbegin}\n\n    @sa @ref rbegin() -- returns a reverse iterator to the beginning\n    @sa @ref rend() -- returns a reverse iterator to the end\n    @sa @ref crend() -- returns a const reverse iterator to the end\n\n    @since version 1.0.0\n    */\n    const_reverse_iterator crbegin() const noexcept\n    {\n        return const_reverse_iterator(cend());\n    }\n\n    /*!\n    @brief returns a const reverse iterator to one before the first\n\n    Returns a const reverse iterator to the reverse-end; that is, one before\n    the first element.\n\n    @image html range-rbegin-rend.svg \"Illustration from cppreference.com\"\n\n    @complexity Constant.\n\n    @requirement This function helps `basic_json` satisfying the\n    [ReversibleContainer](https://en.cppreference.com/w/cpp/named_req/ReversibleContainer)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `const_cast<const basic_json&>(*this).rend()`.\n\n    @liveexample{The following code shows an example for `crend()`.,crend}\n\n    @sa @ref rend() -- returns a reverse iterator to the end\n    @sa @ref rbegin() -- returns a reverse iterator to the beginning\n    @sa @ref crbegin() -- returns a const reverse iterator to the beginning\n\n    @since version 1.0.0\n    */\n    const_reverse_iterator crend() const noexcept\n    {\n        return const_reverse_iterator(cbegin());\n    }\n\n  public:\n    /*!\n    @brief wrapper to access iterator member functions in range-based for\n\n    This function allows to access @ref iterator::key() and @ref\n    iterator::value() during range-based for loops. In these loops, a\n    reference to the JSON values is returned, so there is no access to the\n    underlying iterator.\n\n    For loop without iterator_wrapper:\n\n    @code{cpp}\n    for (auto it = j_object.begin(); it != j_object.end(); ++it)\n    {\n        std::cout << \"key: \" << it.key() << \", value:\" << it.value() << '\\n';\n    }\n    @endcode\n\n    Range-based for loop without iterator proxy:\n\n    @code{cpp}\n    for (auto it : j_object)\n    {\n        // \"it\" is of type json::reference and has no key() member\n        std::cout << \"value: \" << it << '\\n';\n    }\n    @endcode\n\n    Range-based for loop with iterator proxy:\n\n    @code{cpp}\n    for (auto it : json::iterator_wrapper(j_object))\n    {\n        std::cout << \"key: \" << it.key() << \", value:\" << it.value() << '\\n';\n    }\n    @endcode\n\n    @note When iterating over an array, `key()` will return the index of the\n          element as string (see example).\n\n    @param[in] ref  reference to a JSON value\n    @return iteration proxy object wrapping @a ref with an interface to use in\n            range-based for loops\n\n    @liveexample{The following code shows how the wrapper is used,iterator_wrapper}\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Constant.\n\n    @note The name of this function is not yet final and may change in the\n    future.\n\n    @deprecated This stream operator is deprecated and will be removed in\n                future 4.0.0 of the library. Please use @ref items() instead;\n                that is, replace `json::iterator_wrapper(j)` with `j.items()`.\n    */\n    JSON_HEDLEY_DEPRECATED(3.1.0)\n    static iteration_proxy<iterator> iterator_wrapper(reference ref) noexcept\n    {\n        return ref.items();\n    }\n\n    /*!\n    @copydoc iterator_wrapper(reference)\n    */\n    JSON_HEDLEY_DEPRECATED(3.1.0)\n    static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) noexcept\n    {\n        return ref.items();\n    }\n\n    /*!\n    @brief helper to access iterator member functions in range-based for\n\n    This function allows to access @ref iterator::key() and @ref\n    iterator::value() during range-based for loops. In these loops, a\n    reference to the JSON values is returned, so there is no access to the\n    underlying iterator.\n\n    For loop without `items()` function:\n\n    @code{cpp}\n    for (auto it = j_object.begin(); it != j_object.end(); ++it)\n    {\n        std::cout << \"key: \" << it.key() << \", value:\" << it.value() << '\\n';\n    }\n    @endcode\n\n    Range-based for loop without `items()` function:\n\n    @code{cpp}\n    for (auto it : j_object)\n    {\n        // \"it\" is of type json::reference and has no key() member\n        std::cout << \"value: \" << it << '\\n';\n    }\n    @endcode\n\n    Range-based for loop with `items()` function:\n\n    @code{cpp}\n    for (auto& el : j_object.items())\n    {\n        std::cout << \"key: \" << el.key() << \", value:\" << el.value() << '\\n';\n    }\n    @endcode\n\n    The `items()` function also allows to use\n    [structured bindings](https://en.cppreference.com/w/cpp/language/structured_binding)\n    (C++17):\n\n    @code{cpp}\n    for (auto& [key, val] : j_object.items())\n    {\n        std::cout << \"key: \" << key << \", value:\" << val << '\\n';\n    }\n    @endcode\n\n    @note When iterating over an array, `key()` will return the index of the\n          element as string (see example). For primitive types (e.g., numbers),\n          `key()` returns an empty string.\n\n    @return iteration proxy object wrapping @a ref with an interface to use in\n            range-based for loops\n\n    @liveexample{The following code shows how the function is used.,items}\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Constant.\n\n    @since version 3.1.0, structured bindings support since 3.5.0.\n    */\n    iteration_proxy<iterator> items() noexcept\n    {\n        return iteration_proxy<iterator>(*this);\n    }\n\n    /*!\n    @copydoc items()\n    */\n    iteration_proxy<const_iterator> items() const noexcept\n    {\n        return iteration_proxy<const_iterator>(*this);\n    }\n\n    /// @}\n\n\n    //////////////\n    // capacity //\n    //////////////\n\n    /// @name capacity\n    /// @{\n\n    /*!\n    @brief checks whether the container is empty.\n\n    Checks if a JSON value has no elements (i.e. whether its @ref size is `0`).\n\n    @return The return value depends on the different types and is\n            defined as follows:\n            Value type  | return value\n            ----------- | -------------\n            null        | `true`\n            boolean     | `false`\n            string      | `false`\n            number      | `false`\n            object      | result of function `object_t::empty()`\n            array       | result of function `array_t::empty()`\n\n    @liveexample{The following code uses `empty()` to check if a JSON\n    object contains any elements.,empty}\n\n    @complexity Constant, as long as @ref array_t and @ref object_t satisfy\n    the Container concept; that is, their `empty()` functions have constant\n    complexity.\n\n    @iterators No changes.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @note This function does not return whether a string stored as JSON value\n    is empty - it returns whether the JSON container itself is empty which is\n    false in the case of a string.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `begin() == end()`.\n\n    @sa @ref size() -- returns the number of elements\n\n    @since version 1.0.0\n    */\n    bool empty() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::null:\n            {\n                // null values are empty\n                return true;\n            }\n\n            case value_t::array:\n            {\n                // delegate call to array_t::empty()\n                return m_value.array->empty();\n            }\n\n            case value_t::object:\n            {\n                // delegate call to object_t::empty()\n                return m_value.object->empty();\n            }\n\n            default:\n            {\n                // all other types are nonempty\n                return false;\n            }\n        }\n    }\n\n    /*!\n    @brief returns the number of elements\n\n    Returns the number of elements in a JSON value.\n\n    @return The return value depends on the different types and is\n            defined as follows:\n            Value type  | return value\n            ----------- | -------------\n            null        | `0`\n            boolean     | `1`\n            string      | `1`\n            number      | `1`\n            object      | result of function object_t::size()\n            array       | result of function array_t::size()\n\n    @liveexample{The following code calls `size()` on the different value\n    types.,size}\n\n    @complexity Constant, as long as @ref array_t and @ref object_t satisfy\n    the Container concept; that is, their size() functions have constant\n    complexity.\n\n    @iterators No changes.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @note This function does not return the length of a string stored as JSON\n    value - it returns the number of elements in the JSON value which is 1 in\n    the case of a string.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of `std::distance(begin(), end())`.\n\n    @sa @ref empty() -- checks whether the container is empty\n    @sa @ref max_size() -- returns the maximal number of elements\n\n    @since version 1.0.0\n    */\n    size_type size() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::null:\n            {\n                // null values are empty\n                return 0;\n            }\n\n            case value_t::array:\n            {\n                // delegate call to array_t::size()\n                return m_value.array->size();\n            }\n\n            case value_t::object:\n            {\n                // delegate call to object_t::size()\n                return m_value.object->size();\n            }\n\n            default:\n            {\n                // all other types have size 1\n                return 1;\n            }\n        }\n    }\n\n    /*!\n    @brief returns the maximum possible number of elements\n\n    Returns the maximum number of elements a JSON value is able to hold due to\n    system or library implementation limitations, i.e. `std::distance(begin(),\n    end())` for the JSON value.\n\n    @return The return value depends on the different types and is\n            defined as follows:\n            Value type  | return value\n            ----------- | -------------\n            null        | `0` (same as `size()`)\n            boolean     | `1` (same as `size()`)\n            string      | `1` (same as `size()`)\n            number      | `1` (same as `size()`)\n            object      | result of function `object_t::max_size()`\n            array       | result of function `array_t::max_size()`\n\n    @liveexample{The following code calls `max_size()` on the different value\n    types. Note the output is implementation specific.,max_size}\n\n    @complexity Constant, as long as @ref array_t and @ref object_t satisfy\n    the Container concept; that is, their `max_size()` functions have constant\n    complexity.\n\n    @iterators No changes.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @requirement This function helps `basic_json` satisfying the\n    [Container](https://en.cppreference.com/w/cpp/named_req/Container)\n    requirements:\n    - The complexity is constant.\n    - Has the semantics of returning `b.size()` where `b` is the largest\n      possible JSON value.\n\n    @sa @ref size() -- returns the number of elements\n\n    @since version 1.0.0\n    */\n    size_type max_size() const noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::array:\n            {\n                // delegate call to array_t::max_size()\n                return m_value.array->max_size();\n            }\n\n            case value_t::object:\n            {\n                // delegate call to object_t::max_size()\n                return m_value.object->max_size();\n            }\n\n            default:\n            {\n                // all other types have max_size() == size()\n                return size();\n            }\n        }\n    }\n\n    /// @}\n\n\n    ///////////////\n    // modifiers //\n    ///////////////\n\n    /// @name modifiers\n    /// @{\n\n    /*!\n    @brief clears the contents\n\n    Clears the content of a JSON value and resets it to the default value as\n    if @ref basic_json(value_t) would have been called with the current value\n    type from @ref type():\n\n    Value type  | initial value\n    ----------- | -------------\n    null        | `null`\n    boolean     | `false`\n    string      | `\"\"`\n    number      | `0`\n    object      | `{}`\n    array       | `[]`\n\n    @post Has the same effect as calling\n    @code {.cpp}\n    *this = basic_json(type());\n    @endcode\n\n    @liveexample{The example below shows the effect of `clear()` to different\n    JSON types.,clear}\n\n    @complexity Linear in the size of the JSON value.\n\n    @iterators All iterators, pointers and references related to this container\n               are invalidated.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @sa @ref basic_json(value_t) -- constructor that creates an object with the\n        same value than calling `clear()`\n\n    @since version 1.0.0\n    */\n    void clear() noexcept\n    {\n        switch (m_type)\n        {\n            case value_t::number_integer:\n            {\n                m_value.number_integer = 0;\n                break;\n            }\n\n            case value_t::number_unsigned:\n            {\n                m_value.number_unsigned = 0;\n                break;\n            }\n\n            case value_t::number_float:\n            {\n                m_value.number_float = 0.0;\n                break;\n            }\n\n            case value_t::boolean:\n            {\n                m_value.boolean = false;\n                break;\n            }\n\n            case value_t::string:\n            {\n                m_value.string->clear();\n                break;\n            }\n\n            case value_t::array:\n            {\n                m_value.array->clear();\n                break;\n            }\n\n            case value_t::object:\n            {\n                m_value.object->clear();\n                break;\n            }\n\n            default:\n                break;\n        }\n    }\n\n    /*!\n    @brief add an object to an array\n\n    Appends the given element @a val to the end of the JSON value. If the\n    function is called on a JSON null value, an empty array is created before\n    appending @a val.\n\n    @param[in] val the value to add to the JSON array\n\n    @throw type_error.308 when called on a type other than JSON array or\n    null; example: `\"cannot use push_back() with number\"`\n\n    @complexity Amortized constant.\n\n    @liveexample{The example shows how `push_back()` and `+=` can be used to\n    add elements to a JSON array. Note how the `null` value was silently\n    converted to a JSON array.,push_back}\n\n    @since version 1.0.0\n    */\n    void push_back(basic_json&& val)\n    {\n        // push_back only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(not(is_null() or is_array())))\n        {\n            JSON_THROW(type_error::create(308, \"cannot use push_back() with \" + std::string(type_name())));\n        }\n\n        // transform null object into an array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value = value_t::array;\n            assert_invariant();\n        }\n\n        // add element to array (move semantics)\n        m_value.array->push_back(std::move(val));\n        // invalidate object: mark it null so we do not call the destructor\n        // cppcheck-suppress accessMoved\n        val.m_type = value_t::null;\n    }\n\n    /*!\n    @brief add an object to an array\n    @copydoc push_back(basic_json&&)\n    */\n    reference operator+=(basic_json&& val)\n    {\n        push_back(std::move(val));\n        return *this;\n    }\n\n    /*!\n    @brief add an object to an array\n    @copydoc push_back(basic_json&&)\n    */\n    void push_back(const basic_json& val)\n    {\n        // push_back only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(not(is_null() or is_array())))\n        {\n            JSON_THROW(type_error::create(308, \"cannot use push_back() with \" + std::string(type_name())));\n        }\n\n        // transform null object into an array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value = value_t::array;\n            assert_invariant();\n        }\n\n        // add element to array\n        m_value.array->push_back(val);\n    }\n\n    /*!\n    @brief add an object to an array\n    @copydoc push_back(basic_json&&)\n    */\n    reference operator+=(const basic_json& val)\n    {\n        push_back(val);\n        return *this;\n    }\n\n    /*!\n    @brief add an object to an object\n\n    Inserts the given element @a val to the JSON object. If the function is\n    called on a JSON null value, an empty object is created before inserting\n    @a val.\n\n    @param[in] val the value to add to the JSON object\n\n    @throw type_error.308 when called on a type other than JSON object or\n    null; example: `\"cannot use push_back() with number\"`\n\n    @complexity Logarithmic in the size of the container, O(log(`size()`)).\n\n    @liveexample{The example shows how `push_back()` and `+=` can be used to\n    add elements to a JSON object. Note how the `null` value was silently\n    converted to a JSON object.,push_back__object_t__value}\n\n    @since version 1.0.0\n    */\n    void push_back(const typename object_t::value_type& val)\n    {\n        // push_back only works for null objects or objects\n        if (JSON_HEDLEY_UNLIKELY(not(is_null() or is_object())))\n        {\n            JSON_THROW(type_error::create(308, \"cannot use push_back() with \" + std::string(type_name())));\n        }\n\n        // transform null object into an object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value = value_t::object;\n            assert_invariant();\n        }\n\n        // add element to array\n        m_value.object->insert(val);\n    }\n\n    /*!\n    @brief add an object to an object\n    @copydoc push_back(const typename object_t::value_type&)\n    */\n    reference operator+=(const typename object_t::value_type& val)\n    {\n        push_back(val);\n        return *this;\n    }\n\n    /*!\n    @brief add an object to an object\n\n    This function allows to use `push_back` with an initializer list. In case\n\n    1. the current value is an object,\n    2. the initializer list @a init contains only two elements, and\n    3. the first element of @a init is a string,\n\n    @a init is converted into an object element and added using\n    @ref push_back(const typename object_t::value_type&). Otherwise, @a init\n    is converted to a JSON value and added using @ref push_back(basic_json&&).\n\n    @param[in] init  an initializer list\n\n    @complexity Linear in the size of the initializer list @a init.\n\n    @note This function is required to resolve an ambiguous overload error,\n          because pairs like `{\"key\", \"value\"}` can be both interpreted as\n          `object_t::value_type` or `std::initializer_list<basic_json>`, see\n          https://github.com/nlohmann/json/issues/235 for more information.\n\n    @liveexample{The example shows how initializer lists are treated as\n    objects when possible.,push_back__initializer_list}\n    */\n    void push_back(initializer_list_t init)\n    {\n        if (is_object() and init.size() == 2 and (*init.begin())->is_string())\n        {\n            basic_json&& key = init.begin()->moved_or_copied();\n            push_back(typename object_t::value_type(\n                          std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied()));\n        }\n        else\n        {\n            push_back(basic_json(init));\n        }\n    }\n\n    /*!\n    @brief add an object to an object\n    @copydoc push_back(initializer_list_t)\n    */\n    reference operator+=(initializer_list_t init)\n    {\n        push_back(init);\n        return *this;\n    }\n\n    /*!\n    @brief add an object to an array\n\n    Creates a JSON value from the passed parameters @a args to the end of the\n    JSON value. If the function is called on a JSON null value, an empty array\n    is created before appending the value created from @a args.\n\n    @param[in] args arguments to forward to a constructor of @ref basic_json\n    @tparam Args compatible types to create a @ref basic_json object\n\n    @return reference to the inserted element\n\n    @throw type_error.311 when called on a type other than JSON array or\n    null; example: `\"cannot use emplace_back() with number\"`\n\n    @complexity Amortized constant.\n\n    @liveexample{The example shows how `push_back()` can be used to add\n    elements to a JSON array. Note how the `null` value was silently converted\n    to a JSON array.,emplace_back}\n\n    @since version 2.0.8, returns reference since 3.7.0\n    */\n    template<class... Args>\n    reference emplace_back(Args&& ... args)\n    {\n        // emplace_back only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(not(is_null() or is_array())))\n        {\n            JSON_THROW(type_error::create(311, \"cannot use emplace_back() with \" + std::string(type_name())));\n        }\n\n        // transform null object into an array\n        if (is_null())\n        {\n            m_type = value_t::array;\n            m_value = value_t::array;\n            assert_invariant();\n        }\n\n        // add element to array (perfect forwarding)\n#ifdef JSON_HAS_CPP_17\n        return m_value.array->emplace_back(std::forward<Args>(args)...);\n#else\n        m_value.array->emplace_back(std::forward<Args>(args)...);\n        return m_value.array->back();\n#endif\n    }\n\n    /*!\n    @brief add an object to an object if key does not exist\n\n    Inserts a new element into a JSON object constructed in-place with the\n    given @a args if there is no element with the key in the container. If the\n    function is called on a JSON null value, an empty object is created before\n    appending the value created from @a args.\n\n    @param[in] args arguments to forward to a constructor of @ref basic_json\n    @tparam Args compatible types to create a @ref basic_json object\n\n    @return a pair consisting of an iterator to the inserted element, or the\n            already-existing element if no insertion happened, and a bool\n            denoting whether the insertion took place.\n\n    @throw type_error.311 when called on a type other than JSON object or\n    null; example: `\"cannot use emplace() with number\"`\n\n    @complexity Logarithmic in the size of the container, O(log(`size()`)).\n\n    @liveexample{The example shows how `emplace()` can be used to add elements\n    to a JSON object. Note how the `null` value was silently converted to a\n    JSON object. Further note how no value is added if there was already one\n    value stored with the same key.,emplace}\n\n    @since version 2.0.8\n    */\n    template<class... Args>\n    std::pair<iterator, bool> emplace(Args&& ... args)\n    {\n        // emplace only works for null objects or arrays\n        if (JSON_HEDLEY_UNLIKELY(not(is_null() or is_object())))\n        {\n            JSON_THROW(type_error::create(311, \"cannot use emplace() with \" + std::string(type_name())));\n        }\n\n        // transform null object into an object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value = value_t::object;\n            assert_invariant();\n        }\n\n        // add element to array (perfect forwarding)\n        auto res = m_value.object->emplace(std::forward<Args>(args)...);\n        // create result iterator and set iterator to the result of emplace\n        auto it = begin();\n        it.m_it.object_iterator = res.first;\n\n        // return pair of iterator and boolean\n        return {it, res.second};\n    }\n\n    /// Helper for insertion of an iterator\n    /// @note: This uses std::distance to support GCC 4.8,\n    ///        see https://github.com/nlohmann/json/pull/1257\n    template<typename... Args>\n    iterator insert_iterator(const_iterator pos, Args&& ... args)\n    {\n        iterator result(this);\n        assert(m_value.array != nullptr);\n\n        auto insert_pos = std::distance(m_value.array->begin(), pos.m_it.array_iterator);\n        m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...);\n        result.m_it.array_iterator = m_value.array->begin() + insert_pos;\n\n        // This could have been written as:\n        // result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val);\n        // but the return value of insert is missing in GCC 4.8, so it is written this way instead.\n\n        return result;\n    }\n\n    /*!\n    @brief inserts element\n\n    Inserts element @a val before iterator @a pos.\n\n    @param[in] pos iterator before which the content will be inserted; may be\n    the end() iterator\n    @param[in] val element to insert\n    @return iterator pointing to the inserted @a val.\n\n    @throw type_error.309 if called on JSON values other than arrays;\n    example: `\"cannot use insert() with string\"`\n    @throw invalid_iterator.202 if @a pos is not an iterator of *this;\n    example: `\"iterator does not fit current value\"`\n\n    @complexity Constant plus linear in the distance between @a pos and end of\n    the container.\n\n    @liveexample{The example shows how `insert()` is used.,insert}\n\n    @since version 1.0.0\n    */\n    iterator insert(const_iterator pos, const basic_json& val)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            // check if iterator pos fits to this JSON value\n            if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n            {\n                JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\"));\n            }\n\n            // insert to array and return iterator\n            return insert_iterator(pos, val);\n        }\n\n        JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief inserts element\n    @copydoc insert(const_iterator, const basic_json&)\n    */\n    iterator insert(const_iterator pos, basic_json&& val)\n    {\n        return insert(pos, val);\n    }\n\n    /*!\n    @brief inserts elements\n\n    Inserts @a cnt copies of @a val before iterator @a pos.\n\n    @param[in] pos iterator before which the content will be inserted; may be\n    the end() iterator\n    @param[in] cnt number of copies of @a val to insert\n    @param[in] val element to insert\n    @return iterator pointing to the first element inserted, or @a pos if\n    `cnt==0`\n\n    @throw type_error.309 if called on JSON values other than arrays; example:\n    `\"cannot use insert() with string\"`\n    @throw invalid_iterator.202 if @a pos is not an iterator of *this;\n    example: `\"iterator does not fit current value\"`\n\n    @complexity Linear in @a cnt plus linear in the distance between @a pos\n    and end of the container.\n\n    @liveexample{The example shows how `insert()` is used.,insert__count}\n\n    @since version 1.0.0\n    */\n    iterator insert(const_iterator pos, size_type cnt, const basic_json& val)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            // check if iterator pos fits to this JSON value\n            if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n            {\n                JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\"));\n            }\n\n            // insert to array and return iterator\n            return insert_iterator(pos, cnt, val);\n        }\n\n        JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name())));\n    }\n\n    /*!\n    @brief inserts elements\n\n    Inserts elements from range `[first, last)` before iterator @a pos.\n\n    @param[in] pos iterator before which the content will be inserted; may be\n    the end() iterator\n    @param[in] first begin of the range of elements to insert\n    @param[in] last end of the range of elements to insert\n\n    @throw type_error.309 if called on JSON values other than arrays; example:\n    `\"cannot use insert() with string\"`\n    @throw invalid_iterator.202 if @a pos is not an iterator of *this;\n    example: `\"iterator does not fit current value\"`\n    @throw invalid_iterator.210 if @a first and @a last do not belong to the\n    same JSON value; example: `\"iterators do not fit\"`\n    @throw invalid_iterator.211 if @a first or @a last are iterators into\n    container for which insert is called; example: `\"passed iterators may not\n    belong to container\"`\n\n    @return iterator pointing to the first element inserted, or @a pos if\n    `first==last`\n\n    @complexity Linear in `std::distance(first, last)` plus linear in the\n    distance between @a pos and end of the container.\n\n    @liveexample{The example shows how `insert()` is used.,insert__range}\n\n    @since version 1.0.0\n    */\n    iterator insert(const_iterator pos, const_iterator first, const_iterator last)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_UNLIKELY(not is_array()))\n        {\n            JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name())));\n        }\n\n        // check if iterator pos fits to this JSON value\n        if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\"));\n        }\n\n        // check if range iterators belong to the same JSON object\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(210, \"iterators do not fit\"));\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(first.m_object == this))\n        {\n            JSON_THROW(invalid_iterator::create(211, \"passed iterators may not belong to container\"));\n        }\n\n        // insert to array and return iterator\n        return insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator);\n    }\n\n    /*!\n    @brief inserts elements\n\n    Inserts elements from initializer list @a ilist before iterator @a pos.\n\n    @param[in] pos iterator before which the content will be inserted; may be\n    the end() iterator\n    @param[in] ilist initializer list to insert the values from\n\n    @throw type_error.309 if called on JSON values other than arrays; example:\n    `\"cannot use insert() with string\"`\n    @throw invalid_iterator.202 if @a pos is not an iterator of *this;\n    example: `\"iterator does not fit current value\"`\n\n    @return iterator pointing to the first element inserted, or @a pos if\n    `ilist` is empty\n\n    @complexity Linear in `ilist.size()` plus linear in the distance between\n    @a pos and end of the container.\n\n    @liveexample{The example shows how `insert()` is used.,insert__ilist}\n\n    @since version 1.0.0\n    */\n    iterator insert(const_iterator pos, initializer_list_t ilist)\n    {\n        // insert only works for arrays\n        if (JSON_HEDLEY_UNLIKELY(not is_array()))\n        {\n            JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name())));\n        }\n\n        // check if iterator pos fits to this JSON value\n        if (JSON_HEDLEY_UNLIKELY(pos.m_object != this))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterator does not fit current value\"));\n        }\n\n        // insert to array and return iterator\n        return insert_iterator(pos, ilist.begin(), ilist.end());\n    }\n\n    /*!\n    @brief inserts elements\n\n    Inserts elements from range `[first, last)`.\n\n    @param[in] first begin of the range of elements to insert\n    @param[in] last end of the range of elements to insert\n\n    @throw type_error.309 if called on JSON values other than objects; example:\n    `\"cannot use insert() with string\"`\n    @throw invalid_iterator.202 if iterator @a first or @a last does does not\n    point to an object; example: `\"iterators first and last must point to\n    objects\"`\n    @throw invalid_iterator.210 if @a first and @a last do not belong to the\n    same JSON value; example: `\"iterators do not fit\"`\n\n    @complexity Logarithmic: `O(N*log(size() + N))`, where `N` is the number\n    of elements to insert.\n\n    @liveexample{The example shows how `insert()` is used.,insert__range_object}\n\n    @since version 3.0.0\n    */\n    void insert(const_iterator first, const_iterator last)\n    {\n        // insert only works for objects\n        if (JSON_HEDLEY_UNLIKELY(not is_object()))\n        {\n            JSON_THROW(type_error::create(309, \"cannot use insert() with \" + std::string(type_name())));\n        }\n\n        // check if range iterators belong to the same JSON object\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(210, \"iterators do not fit\"));\n        }\n\n        // passed iterators must belong to objects\n        if (JSON_HEDLEY_UNLIKELY(not first.m_object->is_object()))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterators first and last must point to objects\"));\n        }\n\n        m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator);\n    }\n\n    /*!\n    @brief updates a JSON object from another object, overwriting existing keys\n\n    Inserts all values from JSON object @a j and overwrites existing keys.\n\n    @param[in] j  JSON object to read values from\n\n    @throw type_error.312 if called on JSON values other than objects; example:\n    `\"cannot use update() with string\"`\n\n    @complexity O(N*log(size() + N)), where N is the number of elements to\n                insert.\n\n    @liveexample{The example shows how `update()` is used.,update}\n\n    @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update\n\n    @since version 3.0.0\n    */\n    void update(const_reference j)\n    {\n        // implicitly convert null value to an empty object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value.object = create<object_t>();\n            assert_invariant();\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(not is_object()))\n        {\n            JSON_THROW(type_error::create(312, \"cannot use update() with \" + std::string(type_name())));\n        }\n        if (JSON_HEDLEY_UNLIKELY(not j.is_object()))\n        {\n            JSON_THROW(type_error::create(312, \"cannot use update() with \" + std::string(j.type_name())));\n        }\n\n        for (auto it = j.cbegin(); it != j.cend(); ++it)\n        {\n            m_value.object->operator[](it.key()) = it.value();\n        }\n    }\n\n    /*!\n    @brief updates a JSON object from another object, overwriting existing keys\n\n    Inserts all values from from range `[first, last)` and overwrites existing\n    keys.\n\n    @param[in] first begin of the range of elements to insert\n    @param[in] last end of the range of elements to insert\n\n    @throw type_error.312 if called on JSON values other than objects; example:\n    `\"cannot use update() with string\"`\n    @throw invalid_iterator.202 if iterator @a first or @a last does does not\n    point to an object; example: `\"iterators first and last must point to\n    objects\"`\n    @throw invalid_iterator.210 if @a first and @a last do not belong to the\n    same JSON value; example: `\"iterators do not fit\"`\n\n    @complexity O(N*log(size() + N)), where N is the number of elements to\n                insert.\n\n    @liveexample{The example shows how `update()` is used__range.,update}\n\n    @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update\n\n    @since version 3.0.0\n    */\n    void update(const_iterator first, const_iterator last)\n    {\n        // implicitly convert null value to an empty object\n        if (is_null())\n        {\n            m_type = value_t::object;\n            m_value.object = create<object_t>();\n            assert_invariant();\n        }\n\n        if (JSON_HEDLEY_UNLIKELY(not is_object()))\n        {\n            JSON_THROW(type_error::create(312, \"cannot use update() with \" + std::string(type_name())));\n        }\n\n        // check if range iterators belong to the same JSON object\n        if (JSON_HEDLEY_UNLIKELY(first.m_object != last.m_object))\n        {\n            JSON_THROW(invalid_iterator::create(210, \"iterators do not fit\"));\n        }\n\n        // passed iterators must belong to objects\n        if (JSON_HEDLEY_UNLIKELY(not first.m_object->is_object()\n                                 or not last.m_object->is_object()))\n        {\n            JSON_THROW(invalid_iterator::create(202, \"iterators first and last must point to objects\"));\n        }\n\n        for (auto it = first; it != last; ++it)\n        {\n            m_value.object->operator[](it.key()) = it.value();\n        }\n    }\n\n    /*!\n    @brief exchanges the values\n\n    Exchanges the contents of the JSON value with those of @a other. Does not\n    invoke any move, copy, or swap operations on individual elements. All\n    iterators and references remain valid. The past-the-end iterator is\n    invalidated.\n\n    @param[in,out] other JSON value to exchange the contents with\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how JSON values can be swapped with\n    `swap()`.,swap__reference}\n\n    @since version 1.0.0\n    */\n    void swap(reference other) noexcept (\n        std::is_nothrow_move_constructible<value_t>::value and\n        std::is_nothrow_move_assignable<value_t>::value and\n        std::is_nothrow_move_constructible<json_value>::value and\n        std::is_nothrow_move_assignable<json_value>::value\n    )\n    {\n        std::swap(m_type, other.m_type);\n        std::swap(m_value, other.m_value);\n        assert_invariant();\n    }\n\n    /*!\n    @brief exchanges the values\n\n    Exchanges the contents of a JSON array with those of @a other. Does not\n    invoke any move, copy, or swap operations on individual elements. All\n    iterators and references remain valid. The past-the-end iterator is\n    invalidated.\n\n    @param[in,out] other array to exchange the contents with\n\n    @throw type_error.310 when JSON value is not an array; example: `\"cannot\n    use swap() with string\"`\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how arrays can be swapped with\n    `swap()`.,swap__array_t}\n\n    @since version 1.0.0\n    */\n    void swap(array_t& other)\n    {\n        // swap only works for arrays\n        if (JSON_HEDLEY_LIKELY(is_array()))\n        {\n            std::swap(*(m_value.array), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name())));\n        }\n    }\n\n    /*!\n    @brief exchanges the values\n\n    Exchanges the contents of a JSON object with those of @a other. Does not\n    invoke any move, copy, or swap operations on individual elements. All\n    iterators and references remain valid. The past-the-end iterator is\n    invalidated.\n\n    @param[in,out] other object to exchange the contents with\n\n    @throw type_error.310 when JSON value is not an object; example:\n    `\"cannot use swap() with string\"`\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how objects can be swapped with\n    `swap()`.,swap__object_t}\n\n    @since version 1.0.0\n    */\n    void swap(object_t& other)\n    {\n        // swap only works for objects\n        if (JSON_HEDLEY_LIKELY(is_object()))\n        {\n            std::swap(*(m_value.object), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name())));\n        }\n    }\n\n    /*!\n    @brief exchanges the values\n\n    Exchanges the contents of a JSON string with those of @a other. Does not\n    invoke any move, copy, or swap operations on individual elements. All\n    iterators and references remain valid. The past-the-end iterator is\n    invalidated.\n\n    @param[in,out] other string to exchange the contents with\n\n    @throw type_error.310 when JSON value is not a string; example: `\"cannot\n    use swap() with boolean\"`\n\n    @complexity Constant.\n\n    @liveexample{The example below shows how strings can be swapped with\n    `swap()`.,swap__string_t}\n\n    @since version 1.0.0\n    */\n    void swap(string_t& other)\n    {\n        // swap only works for strings\n        if (JSON_HEDLEY_LIKELY(is_string()))\n        {\n            std::swap(*(m_value.string), other);\n        }\n        else\n        {\n            JSON_THROW(type_error::create(310, \"cannot use swap() with \" + std::string(type_name())));\n        }\n    }\n\n    /// @}\n\n  public:\n    //////////////////////////////////////////\n    // lexicographical comparison operators //\n    //////////////////////////////////////////\n\n    /// @name lexicographical comparison operators\n    /// @{\n\n    /*!\n    @brief comparison: equal\n\n    Compares two JSON values for equality according to the following rules:\n    - Two JSON values are equal if (1) they are from the same type and (2)\n      their stored values are the same according to their respective\n      `operator==`.\n    - Integer and floating-point numbers are automatically converted before\n      comparison. Note than two NaN values are always treated as unequal.\n    - Two JSON null values are equal.\n\n    @note Floating-point inside JSON values numbers are compared with\n    `json::number_float_t::operator==` which is `double::operator==` by\n    default. To compare floating-point while respecting an epsilon, an alternative\n    [comparison function](https://github.com/mariokonrad/marnav/blob/master/src/marnav/math/floatingpoint.hpp#L34-#L39)\n    could be used, for instance\n    @code {.cpp}\n    template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value, T>::type>\n    inline bool is_same(T a, T b, T epsilon = std::numeric_limits<T>::epsilon()) noexcept\n    {\n        return std::abs(a - b) <= epsilon;\n    }\n    @endcode\n\n    @note NaN values never compare equal to themselves or to other NaN values.\n\n    @param[in] lhs  first JSON value to consider\n    @param[in] rhs  second JSON value to consider\n    @return whether the values @a lhs and @a rhs are equal\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @complexity Linear.\n\n    @liveexample{The example demonstrates comparing several JSON\n    types.,operator__equal}\n\n    @since version 1.0.0\n    */\n    friend bool operator==(const_reference lhs, const_reference rhs) noexcept\n    {\n        const auto lhs_type = lhs.type();\n        const auto rhs_type = rhs.type();\n\n        if (lhs_type == rhs_type)\n        {\n            switch (lhs_type)\n            {\n                case value_t::array:\n                    return *lhs.m_value.array == *rhs.m_value.array;\n\n                case value_t::object:\n                    return *lhs.m_value.object == *rhs.m_value.object;\n\n                case value_t::null:\n                    return true;\n\n                case value_t::string:\n                    return *lhs.m_value.string == *rhs.m_value.string;\n\n                case value_t::boolean:\n                    return lhs.m_value.boolean == rhs.m_value.boolean;\n\n                case value_t::number_integer:\n                    return lhs.m_value.number_integer == rhs.m_value.number_integer;\n\n                case value_t::number_unsigned:\n                    return lhs.m_value.number_unsigned == rhs.m_value.number_unsigned;\n\n                case value_t::number_float:\n                    return lhs.m_value.number_float == rhs.m_value.number_float;\n\n                default:\n                    return false;\n            }\n        }\n        else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_integer) == rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)\n        {\n            return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_integer);\n        }\n        else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_unsigned);\n        }\n        else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer)\n        {\n            return static_cast<number_integer_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_integer;\n        }\n        else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_integer == static_cast<number_integer_t>(rhs.m_value.number_unsigned);\n        }\n\n        return false;\n    }\n\n    /*!\n    @brief comparison: equal\n    @copydoc operator==(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept\n    {\n        return lhs == basic_json(rhs);\n    }\n\n    /*!\n    @brief comparison: equal\n    @copydoc operator==(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) == rhs;\n    }\n\n    /*!\n    @brief comparison: not equal\n\n    Compares two JSON values for inequality by calculating `not (lhs == rhs)`.\n\n    @param[in] lhs  first JSON value to consider\n    @param[in] rhs  second JSON value to consider\n    @return whether the values @a lhs and @a rhs are not equal\n\n    @complexity Linear.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @liveexample{The example demonstrates comparing several JSON\n    types.,operator__notequal}\n\n    @since version 1.0.0\n    */\n    friend bool operator!=(const_reference lhs, const_reference rhs) noexcept\n    {\n        return not (lhs == rhs);\n    }\n\n    /*!\n    @brief comparison: not equal\n    @copydoc operator!=(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator!=(const_reference lhs, const ScalarType rhs) noexcept\n    {\n        return lhs != basic_json(rhs);\n    }\n\n    /*!\n    @brief comparison: not equal\n    @copydoc operator!=(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator!=(const ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) != rhs;\n    }\n\n    /*!\n    @brief comparison: less than\n\n    Compares whether one JSON value @a lhs is less than another JSON value @a\n    rhs according to the following rules:\n    - If @a lhs and @a rhs have the same type, the values are compared using\n      the default `<` operator.\n    - Integer and floating-point numbers are automatically converted before\n      comparison\n    - In case @a lhs and @a rhs have different types, the values are ignored\n      and the order of the types is considered, see\n      @ref operator<(const value_t, const value_t).\n\n    @param[in] lhs  first JSON value to consider\n    @param[in] rhs  second JSON value to consider\n    @return whether @a lhs is less than @a rhs\n\n    @complexity Linear.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @liveexample{The example demonstrates comparing several JSON\n    types.,operator__less}\n\n    @since version 1.0.0\n    */\n    friend bool operator<(const_reference lhs, const_reference rhs) noexcept\n    {\n        const auto lhs_type = lhs.type();\n        const auto rhs_type = rhs.type();\n\n        if (lhs_type == rhs_type)\n        {\n            switch (lhs_type)\n            {\n                case value_t::array:\n                    // note parentheses are necessary, see\n                    // https://github.com/nlohmann/json/issues/1530\n                    return (*lhs.m_value.array) < (*rhs.m_value.array);\n\n                case value_t::object:\n                    return (*lhs.m_value.object) < (*rhs.m_value.object);\n\n                case value_t::null:\n                    return false;\n\n                case value_t::string:\n                    return (*lhs.m_value.string) < (*rhs.m_value.string);\n\n                case value_t::boolean:\n                    return (lhs.m_value.boolean) < (rhs.m_value.boolean);\n\n                case value_t::number_integer:\n                    return (lhs.m_value.number_integer) < (rhs.m_value.number_integer);\n\n                case value_t::number_unsigned:\n                    return (lhs.m_value.number_unsigned) < (rhs.m_value.number_unsigned);\n\n                case value_t::number_float:\n                    return (lhs.m_value.number_float) < (rhs.m_value.number_float);\n\n                default:\n                    return false;\n            }\n        }\n        else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_integer) < rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer)\n        {\n            return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_integer);\n        }\n        else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float)\n        {\n            return static_cast<number_float_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_float;\n        }\n        else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_unsigned);\n        }\n        else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned)\n        {\n            return lhs.m_value.number_integer < static_cast<number_integer_t>(rhs.m_value.number_unsigned);\n        }\n        else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer)\n        {\n            return static_cast<number_integer_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_integer;\n        }\n\n        // We only reach this line if we cannot compare values. In that case,\n        // we compare types. Note we have to call the operator explicitly,\n        // because MSVC has problems otherwise.\n        return operator<(lhs_type, rhs_type);\n    }\n\n    /*!\n    @brief comparison: less than\n    @copydoc operator<(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<(const_reference lhs, const ScalarType rhs) noexcept\n    {\n        return lhs < basic_json(rhs);\n    }\n\n    /*!\n    @brief comparison: less than\n    @copydoc operator<(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<(const ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) < rhs;\n    }\n\n    /*!\n    @brief comparison: less than or equal\n\n    Compares whether one JSON value @a lhs is less than or equal to another\n    JSON value by calculating `not (rhs < lhs)`.\n\n    @param[in] lhs  first JSON value to consider\n    @param[in] rhs  second JSON value to consider\n    @return whether @a lhs is less than or equal to @a rhs\n\n    @complexity Linear.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @liveexample{The example demonstrates comparing several JSON\n    types.,operator__greater}\n\n    @since version 1.0.0\n    */\n    friend bool operator<=(const_reference lhs, const_reference rhs) noexcept\n    {\n        return not (rhs < lhs);\n    }\n\n    /*!\n    @brief comparison: less than or equal\n    @copydoc operator<=(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<=(const_reference lhs, const ScalarType rhs) noexcept\n    {\n        return lhs <= basic_json(rhs);\n    }\n\n    /*!\n    @brief comparison: less than or equal\n    @copydoc operator<=(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator<=(const ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) <= rhs;\n    }\n\n    /*!\n    @brief comparison: greater than\n\n    Compares whether one JSON value @a lhs is greater than another\n    JSON value by calculating `not (lhs <= rhs)`.\n\n    @param[in] lhs  first JSON value to consider\n    @param[in] rhs  second JSON value to consider\n    @return whether @a lhs is greater than to @a rhs\n\n    @complexity Linear.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @liveexample{The example demonstrates comparing several JSON\n    types.,operator__lessequal}\n\n    @since version 1.0.0\n    */\n    friend bool operator>(const_reference lhs, const_reference rhs) noexcept\n    {\n        return not (lhs <= rhs);\n    }\n\n    /*!\n    @brief comparison: greater than\n    @copydoc operator>(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>(const_reference lhs, const ScalarType rhs) noexcept\n    {\n        return lhs > basic_json(rhs);\n    }\n\n    /*!\n    @brief comparison: greater than\n    @copydoc operator>(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>(const ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) > rhs;\n    }\n\n    /*!\n    @brief comparison: greater than or equal\n\n    Compares whether one JSON value @a lhs is greater than or equal to another\n    JSON value by calculating `not (lhs < rhs)`.\n\n    @param[in] lhs  first JSON value to consider\n    @param[in] rhs  second JSON value to consider\n    @return whether @a lhs is greater than or equal to @a rhs\n\n    @complexity Linear.\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @liveexample{The example demonstrates comparing several JSON\n    types.,operator__greaterequal}\n\n    @since version 1.0.0\n    */\n    friend bool operator>=(const_reference lhs, const_reference rhs) noexcept\n    {\n        return not (lhs < rhs);\n    }\n\n    /*!\n    @brief comparison: greater than or equal\n    @copydoc operator>=(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>=(const_reference lhs, const ScalarType rhs) noexcept\n    {\n        return lhs >= basic_json(rhs);\n    }\n\n    /*!\n    @brief comparison: greater than or equal\n    @copydoc operator>=(const_reference, const_reference)\n    */\n    template<typename ScalarType, typename std::enable_if<\n                 std::is_scalar<ScalarType>::value, int>::type = 0>\n    friend bool operator>=(const ScalarType lhs, const_reference rhs) noexcept\n    {\n        return basic_json(lhs) >= rhs;\n    }\n\n    /// @}\n\n    ///////////////////\n    // serialization //\n    ///////////////////\n\n    /// @name serialization\n    /// @{\n\n    /*!\n    @brief serialize to stream\n\n    Serialize the given JSON value @a j to the output stream @a o. The JSON\n    value will be serialized using the @ref dump member function.\n\n    - The indentation of the output can be controlled with the member variable\n      `width` of the output stream @a o. For instance, using the manipulator\n      `std::setw(4)` on @a o sets the indentation level to `4` and the\n      serialization result is the same as calling `dump(4)`.\n\n    - The indentation character can be controlled with the member variable\n      `fill` of the output stream @a o. For instance, the manipulator\n      `std::setfill('\\\\t')` sets indentation to use a tab character rather than\n      the default space character.\n\n    @param[in,out] o  stream to serialize to\n    @param[in] j  JSON value to serialize\n\n    @return the stream @a o\n\n    @throw type_error.316 if a string stored inside the JSON value is not\n                          UTF-8 encoded\n\n    @complexity Linear.\n\n    @liveexample{The example below shows the serialization with different\n    parameters to `width` to adjust the indentation level.,operator_serialize}\n\n    @since version 1.0.0; indentation character added in version 3.0.0\n    */\n    friend std::ostream& operator<<(std::ostream& o, const basic_json& j)\n    {\n        // read width member and use it as indentation parameter if nonzero\n        const bool pretty_print = o.width() > 0;\n        const auto indentation = pretty_print ? o.width() : 0;\n\n        // reset width to 0 for subsequent calls to this stream\n        o.width(0);\n\n        // do the actual serialization\n        serializer s(detail::output_adapter<char>(o), o.fill());\n        s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation));\n        return o;\n    }\n\n    /*!\n    @brief serialize to stream\n    @deprecated This stream operator is deprecated and will be removed in\n                future 4.0.0 of the library. Please use\n                @ref operator<<(std::ostream&, const basic_json&)\n                instead; that is, replace calls like `j >> o;` with `o << j;`.\n    @since version 1.0.0; deprecated since version 3.0.0\n    */\n    JSON_HEDLEY_DEPRECATED(3.0.0)\n    friend std::ostream& operator>>(const basic_json& j, std::ostream& o)\n    {\n        return o << j;\n    }\n\n    /// @}\n\n\n    /////////////////////\n    // deserialization //\n    /////////////////////\n\n    /// @name deserialization\n    /// @{\n\n    /*!\n    @brief deserialize from a compatible input\n\n    This function reads from a compatible input. Examples are:\n    - an array of 1-byte values\n    - strings with character/literal type with size of 1 byte\n    - input streams\n    - container with contiguous storage of 1-byte values. Compatible container\n      types include `std::vector`, `std::string`, `std::array`,\n      `std::valarray`, and `std::initializer_list`. Furthermore, C-style\n      arrays can be used with `std::begin()`/`std::end()`. User-defined\n      containers can be used as long as they implement random-access iterators\n      and a contiguous storage.\n\n    @pre Each element of the container has a size of 1 byte. Violating this\n    precondition yields undefined behavior. **This precondition is enforced\n    with a static assertion.**\n\n    @pre The container storage is contiguous. Violating this precondition\n    yields undefined behavior. **This precondition is enforced with an\n    assertion.**\n\n    @warning There is no way to enforce all preconditions at compile-time. If\n             the function is called with a noncompliant container and with\n             assertions switched off, the behavior is undefined and will most\n             likely yield segmentation violation.\n\n    @param[in] i  input to read from\n    @param[in] cb  a parser callback function of type @ref parser_callback_t\n    which is used to control the deserialization by filtering unwanted values\n    (optional)\n    @param[in] allow_exceptions  whether to throw exceptions in case of a\n    parse error (optional, true by default)\n\n    @return deserialized JSON value; in case of a parse error and\n            @a allow_exceptions set to `false`, the return value will be\n            value_t::discarded.\n\n    @throw parse_error.101 if a parse error occurs; example: `\"\"unexpected end\n    of input; expected string literal\"\"`\n    @throw parse_error.102 if to_unicode fails or surrogate error\n    @throw parse_error.103 if to_unicode fails\n\n    @complexity Linear in the length of the input. The parser is a predictive\n    LL(1) parser. The complexity can be higher if the parser callback function\n    @a cb has a super-linear complexity.\n\n    @note A UTF-8 byte order mark is silently ignored.\n\n    @liveexample{The example below demonstrates the `parse()` function reading\n    from an array.,parse__array__parser_callback_t}\n\n    @liveexample{The example below demonstrates the `parse()` function with\n    and without callback function.,parse__string__parser_callback_t}\n\n    @liveexample{The example below demonstrates the `parse()` function with\n    and without callback function.,parse__istream__parser_callback_t}\n\n    @liveexample{The example below demonstrates the `parse()` function reading\n    from a contiguous container.,parse__contiguouscontainer__parser_callback_t}\n\n    @since version 2.0.3 (contiguous containers)\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json parse(detail::input_adapter&& i,\n                            const parser_callback_t cb = nullptr,\n                            const bool allow_exceptions = true)\n    {\n        basic_json result;\n        parser(i, cb, allow_exceptions).parse(true, result);\n        return result;\n    }\n\n    static bool accept(detail::input_adapter&& i)\n    {\n        return parser(i).accept(true);\n    }\n\n    /*!\n    @brief generate SAX events\n\n    The SAX event lister must follow the interface of @ref json_sax.\n\n    This function reads from a compatible input. Examples are:\n    - an array of 1-byte values\n    - strings with character/literal type with size of 1 byte\n    - input streams\n    - container with contiguous storage of 1-byte values. Compatible container\n      types include `std::vector`, `std::string`, `std::array`,\n      `std::valarray`, and `std::initializer_list`. Furthermore, C-style\n      arrays can be used with `std::begin()`/`std::end()`. User-defined\n      containers can be used as long as they implement random-access iterators\n      and a contiguous storage.\n\n    @pre Each element of the container has a size of 1 byte. Violating this\n    precondition yields undefined behavior. **This precondition is enforced\n    with a static assertion.**\n\n    @pre The container storage is contiguous. Violating this precondition\n    yields undefined behavior. **This precondition is enforced with an\n    assertion.**\n\n    @warning There is no way to enforce all preconditions at compile-time. If\n             the function is called with a noncompliant container and with\n             assertions switched off, the behavior is undefined and will most\n             likely yield segmentation violation.\n\n    @param[in] i  input to read from\n    @param[in,out] sax  SAX event listener\n    @param[in] format  the format to parse (JSON, CBOR, MessagePack, or UBJSON)\n    @param[in] strict  whether the input has to be consumed completely\n\n    @return return value of the last processed SAX event\n\n    @throw parse_error.101 if a parse error occurs; example: `\"\"unexpected end\n    of input; expected string literal\"\"`\n    @throw parse_error.102 if to_unicode fails or surrogate error\n    @throw parse_error.103 if to_unicode fails\n\n    @complexity Linear in the length of the input. The parser is a predictive\n    LL(1) parser. The complexity can be higher if the SAX consumer @a sax has\n    a super-linear complexity.\n\n    @note A UTF-8 byte order mark is silently ignored.\n\n    @liveexample{The example below demonstrates the `sax_parse()` function\n    reading from string and processing the events with a user-defined SAX\n    event consumer.,sax_parse}\n\n    @since version 3.2.0\n    */\n    template <typename SAX>\n    JSON_HEDLEY_NON_NULL(2)\n    static bool sax_parse(detail::input_adapter&& i, SAX* sax,\n                          input_format_t format = input_format_t::json,\n                          const bool strict = true)\n    {\n        assert(sax);\n        return format == input_format_t::json\n               ? parser(std::move(i)).sax_parse(sax, strict)\n               : detail::binary_reader<basic_json, SAX>(std::move(i)).sax_parse(format, sax, strict);\n    }\n\n    /*!\n    @brief deserialize from an iterator range with contiguous storage\n\n    This function reads from an iterator range of a container with contiguous\n    storage of 1-byte values. Compatible container types include\n    `std::vector`, `std::string`, `std::array`, `std::valarray`, and\n    `std::initializer_list`. Furthermore, C-style arrays can be used with\n    `std::begin()`/`std::end()`. User-defined containers can be used as long\n    as they implement random-access iterators and a contiguous storage.\n\n    @pre The iterator range is contiguous. Violating this precondition yields\n    undefined behavior. **This precondition is enforced with an assertion.**\n    @pre Each element in the range has a size of 1 byte. Violating this\n    precondition yields undefined behavior. **This precondition is enforced\n    with a static assertion.**\n\n    @warning There is no way to enforce all preconditions at compile-time. If\n             the function is called with noncompliant iterators and with\n             assertions switched off, the behavior is undefined and will most\n             likely yield segmentation violation.\n\n    @tparam IteratorType iterator of container with contiguous storage\n    @param[in] first  begin of the range to parse (included)\n    @param[in] last  end of the range to parse (excluded)\n    @param[in] cb  a parser callback function of type @ref parser_callback_t\n    which is used to control the deserialization by filtering unwanted values\n    (optional)\n    @param[in] allow_exceptions  whether to throw exceptions in case of a\n    parse error (optional, true by default)\n\n    @return deserialized JSON value; in case of a parse error and\n            @a allow_exceptions set to `false`, the return value will be\n            value_t::discarded.\n\n    @throw parse_error.101 in case of an unexpected token\n    @throw parse_error.102 if to_unicode fails or surrogate error\n    @throw parse_error.103 if to_unicode fails\n\n    @complexity Linear in the length of the input. The parser is a predictive\n    LL(1) parser. The complexity can be higher if the parser callback function\n    @a cb has a super-linear complexity.\n\n    @note A UTF-8 byte order mark is silently ignored.\n\n    @liveexample{The example below demonstrates the `parse()` function reading\n    from an iterator range.,parse__iteratortype__parser_callback_t}\n\n    @since version 2.0.3\n    */\n    template<class IteratorType, typename std::enable_if<\n                 std::is_base_of<\n                     std::random_access_iterator_tag,\n                     typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0>\n    static basic_json parse(IteratorType first, IteratorType last,\n                            const parser_callback_t cb = nullptr,\n                            const bool allow_exceptions = true)\n    {\n        basic_json result;\n        parser(detail::input_adapter(first, last), cb, allow_exceptions).parse(true, result);\n        return result;\n    }\n\n    template<class IteratorType, typename std::enable_if<\n                 std::is_base_of<\n                     std::random_access_iterator_tag,\n                     typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0>\n    static bool accept(IteratorType first, IteratorType last)\n    {\n        return parser(detail::input_adapter(first, last)).accept(true);\n    }\n\n    template<class IteratorType, class SAX, typename std::enable_if<\n                 std::is_base_of<\n                     std::random_access_iterator_tag,\n                     typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0>\n    JSON_HEDLEY_NON_NULL(3)\n    static bool sax_parse(IteratorType first, IteratorType last, SAX* sax)\n    {\n        return parser(detail::input_adapter(first, last)).sax_parse(sax);\n    }\n\n    /*!\n    @brief deserialize from stream\n    @deprecated This stream operator is deprecated and will be removed in\n                version 4.0.0 of the library. Please use\n                @ref operator>>(std::istream&, basic_json&)\n                instead; that is, replace calls like `j << i;` with `i >> j;`.\n    @since version 1.0.0; deprecated since version 3.0.0\n    */\n    JSON_HEDLEY_DEPRECATED(3.0.0)\n    friend std::istream& operator<<(basic_json& j, std::istream& i)\n    {\n        return operator>>(i, j);\n    }\n\n    /*!\n    @brief deserialize from stream\n\n    Deserializes an input stream to a JSON value.\n\n    @param[in,out] i  input stream to read a serialized JSON value from\n    @param[in,out] j  JSON value to write the deserialized input to\n\n    @throw parse_error.101 in case of an unexpected token\n    @throw parse_error.102 if to_unicode fails or surrogate error\n    @throw parse_error.103 if to_unicode fails\n\n    @complexity Linear in the length of the input. The parser is a predictive\n    LL(1) parser.\n\n    @note A UTF-8 byte order mark is silently ignored.\n\n    @liveexample{The example below shows how a JSON value is constructed by\n    reading a serialization from a stream.,operator_deserialize}\n\n    @sa parse(std::istream&, const parser_callback_t) for a variant with a\n    parser callback function to filter values while parsing\n\n    @since version 1.0.0\n    */\n    friend std::istream& operator>>(std::istream& i, basic_json& j)\n    {\n        parser(detail::input_adapter(i)).parse(false, j);\n        return i;\n    }\n\n    /// @}\n\n    ///////////////////////////\n    // convenience functions //\n    ///////////////////////////\n\n    /*!\n    @brief return the type as string\n\n    Returns the type name as string to be used in error messages - usually to\n    indicate that a function was called on a wrong JSON type.\n\n    @return a string representation of a the @a m_type member:\n            Value type  | return value\n            ----------- | -------------\n            null        | `\"null\"`\n            boolean     | `\"boolean\"`\n            string      | `\"string\"`\n            number      | `\"number\"` (for all number types)\n            object      | `\"object\"`\n            array       | `\"array\"`\n            discarded   | `\"discarded\"`\n\n    @exceptionsafety No-throw guarantee: this function never throws exceptions.\n\n    @complexity Constant.\n\n    @liveexample{The following code exemplifies `type_name()` for all JSON\n    types.,type_name}\n\n    @sa @ref type() -- return the type of the JSON value\n    @sa @ref operator value_t() -- return the type of the JSON value (implicit)\n\n    @since version 1.0.0, public since 2.1.0, `const char*` and `noexcept`\n    since 3.0.0\n    */\n    JSON_HEDLEY_RETURNS_NON_NULL\n    const char* type_name() const noexcept\n    {\n        {\n            switch (m_type)\n            {\n                case value_t::null:\n                    return \"null\";\n                case value_t::object:\n                    return \"object\";\n                case value_t::array:\n                    return \"array\";\n                case value_t::string:\n                    return \"string\";\n                case value_t::boolean:\n                    return \"boolean\";\n                case value_t::discarded:\n                    return \"discarded\";\n                default:\n                    return \"number\";\n            }\n        }\n    }\n\n\n  private:\n    //////////////////////\n    // member variables //\n    //////////////////////\n\n    /// the type of the current element\n    value_t m_type = value_t::null;\n\n    /// the value of the current element\n    json_value m_value = {};\n\n    //////////////////////////////////////////\n    // binary serialization/deserialization //\n    //////////////////////////////////////////\n\n    /// @name binary serialization/deserialization support\n    /// @{\n\n  public:\n    /*!\n    @brief create a CBOR serialization of a given JSON value\n\n    Serializes a given JSON value @a j to a byte vector using the CBOR (Concise\n    Binary Object Representation) serialization format. CBOR is a binary\n    serialization format which aims to be more compact than JSON itself, yet\n    more efficient to parse.\n\n    The library uses the following mapping from JSON values types to\n    CBOR types according to the CBOR specification (RFC 7049):\n\n    JSON value type | value/range                                | CBOR type                          | first byte\n    --------------- | ------------------------------------------ | ---------------------------------- | ---------------\n    null            | `null`                                     | Null                               | 0xF6\n    boolean         | `true`                                     | True                               | 0xF5\n    boolean         | `false`                                    | False                              | 0xF4\n    number_integer  | -9223372036854775808..-2147483649          | Negative integer (8 bytes follow)  | 0x3B\n    number_integer  | -2147483648..-32769                        | Negative integer (4 bytes follow)  | 0x3A\n    number_integer  | -32768..-129                               | Negative integer (2 bytes follow)  | 0x39\n    number_integer  | -128..-25                                  | Negative integer (1 byte follow)   | 0x38\n    number_integer  | -24..-1                                    | Negative integer                   | 0x20..0x37\n    number_integer  | 0..23                                      | Integer                            | 0x00..0x17\n    number_integer  | 24..255                                    | Unsigned integer (1 byte follow)   | 0x18\n    number_integer  | 256..65535                                 | Unsigned integer (2 bytes follow)  | 0x19\n    number_integer  | 65536..4294967295                          | Unsigned integer (4 bytes follow)  | 0x1A\n    number_integer  | 4294967296..18446744073709551615           | Unsigned integer (8 bytes follow)  | 0x1B\n    number_unsigned | 0..23                                      | Integer                            | 0x00..0x17\n    number_unsigned | 24..255                                    | Unsigned integer (1 byte follow)   | 0x18\n    number_unsigned | 256..65535                                 | Unsigned integer (2 bytes follow)  | 0x19\n    number_unsigned | 65536..4294967295                          | Unsigned integer (4 bytes follow)  | 0x1A\n    number_unsigned | 4294967296..18446744073709551615           | Unsigned integer (8 bytes follow)  | 0x1B\n    number_float    | *any value*                                | Double-Precision Float             | 0xFB\n    string          | *length*: 0..23                            | UTF-8 string                       | 0x60..0x77\n    string          | *length*: 23..255                          | UTF-8 string (1 byte follow)       | 0x78\n    string          | *length*: 256..65535                       | UTF-8 string (2 bytes follow)      | 0x79\n    string          | *length*: 65536..4294967295                | UTF-8 string (4 bytes follow)      | 0x7A\n    string          | *length*: 4294967296..18446744073709551615 | UTF-8 string (8 bytes follow)      | 0x7B\n    array           | *size*: 0..23                              | array                              | 0x80..0x97\n    array           | *size*: 23..255                            | array (1 byte follow)              | 0x98\n    array           | *size*: 256..65535                         | array (2 bytes follow)             | 0x99\n    array           | *size*: 65536..4294967295                  | array (4 bytes follow)             | 0x9A\n    array           | *size*: 4294967296..18446744073709551615   | array (8 bytes follow)             | 0x9B\n    object          | *size*: 0..23                              | map                                | 0xA0..0xB7\n    object          | *size*: 23..255                            | map (1 byte follow)                | 0xB8\n    object          | *size*: 256..65535                         | map (2 bytes follow)               | 0xB9\n    object          | *size*: 65536..4294967295                  | map (4 bytes follow)               | 0xBA\n    object          | *size*: 4294967296..18446744073709551615   | map (8 bytes follow)               | 0xBB\n\n    @note The mapping is **complete** in the sense that any JSON value type\n          can be converted to a CBOR value.\n\n    @note If NaN or Infinity are stored inside a JSON number, they are\n          serialized properly. This behavior differs from the @ref dump()\n          function which serializes NaN or Infinity to `null`.\n\n    @note The following CBOR types are not used in the conversion:\n          - byte strings (0x40..0x5F)\n          - UTF-8 strings terminated by \"break\" (0x7F)\n          - arrays terminated by \"break\" (0x9F)\n          - maps terminated by \"break\" (0xBF)\n          - date/time (0xC0..0xC1)\n          - bignum (0xC2..0xC3)\n          - decimal fraction (0xC4)\n          - bigfloat (0xC5)\n          - tagged items (0xC6..0xD4, 0xD8..0xDB)\n          - expected conversions (0xD5..0xD7)\n          - simple values (0xE0..0xF3, 0xF8)\n          - undefined (0xF7)\n          - half and single-precision floats (0xF9-0xFA)\n          - break (0xFF)\n\n    @param[in] j  JSON value to serialize\n    @return MessagePack serialization as byte vector\n\n    @complexity Linear in the size of the JSON value @a j.\n\n    @liveexample{The example shows the serialization of a JSON value to a byte\n    vector in CBOR format.,to_cbor}\n\n    @sa http://cbor.io\n    @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the\n        analogous deserialization\n    @sa @ref to_msgpack(const basic_json&) for the related MessagePack format\n    @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the\n             related UBJSON format\n\n    @since version 2.0.9\n    */\n    static std::vector<uint8_t> to_cbor(const basic_json& j)\n    {\n        std::vector<uint8_t> result;\n        to_cbor(j, result);\n        return result;\n    }\n\n    static void to_cbor(const basic_json& j, detail::output_adapter<uint8_t> o)\n    {\n        binary_writer<uint8_t>(o).write_cbor(j);\n    }\n\n    static void to_cbor(const basic_json& j, detail::output_adapter<char> o)\n    {\n        binary_writer<char>(o).write_cbor(j);\n    }\n\n    /*!\n    @brief create a MessagePack serialization of a given JSON value\n\n    Serializes a given JSON value @a j to a byte vector using the MessagePack\n    serialization format. MessagePack is a binary serialization format which\n    aims to be more compact than JSON itself, yet more efficient to parse.\n\n    The library uses the following mapping from JSON values types to\n    MessagePack types according to the MessagePack specification:\n\n    JSON value type | value/range                       | MessagePack type | first byte\n    --------------- | --------------------------------- | ---------------- | ----------\n    null            | `null`                            | nil              | 0xC0\n    boolean         | `true`                            | true             | 0xC3\n    boolean         | `false`                           | false            | 0xC2\n    number_integer  | -9223372036854775808..-2147483649 | int64            | 0xD3\n    number_integer  | -2147483648..-32769               | int32            | 0xD2\n    number_integer  | -32768..-129                      | int16            | 0xD1\n    number_integer  | -128..-33                         | int8             | 0xD0\n    number_integer  | -32..-1                           | negative fixint  | 0xE0..0xFF\n    number_integer  | 0..127                            | positive fixint  | 0x00..0x7F\n    number_integer  | 128..255                          | uint 8           | 0xCC\n    number_integer  | 256..65535                        | uint 16          | 0xCD\n    number_integer  | 65536..4294967295                 | uint 32          | 0xCE\n    number_integer  | 4294967296..18446744073709551615  | uint 64          | 0xCF\n    number_unsigned | 0..127                            | positive fixint  | 0x00..0x7F\n    number_unsigned | 128..255                          | uint 8           | 0xCC\n    number_unsigned | 256..65535                        | uint 16          | 0xCD\n    number_unsigned | 65536..4294967295                 | uint 32          | 0xCE\n    number_unsigned | 4294967296..18446744073709551615  | uint 64          | 0xCF\n    number_float    | *any value*                       | float 64         | 0xCB\n    string          | *length*: 0..31                   | fixstr           | 0xA0..0xBF\n    string          | *length*: 32..255                 | str 8            | 0xD9\n    string          | *length*: 256..65535              | str 16           | 0xDA\n    string          | *length*: 65536..4294967295       | str 32           | 0xDB\n    array           | *size*: 0..15                     | fixarray         | 0x90..0x9F\n    array           | *size*: 16..65535                 | array 16         | 0xDC\n    array           | *size*: 65536..4294967295         | array 32         | 0xDD\n    object          | *size*: 0..15                     | fix map          | 0x80..0x8F\n    object          | *size*: 16..65535                 | map 16           | 0xDE\n    object          | *size*: 65536..4294967295         | map 32           | 0xDF\n\n    @note The mapping is **complete** in the sense that any JSON value type\n          can be converted to a MessagePack value.\n\n    @note The following values can **not** be converted to a MessagePack value:\n          - strings with more than 4294967295 bytes\n          - arrays with more than 4294967295 elements\n          - objects with more than 4294967295 elements\n\n    @note The following MessagePack types are not used in the conversion:\n          - bin 8 - bin 32 (0xC4..0xC6)\n          - ext 8 - ext 32 (0xC7..0xC9)\n          - float 32 (0xCA)\n          - fixext 1 - fixext 16 (0xD4..0xD8)\n\n    @note Any MessagePack output created @ref to_msgpack can be successfully\n          parsed by @ref from_msgpack.\n\n    @note If NaN or Infinity are stored inside a JSON number, they are\n          serialized properly. This behavior differs from the @ref dump()\n          function which serializes NaN or Infinity to `null`.\n\n    @param[in] j  JSON value to serialize\n    @return MessagePack serialization as byte vector\n\n    @complexity Linear in the size of the JSON value @a j.\n\n    @liveexample{The example shows the serialization of a JSON value to a byte\n    vector in MessagePack format.,to_msgpack}\n\n    @sa http://msgpack.org\n    @sa @ref from_msgpack for the analogous deserialization\n    @sa @ref to_cbor(const basic_json& for the related CBOR format\n    @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the\n             related UBJSON format\n\n    @since version 2.0.9\n    */\n    static std::vector<uint8_t> to_msgpack(const basic_json& j)\n    {\n        std::vector<uint8_t> result;\n        to_msgpack(j, result);\n        return result;\n    }\n\n    static void to_msgpack(const basic_json& j, detail::output_adapter<uint8_t> o)\n    {\n        binary_writer<uint8_t>(o).write_msgpack(j);\n    }\n\n    static void to_msgpack(const basic_json& j, detail::output_adapter<char> o)\n    {\n        binary_writer<char>(o).write_msgpack(j);\n    }\n\n    /*!\n    @brief create a UBJSON serialization of a given JSON value\n\n    Serializes a given JSON value @a j to a byte vector using the UBJSON\n    (Universal Binary JSON) serialization format. UBJSON aims to be more compact\n    than JSON itself, yet more efficient to parse.\n\n    The library uses the following mapping from JSON values types to\n    UBJSON types according to the UBJSON specification:\n\n    JSON value type | value/range                       | UBJSON type | marker\n    --------------- | --------------------------------- | ----------- | ------\n    null            | `null`                            | null        | `Z`\n    boolean         | `true`                            | true        | `T`\n    boolean         | `false`                           | false       | `F`\n    number_integer  | -9223372036854775808..-2147483649 | int64       | `L`\n    number_integer  | -2147483648..-32769               | int32       | `l`\n    number_integer  | -32768..-129                      | int16       | `I`\n    number_integer  | -128..127                         | int8        | `i`\n    number_integer  | 128..255                          | uint8       | `U`\n    number_integer  | 256..32767                        | int16       | `I`\n    number_integer  | 32768..2147483647                 | int32       | `l`\n    number_integer  | 2147483648..9223372036854775807   | int64       | `L`\n    number_unsigned | 0..127                            | int8        | `i`\n    number_unsigned | 128..255                          | uint8       | `U`\n    number_unsigned | 256..32767                        | int16       | `I`\n    number_unsigned | 32768..2147483647                 | int32       | `l`\n    number_unsigned | 2147483648..9223372036854775807   | int64       | `L`\n    number_float    | *any value*                       | float64     | `D`\n    string          | *with shortest length indicator*  | string      | `S`\n    array           | *see notes on optimized format*   | array       | `[`\n    object          | *see notes on optimized format*   | map         | `{`\n\n    @note The mapping is **complete** in the sense that any JSON value type\n          can be converted to a UBJSON value.\n\n    @note The following values can **not** be converted to a UBJSON value:\n          - strings with more than 9223372036854775807 bytes (theoretical)\n          - unsigned integer numbers above 9223372036854775807\n\n    @note The following markers are not used in the conversion:\n          - `Z`: no-op values are not created.\n          - `C`: single-byte strings are serialized with `S` markers.\n\n    @note Any UBJSON output created @ref to_ubjson can be successfully parsed\n          by @ref from_ubjson.\n\n    @note If NaN or Infinity are stored inside a JSON number, they are\n          serialized properly. This behavior differs from the @ref dump()\n          function which serializes NaN or Infinity to `null`.\n\n    @note The optimized formats for containers are supported: Parameter\n          @a use_size adds size information to the beginning of a container and\n          removes the closing marker. Parameter @a use_type further checks\n          whether all elements of a container have the same type and adds the\n          type marker to the beginning of the container. The @a use_type\n          parameter must only be used together with @a use_size = true. Note\n          that @a use_size = true alone may result in larger representations -\n          the benefit of this parameter is that the receiving side is\n          immediately informed on the number of elements of the container.\n\n    @param[in] j  JSON value to serialize\n    @param[in] use_size  whether to add size annotations to container types\n    @param[in] use_type  whether to add type annotations to container types\n                         (must be combined with @a use_size = true)\n    @return UBJSON serialization as byte vector\n\n    @complexity Linear in the size of the JSON value @a j.\n\n    @liveexample{The example shows the serialization of a JSON value to a byte\n    vector in UBJSON format.,to_ubjson}\n\n    @sa http://ubjson.org\n    @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the\n        analogous deserialization\n    @sa @ref to_cbor(const basic_json& for the related CBOR format\n    @sa @ref to_msgpack(const basic_json&) for the related MessagePack format\n\n    @since version 3.1.0\n    */\n    static std::vector<uint8_t> to_ubjson(const basic_json& j,\n                                          const bool use_size = false,\n                                          const bool use_type = false)\n    {\n        std::vector<uint8_t> result;\n        to_ubjson(j, result, use_size, use_type);\n        return result;\n    }\n\n    static void to_ubjson(const basic_json& j, detail::output_adapter<uint8_t> o,\n                          const bool use_size = false, const bool use_type = false)\n    {\n        binary_writer<uint8_t>(o).write_ubjson(j, use_size, use_type);\n    }\n\n    static void to_ubjson(const basic_json& j, detail::output_adapter<char> o,\n                          const bool use_size = false, const bool use_type = false)\n    {\n        binary_writer<char>(o).write_ubjson(j, use_size, use_type);\n    }\n\n\n    /*!\n    @brief Serializes the given JSON object `j` to BSON and returns a vector\n           containing the corresponding BSON-representation.\n\n    BSON (Binary JSON) is a binary format in which zero or more ordered key/value pairs are\n    stored as a single entity (a so-called document).\n\n    The library uses the following mapping from JSON values types to BSON types:\n\n    JSON value type | value/range                       | BSON type   | marker\n    --------------- | --------------------------------- | ----------- | ------\n    null            | `null`                            | null        | 0x0A\n    boolean         | `true`, `false`                   | boolean     | 0x08\n    number_integer  | -9223372036854775808..-2147483649 | int64       | 0x12\n    number_integer  | -2147483648..2147483647           | int32       | 0x10\n    number_integer  | 2147483648..9223372036854775807   | int64       | 0x12\n    number_unsigned | 0..2147483647                     | int32       | 0x10\n    number_unsigned | 2147483648..9223372036854775807   | int64       | 0x12\n    number_unsigned | 9223372036854775808..18446744073709551615| --   | --\n    number_float    | *any value*                       | double      | 0x01\n    string          | *any value*                       | string      | 0x02\n    array           | *any value*                       | document    | 0x04\n    object          | *any value*                       | document    | 0x03\n\n    @warning The mapping is **incomplete**, since only JSON-objects (and things\n    contained therein) can be serialized to BSON.\n    Also, integers larger than 9223372036854775807 cannot be serialized to BSON,\n    and the keys may not contain U+0000, since they are serialized a\n    zero-terminated c-strings.\n\n    @throw out_of_range.407  if `j.is_number_unsigned() && j.get<std::uint64_t>() > 9223372036854775807`\n    @throw out_of_range.409  if a key in `j` contains a NULL (U+0000)\n    @throw type_error.317    if `!j.is_object()`\n\n    @pre The input `j` is required to be an object: `j.is_object() == true`.\n\n    @note Any BSON output created via @ref to_bson can be successfully parsed\n          by @ref from_bson.\n\n    @param[in] j  JSON value to serialize\n    @return BSON serialization as byte vector\n\n    @complexity Linear in the size of the JSON value @a j.\n\n    @liveexample{The example shows the serialization of a JSON value to a byte\n    vector in BSON format.,to_bson}\n\n    @sa http://bsonspec.org/spec.html\n    @sa @ref from_bson(detail::input_adapter&&, const bool strict) for the\n        analogous deserialization\n    @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the\n             related UBJSON format\n    @sa @ref to_cbor(const basic_json&) for the related CBOR format\n    @sa @ref to_msgpack(const basic_json&) for the related MessagePack format\n    */\n    static std::vector<uint8_t> to_bson(const basic_json& j)\n    {\n        std::vector<uint8_t> result;\n        to_bson(j, result);\n        return result;\n    }\n\n    /*!\n    @brief Serializes the given JSON object `j` to BSON and forwards the\n           corresponding BSON-representation to the given output_adapter `o`.\n    @param j The JSON object to convert to BSON.\n    @param o The output adapter that receives the binary BSON representation.\n    @pre The input `j` shall be an object: `j.is_object() == true`\n    @sa @ref to_bson(const basic_json&)\n    */\n    static void to_bson(const basic_json& j, detail::output_adapter<uint8_t> o)\n    {\n        binary_writer<uint8_t>(o).write_bson(j);\n    }\n\n    /*!\n    @copydoc to_bson(const basic_json&, detail::output_adapter<uint8_t>)\n    */\n    static void to_bson(const basic_json& j, detail::output_adapter<char> o)\n    {\n        binary_writer<char>(o).write_bson(j);\n    }\n\n\n    /*!\n    @brief create a JSON value from an input in CBOR format\n\n    Deserializes a given input @a i to a JSON value using the CBOR (Concise\n    Binary Object Representation) serialization format.\n\n    The library maps CBOR types to JSON value types as follows:\n\n    CBOR type              | JSON value type | first byte\n    ---------------------- | --------------- | ----------\n    Integer                | number_unsigned | 0x00..0x17\n    Unsigned integer       | number_unsigned | 0x18\n    Unsigned integer       | number_unsigned | 0x19\n    Unsigned integer       | number_unsigned | 0x1A\n    Unsigned integer       | number_unsigned | 0x1B\n    Negative integer       | number_integer  | 0x20..0x37\n    Negative integer       | number_integer  | 0x38\n    Negative integer       | number_integer  | 0x39\n    Negative integer       | number_integer  | 0x3A\n    Negative integer       | number_integer  | 0x3B\n    Negative integer       | number_integer  | 0x40..0x57\n    UTF-8 string           | string          | 0x60..0x77\n    UTF-8 string           | string          | 0x78\n    UTF-8 string           | string          | 0x79\n    UTF-8 string           | string          | 0x7A\n    UTF-8 string           | string          | 0x7B\n    UTF-8 string           | string          | 0x7F\n    array                  | array           | 0x80..0x97\n    array                  | array           | 0x98\n    array                  | array           | 0x99\n    array                  | array           | 0x9A\n    array                  | array           | 0x9B\n    array                  | array           | 0x9F\n    map                    | object          | 0xA0..0xB7\n    map                    | object          | 0xB8\n    map                    | object          | 0xB9\n    map                    | object          | 0xBA\n    map                    | object          | 0xBB\n    map                    | object          | 0xBF\n    False                  | `false`         | 0xF4\n    True                   | `true`          | 0xF5\n    Null                   | `null`          | 0xF6\n    Half-Precision Float   | number_float    | 0xF9\n    Single-Precision Float | number_float    | 0xFA\n    Double-Precision Float | number_float    | 0xFB\n\n    @warning The mapping is **incomplete** in the sense that not all CBOR\n             types can be converted to a JSON value. The following CBOR types\n             are not supported and will yield parse errors (parse_error.112):\n             - byte strings (0x40..0x5F)\n             - date/time (0xC0..0xC1)\n             - bignum (0xC2..0xC3)\n             - decimal fraction (0xC4)\n             - bigfloat (0xC5)\n             - tagged items (0xC6..0xD4, 0xD8..0xDB)\n             - expected conversions (0xD5..0xD7)\n             - simple values (0xE0..0xF3, 0xF8)\n             - undefined (0xF7)\n\n    @warning CBOR allows map keys of any type, whereas JSON only allows\n             strings as keys in object values. Therefore, CBOR maps with keys\n             other than UTF-8 strings are rejected (parse_error.113).\n\n    @note Any CBOR output created @ref to_cbor can be successfully parsed by\n          @ref from_cbor.\n\n    @param[in] i  an input in CBOR format convertible to an input adapter\n    @param[in] strict  whether to expect the input to be consumed until EOF\n                       (true by default)\n    @param[in] allow_exceptions  whether to throw exceptions in case of a\n    parse error (optional, true by default)\n\n    @return deserialized JSON value; in case of a parse error and\n            @a allow_exceptions set to `false`, the return value will be\n            value_t::discarded.\n\n    @throw parse_error.110 if the given input ends prematurely or the end of\n    file was not reached when @a strict was set to true\n    @throw parse_error.112 if unsupported features from CBOR were\n    used in the given input @a v or if the input is not valid CBOR\n    @throw parse_error.113 if a string was expected as map key, but not found\n\n    @complexity Linear in the size of the input @a i.\n\n    @liveexample{The example shows the deserialization of a byte vector in CBOR\n    format to a JSON value.,from_cbor}\n\n    @sa http://cbor.io\n    @sa @ref to_cbor(const basic_json&) for the analogous serialization\n    @sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for the\n        related MessagePack format\n    @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the\n        related UBJSON format\n\n    @since version 2.0.9; parameter @a start_index since 2.1.1; changed to\n           consume input adapters, removed start_index parameter, and added\n           @a strict parameter since 3.0.0; added @a allow_exceptions parameter\n           since 3.2.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_cbor(detail::input_adapter&& i,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::cbor, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @copydoc from_cbor(detail::input_adapter&&, const bool, const bool)\n    */\n    template<typename A1, typename A2,\n             detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_cbor(A1 && a1, A2 && a2,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::cbor, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @brief create a JSON value from an input in MessagePack format\n\n    Deserializes a given input @a i to a JSON value using the MessagePack\n    serialization format.\n\n    The library maps MessagePack types to JSON value types as follows:\n\n    MessagePack type | JSON value type | first byte\n    ---------------- | --------------- | ----------\n    positive fixint  | number_unsigned | 0x00..0x7F\n    fixmap           | object          | 0x80..0x8F\n    fixarray         | array           | 0x90..0x9F\n    fixstr           | string          | 0xA0..0xBF\n    nil              | `null`          | 0xC0\n    false            | `false`         | 0xC2\n    true             | `true`          | 0xC3\n    float 32         | number_float    | 0xCA\n    float 64         | number_float    | 0xCB\n    uint 8           | number_unsigned | 0xCC\n    uint 16          | number_unsigned | 0xCD\n    uint 32          | number_unsigned | 0xCE\n    uint 64          | number_unsigned | 0xCF\n    int 8            | number_integer  | 0xD0\n    int 16           | number_integer  | 0xD1\n    int 32           | number_integer  | 0xD2\n    int 64           | number_integer  | 0xD3\n    str 8            | string          | 0xD9\n    str 16           | string          | 0xDA\n    str 32           | string          | 0xDB\n    array 16         | array           | 0xDC\n    array 32         | array           | 0xDD\n    map 16           | object          | 0xDE\n    map 32           | object          | 0xDF\n    negative fixint  | number_integer  | 0xE0-0xFF\n\n    @warning The mapping is **incomplete** in the sense that not all\n             MessagePack types can be converted to a JSON value. The following\n             MessagePack types are not supported and will yield parse errors:\n              - bin 8 - bin 32 (0xC4..0xC6)\n              - ext 8 - ext 32 (0xC7..0xC9)\n              - fixext 1 - fixext 16 (0xD4..0xD8)\n\n    @note Any MessagePack output created @ref to_msgpack can be successfully\n          parsed by @ref from_msgpack.\n\n    @param[in] i  an input in MessagePack format convertible to an input\n                  adapter\n    @param[in] strict  whether to expect the input to be consumed until EOF\n                       (true by default)\n    @param[in] allow_exceptions  whether to throw exceptions in case of a\n    parse error (optional, true by default)\n\n    @return deserialized JSON value; in case of a parse error and\n            @a allow_exceptions set to `false`, the return value will be\n            value_t::discarded.\n\n    @throw parse_error.110 if the given input ends prematurely or the end of\n    file was not reached when @a strict was set to true\n    @throw parse_error.112 if unsupported features from MessagePack were\n    used in the given input @a i or if the input is not valid MessagePack\n    @throw parse_error.113 if a string was expected as map key, but not found\n\n    @complexity Linear in the size of the input @a i.\n\n    @liveexample{The example shows the deserialization of a byte vector in\n    MessagePack format to a JSON value.,from_msgpack}\n\n    @sa http://msgpack.org\n    @sa @ref to_msgpack(const basic_json&) for the analogous serialization\n    @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the\n        related CBOR format\n    @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for\n        the related UBJSON format\n    @sa @ref from_bson(detail::input_adapter&&, const bool, const bool) for\n        the related BSON format\n\n    @since version 2.0.9; parameter @a start_index since 2.1.1; changed to\n           consume input adapters, removed start_index parameter, and added\n           @a strict parameter since 3.0.0; added @a allow_exceptions parameter\n           since 3.2.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_msgpack(detail::input_adapter&& i,\n                                   const bool strict = true,\n                                   const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::msgpack, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @copydoc from_msgpack(detail::input_adapter&&, const bool, const bool)\n    */\n    template<typename A1, typename A2,\n             detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_msgpack(A1 && a1, A2 && a2,\n                                   const bool strict = true,\n                                   const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::msgpack, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @brief create a JSON value from an input in UBJSON format\n\n    Deserializes a given input @a i to a JSON value using the UBJSON (Universal\n    Binary JSON) serialization format.\n\n    The library maps UBJSON types to JSON value types as follows:\n\n    UBJSON type | JSON value type                         | marker\n    ----------- | --------------------------------------- | ------\n    no-op       | *no value, next value is read*          | `N`\n    null        | `null`                                  | `Z`\n    false       | `false`                                 | `F`\n    true        | `true`                                  | `T`\n    float32     | number_float                            | `d`\n    float64     | number_float                            | `D`\n    uint8       | number_unsigned                         | `U`\n    int8        | number_integer                          | `i`\n    int16       | number_integer                          | `I`\n    int32       | number_integer                          | `l`\n    int64       | number_integer                          | `L`\n    string      | string                                  | `S`\n    char        | string                                  | `C`\n    array       | array (optimized values are supported)  | `[`\n    object      | object (optimized values are supported) | `{`\n\n    @note The mapping is **complete** in the sense that any UBJSON value can\n          be converted to a JSON value.\n\n    @param[in] i  an input in UBJSON format convertible to an input adapter\n    @param[in] strict  whether to expect the input to be consumed until EOF\n                       (true by default)\n    @param[in] allow_exceptions  whether to throw exceptions in case of a\n    parse error (optional, true by default)\n\n    @return deserialized JSON value; in case of a parse error and\n            @a allow_exceptions set to `false`, the return value will be\n            value_t::discarded.\n\n    @throw parse_error.110 if the given input ends prematurely or the end of\n    file was not reached when @a strict was set to true\n    @throw parse_error.112 if a parse error occurs\n    @throw parse_error.113 if a string could not be parsed successfully\n\n    @complexity Linear in the size of the input @a i.\n\n    @liveexample{The example shows the deserialization of a byte vector in\n    UBJSON format to a JSON value.,from_ubjson}\n\n    @sa http://ubjson.org\n    @sa @ref to_ubjson(const basic_json&, const bool, const bool) for the\n             analogous serialization\n    @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the\n        related CBOR format\n    @sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for\n        the related MessagePack format\n    @sa @ref from_bson(detail::input_adapter&&, const bool, const bool) for\n        the related BSON format\n\n    @since version 3.1.0; added @a allow_exceptions parameter since 3.2.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_ubjson(detail::input_adapter&& i,\n                                  const bool strict = true,\n                                  const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::ubjson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @copydoc from_ubjson(detail::input_adapter&&, const bool, const bool)\n    */\n    template<typename A1, typename A2,\n             detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_ubjson(A1 && a1, A2 && a2,\n                                  const bool strict = true,\n                                  const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::ubjson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @brief Create a JSON value from an input in BSON format\n\n    Deserializes a given input @a i to a JSON value using the BSON (Binary JSON)\n    serialization format.\n\n    The library maps BSON record types to JSON value types as follows:\n\n    BSON type       | BSON marker byte | JSON value type\n    --------------- | ---------------- | ---------------------------\n    double          | 0x01             | number_float\n    string          | 0x02             | string\n    document        | 0x03             | object\n    array           | 0x04             | array\n    binary          | 0x05             | still unsupported\n    undefined       | 0x06             | still unsupported\n    ObjectId        | 0x07             | still unsupported\n    boolean         | 0x08             | boolean\n    UTC Date-Time   | 0x09             | still unsupported\n    null            | 0x0A             | null\n    Regular Expr.   | 0x0B             | still unsupported\n    DB Pointer      | 0x0C             | still unsupported\n    JavaScript Code | 0x0D             | still unsupported\n    Symbol          | 0x0E             | still unsupported\n    JavaScript Code | 0x0F             | still unsupported\n    int32           | 0x10             | number_integer\n    Timestamp       | 0x11             | still unsupported\n    128-bit decimal float | 0x13       | still unsupported\n    Max Key         | 0x7F             | still unsupported\n    Min Key         | 0xFF             | still unsupported\n\n    @warning The mapping is **incomplete**. The unsupported mappings\n             are indicated in the table above.\n\n    @param[in] i  an input in BSON format convertible to an input adapter\n    @param[in] strict  whether to expect the input to be consumed until EOF\n                       (true by default)\n    @param[in] allow_exceptions  whether to throw exceptions in case of a\n    parse error (optional, true by default)\n\n    @return deserialized JSON value; in case of a parse error and\n            @a allow_exceptions set to `false`, the return value will be\n            value_t::discarded.\n\n    @throw parse_error.114 if an unsupported BSON record type is encountered\n\n    @complexity Linear in the size of the input @a i.\n\n    @liveexample{The example shows the deserialization of a byte vector in\n    BSON format to a JSON value.,from_bson}\n\n    @sa http://bsonspec.org/spec.html\n    @sa @ref to_bson(const basic_json&) for the analogous serialization\n    @sa @ref from_cbor(detail::input_adapter&&, const bool, const bool) for the\n        related CBOR format\n    @sa @ref from_msgpack(detail::input_adapter&&, const bool, const bool) for\n        the related MessagePack format\n    @sa @ref from_ubjson(detail::input_adapter&&, const bool, const bool) for the\n        related UBJSON format\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_bson(detail::input_adapter&& i,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(i)).sax_parse(input_format_t::bson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n    /*!\n    @copydoc from_bson(detail::input_adapter&&, const bool, const bool)\n    */\n    template<typename A1, typename A2,\n             detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0>\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json from_bson(A1 && a1, A2 && a2,\n                                const bool strict = true,\n                                const bool allow_exceptions = true)\n    {\n        basic_json result;\n        detail::json_sax_dom_parser<basic_json> sdp(result, allow_exceptions);\n        const bool res = binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).sax_parse(input_format_t::bson, &sdp, strict);\n        return res ? result : basic_json(value_t::discarded);\n    }\n\n\n\n    /// @}\n\n    //////////////////////////\n    // JSON Pointer support //\n    //////////////////////////\n\n    /// @name JSON Pointer functions\n    /// @{\n\n    /*!\n    @brief access specified element via JSON Pointer\n\n    Uses a JSON pointer to retrieve a reference to the respective JSON value.\n    No bound checking is performed. Similar to @ref operator[](const typename\n    object_t::key_type&), `null` values are created in arrays and objects if\n    necessary.\n\n    In particular:\n    - If the JSON pointer points to an object key that does not exist, it\n      is created an filled with a `null` value before a reference to it\n      is returned.\n    - If the JSON pointer points to an array index that does not exist, it\n      is created an filled with a `null` value before a reference to it\n      is returned. All indices between the current maximum and the given\n      index are also filled with `null`.\n    - The special value `-` is treated as a synonym for the index past the\n      end.\n\n    @param[in] ptr  a JSON pointer\n\n    @return reference to the element pointed to by @a ptr\n\n    @complexity Constant.\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n\n    @liveexample{The behavior is shown in the example.,operatorjson_pointer}\n\n    @since version 2.0.0\n    */\n    reference operator[](const json_pointer& ptr)\n    {\n        return ptr.get_unchecked(this);\n    }\n\n    /*!\n    @brief access specified element via JSON Pointer\n\n    Uses a JSON pointer to retrieve a reference to the respective JSON value.\n    No bound checking is performed. The function does not change the JSON\n    value; no `null` values are created. In particular, the the special value\n    `-` yields an exception.\n\n    @param[in] ptr  JSON pointer to the desired element\n\n    @return const reference to the element pointed to by @a ptr\n\n    @complexity Constant.\n\n    @throw parse_error.106   if an array index begins with '0'\n    @throw parse_error.109   if an array index was not a number\n    @throw out_of_range.402  if the array index '-' is used\n    @throw out_of_range.404  if the JSON pointer can not be resolved\n\n    @liveexample{The behavior is shown in the example.,operatorjson_pointer_const}\n\n    @since version 2.0.0\n    */\n    const_reference operator[](const json_pointer& ptr) const\n    {\n        return ptr.get_unchecked(this);\n    }\n\n    /*!\n    @brief access specified element via JSON Pointer\n\n    Returns a reference to the element at with specified JSON pointer @a ptr,\n    with bounds checking.\n\n    @param[in] ptr  JSON pointer to the desired element\n\n    @return reference to the element pointed to by @a ptr\n\n    @throw parse_error.106 if an array index in the passed JSON pointer @a ptr\n    begins with '0'. See example below.\n\n    @throw parse_error.109 if an array index in the passed JSON pointer @a ptr\n    is not a number. See example below.\n\n    @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr\n    is out of range. See example below.\n\n    @throw out_of_range.402 if the array index '-' is used in the passed JSON\n    pointer @a ptr. As `at` provides checked access (and no elements are\n    implicitly inserted), the index '-' is always invalid. See example below.\n\n    @throw out_of_range.403 if the JSON pointer describes a key of an object\n    which cannot be found. See example below.\n\n    @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved.\n    See example below.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Constant.\n\n    @since version 2.0.0\n\n    @liveexample{The behavior is shown in the example.,at_json_pointer}\n    */\n    reference at(const json_pointer& ptr)\n    {\n        return ptr.get_checked(this);\n    }\n\n    /*!\n    @brief access specified element via JSON Pointer\n\n    Returns a const reference to the element at with specified JSON pointer @a\n    ptr, with bounds checking.\n\n    @param[in] ptr  JSON pointer to the desired element\n\n    @return reference to the element pointed to by @a ptr\n\n    @throw parse_error.106 if an array index in the passed JSON pointer @a ptr\n    begins with '0'. See example below.\n\n    @throw parse_error.109 if an array index in the passed JSON pointer @a ptr\n    is not a number. See example below.\n\n    @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr\n    is out of range. See example below.\n\n    @throw out_of_range.402 if the array index '-' is used in the passed JSON\n    pointer @a ptr. As `at` provides checked access (and no elements are\n    implicitly inserted), the index '-' is always invalid. See example below.\n\n    @throw out_of_range.403 if the JSON pointer describes a key of an object\n    which cannot be found. See example below.\n\n    @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved.\n    See example below.\n\n    @exceptionsafety Strong guarantee: if an exception is thrown, there are no\n    changes in the JSON value.\n\n    @complexity Constant.\n\n    @since version 2.0.0\n\n    @liveexample{The behavior is shown in the example.,at_json_pointer_const}\n    */\n    const_reference at(const json_pointer& ptr) const\n    {\n        return ptr.get_checked(this);\n    }\n\n    /*!\n    @brief return flattened JSON value\n\n    The function creates a JSON object whose keys are JSON pointers (see [RFC\n    6901](https://tools.ietf.org/html/rfc6901)) and whose values are all\n    primitive. The original JSON value can be restored using the @ref\n    unflatten() function.\n\n    @return an object that maps JSON pointers to primitive values\n\n    @note Empty objects and arrays are flattened to `null` and will not be\n          reconstructed correctly by the @ref unflatten() function.\n\n    @complexity Linear in the size the JSON value.\n\n    @liveexample{The following code shows how a JSON object is flattened to an\n    object whose keys consist of JSON pointers.,flatten}\n\n    @sa @ref unflatten() for the reverse function\n\n    @since version 2.0.0\n    */\n    basic_json flatten() const\n    {\n        basic_json result(value_t::object);\n        json_pointer::flatten(\"\", *this, result);\n        return result;\n    }\n\n    /*!\n    @brief unflatten a previously flattened JSON value\n\n    The function restores the arbitrary nesting of a JSON value that has been\n    flattened before using the @ref flatten() function. The JSON value must\n    meet certain constraints:\n    1. The value must be an object.\n    2. The keys must be JSON pointers (see\n       [RFC 6901](https://tools.ietf.org/html/rfc6901))\n    3. The mapped values must be primitive JSON types.\n\n    @return the original JSON from a flattened version\n\n    @note Empty objects and arrays are flattened by @ref flatten() to `null`\n          values and can not unflattened to their original type. Apart from\n          this example, for a JSON value `j`, the following is always true:\n          `j == j.flatten().unflatten()`.\n\n    @complexity Linear in the size the JSON value.\n\n    @throw type_error.314  if value is not an object\n    @throw type_error.315  if object values are not primitive\n\n    @liveexample{The following code shows how a flattened JSON object is\n    unflattened into the original nested JSON object.,unflatten}\n\n    @sa @ref flatten() for the reverse function\n\n    @since version 2.0.0\n    */\n    basic_json unflatten() const\n    {\n        return json_pointer::unflatten(*this);\n    }\n\n    /// @}\n\n    //////////////////////////\n    // JSON Patch functions //\n    //////////////////////////\n\n    /// @name JSON Patch functions\n    /// @{\n\n    /*!\n    @brief applies a JSON patch\n\n    [JSON Patch](http://jsonpatch.com) defines a JSON document structure for\n    expressing a sequence of operations to apply to a JSON) document. With\n    this function, a JSON Patch is applied to the current JSON value by\n    executing all operations from the patch.\n\n    @param[in] json_patch  JSON patch document\n    @return patched document\n\n    @note The application of a patch is atomic: Either all operations succeed\n          and the patched document is returned or an exception is thrown. In\n          any case, the original value is not changed: the patch is applied\n          to a copy of the value.\n\n    @throw parse_error.104 if the JSON patch does not consist of an array of\n    objects\n\n    @throw parse_error.105 if the JSON patch is malformed (e.g., mandatory\n    attributes are missing); example: `\"operation add must have member path\"`\n\n    @throw out_of_range.401 if an array index is out of range.\n\n    @throw out_of_range.403 if a JSON pointer inside the patch could not be\n    resolved successfully in the current JSON value; example: `\"key baz not\n    found\"`\n\n    @throw out_of_range.405 if JSON pointer has no parent (\"add\", \"remove\",\n    \"move\")\n\n    @throw other_error.501 if \"test\" operation was unsuccessful\n\n    @complexity Linear in the size of the JSON value and the length of the\n    JSON patch. As usually only a fraction of the JSON value is affected by\n    the patch, the complexity can usually be neglected.\n\n    @liveexample{The following code shows how a JSON patch is applied to a\n    value.,patch}\n\n    @sa @ref diff -- create a JSON patch by comparing two JSON values\n\n    @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)\n    @sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901)\n\n    @since version 2.0.0\n    */\n    basic_json patch(const basic_json& json_patch) const\n    {\n        // make a working copy to apply the patch to\n        basic_json result = *this;\n\n        // the valid JSON Patch operations\n        enum class patch_operations {add, remove, replace, move, copy, test, invalid};\n\n        const auto get_op = [](const std::string & op)\n        {\n            if (op == \"add\")\n            {\n                return patch_operations::add;\n            }\n            if (op == \"remove\")\n            {\n                return patch_operations::remove;\n            }\n            if (op == \"replace\")\n            {\n                return patch_operations::replace;\n            }\n            if (op == \"move\")\n            {\n                return patch_operations::move;\n            }\n            if (op == \"copy\")\n            {\n                return patch_operations::copy;\n            }\n            if (op == \"test\")\n            {\n                return patch_operations::test;\n            }\n\n            return patch_operations::invalid;\n        };\n\n        // wrapper for \"add\" operation; add value at ptr\n        const auto operation_add = [&result](json_pointer & ptr, basic_json val)\n        {\n            // adding to the root of the target document means replacing it\n            if (ptr.empty())\n            {\n                result = val;\n                return;\n            }\n\n            // make sure the top element of the pointer exists\n            json_pointer top_pointer = ptr.top();\n            if (top_pointer != ptr)\n            {\n                result.at(top_pointer);\n            }\n\n            // get reference to parent of JSON pointer ptr\n            const auto last_path = ptr.back();\n            ptr.pop_back();\n            basic_json& parent = result[ptr];\n\n            switch (parent.m_type)\n            {\n                case value_t::null:\n                case value_t::object:\n                {\n                    // use operator[] to add value\n                    parent[last_path] = val;\n                    break;\n                }\n\n                case value_t::array:\n                {\n                    if (last_path == \"-\")\n                    {\n                        // special case: append to back\n                        parent.push_back(val);\n                    }\n                    else\n                    {\n                        const auto idx = json_pointer::array_index(last_path);\n                        if (JSON_HEDLEY_UNLIKELY(static_cast<size_type>(idx) > parent.size()))\n                        {\n                            // avoid undefined behavior\n                            JSON_THROW(out_of_range::create(401, \"array index \" + std::to_string(idx) + \" is out of range\"));\n                        }\n\n                        // default case: insert add offset\n                        parent.insert(parent.begin() + static_cast<difference_type>(idx), val);\n                    }\n                    break;\n                }\n\n                // if there exists a parent it cannot be primitive\n                default:            // LCOV_EXCL_LINE\n                    assert(false);  // LCOV_EXCL_LINE\n            }\n        };\n\n        // wrapper for \"remove\" operation; remove value at ptr\n        const auto operation_remove = [&result](json_pointer & ptr)\n        {\n            // get reference to parent of JSON pointer ptr\n            const auto last_path = ptr.back();\n            ptr.pop_back();\n            basic_json& parent = result.at(ptr);\n\n            // remove child\n            if (parent.is_object())\n            {\n                // perform range check\n                auto it = parent.find(last_path);\n                if (JSON_HEDLEY_LIKELY(it != parent.end()))\n                {\n                    parent.erase(it);\n                }\n                else\n                {\n                    JSON_THROW(out_of_range::create(403, \"key '\" + last_path + \"' not found\"));\n                }\n            }\n            else if (parent.is_array())\n            {\n                // note erase performs range check\n                parent.erase(static_cast<size_type>(json_pointer::array_index(last_path)));\n            }\n        };\n\n        // type check: top level value must be an array\n        if (JSON_HEDLEY_UNLIKELY(not json_patch.is_array()))\n        {\n            JSON_THROW(parse_error::create(104, 0, \"JSON patch must be an array of objects\"));\n        }\n\n        // iterate and apply the operations\n        for (const auto& val : json_patch)\n        {\n            // wrapper to get a value for an operation\n            const auto get_value = [&val](const std::string & op,\n                                          const std::string & member,\n                                          bool string_type) -> basic_json &\n            {\n                // find value\n                auto it = val.m_value.object->find(member);\n\n                // context-sensitive error message\n                const auto error_msg = (op == \"op\") ? \"operation\" : \"operation '\" + op + \"'\";\n\n                // check if desired value is present\n                if (JSON_HEDLEY_UNLIKELY(it == val.m_value.object->end()))\n                {\n                    JSON_THROW(parse_error::create(105, 0, error_msg + \" must have member '\" + member + \"'\"));\n                }\n\n                // check if result is of type string\n                if (JSON_HEDLEY_UNLIKELY(string_type and not it->second.is_string()))\n                {\n                    JSON_THROW(parse_error::create(105, 0, error_msg + \" must have string member '\" + member + \"'\"));\n                }\n\n                // no error: return value\n                return it->second;\n            };\n\n            // type check: every element of the array must be an object\n            if (JSON_HEDLEY_UNLIKELY(not val.is_object()))\n            {\n                JSON_THROW(parse_error::create(104, 0, \"JSON patch must be an array of objects\"));\n            }\n\n            // collect mandatory members\n            const std::string op = get_value(\"op\", \"op\", true);\n            const std::string path = get_value(op, \"path\", true);\n            json_pointer ptr(path);\n\n            switch (get_op(op))\n            {\n                case patch_operations::add:\n                {\n                    operation_add(ptr, get_value(\"add\", \"value\", false));\n                    break;\n                }\n\n                case patch_operations::remove:\n                {\n                    operation_remove(ptr);\n                    break;\n                }\n\n                case patch_operations::replace:\n                {\n                    // the \"path\" location must exist - use at()\n                    result.at(ptr) = get_value(\"replace\", \"value\", false);\n                    break;\n                }\n\n                case patch_operations::move:\n                {\n                    const std::string from_path = get_value(\"move\", \"from\", true);\n                    json_pointer from_ptr(from_path);\n\n                    // the \"from\" location must exist - use at()\n                    basic_json v = result.at(from_ptr);\n\n                    // The move operation is functionally identical to a\n                    // \"remove\" operation on the \"from\" location, followed\n                    // immediately by an \"add\" operation at the target\n                    // location with the value that was just removed.\n                    operation_remove(from_ptr);\n                    operation_add(ptr, v);\n                    break;\n                }\n\n                case patch_operations::copy:\n                {\n                    const std::string from_path = get_value(\"copy\", \"from\", true);\n                    const json_pointer from_ptr(from_path);\n\n                    // the \"from\" location must exist - use at()\n                    basic_json v = result.at(from_ptr);\n\n                    // The copy is functionally identical to an \"add\"\n                    // operation at the target location using the value\n                    // specified in the \"from\" member.\n                    operation_add(ptr, v);\n                    break;\n                }\n\n                case patch_operations::test:\n                {\n                    bool success = false;\n                    JSON_TRY\n                    {\n                        // check if \"value\" matches the one at \"path\"\n                        // the \"path\" location must exist - use at()\n                        success = (result.at(ptr) == get_value(\"test\", \"value\", false));\n                    }\n                    JSON_INTERNAL_CATCH (out_of_range&)\n                    {\n                        // ignore out of range errors: success remains false\n                    }\n\n                    // throw an exception if test fails\n                    if (JSON_HEDLEY_UNLIKELY(not success))\n                    {\n                        JSON_THROW(other_error::create(501, \"unsuccessful: \" + val.dump()));\n                    }\n\n                    break;\n                }\n\n                default:\n                {\n                    // op must be \"add\", \"remove\", \"replace\", \"move\", \"copy\", or\n                    // \"test\"\n                    JSON_THROW(parse_error::create(105, 0, \"operation value '\" + op + \"' is invalid\"));\n                }\n            }\n        }\n\n        return result;\n    }\n\n    /*!\n    @brief creates a diff as a JSON patch\n\n    Creates a [JSON Patch](http://jsonpatch.com) so that value @a source can\n    be changed into the value @a target by calling @ref patch function.\n\n    @invariant For two JSON values @a source and @a target, the following code\n    yields always `true`:\n    @code {.cpp}\n    source.patch(diff(source, target)) == target;\n    @endcode\n\n    @note Currently, only `remove`, `add`, and `replace` operations are\n          generated.\n\n    @param[in] source  JSON value to compare from\n    @param[in] target  JSON value to compare against\n    @param[in] path    helper value to create JSON pointers\n\n    @return a JSON patch to convert the @a source to @a target\n\n    @complexity Linear in the lengths of @a source and @a target.\n\n    @liveexample{The following code shows how a JSON patch is created as a\n    diff for two JSON values.,diff}\n\n    @sa @ref patch -- apply a JSON patch\n    @sa @ref merge_patch -- apply a JSON Merge Patch\n\n    @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902)\n\n    @since version 2.0.0\n    */\n    JSON_HEDLEY_WARN_UNUSED_RESULT\n    static basic_json diff(const basic_json& source, const basic_json& target,\n                           const std::string& path = \"\")\n    {\n        // the patch\n        basic_json result(value_t::array);\n\n        // if the values are the same, return empty patch\n        if (source == target)\n        {\n            return result;\n        }\n\n        if (source.type() != target.type())\n        {\n            // different types: replace value\n            result.push_back(\n            {\n                {\"op\", \"replace\"}, {\"path\", path}, {\"value\", target}\n            });\n            return result;\n        }\n\n        switch (source.type())\n        {\n            case value_t::array:\n            {\n                // first pass: traverse common elements\n                std::size_t i = 0;\n                while (i < source.size() and i < target.size())\n                {\n                    // recursive call to compare array values at index i\n                    auto temp_diff = diff(source[i], target[i], path + \"/\" + std::to_string(i));\n                    result.insert(result.end(), temp_diff.begin(), temp_diff.end());\n                    ++i;\n                }\n\n                // i now reached the end of at least one array\n                // in a second pass, traverse the remaining elements\n\n                // remove my remaining elements\n                const auto end_index = static_cast<difference_type>(result.size());\n                while (i < source.size())\n                {\n                    // add operations in reverse order to avoid invalid\n                    // indices\n                    result.insert(result.begin() + end_index, object(\n                    {\n                        {\"op\", \"remove\"},\n                        {\"path\", path + \"/\" + std::to_string(i)}\n                    }));\n                    ++i;\n                }\n\n                // add other remaining elements\n                while (i < target.size())\n                {\n                    result.push_back(\n                    {\n                        {\"op\", \"add\"},\n                        {\"path\", path + \"/\" + std::to_string(i)},\n                        {\"value\", target[i]}\n                    });\n                    ++i;\n                }\n\n                break;\n            }\n\n            case value_t::object:\n            {\n                // first pass: traverse this object's elements\n                for (auto it = source.cbegin(); it != source.cend(); ++it)\n                {\n                    // escape the key name to be used in a JSON patch\n                    const auto key = json_pointer::escape(it.key());\n\n                    if (target.find(it.key()) != target.end())\n                    {\n                        // recursive call to compare object values at key it\n                        auto temp_diff = diff(it.value(), target[it.key()], path + \"/\" + key);\n                        result.insert(result.end(), temp_diff.begin(), temp_diff.end());\n                    }\n                    else\n                    {\n                        // found a key that is not in o -> remove it\n                        result.push_back(object(\n                        {\n                            {\"op\", \"remove\"}, {\"path\", path + \"/\" + key}\n                        }));\n                    }\n                }\n\n                // second pass: traverse other object's elements\n                for (auto it = target.cbegin(); it != target.cend(); ++it)\n                {\n                    if (source.find(it.key()) == source.end())\n                    {\n                        // found a key that is not in this -> add it\n                        const auto key = json_pointer::escape(it.key());\n                        result.push_back(\n                        {\n                            {\"op\", \"add\"}, {\"path\", path + \"/\" + key},\n                            {\"value\", it.value()}\n                        });\n                    }\n                }\n\n                break;\n            }\n\n            default:\n            {\n                // both primitive type: replace value\n                result.push_back(\n                {\n                    {\"op\", \"replace\"}, {\"path\", path}, {\"value\", target}\n                });\n                break;\n            }\n        }\n\n        return result;\n    }\n\n    /// @}\n\n    ////////////////////////////////\n    // JSON Merge Patch functions //\n    ////////////////////////////////\n\n    /// @name JSON Merge Patch functions\n    /// @{\n\n    /*!\n    @brief applies a JSON Merge Patch\n\n    The merge patch format is primarily intended for use with the HTTP PATCH\n    method as a means of describing a set of modifications to a target\n    resource's content. This function applies a merge patch to the current\n    JSON value.\n\n    The function implements the following algorithm from Section 2 of\n    [RFC 7396 (JSON Merge Patch)](https://tools.ietf.org/html/rfc7396):\n\n    ```\n    define MergePatch(Target, Patch):\n      if Patch is an Object:\n        if Target is not an Object:\n          Target = {} // Ignore the contents and set it to an empty Object\n        for each Name/Value pair in Patch:\n          if Value is null:\n            if Name exists in Target:\n              remove the Name/Value pair from Target\n          else:\n            Target[Name] = MergePatch(Target[Name], Value)\n        return Target\n      else:\n        return Patch\n    ```\n\n    Thereby, `Target` is the current object; that is, the patch is applied to\n    the current value.\n\n    @param[in] apply_patch  the patch to apply\n\n    @complexity Linear in the lengths of @a patch.\n\n    @liveexample{The following code shows how a JSON Merge Patch is applied to\n    a JSON document.,merge_patch}\n\n    @sa @ref patch -- apply a JSON patch\n    @sa [RFC 7396 (JSON Merge Patch)](https://tools.ietf.org/html/rfc7396)\n\n    @since version 3.0.0\n    */\n    void merge_patch(const basic_json& apply_patch)\n    {\n        if (apply_patch.is_object())\n        {\n            if (not is_object())\n            {\n                *this = object();\n            }\n            for (auto it = apply_patch.begin(); it != apply_patch.end(); ++it)\n            {\n                if (it.value().is_null())\n                {\n                    erase(it.key());\n                }\n                else\n                {\n                    operator[](it.key()).merge_patch(it.value());\n                }\n            }\n        }\n        else\n        {\n            *this = apply_patch;\n        }\n    }\n\n    /// @}\n};\n\n/*!\n@brief user-defined to_string function for JSON values\n\nThis function implements a user-defined to_string  for JSON objects.\n\n@param[in] j  a JSON object\n@return a std::string object\n*/\n\nNLOHMANN_BASIC_JSON_TPL_DECLARATION\nstd::string to_string(const NLOHMANN_BASIC_JSON_TPL& j)\n{\n    return j.dump();\n}\n} // namespace nlohmann\n\n///////////////////////\n// nonmember support //\n///////////////////////\n\n// specialization of std::swap, and std::hash\nnamespace std\n{\n\n/// hash value for JSON objects\ntemplate<>\nstruct hash<nlohmann::json>\n{\n    /*!\n    @brief return a hash value for a JSON object\n\n    @since version 1.0.0\n    */\n    std::size_t operator()(const nlohmann::json& j) const\n    {\n        // a naive hashing via the string representation\n        const auto& h = hash<nlohmann::json::string_t>();\n        return h(j.dump());\n    }\n};\n\n/// specialization for std::less<value_t>\n/// @note: do not remove the space after '<',\n///        see https://github.com/nlohmann/json/pull/679\ntemplate<>\nstruct less< ::nlohmann::detail::value_t>\n{\n    /*!\n    @brief compare two value_t enum values\n    @since version 3.0.0\n    */\n    bool operator()(nlohmann::detail::value_t lhs,\n                    nlohmann::detail::value_t rhs) const noexcept\n    {\n        return nlohmann::detail::operator<(lhs, rhs);\n    }\n};\n\n/*!\n@brief exchanges the values of two JSON objects\n\n@since version 1.0.0\n*/\ntemplate<>\ninline void swap<nlohmann::json>(nlohmann::json& j1, nlohmann::json& j2) noexcept(\n    is_nothrow_move_constructible<nlohmann::json>::value and\n    is_nothrow_move_assignable<nlohmann::json>::value\n)\n{\n    j1.swap(j2);\n}\n\n} // namespace std\n\n/*!\n@brief user-defined string literal for JSON values\n\nThis operator implements a user-defined string literal for JSON objects. It\ncan be used by adding `\"_json\"` to a string literal and returns a JSON object\nif no parse error occurred.\n\n@param[in] s  a string representation of a JSON object\n@param[in] n  the length of string @a s\n@return a JSON object\n\n@since version 1.0.0\n*/\nJSON_HEDLEY_NON_NULL(1)\ninline nlohmann::json operator \"\" _json(const char* s, std::size_t n)\n{\n    return nlohmann::json::parse(s, s + n);\n}\n\n/*!\n@brief user-defined string literal for JSON pointer\n\nThis operator implements a user-defined string literal for JSON Pointers. It\ncan be used by adding `\"_json_pointer\"` to a string literal and returns a JSON pointer\nobject if no parse error occurred.\n\n@param[in] s  a string representation of a JSON Pointer\n@param[in] n  the length of string @a s\n@return a JSON pointer object\n\n@since version 2.0.0\n*/\nJSON_HEDLEY_NON_NULL(1)\ninline nlohmann::json::json_pointer operator \"\" _json_pointer(const char* s, std::size_t n)\n{\n    return nlohmann::json::json_pointer(std::string(s, n));\n}\n\n// #include <nlohmann/detail/macro_unscope.hpp>\n\n\n// restore GCC/clang diagnostic settings\n#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)\n    #pragma GCC diagnostic pop\n#endif\n#if defined(__clang__)\n    #pragma GCC diagnostic pop\n#endif\n\n// clean up\n#undef JSON_INTERNAL_CATCH\n#undef JSON_CATCH\n#undef JSON_THROW\n#undef JSON_TRY\n#undef JSON_HAS_CPP_14\n#undef JSON_HAS_CPP_17\n#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION\n#undef NLOHMANN_BASIC_JSON_TPL\n\n// #include <nlohmann/thirdparty/hedley/hedley_undef.hpp>\n#undef JSON_HEDLEY_ALWAYS_INLINE\n#undef JSON_HEDLEY_ARM_VERSION\n#undef JSON_HEDLEY_ARM_VERSION_CHECK\n#undef JSON_HEDLEY_ARRAY_PARAM\n#undef JSON_HEDLEY_ASSUME\n#undef JSON_HEDLEY_BEGIN_C_DECLS\n#undef JSON_HEDLEY_C_DECL\n#undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_CLANG_HAS_BUILTIN\n#undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_CLANG_HAS_EXTENSION\n#undef JSON_HEDLEY_CLANG_HAS_FEATURE\n#undef JSON_HEDLEY_CLANG_HAS_WARNING\n#undef JSON_HEDLEY_COMPCERT_VERSION\n#undef JSON_HEDLEY_COMPCERT_VERSION_CHECK\n#undef JSON_HEDLEY_CONCAT\n#undef JSON_HEDLEY_CONCAT_EX\n#undef JSON_HEDLEY_CONST\n#undef JSON_HEDLEY_CONST_CAST\n#undef JSON_HEDLEY_CONSTEXPR\n#undef JSON_HEDLEY_CPP_CAST\n#undef JSON_HEDLEY_CRAY_VERSION\n#undef JSON_HEDLEY_CRAY_VERSION_CHECK\n#undef JSON_HEDLEY_DEPRECATED\n#undef JSON_HEDLEY_DEPRECATED_FOR\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES\n#undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS\n#undef JSON_HEDLEY_DIAGNOSTIC_POP\n#undef JSON_HEDLEY_DIAGNOSTIC_PUSH\n#undef JSON_HEDLEY_DMC_VERSION\n#undef JSON_HEDLEY_DMC_VERSION_CHECK\n#undef JSON_HEDLEY_EMPTY_BASES\n#undef JSON_HEDLEY_EMSCRIPTEN_VERSION\n#undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK\n#undef JSON_HEDLEY_END_C_DECLS\n#undef JSON_HEDLEY_FALL_THROUGH\n#undef JSON_HEDLEY_FLAGS\n#undef JSON_HEDLEY_FLAGS_CAST\n#undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_GCC_HAS_BUILTIN\n#undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_GCC_HAS_EXTENSION\n#undef JSON_HEDLEY_GCC_HAS_FEATURE\n#undef JSON_HEDLEY_GCC_HAS_WARNING\n#undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK\n#undef JSON_HEDLEY_GCC_VERSION\n#undef JSON_HEDLEY_GCC_VERSION_CHECK\n#undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_GNUC_HAS_BUILTIN\n#undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_GNUC_HAS_EXTENSION\n#undef JSON_HEDLEY_GNUC_HAS_FEATURE\n#undef JSON_HEDLEY_GNUC_HAS_WARNING\n#undef JSON_HEDLEY_GNUC_VERSION\n#undef JSON_HEDLEY_GNUC_VERSION_CHECK\n#undef JSON_HEDLEY_HAS_ATTRIBUTE\n#undef JSON_HEDLEY_HAS_BUILTIN\n#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE\n#undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS\n#undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE\n#undef JSON_HEDLEY_HAS_EXTENSION\n#undef JSON_HEDLEY_HAS_FEATURE\n#undef JSON_HEDLEY_HAS_WARNING\n#undef JSON_HEDLEY_IAR_VERSION\n#undef JSON_HEDLEY_IAR_VERSION_CHECK\n#undef JSON_HEDLEY_IBM_VERSION\n#undef JSON_HEDLEY_IBM_VERSION_CHECK\n#undef JSON_HEDLEY_IMPORT\n#undef JSON_HEDLEY_INLINE\n#undef JSON_HEDLEY_INTEL_VERSION\n#undef JSON_HEDLEY_INTEL_VERSION_CHECK\n#undef JSON_HEDLEY_IS_CONSTANT\n#undef JSON_HEDLEY_IS_CONSTEXPR_\n#undef JSON_HEDLEY_LIKELY\n#undef JSON_HEDLEY_MALLOC\n#undef JSON_HEDLEY_MESSAGE\n#undef JSON_HEDLEY_MSVC_VERSION\n#undef JSON_HEDLEY_MSVC_VERSION_CHECK\n#undef JSON_HEDLEY_NEVER_INLINE\n#undef JSON_HEDLEY_NO_ESCAPE\n#undef JSON_HEDLEY_NON_NULL\n#undef JSON_HEDLEY_NO_RETURN\n#undef JSON_HEDLEY_NO_THROW\n#undef JSON_HEDLEY_NULL\n#undef JSON_HEDLEY_PELLES_VERSION\n#undef JSON_HEDLEY_PELLES_VERSION_CHECK\n#undef JSON_HEDLEY_PGI_VERSION\n#undef JSON_HEDLEY_PGI_VERSION_CHECK\n#undef JSON_HEDLEY_PREDICT\n#undef JSON_HEDLEY_PRINTF_FORMAT\n#undef JSON_HEDLEY_PRIVATE\n#undef JSON_HEDLEY_PUBLIC\n#undef JSON_HEDLEY_PURE\n#undef JSON_HEDLEY_REINTERPRET_CAST\n#undef JSON_HEDLEY_REQUIRE\n#undef JSON_HEDLEY_REQUIRE_CONSTEXPR\n#undef JSON_HEDLEY_REQUIRE_MSG\n#undef JSON_HEDLEY_RESTRICT\n#undef JSON_HEDLEY_RETURNS_NON_NULL\n#undef JSON_HEDLEY_SENTINEL\n#undef JSON_HEDLEY_STATIC_ASSERT\n#undef JSON_HEDLEY_STATIC_CAST\n#undef JSON_HEDLEY_STRINGIFY\n#undef JSON_HEDLEY_STRINGIFY_EX\n#undef JSON_HEDLEY_SUNPRO_VERSION\n#undef JSON_HEDLEY_SUNPRO_VERSION_CHECK\n#undef JSON_HEDLEY_TINYC_VERSION\n#undef JSON_HEDLEY_TINYC_VERSION_CHECK\n#undef JSON_HEDLEY_TI_VERSION\n#undef JSON_HEDLEY_TI_VERSION_CHECK\n#undef JSON_HEDLEY_UNAVAILABLE\n#undef JSON_HEDLEY_UNLIKELY\n#undef JSON_HEDLEY_UNPREDICTABLE\n#undef JSON_HEDLEY_UNREACHABLE\n#undef JSON_HEDLEY_UNREACHABLE_RETURN\n#undef JSON_HEDLEY_VERSION\n#undef JSON_HEDLEY_VERSION_DECODE_MAJOR\n#undef JSON_HEDLEY_VERSION_DECODE_MINOR\n#undef JSON_HEDLEY_VERSION_DECODE_REVISION\n#undef JSON_HEDLEY_VERSION_ENCODE\n#undef JSON_HEDLEY_WARNING\n#undef JSON_HEDLEY_WARN_UNUSED_RESULT\n\n\n\n#endif  // INCLUDE_NLOHMANN_JSON_HPP_\n--\n"
  },
  {
    "path": ".config/proji/templates/cmake/external/headers/rang.hpp",
    "content": "#ifndef RANG_DOT_HPP\n#define RANG_DOT_HPP\n\n#if defined(__unix__) || defined(__unix) || defined(__linux__)\n#define OS_LINUX\n#elif defined(WIN32) || defined(_WIN32) || defined(_WIN64)\n#define OS_WIN\n#elif defined(__APPLE__) || defined(__MACH__)\n#define OS_MAC\n#else\n#error Unknown Platform\n#endif\n\n#if defined(OS_LINUX) || defined(OS_MAC)\n#include <unistd.h>\n\n#elif defined(OS_WIN)\n\n#if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0600)\n#error                                                                         \\\n  \"Please include rang.hpp before any windows system headers or set _WIN32_WINNT at least to _WIN32_WINNT_VISTA\"\n#elif !defined(_WIN32_WINNT)\n#define _WIN32_WINNT _WIN32_WINNT_VISTA\n#endif\n\n#include <windows.h>\n#include <io.h>\n#include <memory>\n\n// Only defined in windows 10 onwards, redefining in lower windows since it\n// doesn't gets used in lower versions\n// https://docs.microsoft.com/en-us/windows/console/getconsolemode\n#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING\n#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004\n#endif\n\n#endif\n\n#include <algorithm>\n#include <atomic>\n#include <cstdlib>\n#include <cstring>\n#include <iostream>\n\nnamespace rang {\n\n/* For better compability with most of terminals do not use any style settings\n * except of reset, bold and reversed.\n * Note that on Windows terminals bold style is same as fgB color.\n */\nenum class style {\n    reset     = 0,\n    bold      = 1,\n    dim       = 2,\n    italic    = 3,\n    underline = 4,\n    blink     = 5,\n    rblink    = 6,\n    reversed  = 7,\n    conceal   = 8,\n    crossed   = 9\n};\n\nenum class fg {\n    black   = 30,\n    red     = 31,\n    green   = 32,\n    yellow  = 33,\n    blue    = 34,\n    magenta = 35,\n    cyan    = 36,\n    gray    = 37,\n    reset   = 39\n};\n\nenum class bg {\n    black   = 40,\n    red     = 41,\n    green   = 42,\n    yellow  = 43,\n    blue    = 44,\n    magenta = 45,\n    cyan    = 46,\n    gray    = 47,\n    reset   = 49\n};\n\nenum class fgB {\n    black   = 90,\n    red     = 91,\n    green   = 92,\n    yellow  = 93,\n    blue    = 94,\n    magenta = 95,\n    cyan    = 96,\n    gray    = 97\n};\n\nenum class bgB {\n    black   = 100,\n    red     = 101,\n    green   = 102,\n    yellow  = 103,\n    blue    = 104,\n    magenta = 105,\n    cyan    = 106,\n    gray    = 107\n};\n\nenum class control {  // Behaviour of rang function calls\n    Off   = 0,  // toggle off rang style/color calls\n    Auto  = 1,  // (Default) autodect terminal and colorize if needed\n    Force = 2  // force ansi color output to non terminal streams\n};\n// Use rang::setControlMode to set rang control mode\n\nenum class winTerm {  // Windows Terminal Mode\n    Auto   = 0,  // (Default) automatically detects wheter Ansi or Native API\n    Ansi   = 1,  // Force use Ansi API\n    Native = 2  // Force use Native API\n};\n// Use rang::setWinTermMode to explicitly set terminal API for Windows\n// Calling rang::setWinTermMode have no effect on other OS\n\nnamespace rang_implementation {\n\n    inline std::atomic<control> &controlMode() noexcept\n    {\n        static std::atomic<control> value(control::Auto);\n        return value;\n    }\n\n    inline std::atomic<winTerm> &winTermMode() noexcept\n    {\n        static std::atomic<winTerm> termMode(winTerm::Auto);\n        return termMode;\n    }\n\n    inline bool supportsColor() noexcept\n    {\n#if defined(OS_LINUX) || defined(OS_MAC)\n\n        static const bool result = [] {\n            const char *Terms[]\n              = { \"ansi\",    \"color\",  \"console\", \"cygwin\", \"gnome\",\n                  \"konsole\", \"kterm\",  \"linux\",   \"msys\",   \"putty\",\n                  \"rxvt\",    \"screen\", \"vt100\",   \"xterm\" };\n\n            const char *env_p = std::getenv(\"TERM\");\n            if (env_p == nullptr) {\n                return false;\n            }\n            return std::any_of(std::begin(Terms), std::end(Terms),\n                               [&](const char *term) {\n                                   return std::strstr(env_p, term) != nullptr;\n                               });\n        }();\n\n#elif defined(OS_WIN)\n        // All windows versions support colors through native console methods\n        static constexpr bool result = true;\n#endif\n        return result;\n    }\n\n#ifdef OS_WIN\n\n\n    inline bool isMsysPty(int fd) noexcept\n    {\n        // Dynamic load for binary compability with old Windows\n        const auto ptrGetFileInformationByHandleEx\n          = reinterpret_cast<decltype(&GetFileInformationByHandleEx)>(\n            GetProcAddress(GetModuleHandle(TEXT(\"kernel32.dll\")),\n                           \"GetFileInformationByHandleEx\"));\n        if (!ptrGetFileInformationByHandleEx) {\n            return false;\n        }\n\n        HANDLE h = reinterpret_cast<HANDLE>(_get_osfhandle(fd));\n        if (h == INVALID_HANDLE_VALUE) {\n            return false;\n        }\n\n        // Check that it's a pipe:\n        if (GetFileType(h) != FILE_TYPE_PIPE) {\n            return false;\n        }\n\n        // POD type is binary compatible with FILE_NAME_INFO from WinBase.h\n        // It have the same alignment and used to avoid UB in caller code\n        struct MY_FILE_NAME_INFO {\n            DWORD FileNameLength;\n            WCHAR FileName[MAX_PATH];\n        };\n\n        auto pNameInfo = std::unique_ptr<MY_FILE_NAME_INFO>(\n          new (std::nothrow) MY_FILE_NAME_INFO());\n        if (!pNameInfo) {\n            return false;\n        }\n\n        // Check pipe name is template of\n        // {\"cygwin-\",\"msys-\"}XXXXXXXXXXXXXXX-ptyX-XX\n        if (!ptrGetFileInformationByHandleEx(h, FileNameInfo, pNameInfo.get(),\n                                             sizeof(MY_FILE_NAME_INFO))) {\n            return false;\n        }\n        std::wstring name(pNameInfo->FileName, pNameInfo->FileNameLength / sizeof(WCHAR));\n        if ((name.find(L\"msys-\") == std::wstring::npos\n             && name.find(L\"cygwin-\") == std::wstring::npos)\n            || name.find(L\"-pty\") == std::wstring::npos) {\n            return false;\n        }\n\n        return true;\n    }\n\n#endif\n\n    inline bool isTerminal(const std::streambuf *osbuf) noexcept\n    {\n        using std::cerr;\n        using std::clog;\n        using std::cout;\n#if defined(OS_LINUX) || defined(OS_MAC)\n        if (osbuf == cout.rdbuf()) {\n            static const bool cout_term = isatty(fileno(stdout)) != 0;\n            return cout_term;\n        } else if (osbuf == cerr.rdbuf() || osbuf == clog.rdbuf()) {\n            static const bool cerr_term = isatty(fileno(stderr)) != 0;\n            return cerr_term;\n        }\n#elif defined(OS_WIN)\n        if (osbuf == cout.rdbuf()) {\n            static const bool cout_term\n              = (_isatty(_fileno(stdout)) || isMsysPty(_fileno(stdout)));\n            return cout_term;\n        } else if (osbuf == cerr.rdbuf() || osbuf == clog.rdbuf()) {\n            static const bool cerr_term\n              = (_isatty(_fileno(stderr)) || isMsysPty(_fileno(stderr)));\n            return cerr_term;\n        }\n#endif\n        return false;\n    }\n\n    template <typename T>\n    using enableStd = typename std::enable_if<\n      std::is_same<T, rang::style>::value || std::is_same<T, rang::fg>::value\n        || std::is_same<T, rang::bg>::value || std::is_same<T, rang::fgB>::value\n        || std::is_same<T, rang::bgB>::value,\n      std::ostream &>::type;\n\n\n#ifdef OS_WIN\n\n    struct SGR {  // Select Graphic Rendition parameters for Windows console\n        BYTE fgColor;  // foreground color (0-15) lower 3 rgb bits + intense bit\n        BYTE bgColor;  // background color (0-15) lower 3 rgb bits + intense bit\n        BYTE bold;  // emulated as FOREGROUND_INTENSITY bit\n        BYTE underline;  // emulated as BACKGROUND_INTENSITY bit\n        BOOLEAN inverse;  // swap foreground/bold & background/underline\n        BOOLEAN conceal;  // set foreground/bold to background/underline\n    };\n\n    enum class AttrColor : BYTE {  // Color attributes for console screen buffer\n        black   = 0,\n        red     = 4,\n        green   = 2,\n        yellow  = 6,\n        blue    = 1,\n        magenta = 5,\n        cyan    = 3,\n        gray    = 7\n    };\n\n    inline HANDLE getConsoleHandle(const std::streambuf *osbuf) noexcept\n    {\n        if (osbuf == std::cout.rdbuf()) {\n            static const HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);\n            return hStdout;\n        } else if (osbuf == std::cerr.rdbuf() || osbuf == std::clog.rdbuf()) {\n            static const HANDLE hStderr = GetStdHandle(STD_ERROR_HANDLE);\n            return hStderr;\n        }\n        return INVALID_HANDLE_VALUE;\n    }\n\n    inline bool setWinTermAnsiColors(const std::streambuf *osbuf) noexcept\n    {\n        HANDLE h = getConsoleHandle(osbuf);\n        if (h == INVALID_HANDLE_VALUE) {\n            return false;\n        }\n        DWORD dwMode = 0;\n        if (!GetConsoleMode(h, &dwMode)) {\n            return false;\n        }\n        dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;\n        if (!SetConsoleMode(h, dwMode)) {\n            return false;\n        }\n        return true;\n    }\n\n    inline bool supportsAnsi(const std::streambuf *osbuf) noexcept\n    {\n        using std::cerr;\n        using std::clog;\n        using std::cout;\n        if (osbuf == cout.rdbuf()) {\n            static const bool cout_ansi\n              = (isMsysPty(_fileno(stdout)) || setWinTermAnsiColors(osbuf));\n            return cout_ansi;\n        } else if (osbuf == cerr.rdbuf() || osbuf == clog.rdbuf()) {\n            static const bool cerr_ansi\n              = (isMsysPty(_fileno(stderr)) || setWinTermAnsiColors(osbuf));\n            return cerr_ansi;\n        }\n        return false;\n    }\n\n    inline const SGR &defaultState() noexcept\n    {\n        static const SGR defaultSgr = []() -> SGR {\n            CONSOLE_SCREEN_BUFFER_INFO info;\n            WORD attrib = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;\n            if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE),\n                                           &info)\n                || GetConsoleScreenBufferInfo(GetStdHandle(STD_ERROR_HANDLE),\n                                              &info)) {\n                attrib = info.wAttributes;\n            }\n            SGR sgr     = { 0, 0, 0, 0, FALSE, FALSE };\n            sgr.fgColor = attrib & 0x0F;\n            sgr.bgColor = (attrib & 0xF0) >> 4;\n            return sgr;\n        }();\n        return defaultSgr;\n    }\n\n    inline BYTE ansi2attr(BYTE rgb) noexcept\n    {\n        static const AttrColor rev[8]\n          = { AttrColor::black,  AttrColor::red,  AttrColor::green,\n              AttrColor::yellow, AttrColor::blue, AttrColor::magenta,\n              AttrColor::cyan,   AttrColor::gray };\n        return static_cast<BYTE>(rev[rgb]);\n    }\n\n    inline void setWinSGR(rang::bg col, SGR &state) noexcept\n    {\n        if (col != rang::bg::reset) {\n            state.bgColor = ansi2attr(static_cast<BYTE>(col) - 40);\n        } else {\n            state.bgColor = defaultState().bgColor;\n        }\n    }\n\n    inline void setWinSGR(rang::fg col, SGR &state) noexcept\n    {\n        if (col != rang::fg::reset) {\n            state.fgColor = ansi2attr(static_cast<BYTE>(col) - 30);\n        } else {\n            state.fgColor = defaultState().fgColor;\n        }\n    }\n\n    inline void setWinSGR(rang::bgB col, SGR &state) noexcept\n    {\n        state.bgColor = (BACKGROUND_INTENSITY >> 4)\n          | ansi2attr(static_cast<BYTE>(col) - 100);\n    }\n\n    inline void setWinSGR(rang::fgB col, SGR &state) noexcept\n    {\n        state.fgColor\n          = FOREGROUND_INTENSITY | ansi2attr(static_cast<BYTE>(col) - 90);\n    }\n\n    inline void setWinSGR(rang::style style, SGR &state) noexcept\n    {\n        switch (style) {\n            case rang::style::reset: state = defaultState(); break;\n            case rang::style::bold: state.bold = FOREGROUND_INTENSITY; break;\n            case rang::style::underline:\n            case rang::style::blink:\n                state.underline = BACKGROUND_INTENSITY;\n                break;\n            case rang::style::reversed: state.inverse = TRUE; break;\n            case rang::style::conceal: state.conceal = TRUE; break;\n            default: break;\n        }\n    }\n\n    inline SGR &current_state() noexcept\n    {\n        static SGR state = defaultState();\n        return state;\n    }\n\n    inline WORD SGR2Attr(const SGR &state) noexcept\n    {\n        WORD attrib = 0;\n        if (state.conceal) {\n            if (state.inverse) {\n                attrib = (state.fgColor << 4) | state.fgColor;\n                if (state.bold)\n                    attrib |= FOREGROUND_INTENSITY | BACKGROUND_INTENSITY;\n            } else {\n                attrib = (state.bgColor << 4) | state.bgColor;\n                if (state.underline)\n                    attrib |= FOREGROUND_INTENSITY | BACKGROUND_INTENSITY;\n            }\n        } else if (state.inverse) {\n            attrib = (state.fgColor << 4) | state.bgColor;\n            if (state.bold) attrib |= BACKGROUND_INTENSITY;\n            if (state.underline) attrib |= FOREGROUND_INTENSITY;\n        } else {\n            attrib = state.fgColor | (state.bgColor << 4) | state.bold\n              | state.underline;\n        }\n        return attrib;\n    }\n\n    template <typename T>\n    inline void setWinColorAnsi(std::ostream &os, T const value)\n    {\n        os << \"\\033[\" << static_cast<int>(value) << \"m\";\n    }\n\n    template <typename T>\n    inline void setWinColorNative(std::ostream &os, T const value)\n    {\n        const HANDLE h = getConsoleHandle(os.rdbuf());\n        if (h != INVALID_HANDLE_VALUE) {\n            setWinSGR(value, current_state());\n            // Out all buffered text to console with previous settings:\n            os.flush();\n            SetConsoleTextAttribute(h, SGR2Attr(current_state()));\n        }\n    }\n\n    template <typename T>\n    inline enableStd<T> setColor(std::ostream &os, T const value)\n    {\n        if (winTermMode() == winTerm::Auto) {\n            if (supportsAnsi(os.rdbuf())) {\n                setWinColorAnsi(os, value);\n            } else {\n                setWinColorNative(os, value);\n            }\n        } else if (winTermMode() == winTerm::Ansi) {\n            setWinColorAnsi(os, value);\n        } else {\n            setWinColorNative(os, value);\n        }\n        return os;\n    }\n#else\n    template <typename T>\n    inline enableStd<T> setColor(std::ostream &os, T const value)\n    {\n        return os << \"\\033[\" << static_cast<int>(value) << \"m\";\n    }\n#endif\n}  // namespace rang_implementation\n\ntemplate <typename T>\ninline rang_implementation::enableStd<T> operator<<(std::ostream &os,\n                                                    const T value)\n{\n    const control option = rang_implementation::controlMode();\n    switch (option) {\n        case control::Auto:\n            return rang_implementation::supportsColor()\n                && rang_implementation::isTerminal(os.rdbuf())\n              ? rang_implementation::setColor(os, value)\n              : os;\n        case control::Force: return rang_implementation::setColor(os, value);\n        default: return os;\n    }\n}\n\ninline void setWinTermMode(const rang::winTerm value) noexcept\n{\n    rang_implementation::winTermMode() = value;\n}\n\ninline void setControlMode(const control value) noexcept\n{\n    rang_implementation::controlMode() = value;\n}\n\n}  // namespace rang\n\n#undef OS_LINUX\n#undef OS_WIN\n#undef OS_MAC\n\n#endif /* ifndef RANG_DOT_HPP */\n"
  },
  {
    "path": ".config/proji/templates/cmake/external/headers/utils.hpp",
    "content": "#pragma once\n#include <string>\n#include <vector>\nnamespace utl {\n    // template<const std::string& S, const std::string& D, const bool& B>\n    std::vector<std::string> split(const std::string& s, const std::string& delimiter, const bool& removeEmptyEntries = false){\n        std::vector<std::string> tokens;\n        for (size_t start = 0, end; start < s.length(); start = end + delimiter.length()){\n            size_t position = s.find(delimiter, start);\n            end = position != std::string::npos ? position : s.length();\n            std::string token = s.substr(start, end - start);\n            if (!removeEmptyEntries || !token.empty()) { tokens.push_back(token); }\n        }\n        auto endsWith = [](const std::string& s, const std::string& suffix)->bool{ return s.size() >= suffix.size() && s.substr(s.size() - suffix.size()) == suffix; };\n        if (!removeEmptyEntries && (s.empty() || endsWith(s, delimiter))) { tokens.push_back(\"\"); }\n        return tokens;\n    }\n\n    int factorial(int number) { return number <= 1 ? number : factorial(number - 1) * number; }\n}\n"
  },
  {
    "path": ".config/proji/templates/cmake/include/cplate/classic.h",
    "content": "#pragma once\n#include <iostream>\n// #include \"fmt/format.h\"\n\nclass Object {\npublic:\n    ///width of the object\n    int width;\n    /// heigh of the object\n    int heigh;\n    /// depth of the object\n    int depth;\n\nprivate:\n    int surface;\n    int volume;\n\npublic:\n    void setSurface( int a, int b );\n    void setVolume( int a, int b, int c );\n    int getSurface();\n    int getVolume();\n};\n"
  },
  {
    "path": ".config/proji/templates/cmake/include/second/classic.h",
    "content": "#pragma once\n#include <iostream>\n// #include \"fmt/format.h\"\n\nclass Object {\npublic:\n    ///width of the object\n    int width;\n    /// heigh of the object\n    int heigh;\n    /// depth of the object\n    int depth;\n\nprivate:\n    int surface;\n    int volume;\n\npublic:\n    void setSurface( int a, int b );\n    void setVolume( int a, int b, int c );\n    int getSurface();\n    int getVolume();\n};\n"
  },
  {
    "path": ".config/proji/templates/cmake/shell.nix",
    "content": "with import <nixpkgs> {}; rec {\n  cplateEnv = stdenv.mkDerivation {\n    name = \"cmake\";\n    buildInputs = [ stdenv\n                    pkgconfig\n                    gcc\n                    llvm\n                    clang\n                    gdb\n                    lldb\n                    cmake\n                    ctags\n                    cquery\n                    ccache\n                    cppcheck\n                    clang-tools\n                    valgrind\n                    kcov\n                    xorg.libX11\n                    ncurses\n                  ];\n    LD_LIBRARY_PATH=\"${xorg.libX11}/lib/\";\n    CPLUS_INCLUDE_PATH=\"/nix/store/bhngps8y3sf2hdfkbi16bk2ya3k67rkq-gcc-8.3.0/include/c++/8.3.0\";\n  };\n}\n"
  },
  {
    "path": ".config/proji/templates/cmake/source/cplate/classic.cpp",
    "content": "#include <cplate/classic.h>\n/// calculate volume of the square\n/// based on the input `a` and `b` and `c`\nvoid Object::setVolume( const int a, const int b, const int c ) {\n    this->volume = a * b * c;\n}\n\n/// calculate surface of the square\n/// based on the input `a` and `b`\nvoid Object::setSurface( const int a, const int b ) {\n    this->surface = a * b;\n}\n\n/// return the surface of the square\nint Object::getSurface() {\n    return this->surface;\n}\n\n/// return the surface of the square\nint Object::getVolume() {\n    return this->volume;\n}\n"
  },
  {
    "path": ".config/proji/templates/cmake/source/main.cpp",
    "content": "#include <fmt/format.h>\n#include <cplate/classic.h>\n#include <utils.hpp>\n\nint main() {\n    std::string s = fmt::format( \"I'd rather be {1} than {0}.\", \"right\", \"happy\" );\n    fmt::print( s );    // Python-like format string syntax\n\n    fmt::print( \"gogo\" );\n    fmt::print(\"something\");\n    std::cout << 555 << std::endl;\n\n}\n"
  },
  {
    "path": ".config/proji/templates/cmake/source/second/classic.cpp",
    "content": "#include <second/classic.h>\n/// calculate volume of the square\n/// based on the input `a` and `b` and `c`\nvoid Object::setVolume( const int a, const int b, const int c ) {\n    this->volume = a * b * c;\n}\n\n/// calculate surface of the square\n/// based on the input `a` and `b`\nvoid Object::setSurface( const int a, const int b ) {\n    this->surface = a * b;\n}\n\n/// return the surface of the square\nint Object::getSurface() {\n    return this->surface;\n}\n\n/// return the surface of the square\nint Object::getVolume() {\n    return this->volume;\n}\n"
  },
  {
    "path": ".config/proji/templates/cmake/tests/test_one.cpp",
    "content": "#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN\n#include <cplate/classic.h>\n#include <utils.hpp>\n#include <doctest.hpp>\n\nTEST_CASE( \"testing the factorial function\" ) {\n    CHECK( utl::factorial( 1 ) == 1 );\n    CHECK( utl::factorial( 2 ) == 2 );\n    CHECK( utl::factorial( 3 ) == 6 );\n    CHECK( utl::factorial( 10 ) == 3628800 );\n}\n\n\nTEST_CASE( \"testing shape class\" ) {\n    Object shape;\n    shape.setSurface( 5, 4 );\n    CHECK( shape.getSurface() == 20 );\n}\n\nTEST_CASE( \"testing shape class\" ) {\n    Object shape;\n    shape.setVolume( 2, 3, 4 );\n    CHECK( shape.getVolume() == 24 );\n}\n"
  },
  {
    "path": ".config/proji/templates/dev/.envrc",
    "content": "tidyup\nuse nix\n\nexport ENVNAME=dev\n"
  },
  {
    "path": ".config/proji/templates/dev/shell.nix",
    "content": "with import <nixpkgs> {}; rec {\n  cplateEnv = stdenv.mkDerivation {\n    name = \"python\";\n    buildInputs = [ stdenv\n                    pkgconfig\n                    gcc\n                    xorg.libX11\n                    ncurses\n                  ];\n  };\n}\n"
  },
  {
    "path": ".config/proji/templates/py/.envrc",
    "content": "tidyup\nuse nix\n# layout conda $(basename $PWD)\nlayout viper\n\nexport ENVNAME=conda\n"
  },
  {
    "path": ".config/proji/templates/py/.gitignore",
    "content": "/build/\n/bin/\n/lib/\n\n.cs_files\n.notifier\n/.undodir/\n/.direnv/\n/.clangd/\n.gdb_history\n"
  },
  {
    "path": ".config/proji/templates/py/shell.nix",
    "content": "with import <nixpkgs> {}; rec {\n  cplateEnv = stdenv.mkDerivation {\n    name = \"python\";\n    buildInputs = [ stdenv\n                    pkgconfig\n                    gcc\n                    xorg.libX11\n                    ncurses\n                  ];\n  };\n}\n"
  },
  {
    "path": ".config/proji/templates/ros/CMakeLists.txt",
    "content": "# toplevel CMakeLists.txt for a catkin workspace\n# catkin/cmake/toplevel.cmake\n\ncmake_minimum_required(VERSION 2.8.3)\n\nset(CATKIN_TOPLEVEL TRUE)\n\n# search for catkin within the workspace\nset(_cmd \"catkin_find_pkg\" \"catkin\" \"${CMAKE_SOURCE_DIR}\")\nexecute_process(COMMAND ${_cmd}\n  RESULT_VARIABLE _res\n  OUTPUT_VARIABLE _out\n  ERROR_VARIABLE _err\n  OUTPUT_STRIP_TRAILING_WHITESPACE\n  ERROR_STRIP_TRAILING_WHITESPACE\n)\nif(NOT _res EQUAL 0 AND NOT _res EQUAL 2)\n  # searching fot catkin resulted in an error\n  string(REPLACE \";\" \" \" _cmd_str \"${_cmd}\")\n  message(FATAL_ERROR \"Search for 'catkin' in workspace failed (${_cmd_str}): ${_err}\")\nendif()\n\n# include catkin from workspace or via find_package()\nif(_res EQUAL 0)\n  set(catkin_EXTRAS_DIR \"${CMAKE_SOURCE_DIR}/${_out}/cmake\")\n  # include all.cmake without add_subdirectory to let it operate in same scope\n  include(${catkin_EXTRAS_DIR}/all.cmake NO_POLICY_SCOPE)\n  add_subdirectory(\"${_out}\")\n\nelse()\n  # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument\n  # or CMAKE_PREFIX_PATH from the environment\n  if(NOT DEFINED CMAKE_PREFIX_PATH)\n    if(NOT \"$ENV{CMAKE_PREFIX_PATH}\" STREQUAL \"\")\n      if(NOT WIN32)\n        string(REPLACE \":\" \";\" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})\n      else()\n        set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})\n      endif()\n    endif()\n  endif()\n\n  # list of catkin workspaces\n  set(catkin_search_path \"\")\n  foreach(path ${CMAKE_PREFIX_PATH})\n    if(EXISTS \"${path}/.catkin\")\n      list(FIND catkin_search_path ${path} _index)\n      if(_index EQUAL -1)\n        list(APPEND catkin_search_path ${path})\n      endif()\n    endif()\n  endforeach()\n\n  # search for catkin in all workspaces\n  set(CATKIN_TOPLEVEL_FIND_PACKAGE TRUE)\n  find_package(catkin QUIET\n    NO_POLICY_SCOPE\n    PATHS ${catkin_search_path}\n    NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)\n  unset(CATKIN_TOPLEVEL_FIND_PACKAGE)\n\n  if(NOT catkin_FOUND)\n    message(FATAL_ERROR \"find_package(catkin) failed. catkin was neither found in the workspace nor in the CMAKE_PREFIX_PATH. One reason may be that no ROS setup.sh was sourced before.\")\n  endif()\nendif()\n\ncatkin_workspace()\n"
  },
  {
    "path": ".config/proji/templates/tex/.envrc",
    "content": "tidyup\nBIB=$PWD/bibliography.bib\nrun() {\n    docker run -v $PWD/:/doc/ -t -i thomasweise/texlive $@\n}\nexport_function run\n\nexport ENVNAME=tex\n"
  },
  {
    "path": ".config/proji/templates/tex/.gitignore",
    "content": ""
  },
  {
    "path": ".config/proji/templates/tex/article.tex",
    "content": "\\documentclass[review]{elsarticle}\n\\usepackage{lineno,hyperref}\n\\modulolinenumbers[5]\n\\journal{Computers and Electronics in Agriculture}\n\\bibliographystyle{elsarticle-num}\n\n\\begin{document}\n\\begin{frontmatter}\n\\title{Precision Orchard Management (POM): New prespectives on sensors, robotics and artificial intelligence for fruit trees}\n\\author[1,2]{Kushtrim Bresilla}\n\\author[1]{Luca Corelli Grappadelli}\n\\author[1,2]{Luigi Manfrini}\n\\address[1]{Department of Agricultural Sciences, University of Bologna}\n\\begin{abstract}\n    As agriculture becomes more high tech, a growing number of farmers are using GPS-equipped autonomous systems supported by platforms that collect data on plants, soil, and weather. This emerging field of precision agriculture is based on observing, measuring and responding to crops with smart technology. Robots are taking on many tasks in agriculture nowadays, including planting greenhouse crops, harvesting apples, pruning vineyards and/or plant health monitoring. Precision agriculture refers to the way farmers manage crops to ensure efficiency of inputs such as water and fertilizer, and to maximize productivity, quality, and yield as well minimizing pests, unwanted flooding, and diseases. It begins the cycle by collecting information about their crop yields. This is done through a series of sensors specialized for a purpose, then the data is transferred to cloud for intelligent processing and further data analytics. The next step is presented to the farmer as a suggestion to take actions or is done autonomously. In this paper we present a review of this closed system from sensors and data collection, big data and cloud computing until autonomous systems and robotics.\n\n\\end{abstract}\n\\begin{keyword}\n    Precision Agriculture \\sep Smart Farming \\sep Robotics \\sep Artificial Intelligence \\sep Sensors\n\\end{keyword}\n\\end{frontmatter}\n\\linenumbers\n\n\n\n\\section{Introduction}\n\\label{S:1}\n\nThe pace of technological change — whether through advances in computer sciences \\& technology (CST), biotechnology, or such emerging fields as nanotechnology \\cite{Duhan_2017} — will almost certainly accelerate in the next decade, with synergies across technologies and disciplines generating advances in research and development, production processes, and the nature of products and services \\cite{Harrison_2015}. In the CST field, for example, advances in microprocessors will support real-time image recognition and detection,while artificial intelligence will make possible the use of more intelligent robotics in manufacturing that will support the ability to quickly reconfigure machines to produce prototypes and new production runs, with implications for manufacturing logistics and inventories. Further technological advances are expected to continue to increase demand for a highly skilled workforce, support higher productivity growth, and change the organization of business and the nature of employment relationship \\cite{de_Lima_2017}.\n\nAgriculture is a sector with very specific working conditions and constraints. This isn’t only due to the dependency on weather conditions, but as well on the labor market. During times of highly intensive agricultural activities (eg. harvest), there are very pronounced peaks in workload which can only be predicted on a short-term basis due to the weather and seasonality. According to \\cite{EmploymentEU} the world’s agricultural workforce is expected to decline around 30\\% between 2017 and 2030. This expected decline will be driven by structural changes within the agri-food industry, but also because the opportunities for employment are expected to be better in other sectors. Rural areas are already facing difficulties in creating attractive jobs in general, pushing towards an ongoing migration towards urban centres. Those structural changes in agriculture are expected to continue with higher investments in technology. For example, investing in precision farming and digital agriculture are expected to significantly increase \\cite{Colbert16}. New technologies are set to impact the farm labour dynamic in many ways \\cite{Pierpaoli_2013}, but two developments stand out. One, the increasing use of data collection tools, such as sensors, and increasing sophistication of farm hardware and software is increasing demand for higher analytical and technical skill sets \\cite{Aubert_2012,Mulla_2013}. And two, the advancement of automation and autonomy on farm will decrease the reliance on human resources for low-skill and labour-intensive work while increasing autonomous machinery and robotics presence \\cite{Bechar_2016, Precision2007, Yaghoubi13}.\n\nThis paper presents an overview of new technologies and methodologies used in PA with emphasis in fruit tree orchards or precision orchard management. It aims to illustrate the challenges PA faces within this fast pace changing technological sector. One is that the agricultural sector is extremely low margin, therefore, investments in innovation are difficult \\cite{Pierpaoli_2013}. Although the cost of smart farming is still high for any but the largest farms, this doesn't exclude PA for being an innovative sector in research and application. This paper gives and account on those technical advancements in computer sciences, machinery or else that are giving a significant changing push to the core meaning of PA. It focuses especially on the promise that Artificial Intelligence (AI) is making, on the new achievements surpassing even human capacities and capabilities. For many years it has been suggested that PA is in the crossroad where PA applications are catching up with technological advancements \\cite{Stafford_2000}, where as highly-advanced tractors, UAV and other unmanned vehicles and other technologies will autonomously monitor, analyse and manage agricultural farms \\cite{Stafford_2000_book}.\n\n\\subsection{Precision Agriculture 4.0}\n\nThe term precision refers to being minutely exact or sharply defined, and in PA, precise and sharply defined in the context of inputs means application of best measurable \"thing\" at precise \"place\" and sharply defined \"time\" - TPT \\cite{Pierce_1994, Manfrini2009}. \n\nThe concept of PA has shifted its meaning from when was first conceptualized. When first global positioning systems (GPS) in conjunction with yield monitors and their strict relation were made available for field crops in late 80's, marks a rather short history of PA \\cite{Zude_Sasse_2016}. In later years the introduction of analyzing tools like geo-referencing with GIS, shifted the meaning of PA into a more complete system. GIS is used to manage geo-spatial field data, including field boundaries, imagery, soil information, application maps, yield data, and near-earth and remotely sensed data. The affordability of those tools to measure, monitor and analyse spatial variability, tailored the action-taking process into a site-crop-specific \\cite{Stafford_2000}. PA also included the autosteering systems, variable rate application (VRA) and zone management. The technology needed to accomplish VRA includes an in-cab computer and software with a field zone application map, fertilizer equipment capable of changing rates during operation and GPS \\cite{Chen_2012}. Autosteering and telemetry is technology that captures data from farm equipment operating in a field and transfers the data to farmer through internet \\cite{Pickett20041}. According to \\cite{Hedley_2014} GPS and autosteering alone has increased farm efficiency up to 10\\%  thus making PA a more interesting and valuable concept, despite its slow adoption during early years \\cite{Pierpaoli_2013}. \n\nLater on researchers started using light as means of observing the crop. When crop is observed or its condition assessed without physically contact, it is a form of remote sensing \\cite{Huang_2018}. Observing the colors of the leaves or the overall appearances of plants can determine its condition. Remotely sensed images taken from satellites and aircraft provided a means of assessing wide area of fields for a high vantage point and using them for VRA. Even though remote sensing dates back to the 50's \\cite{Bastiaanssen_2000}, only recent technological advances have made the benefits of remote sensing accessible to most farmers. Satellite imagery (SI) in conjunction with VRA are often called \"Grid farming\" or Remote Agriculture. \n\nDue to the prominence of Internet of Things (IoT) and Cloud Computing, PA is transforming into Smart Agriculture (SA). The system of PA is based on a precise and targeted application of specific measures in the exact spatial arrangement for more complex control structures \\cite{Mekala_2017}. Such structures are systems that process the input information and execute the output action. The input blocks of the control system are sensors that convert the input quantity of physical quantity. Various types of sensors that expand the opportunities for application, regulation, measurement and recording of data are being used in the PA systems. There is a paradigm shift from use of wireless sensors network (WSN) as a major driver of smart agriculture to the use of IoT and Data Analytics (DA) \\cite{Elijah_2018}. The IoT integrates several existing technologies such as WSN, radio frequency identification (RFID), cloud computing, middleware systems and end-user applications for delivering Agriculture-as-a-Service (AaaS) \\cite{Gill_2017, Sto_es_2016}. While PA is just taking in-field variability into account, a Smart Agriculture (SA) goes beyond that by basing management tasks not only on location but also on data, enhanced by context- and situation awareness, triggered by real-time events \\cite{Wolfert_2017, Pivoto_2018, O_Grady_2017, Kaloxylos_2012}\n\nAgriculture is highly repetitive, and, many tasks can be automated. Each farming operation requires many resources, for example planting, maintaining, and harvesting crops need money, energy, labour and resources \\cite{Brown20121427}. For those reasons PA relies onto robotics and fully autonomous systems. For a farmer robot to be fully autonomous, it needs to navigate through very diverse and harsh environment without the human supervision \\cite{Slaughter_2008}. Robots nowadays are wirelessly connected to a central operator to both receive updated instructions regarding the mission, and report status and data. However, making an autonomous farm robot requires better controllers, localization, communication and action taking systems. The technology is similar to that of autonomous cars but applied to agitech. Where it differs is that farming robots often need to manipulate their environment, picking vegetables or fruit, applying pesticides in a localized manner, or planting seeds. All these tasks require sensing, manipulation, and processing of their own.\n\nUntil recent years, different traditional computer solving approaches have been extensively adopted in the agricultural field, be that in pest and disease detection, stress and water status monitoring or other. In recent years, with the significant increase in computational power, in particular with special purpose processors optimized for matrix-like data processing and large amount of data calculations (eg. Graphical Processing Unit - GPU), a lot of Machine Learning (ML), Deep Learning (DL) models and methodologies have achieved breakthroughs never achieved before \\cite{LeCun2015, Ensmenger_2011}. ML Algorithms enable one to analyze massive volumes of data, regardless of complexity, quickly and accurately. The union of many components: computer vision (CV) with ML, autonomous decision making based on trained model outcomes have been shown to be promising in solving different problems in agriculture. The predictive potential made possible by DL will cause a disruptive effect in different segments of the traditional industry as well as agriculture \\cite{Patr_cio_2018}.\n\n\\begin{figure}[thpb]\n    \\centering\n    \\includegraphics[width=\\linewidth]{pac.png}\n    \\caption{PA as cyclic system}\n    \\label{fig:pac}\n\\end{figure}\n\nThe process of agriculture towards precision since introduction of GPS, georeferencing, VRA has gone from simple Precision Agriculture (PA1.0) into: firstly with remote sensors and satellite and aircraft imagery to Remote Agriculture (PA2.0), then with big data, cloud-computing and IoT to Smart Agriculture (PA3.0), and lastly with Decision Support Systems (DSS), robotics and AI into Intelligent Self-Sustained \\& Autonomously-Managed Agriculture (PA4.0). PA4.0 it's a fully sustained cyclic system, where outputs of one segment are the input for the next one. It can be thought of three big steps, each including individual and/or independent smaller steps. First step is monitoring and sensing, then comes analyzing and predicting, lastly is managing and action taking. With drones, robots and intelligent monitoring systems now successfully being used in research and field trials, artificial intelligence, or machine learning, is set to revolutionize the future of agriculture as the next phase of precision agriculture is on the horizon. Many operations will be done remotely, processes will be automated, risks will by identified and solved before occurring and farmers will be able to make more informed and rapid decisions.\n\n\\subsection{Artificial Intelligence in PA4.0}\n\n    Scaling up of farm operations to match the exponential increase in consumption will drive the need for automation technologies in the farms. As the farmers are automating their operation, robots and autonomous systems have become an integral part of PA and are assisting farmers to improve yield and product quality while addressing the increasing supply needs. AI has become the backbone of robotics, as it enables a machine to use language processing and deep learning capabilities to take cognitive decisions. With the development of AI technologies, it is easier to track and predict the right time for planting, irrigation, and harvesting. AI helps to predict the likelihood of rain, the outbreak of diseases or attack of pests and the soil health condition. The information gathered from the field using satellite images and sensors on balloons would be juxtaposed with historical weather and other agronomic data to generate customized data for a specific farm and a specific crop. The advanced sensors and technologies, make the entire task of crop and soil management uncomplicated for the farmers and easily automated. \n\n    The use of cognitive technologies in agriculture could also help determine the best crop choice or the best managing practices for a crop mix adapted to various objectives, conditions and better suited for farm’s needs. AI can use diverse capabilities to understand how crops react to different soil types, weather forecasts and local conditions. By analyzing and correlating information about weather, type of crops, types of soil or infestations in a certain area, probability of diseases, data about what worked best, year to year outcomes, marketplace trends, prices or consumer needs, farmers can make decisions to maximize return on crops. These artificial intelligence and cognitive systems will save time, increase safety and reduce potential human error while improving effectiveness.\n\n    The principle of AI is one where a machine can perceive its environment, and through a certain capacity of flexible rationality, take action to address a specified goal related to that environment. ML is when this same machine, according to a specified set of protocols, improves in its ability to address problems and goals related to the environment as the statistical nature of the data it receives increases. As the system receives an increasing amount of similar sets of data that can be categorized into specified protocols, its ability to rationalize increases, allowing it to better predict on a range of outcomes. Remote sensors, satellites, robots and autonomous systems can gather information 24 hours per day over an entire field thus feeding the system with huge amount of data, and in turn self-improving itself in reaching its goal.\n\n    Agricultural technology adoption is increasing each year, and machinery based applications, such as navigation technologies and yield monitors, are leading the way. It appears that adoption is driven in large part by ease of use; the easier a technology is to use, the more likely it is to be adopted on the farm \\cite{Pierpaoli_2013}.\n\n\\section{Site specific crop monitoring - SSCM}\n    The first step in PA4.0 is data collection and sensor monitoring. Different sensors, communications protocols and transmission protocols are used. The purpose of this step is that through crop monitoring for nutrients, water-stress, disease, insect attack, overall plant health etc. the farmer is aware in real-time of what happens in the field. This information can either be presented in raw-form to the farmer or processed with on-board computers, local computers or cloud.\n\n\\subsection{Sensors}\n    A number of sensing technologies are used in precision agriculture, providing data that helps farmers monitor and optimize crops, as well as adapt to changing environmental factors \\cite{Zude_Sasse_2016}. By design most of agricultural sensors can be grouped into:\n\n    \\textbf{Location Sensors} \\\\use signals from GPS satellites to determine latitude, longitude, and altitude to within 20cm. Three satellites minimum are required to triangulate a position. Precise positioning is the cornerstone of precision agriculture.\n\n    \\textbf{Optical Sensors} \\\\use light to measure soil and plant properties. The sensors measure different frequencies of light reflectance in near-infrared, mid-infrared, and polarized light spectrums. Sensors can be placed on vehicles or aerial platforms such as drones or even satellites. Soil reflectance and plant color data are just two variables from optical sensors that can be aggregated and processed. In this category there are RGB, multispectral, hyperspectral, thermal, fluorescent cameras and Time of Flight ranging sensors. \n\n    \\textbf{Electrochemical Sensors} \\\\provide key information required in precision agriculture: moisture, pH and soil nutrient levels and other chemical triggers. Sensor electrodes work by detecting specific ions in the soil/plant. Moisture sensors assess moisture levels by measuring the dielectric constant (an electrical property that changes depending on the amount of moisture present).\n\n    \\textbf{Mechanical Sensors} \\\\measure force applied to the sensor or “mechanical resistance.” Some of those sensors use a probe that penetrates the soil and records resistive forces through use of load cells or strain gauges. A similar form of this technology is used on large tractors to predict pulling requirements for ground engaging equipment. Tensiometers, detect the force used by the roots in water absorption and are very useful for irrigation interventions, Fruit gauges detect fluctuations on fruit growth of the fruit \\cite{Brunella_2007} with accuracy of micrometers. Trunk/stem dendrometers, air pressure etc are all mechanical sensors.\n\n    \\textbf{Thermal Sensors} \\\\basically consists of two different metals such as nickel, copper, tungsten or aluminum etc, that are bonded together to form a Bi-metallic strip. The different linear expansion rates of the two dissimilar metals produces a mechanical bending movement when the strip is subjected to temperature change. The \\textbf{Thermistor} is another type of temperature sensor, whose name is a combination of the words THERM-ally sensitive res-ISTOR. A thermistor is a special type of resistor which changes its physical resistance when exposed to changes in temperature. Their main advantage over bi-metal types is their speed of response to any changes in temperature, accuracy and repeatability. Most of the sap flow sensors are based on thermal sensors \\cite{Alessio_2018}.\n\n\n    \\subsection{Data transmission}\n    During years with the increase development of IoT technologies and decrease in price of computer raw power, wireless technologies have rapidly emerged \\cite{Zhang2002}. Different technologies are used for transmitting without wires but likes of: light (infrared and/or laser point-to-point communications) and radio-frequencies (Bluetooth, WiFi, ZigBee, LoRa, SigFox, CDMA and GSM/GPRS) \\cite{Mirhosseini_2017, Park_2015, Ferentinos_2007}.\n\n    In agriculture, this technology has been adopted due to the acceptable cost (\\cite{Vougioukas_2013}). While this has still not seen a significant success in farmers orchards, it is one of the most used technology that gathers hight resolution spatial and temporal data about the environment and the specific crop that is being monitored.\n\n    Hardware required for Wireless Sensor Network (WSN) and/or Agriculture Wireless Sensor Network (AWSN) \\cite{Aqeel_ur_Rehman_2014, Ruiz_Garcia_2009} is composed of: (ranking based on importance)\n\n    \\begin{enumerate}\n        \\item Radio-frequency communication protocol\n        \\item Energy-efficient processor\n        \\item High-resolution analog inputs (sensors)\n        \\item Long-life energy source\n        \\item Hig-speed reaction outputs (actuators)\n        \\item Development platform\n        \\end{enumerate} \n    \n        Those systems are usually composed of a few sinks and large quantity of small sensors nodes. Each wireless sensor node communicates with a gateway unit which can communicate with other computers via other networks. Communication protocol (CP) consists of the application layer, transport layer, network layer, data link layer, physical layer, power management, mobility management and the task management \\cite{akyildiz2002wireless, Ruiz_Garcia_2009, Ojha_2015}.\n\n            \\begin{table}[t]\n                \\centering\n                \\begin{tabular}{lccccc}\n                    Technology              & LoRa          & Zigbee        & Bluetooth & WiFi      & RFID  \\\\\n                    \\hline\n                    Feature                 & Mesh          & Mesh          & Star      & Star      & P2P    \\\\\n                    Power                   & Very Low      & Low           & Ultra low & Moderate  & Very Low    \\\\\n                    Data rate (up to)       & 300Kbps       & 200Kbps       & 1Mbps     & 100Mbps   & 100Kbps  \\\\\n                    Coverage                & 20km          & 500m          & 300m      & 50m       & 3m    \\\\\n                    Cost                    & Very low      & Low           & Low       & Medium    & Low    \\\\\n                \\end{tabular}\n                \\caption{Comparison of Radio-Frequencies used in AWSN} \\label{tab:RF}\n            \\end{table}\n\n    CPs built over wireless standards, such as 802.15.4, facilitate the device networking and bridge the gap between the internet-enabled gateways and the end-nodes. Such protocols include ZigBee, ONE-NET, Sigfox, WirelessHART, ISA100.11a, and 6LowPan, Bluetooth Low Energy (BLE), LoRa/LoRaWAN, DASH7 and LoWiFi \\cite{Tzounis_2017}. During years different technologies and advances in low power consumption have been developed providing a better means for AWSN. Technologies like Bluetooth were thought the best compromise between datarate, speed and distance \\cite{Vuran_2018, Choudhury_2015}. Bluetooth is probably the closest peer to WSNs, but its power consumption has been of secondary importance in its design. Later on, more robust, lower power consumption and better meshed technologies have been applied. [Tab \\ref{tab:RF} \\cite{Aqeel_ur_Rehman_2014, Wang_2013}. \n\n    As shown in [Fig \\ref{fig:LoRa}, most promising technolog with very high distance transmission rate, low power consumption and reasonable data rate is LoRa. LoRa can be used for free in spectrum bands ~434 MHz in Europe and ~960 MHz in US. LoRa has many parameters; the most important one is the Spreading Factor (SF). SF is a set of parameters that specify transmit power, subfrequency and air time. LoRa define spreading factors numbered from 6 to 12, where LoRaWAN is using from 7 to 12. The lower is the SF, the higher is the throughput, and the lower is the distance covered. Also, lower SF means lower power consumption [Fig \\ref{fig:LoRa}. Many algorithms are implemented in order to automatically assign SF among nodes thus making an efficient data-rate/energy-consumption ratio.\n        \n    \\begin{figure}[thpb]\n        \\centering\n        \\includegraphics[width=\\linewidth]{lora.png}\n        \\caption{LoRa}\n        \\label{fig:LoRa}\n    \\end{figure}\n        \n    Versatile and convenient form factors, low-cost devices, high-processing AWSN can nowadays be used, on small batteries with or without assist of mounted solar panels, and operate for long periods of time. Those modern embedded devices have sufficient resources to support even more demanding sensors, such as image sensors and on-board image analysis.\n        \n    Roughly all Agriculture WSNs can be grouped into three categories:\n        \n    \\begin{enumerate}\n        \\item \\textbf{Barebone monitoring without processing}. Most AWSN fall into this category, AWSN in this case are used just as intermediary nodes between sensors and internet gateways. AWSN log the data from the sensors, then through the RF and CP send the data to the server where further processing is done and served to the user/farmer \\cite{Akyildiz_2004, Tzounis_2017, Dinh_Le_2015}.\n        \\item \\textbf{Monitoring and simple processing}. A huge number of AWSN is now shifting into smarter self-processing nodes. While they take data from sensor (be that soil, plant or environment), they are able to give early warnings and some barebone predictive analytics about the crop. Usually they are attached to actuators to automate some simplified actions like irrigation valves or other VRA \\cite{Hu_2010,Akyildiz_2004,Mainwaring200288}.\n        \\item \\textbf{Monitoring and advanced processing}. In this category fall the more compute-hungry AWSNs. A lot of early pest detection and insect traps use small but powerfull AWSN that have cameras for image analysis and detection \\cite{Chougule_2016}. Those systems include a much power-hungy processor in form of an embedded computer able to monitor crops in real time \\cite{Liqiang_2011, Jzau_Sheng_Lin_2008, Lv_2009, Chougule_2016}.\n    \\end{enumerate}\n\n    AWSNs are spread across all domains of PA, starting with crop soil monitoring \\cite{Wang_2013, Chen_2012,Sun_2009}. According to \\cite{Yunseop_Kim_2008} spatial and temporal variations of soil moisture can be matched by precision irrigation management, which can increase application efficiencies, reduce environmental impacts and even improve yields. However for better and real-time usage Wireless Underground Sensor Networks (WUSNs) have recently been investigated for unattended soil monitoring. Unlike wired sensor, which need to be deployed and removed frequently during the process of planting, WUSNs are deployed in the ground at a safe depth and do not interfere with agriculture machine operations, such as tillage practices \\cite{Akyildiz_2006}. These networks consist of wirelessly-connected underground sensor nodes that communicate through soil \\cite{Dong_2013}. Each device contains all necessary parts to make the device self contained WSN: sensors, memory, a processor, a radio, an antenna, and a power source.\n\n    The widest adoption of AWSN is in the high-value crops e.g. orchard and/or vineyards \\cite{Vougioukas_2013}. A study by \\cite{Torres_2017} was developed to acquire a suitable knowledge to manage irrigation and verify the influences of living mulches on the vine by using wireless sensor networks to measure the vapor pressure deficit, soil water potential and soil water content. In another study ann intelligent data acquisition and service system for apple orchard was developed by \\cite{Guo2014146} for acquiring apple tree growth information in time and managing orchard production remotely by Portable Digital Assistant (PDA) through the ZigBee Wireless Sensors Network (WSN) deployed in the apple orchard.\n\n    Implementing AWSN has many challenges \\cite{Tzounis_2017}. Biggest ones are heterogeneity and signal penetration through the vegetation \\cite{Vougioukas_2013} and security \\cite{Sicari_2015}.\n\n\n    \\subsection{Traceability}\n    RFID is an emerging technology that makes use of wireless communication. The protocol was originally developed for short-range product identification, typically covering the 2 mm - 2 m read range, and has been promoted as the replacement technology for the optical bar-code found, with the use of EPC (Electronic Product Code) \\cite{Ruiz_Garcia_2009}. RFID has the ability to allow energy to penetrate certain goods and to read a tag that is not visible \\cite{dobkin2005radio}. RFID systems are comprised of three main components: the tag or transponder, the reader or transceiver that reads and writes data to a transponder, and the computer containing database and information management software \\cite{li2006radio}.\n\n    Fruit pack houses attach passive RFID tags to bins holding fruit associated with a number. Every time a bin passes through an RFID portal, its tag is read, and data is collected and sent to a database, thus creating an audit trail or chain-of-custody \\cite{Gautam_2017}. The audit trail contains valuable information about those fruit, treatments done and when were they done, when it was picked and so on, which machinery were used, the worker harvesting them (or autonomous machine). With this information readily available, players in the supply chain can quickly and efficiently mitigate a recall. Now, instead of pulling every single product from storage or even store shelves, it is possible to pinpoint and pull just the batch that contains the affected products \\cite{Ghaani_2016}.\n\n    Semi-Active RFID tags equipped with battery-powered sensors allow farmers to collect temperature data from pallets and bins. By reading the RFID tag, farmers can make sure a pallet maintains a certain temperature and no infestation occurs. And, if the pallet has hit a temperature above certain threshold at any point in its life-cycle, the owner can evaluate the specific bins or adjust the expiration data as appropriate \\cite{Piramuthu_2013}. Similarly, RFID tags now exist that can monitor humidity, pressure, and event movement, arming users with even more data to ensure food safety.\n\n    Tree-based monitoring and tracing was described by \\cite{Wu_2013, Ampatzidis_2009, Luvisi_2011}. Electronic archives for each apple tree were set up and the whole record of orchard productivity was utilized to inform the management process.And \\cite{Ampatzidis20123726} presented a real-time monitoring system that can track and record individual picker efficiency during harvest of tree crops. It integrated a digital weighing scale, RFID reader/writer. As harvested fruit is dumped into a standard collection bin situated on the scale, the system reads simultaneously the picker's ID (RFID tag) and records the incremental weight of fruit.\n\n\\section{Crop specific data analytics - CSDA}\n    This is the second step of PA4.0 and the most important one. After data are collected through sensors in the field, and then transmitted through different protocols to internet-gates, the data is forwarded to specific servers and/or computers for analysis. There are different approaches, softwares and platforms that analyse the data which will be discussed. Those data afterwards are either presented to the farmer so he can check again and decide further actions or can be sent directly to autonomous systems that act immediately based on specified algorithms and/or routines.\n\n    \\subsection{Big Data and Cloud Computing}\n    During the significant development of technology of recent decades, the agriculture world has quietly been introduced to data aggregation technology. Companies built data systems into their machinery, farmers started enabling data acquisition devices in their farms, and larger farms started using software to manage their operations. The adoption of those new data sources has been slow \\cite{Pierpaoli_2013}, and systems are often unwanted because they create lock-in to the software, incompatible with the variety of other tools and/or brands used on the farm. Despite that, the amount ot data once the systems are functional, is very high \\cite{Fountas_2006}. The challenge here is not the amount ot data, but what should be done with it, and how can it be processed to help farmers take better decisions \\cite{Wolfert_2017, McBratney_2005}.\n\n    A new phenomenon of Big Data has drawn a huge attention from all domains of research \\cite{Wolfert_2017}. According to \\cite{Li_2018} in 2011, the data volume size (copied or created) was around 2 ZetaBytes, and the trend shows this is exponentially increasing. So what is \"big data\" and what does it mean? Big data is a very abstract concept, and to determine the difference from “massive data” it has some additional features. According to  \\cite{_zk_se_2015}, big data should have those three main characteristics: volume, velocity and variety. Some authors would add another characteristic: value, calling it the 4V-s. Big data is an evolving term that defines any large amount of structured, semi-structured and unstructured data that has the potential to be mined for information. Big data is a set of methods and technologies that require new forms of integration to uncover large hidden values from large dataset that are complex, diverse and of a massive scale.\n\n    Most agriculture datasets have data related to crop patterns, weather parameters, environmental conditions, soil types, soil nutrients, GIS and GPS data, farmer records, agriculture machinery data, such as yield monitoring and VRA [\\ref{tab:bigdata}.\n\n    \\cite{Nguyen_2017} proposes a a platform for collecting and analyzing agricultural big data by suporting multiple methods of collecting data from various data sources using Flume and MapReduce, by using multiple choices of data storage including HDFS, HBase, and Hive and multiple analysis modules with Spark and Hadoop.\n\n    \\begin{table}[t]\n        \\centering\n        \\begin{tabular}{r p{5cm} l p{5cm} l p{5cm}}\n            Data stage              & Process          & Difficulties \\\\ \n            \\hline\n            Data capture        & Sensor logs, UAV and Satellite Imagery, GPS locations, NDVI, Thermal ...    & Availability and Quality \\\\\n            Data storage        & Cloud platforms, Distributed File Systems, Hybrid Storage Systems, Block-chains, P2P ...      & Cost and Safety of data \\\\\n            Data transfer       & Internet, Intranet       & Integrity and Speed \\\\\n            Dta transform       & Data cleaning, Machine Learning and AI, Normalize and other statistics      & Automation and Preprocessing \\\\\n            Data analytics      & Yield models, Planting instructions, Benchmarking, Decision ontologies ...          & Heterogeneity and Scalability \\\\\n            Data Marketing      & Visualization and Representation      & Ownership and Privacy \\\\\n            \\hline\n        \\end{tabular}\n        \\caption{Big-Data stages in PA} \\label{tab:bigdata} \n    \\end{table}\n\n    Another term being extensively used in agriculture is cloud computing of agricultural data \\cite{Woodard_2016, Wolfert_2017, Kaloxylos_2012}. The idea is certainly innovative and new in agriculture but is a very old term in other science domains \\cite{Kamilaris_2017}. The idea of an “intergalactic computer network” was introduced in the 1960s by JCR Licklider, who was responsible for enabling the development of the Advanced Research Projects Agency Network (ARPANET) in 1969. His vision was for everyone on the globe to be interconnected and accessing programs and data at any site, from anywhere.\n\n    Cloud adoption is undoubtedly the cornerstone of digital transformation, it is the foundation for rapid, scalable application development and delivery and as such it has an important role in the development of modern agriculture. High-performance computation may allow for faster and more accurate agricultural management, which could improve decision-making quality, reduce information asymmetry, and increase profits \\cite{Jayaraman_2016}.\n\n    A research done by \\cite{Xia_2018} evaluates the feasibility of applying cloud computing technology for spectrum-based classification of apple chilling injury, by using frameworks like Spark and support vector machines (SVM) classification models for multivariate classification and analysis of the spectral data sets. The results showed that the efficiency of the cloud computing platform was significantly improved by increasing the spectral data set capacity or number of working nodes.\n\n    \\cite{Wang_2018} demonstrated a highly-integrated, cloud-based, low-cost and user-friendly portable NIRS system with its key components and main structure. The system was used to predict the maturity level and TSS content of sweet cherry samples. They named the system ‘Seefruit’ and they foresee the system to become a universal application for fruit quality detection, which offers a fundamental framework for future related research.\n\n    According to \\cite{Tan_2016} Cloud computing is particularly beneficial for decision support in PA for specialty crops. Firstly because of its nature on scalability, cloud computing is able to handle large amount of data and scale automatically. Secondly through  cloud computing it is possible to change quickly the number of server instances and other resources, based on the demand. Finally, agriculture decision support systems are increasingly hosted on Internet, to take advantage of internet-connected devices IoT and to build an online community. They developed a framework for cloud-based Decision Support for orchards and Automation systems that can acquire data from various sources, synthesize application-specific decisions, and control field devices from the cloud.\n\n    \\subsubsection{Predictive Analytics}\n    One of the most exciting technologies presently being used and widely being transformed and developed has been the use of predictive analytics. Predictive analytics as a whole can be comprised of numerous different statistical abilities from modeling, machine learning, and data mining. Used for agriculture, these methods allow to analyze what has happened in the past on the farm, as well as what currently is happening and is going to happen, to make use of the data to predict the future and make decisions that impact the bottom line and end use of on-farm products \\cite{Kamilaris_2017, Nguyen_2017}.\n\n    By learning from historical and future data based on measured variables, management and outcomes of decisions can more readily be made that can greatly impact efficiencies and processes. This is no easy task, as decisions and recommendations about the future require true datasets that are well defined from field to field, even different areas within the field. This insight helps producers to make otherwise challenging agronomic decisions that can take time to reach the field every day quicker and easier. It gives them the opportunity to make a fast decision off of digital information, often with the ability to be unbiased to the source, but relied upon the facts. True agronomic knowledge is essential for success and the right outputs for each digital tool. A small decision on the timing of an input application, could mean the difference between profitability or loss for that application. Predictive scores are given to each opportunity to help determine processes and decision making through analyzing datasets and confidence. Predictive analytics can support to discover relationship, and most importantly trends from those data \\cite{Zhang_2017}.\n\n    \\cite{Barbouchi_2016}, proposed a yield prediction from the input images generated by Radarsat 2. This work has a novel calculation technique from the relationship between the yield obtained from situ and backscatter. The data is collected at the end of the season with the Radarsat2 images. Single data is integrated with the data obtained during acquisition stage and next data during flowering period.\n\n    While in anther study \\cite{Badr_2016} proposed a platform for geospatial data obtained from the yield from the single farm level up to the continental scale. They identified the coupling of Big-Data approach with the integrated repository and services (PAIRS), for the decision support system for agro-technology transfer (DSSAT) crop model. This foresees the global scale of geospatial analytics, and PAIRS provides the solution for the heterogeneous data to integrate the crop models with the dataset size of hundreds of terabytes.\n\n    In another paper \\cite{Suwantong_2016}, the evaluation takes place by NDVI technique which is calculated from the energy of electromagnetic waves obtained using the target crop. NDVI is calculated by the cosine function which is triply modulated with mean value, first stage of variables, and amplitude. The approach for determining the initial period of one crop at 8-day composite is obtained by moderate resolution imaging spectre radiometer.\n\n    By using a center of big data and intelligently storing, screening, calibrating, minning and extracting monitoring data \\cite{Zhang_2017} established the crop growth model based on big data, which can predict and forecast the water requirement of crops in different growth periods and make the decision of automatic irrigation and fertilization, finally realizing timely and proper irrigation of crops.\n\n    Another paper \\cite{Sahu_2018} presents research work utilizing a novel algorithm as to foresee the status of crop by monitoring the agriculture land data and advice which area of crop would be suitable for that land. Contingent on different farms, was intended to regularize the dataset fields that will suit for all different crop managements. The algorithm had the functionality of loading the dataset in database and comparing the previous dataset with the current processing dataset and give viable crop prediction scenarios.\n\n    \\cite{Bendre_2015} forecasts using a regression model and big data handle by cloud computing platforms which shows a considerable potential of data fusion in field of crop and water management. As per results model predicted the temperature and rainfall in the region by suggesting various decisions to farmers for deciding the crop pattern and water management in the future.\n\n    \\subsection{Computer Vision}\n    Another important way of retrieving high volume of data (BigData) in agriculture is through cameras by using machine vision techniques. Computer vision (CV) is the ability of cameras and other visual sensors to capture raw video and process it into useful, actionable information. Information generated by CV is a type of unstructured data, its a collection of very huge amount of data with no structure or labels. The sheer volume of data is not the only challenge, a far bigger challenge is to understand it and act on it in real time.\n\n    In PA there are different areas where CV is applied:\n\n    \\begin{itemize}\n        \\item Processing and quality control\n        \\item Vegetation indices for yield mapping\n        \\item Thermal imagery for stress status\n        \\item Pest and disease monitoring\n        \\item Production growth and monitoring\n    \\end{itemize}\n\n    One of the most interesting of those is the production growth and monitoring. Especially fruit counting and detection. Agriculture is most of the time repetitive, repetitive work of seeding, weeding, feeding, pruning, picking and harvesting, sorting and so on \\cite{He_2018}. Agricultural robots automate those slow, repetitive and dull tasks for farmers, allowing them to focus more on strategic matters and improving overall production yields \\cite{Edan_2009}. One of the most popular robotic application in agriculture are the autonomous harvesting and picking robots. That’s because the speed and accuracy has increased significantly in recent years \\cite{Tao_2017, Bechar_2016}. While the robots in addition to harvesting and picking can check at the same time the maturity level and sort based on size \\cite{Edan_2009}. However, there are many challenges for an autonomous robotic system to complete that task. In principle, for the robot to be fully capable to perform harvesting and picking, it needs a sophisticated detection algorithm in order to overcome challenges as naturally occurring changes in illumination, shape, pose, colour, and viewpoint \\cite{Barnea_2016}.\n\n    The earliest fruit detection systems date since 1968 \\cite{Jimnez1999}. Using different methods and approaches based on photometric information (light reflectance difference from fruit and leaves in visible or infrared spectrum), these detectors were able to differentiate fruit from other parts of the tree. According to the reviews devoted to fruit detection by \\cite{Jimnez1999} and later on by \\cite{Kapach_2012}, there were many problems related to growth habit that had to be considered. The unstructured and uncontrolled outdoor environment also presents many challenges for computer vision systems in agriculture.\n\n    Light conditions have a major influence on fruit detection feasibility: direct sunlight results in saturated spots without color information and in shadows that cause standard segmentation procedures to split the apples surfaces into several fragments. In order to decrease the non-uniform illumination (daytime lighting can be bright, strong, directional and variable), \\cite{Payne_2014} described a machine vision techniques to detect fruit based on images acquired during night time using artificial light sources. The results described show 78\\% fruit detection, 10\\% errors and suggesting that artificial lighting at night can provide consistent illumination without strong directional shadows.\n\n    In a different approach, \\cite{Kelman_2014} presented an algorithm for localizing spherical fruit that have a smooth surface, such as apples, using only shape analysis and in particular convexity. It is shown that in the images used for the study, more than 40\\% of the apple profiles were none-convex, more than 85\\% of apple edges had 15\\% or more non-convex profiles, and more than 45\\% of apple edges had 50\\% or more non-convex profiles. Overall, 94\\% of the apples were correctly detected and 14\\% of the detections corresponded to false positives. Despite hight accuracy number, the model is very specific to apples and wound not be extensible to other fruit crops with less spherical shapes. \\cite{Kapach_2012} explains colour highlights and spherical attributes, which tend to appear more often on the smoother, more specular, and typically elliptical regions like fruit where the surface normal bisects the angle between illumination and viewing directions.\n\n    A method for estimating the number of apple fruit in the orchard using a thermal camera was developed by \\cite{Stajnko2004}. It shows an algorithm able to threshold, count and report fruit’ morphological characteristics from thermal images captured under natural conditions in the orchard. Snd since fruit have bigger volume than leaves, they keep heat for higher amount of time, making them easily to detect while the temperatures start to cool down. However position of foliage on the tree prevent sunshine heating all fruit to the same degree for the same period. fruit inside the canopy are exposed to the sunshine for a shorter time than those outside the canopy, so they could be cooled in almost the same time as leaves, making very difficult to detect the temperature gradient between inner fruit and leaves.\n\n    With the development of better sensor cameras and vision techniques in recent years, more sophisticated approaches have been used for apple detection. Range-based devices such as stereo vision cameras, ultrasonic sensors, laser scanners and Time of Flight cameras measure the distance from the sensor to the observed objects, providing accurate range information in real-time and are consistent with varying lighting condition and are used more widely in agricultural machines nowadays. \\cite{Si_2015} describes location of apples in trees using stereoscopic vision. The advantage of the active triangulation method is that the range data may be obtained without much computation and the speed is very high for any robotic harvesting application. While \\cite{Huanyu_2008} developed a binocular stereo vision tomato harvester in greenhouse. In this method, a pair of stereo images was obtained by stereo cameras, and transformed to grey-scale images. According to the grey correlation, corresponding points of the stereo images were searched, and a depth image was obtained by calculating distances between tomatoes and stereo cameras based on triangulation principle. \n\n    \\cite{Barnea_2016} describes RGB and range data to analyse shape-related features of objects both in the image plane and 3D space. By combining both highlight detection and 3D shape/range data a colour-agnostic fruit detection framework was build. The framework is composed of two steps one following the other. In the first step a high level based feature detector is applied to detect the most probably regions of the frame that can contain fruit. The second step follows immediately after by using a depth-based object classification of the resultant feature vector using a support vector machine (SVM) on those regions passed by step one. In another work \\cite{Nguyen2014AppleDA} developed a multi-phase algorithm to  detect and localize apple fruit by combining an RGB-D camera and point cloud processing techniques. \\cite{Tao_2017} developed an automatic apple recognition system based on the fusion of color and 3D features.\n\n    For many years, traditional computer vision approaches have been extensively adopted in the agricultural field. More recently, with the significant increase in computational power, in particular with special purpose processors optimized for matrix-like data processing and large amount of data calculations (eg. Graphical Processing Unit - GPU), a lot of deep learning, CNN models and methodologies specifically developed have achieved unprecedented breakthroughs \\cite{LeCun2015}.\n\n    \\cite{Sa_2016}, developed a model called Deepfruit, for fruit detection. Adopting a Faster R-CNN model, goal was to build an accurate, fast and reliable fruit detection system. Model after training was able to achieve 0.838 precision and recall in the detection of sweet pepper. In addition they used a multi-modal fusion approach that combines the information from RGB and NIR images. The bottle-neck of the model is that in order to deploy on a real robot system, the processing performance required is a GPU of 8GB or more.\n\n    It is well known that all deep leaning models, to have a high accuracy, they need high number of data \\cite{Krizhevsky_2012}. In case of CNN, more pictures of the object of interest, the better the classification/detection performance is. In a model called DeepCount, \\cite{Maryam_2017} developed a CNN architecture based on Inception-ResNet for counting fruit. In order to use less training data, \\cite{Maryam_2017} used a different approach. They use another model to generate synthetic images/data to feed te main model to train on. Those generated images were simply a brownish and greenish color background with red circles drawn above it to simulate the background and tomato plant with fruit on it. They used twenty-four thousand pictures generated to feed into the model. The model was then tested on real world images and showed an accuracy from 85-80\\%.\n\n    To better understand the amount of data needed for better fruit detection, \\cite{Bargoti_2017} used different data augmentation techniques and transfer learning from other fruit. It is shown that transferring weights between different fruit did not have significant performance gains, while data augmentation like flip and scale  were found to improve performance resulting in equivalent performance with less than half the number of training images.\n\n    \\section{Automated crop management systems - ACMS}\n    The last step in PA4.0 is automation. When enough observations and predictive analytics are made, then farmers are given the choice to take immediate action in order to improve production yield, while reducing resources required. This is done through some chain automation pipelines or autonomous systems (robots). Robots are gradually changing every industry and agriculture isn’t an exception. The use of robotics in PA isn’t widespread yet. However, it’s expected to grow significantly in coming years.\n    \\subsection{Robotics and Autonomous Systems}\n    Many modern farmers are already high-tech. Digitally-controlled farm implements are regularly in use. There are partially and fully automatic devices for most aspects of agricultural functions from grafting to planting, from harvesting to sorting, packaging and boxing. Farmers use software systems and aerial survey maps and data to guide their field operations. They also use auto-steer systems included in many new tractors which follow GPS and software guidance. Some farmers are already transitioning some of their operations to full autonomy. Thus forward-thinking farm owners today may be able to skip over slow, incremental improvements and jump directly to robotic and autonomous automation.\n\n    Fully autonomous vehicles have been studied for many years, with a number of innovations explored as early as the 1920s. The concept of fully autonomous agricultural vehicles is far from new; examples of early driverless tractor prototypes using leader cable guidance systems date back to the 1950s and 1960s [\\cite{Basu_2018}. The potential for combining computers with image sensors provided huge opportunities for machine vision based guidance systems.\n\n    In Agriculture, autonomous systems can be grouped in three main categories \\cite{Emmi_2014}:\n    \\begin{enumerate}\n        \\item Big autonomous tractors\n        \\item Small specialized robots\n        \\item Swarm or fleet robotics\n    \\end{enumerate}\n\n    Autonomous tractors have been studied and in use in agriculture for many years. However precision agriculture was the one that helped advance vehicle guidance in terms of providing position information that is required for vehicle guidance \\cite{Reid_2000}. The key elements of automatic guidance are navigation sensors, a vehicle motion model, a navigation planner, and a steering controller\n\n    \\begin{figure}[thpb]\n        \\centering\n        \\includegraphics[width=\\linewidth]{tractor_autonav.png}\n        \\caption{Basic elements of autonomous tractor}\n        \\label{fig:auto_navv}\n    \\end{figure}\n\n    A tractor usually operates on all terrains, and there are a lot of unpredictable disturbances and noise sources to the signals from the navigation sensors. Therefore, it is necessary to have an effective means for signal conditioning and system state estimation in the sensor fusion modules \\cite{Noguchi_2001}. The topography, vegetation landscape, soil composition, texture and structure, air visibility, illumination, light quality and atmospheric conditions change at rates varying from seconds to months and on scales from millimeters to kilometers \\cite{Bechar_2016}. In order to perform well, the next-gen agriculture autonomous robots (Agbots) must be able to recognize and understand the physical properties of each specific object encountered, and also be able to work under both varying field and controlled environment conditions \\cite{Eizicovits_2014}. Therefore, sensing systems, robotics arms, specialized manipulators, effectors should be able to work under different and unstable environmental conditions \\cite{Bechar_2017}.\n\n    Robots have wide applications in PA, ranging from soil analysis, seedling, weed control, environmental monitoring, harvesting and so on, but in a broader perspective they can be groped in:\n\n    \\begin{itemize}\n        \\item Harvest Management\n        \\item Autonomous navigation\n        \\item Pest management and spraying\n        \\item Weed management and mowing\n        \\item Soil Management\n        \\item Irrigation Management \n        \\item Remote camera sensing UAVs\n        \\item Pruning and Thinning\n        \\item Sorting and packing\n        \\item Seedling and nursery\n        \\item Transporting and cleaning\n        \\item Other\n    \\end{itemize}\n\n    According to \\cite{Bechar_2009, Oren_2011} a robot, to perform a fully autonomous agricultural action needs to go through four continuous steps: first, the robot senses and acquires raw data from and about the environment, task and/or its state using various sensors; secondly, the robot processes and analyses the data received from its sensors to generate reasoning and a perception of the environment, the task or its state to some level of situation awareness; thirdly, the robot generates an operational plan based on its perception of the environment and state, or the task objectives; and lastly, the robot executes the required actions included in the operational plan.\n\n\t\\begin{table}[t]\n\t\t\\centering\n        \\begin{tabular}{r p{12cm}l}\n                Stage               & Task              \\\\\n                \\hline\n                Sensing             & Sensory inputs like: RGB cameras, LIDAR, Sonar, rotary encoders, potentiometers, resistors...             \\\\\n                Analyzing           & Landmark detection, Point-cloud analyzing, Kinematics and Inverse kinematics of manipulator...            \\\\\n                Planning            & Trajectory estimation, object voidance...      \\\\\n                Action              & Performing the planned action, triggering other actios based on location, time, another action ...        \\\\\n                \\hline\n        \\end{tabular}\n        \\caption{Continuous stages of an Agbot \\cite{Bechar_2016}} \\label{tab:autonomy} \n    \\end{table}\n\n\n    In a research \\cite{Malavazi_2018} developed an approach for autonomous robot navigation inside crops using LIDAR (Light Detection and Ranging). The research presents a new approach to extract lines from a point cloud with application to agricultural robot autonomous navigation in a GPS denied environment. However  they show that to change row, for instance, is quite difficult with only one LiDAR sensor in front of the robot. Indeed, when the robot is at the end of a row, it does not have any information about what is behind it. \n\n    A new approach in robotics farming has started to gain attraction due to its flexibility. Swarm robotics is a new type of robotics that allows simple individual robots to work together to perform complex tasks. However, swarm robotics research is still confined into the lab, and no application in the field is currently available.\n\n    The associated theoretical foundations for fleets/swarm robotics and applications for agriculture are being researched and developed \\cite{Emmi_2014}. There are many advantages using a swarm of robots; using a group of robots cooperating with each other to achieve a well-defined objective is an emerging and necessary concept to achieve agricultural goals. Artificial swarm intelligence has been inspired by biological studies of behavior of ants, bees, wasps and termites and has been the spark for changing the perspective on how robots were understood, and gives a new trend to their functionality; such as solving problems through large population. \\cite{Anil_2015}. The individual robots can be regarded as agents with simple and single abilities. Some of them have the ability to evolve themselves when dealing with certain problems to make better compatibility and decisions \\cite{Tan_2013}.\n\n    However, for a robotic agricultural application, considerable information must be processed, and a wide number of actuation signals must be controlled, which may present a number of technical drawbacks. Thus, an important limitation is that the number of total sensors, actuators, and computers/controllers... increases according to the number of swarm units, a failure in one robot component causes the entire swarm to malfunction. This influences swarm reliability, which is of extremely important for the application of automated systems to real tasks in agriculture \\cite{Emmi_2013}.\n\n    Mobile Agricultural Robot Swarms (MARS) aims at the development of small and stream-lined mobile agricultural robot units. The concept addresses looming challenges of to optimize plant specific precision farming, leading to reduced input of seeds, fertilizer and pesticides and to increased yields, to reduce the massive soil compaction as well as energy consumption of heavy machinery and to meet the increasing demand for flexible to use, highly automated and simple to operate systems, anticipating challenges arising from climate change as well as shortage of skilled labour.\n\n    Swarm Robotics for Agricultural Applications (SAGA) is using a group of small unmanned aerial vehicles  to monitor a sugar beet field and cooperatively map the presence of harmful weed. They aim to determine when to perform weeding and on which parts of the farm land, by multi-rotor UAVs  enhanced with on-board camera and vision processing, radio communication systems and suitable protocols to support safe swarm operations. They propose a solution that exploits multiple UAVs that can focus on areas of interest while abandoning those areas of the field that do not require closer inspection.\n\n\\section{Conclusions}\nWe stated the narrative over and over: by the year 2050 the global agricultural community will have to nearly double its output to feed 9 billion people. Efficiency and productivity will increase in the coming years as \\textbf{Precision Agriculture} becomes bigger and farms become more connected. But while the growing number of connected devices and sensors in the farm represents a big opportunity for farmers, it also adds complexity. The solution lies in making use of cognitive technologies that help understand, learn, adapt, reason, act, interact, and increase efficiency. Key innovations in new sensors, IoT, cloud computing, bg data, artificial intelligence and robotics will assist farmers with answers and recommendations on specific problems.\n\nAs information becomes critical for good decision-making as part of the in-field support, it must be collected, stored and interpreted in a timely manner. Because of the overhead cost to maintain local computers, because of the computing power needed needed, and because of expertise needed, many farmers will rely on cloud computing and remote servers for data processing anf predictive analytics. Startups that are aiming to capture, integrate and analyze all those data coming off the farm, whether from sensors, drones, machinery, or imagery, stand to significantly improve the decision-making process for farmers. With more and more companies and start-ups coming up with new and innovative agricultural tools and platforms, interoperability is rapidly becoming a point of concern. The various available tools and technologies often do not follow the same technology standards/platforms as a result of which there is a lack of uniformity in the final analysis referred to farmers.\n\nRobots may one day consist of complete autonomous swarms of relatively small, smart, and cheap units with an optimized allocation of all resources which will manage farms, collect data and perform various tasks. Robots will likely make inroads fastest in areas where the labor is backbreaking, and peak harvest times create a short supply of workers. However most robots built to date are for just one specialized tasks. A fully autonomous system, be that a single unit or multiple units where the whole production chain can be monitored, analysed and managed is still not here. Getting farmers thoroughly acquainted with the concept of smart farming its of utmost importance and proven to be very challenging tasks. In addition to the learning curve there is the motivation and uncertainty to new concepts such as robotics, cloud, IoT and so on. Unfortunately though, the benefits do not become apparent from the very beginning and many farmers still view this use of advanced technology in agriculture as risky and uncertain.\n\n\n\n\n\n        \n    \n\n\\bibliography{bibliography}\n\\end{document}\n"
  },
  {
    "path": ".config/proji/templates/tex/bibliography.bib",
    "content": "@ARTICLE{Sa_2016,\n  AUTHOR = {Sa, Inkyu and Ge, Zongyuan and Dayoub, Feras and Upcroft, Ben and Perez, Tristan and McCool, Chris},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fs16081222},\n  DATE = {2016-08},\n  DOI = {10.3390/s16081222},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {8},\n  PAGES = {1222},\n  TITLE = {DeepFruits: A Fruit Detection System Using Deep Neural Networks},\n  VOLUME = {16},\n}\n\n@ARTICLE{Maryam_2017,\n  AUTHOR = {Rahnemoonfar, Maryam and Sheppard, Clay},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fs17040905},\n  DATE = {2017-04},\n  DOI = {10.3390/s17040905},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {4},\n  PAGES = {905},\n  TITLE = {Deep Count: Fruit Counting Based on Deep Simulated Learning},\n  VOLUME = {17},\n}\n\n@ARTICLE{Grinblat_2016,\n  AUTHOR = {Grinblat, Guillermo L. and Uzal, Lucas C. and Larese, M{\\'{o}}nica G. and Granitto, Pablo M.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2016.07.003},\n  DATE = {2016-09},\n  DOI = {10.1016/j.compag.2016.07.003},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {418--424},\n  TITLE = {Deep learning for plant identification using vein morphological patterns},\n  VOLUME = {127},\n}\n\n@REPORT{EmploymentEU,\n  AUTHOR = {Fr\\\"{o}der, Christoph},\n  INSTITUTION = {Institut der deutschen Wirtschaft K\\\"{o}ln, Geopa-Copa},\n  DATE = {2014-11},\n  TITLE = {Employment in European Agriculture: Labour Costs, Flexibility and Contractual Aspects},\n}\n\n@ARTICLE{Colbert16,\n  AUTHOR = {Colbert, Amy and Yee, Nick and George, Gerard},\n  URL = {https://journals.aom.org/doi/abs/10.5465/amj.2016.4003},\n  DATE = {2016},\n  DOI = {10.5465/amj.2016.4003},\n  EPRINT = {https://journals.aom.org/doi/pdf/10.5465/amj.2016.4003},\n  JOURNALTITLE = {Academy of Management Journal},\n  NUMBER = {3},\n  PAGES = {731--739},\n  TITLE = {The Digital Workforce and the Workplace of the Future},\n  VOLUME = {59},\n}\n\n@ARTICLE{Aubert_2012,\n  AUTHOR = {Aubert, Benoit A. and Schroeder, Andreas and Grimaudo, Jonathan},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.dss.2012.07.002},\n  DATE = {2012-12},\n  DOI = {10.1016/j.dss.2012.07.002},\n  JOURNALTITLE = {Decision Support Systems},\n  NUMBER = {1},\n  PAGES = {510--520},\n  TITLE = {IT as enabler of sustainable farming: An empirical analysis of farmers adoption decision of precision agriculture technology},\n  VOLUME = {54},\n}\n\n@ARTICLE{Pierpaoli_2013,\n  AUTHOR = {Pierpaoli, Emanuele and Carli, Giacomo and Pignatti, Erika and Canavari, Maurizio},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.protcy.2013.11.010},\n  DATE = {2013},\n  DOI = {10.1016/j.protcy.2013.11.010},\n  JOURNALTITLE = {Procedia Technology},\n  PAGES = {61--69},\n  TITLE = {Drivers of Precision Agriculture Technologies Adoption: A Literature Review},\n  VOLUME = {8},\n}\n\n@ARTICLE{Zhang2002,\n  AUTHOR = {Zhang, Naiqian and Wang, Maohua and Wang, Ning},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016/s0168-1699(02)00096-0},\n  DATE = {2002-11},\n  DOI = {10.1016/s0168-1699(02)00096-0},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {2-3},\n  PAGES = {113--132},\n  TITLE = {Precision agriculture{---}a worldwide overview},\n  VOLUME = {36},\n}\n\n@ARTICLE{Lamb_2008,\n  AUTHOR = {Lamb, David W. and Frazier, Paul and Adams, Peter},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2007.04.009},\n  DATE = {2008-04},\n  DOI = {10.1016/j.compag.2007.04.009},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {1},\n  PAGES = {4--9},\n  TITLE = {Improving pathways to adoption: Putting the right Ps in precision agriculture},\n  VOLUME = {61},\n}\n\n@ARTICLE{Mulla_2013,\n  AUTHOR = {Mulla, David J.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2012.08.009},\n  DATE = {2013-04},\n  DOI = {10.1016/j.biosystemseng.2012.08.009},\n  JOURNALTITLE = {Biosystems Engineering},\n  NUMBER = {4},\n  PAGES = {358--371},\n  TITLE = {Twenty five years of remote sensing in precision agriculture: Key advances and remaining knowledge gaps},\n  VOLUME = {114},\n}\n\n@ARTICLE{Hameed_2013,\n  AUTHOR = {Hameed, I. A.},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs10846-013-9834-6},\n  DATE = {2013-05},\n  DOI = {10.1007/s10846-013-9834-6},\n  JOURNALTITLE = {Journal of Intelligent {\\&} Robotic Systems},\n  NUMBER = {3-4},\n  PAGES = {965--983},\n  TITLE = {Intelligent Coverage Path Planning for Agricultural Robots and Autonomous Machines on Three-Dimensional Terrain},\n  VOLUME = {74},\n}\n\n@ARTICLE{Yaghoubi13,\n  AUTHOR = {Yaghoubi, S and Akbarzadeh, N.A. and Bazargani, S.S. and Bamizan, M and Asl, M.I.},\n  BOOKTITLE = {International Journal of Mechanical and Mechatronics Engineering},\n  DATE = {2013-01},\n  PAGES = {1--6},\n  TITLE = {Autonomous robots for agricultural tasks and farm assignment and future trends in agro robots},\n  VOLUME = {13},\n}\n\n@BOOK{Precision2007,\n  EDITOR = {Stafford, J.V.},\n  PUBLISHER = {Wageningen Academic Publishers},\n  URL = {https://doi.org/10.3920%2F978-90-8686-603-8},\n  DATE = {2007-05},\n  DOI = {10.3920/978-90-8686-603-8},\n  TITLE = {Precision agriculture `07},\n}\n\n@ARTICLE{Bechar_2003,\n  AUTHOR = {Bechar, Avital and Edan, Yael},\n  PUBLISHER = {Emerald},\n  URL = {https://doi.org/10.1108%2F01439910310492194},\n  DATE = {2003-10},\n  DOI = {10.1108/01439910310492194},\n  JOURNALTITLE = {Industrial Robot: An International Journal},\n  NUMBER = {5},\n  PAGES = {432--436},\n  TITLE = {Human-robot collaboration for improved target recognition of agricultural robots},\n  VOLUME = {30},\n}\n\n@ARTICLE{Bechar_2016,\n  AUTHOR = {Bechar, Avital and Vigneault, Cl{\\'{e}}ment},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2016.06.014},\n  DATE = {2016-09},\n  DOI = {10.1016/j.biosystemseng.2016.06.014},\n  JOURNALTITLE = {Biosystems Engineering},\n  PAGES = {94--111},\n  TITLE = {Agricultural robots for field operations: Concepts and components},\n  VOLUME = {149},\n}\n\n@ARTICLE{Fuglie_2007,\n  AUTHOR = {Fuglie, Keith and MacDonald, James M. and Ball, V. Eldon},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.2139%2Fssrn.1084980},\n  DATE = {2007},\n  DOI = {10.2139/ssrn.1084980},\n  JOURNALTITLE = {{SSRN} Electronic Journal},\n  TITLE = {Productivity Growth in U.S. Agriculture},\n}\n\n@ARTICLE{Tao_2017,\n  AUTHOR = {Tao, Yongting and Zhou, Jun},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2017.09.019},\n  DATE = {2017-11},\n  DOI = {10.1016/j.compag.2017.09.019},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {388--396},\n  TITLE = {Automatic apple recognition based on the fusion of color and 3D feature for robotic fruit picking},\n  VOLUME = {142},\n}\n\n@ARTICLE{Barnea_2016,\n  AUTHOR = {Barnea, Ehud and Mairon, Rotem and Ben-Shahar, Ohad},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2016.01.013},\n  DATE = {2016-06},\n  DOI = {10.1016/j.biosystemseng.2016.01.013},\n  JOURNALTITLE = {Biosystems Engineering},\n  PAGES = {57--70},\n  TITLE = {Colour-agnostic shape-based 3D fruit detection for crop harvesting robots},\n  VOLUME = {146},\n}\n\n@INCOLLECTION{Edan_2009,\n  AUTHOR = {Edan, Yael and Han, Shufeng and Kondo, Naoshi},\n  PUBLISHER = {Springer Berlin Heidelberg},\n  URL = {https://doi.org/10.1007%2F978-3-540-78831-7_63},\n  BOOKTITLE = {Springer Handbook of Automation},\n  DATE = {2009},\n  DOI = {10.1007/978-3-540-78831-7_63},\n  PAGES = {1095--1128},\n  TITLE = {Automation in Agriculture},\n}\n\n@ARTICLE{Kapach_2012,\n  AUTHOR = {Kapach, Keren and Barnea, Ehud and Mairon, Rotem and Edan, Yael and Shahar, Ohad Ben},\n  PUBLISHER = {Inderscience Publishers},\n  URL = {https://doi.org/10.1504%2Fijcvr.2012.046419},\n  DATE = {2012},\n  DOI = {10.1504/ijcvr.2012.046419},\n  JOURNALTITLE = {International Journal of Computational Vision and Robotics},\n  NUMBER = {1/2},\n  PAGES = {4},\n  TITLE = {Computer vision for fruit harvesting robots - State of the art and challenges ahead},\n  VOLUME = {3},\n}\n\n@ARTICLE{Bac_2014,\n  AUTHOR = {Bac, C. Wouter and van Henten, Eldert J. and Hemming, Jochen and Edan, Yael},\n  PUBLISHER = {Wiley-Blackwell},\n  URL = {https://doi.org/10.1002%2Frob.21525},\n  DATE = {2014-07},\n  DOI = {10.1002/rob.21525},\n  JOURNALTITLE = {Journal of Field Robotics},\n  NUMBER = {6},\n  PAGES = {888--911},\n  TITLE = {Harvesting Robots for High-value Crops: State-of-the-art Review and Challenges Ahead},\n  VOLUME = {31},\n}\n\n@ARTICLE{Jimnez1999,\n  AUTHOR = {Jim{\\'{e}}nez, A.R. and Jain, A.K. and Ceres, R. and Pons, J.L.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016/s0031-3203(98)00170-8},\n  DATE = {1999-10},\n  DOI = {10.1016/s0031-3203(98)00170-8},\n  JOURNALTITLE = {Pattern Recognition},\n  NUMBER = {10},\n  PAGES = {1719--1736},\n  TITLE = {Automatic fruit recognition: a survey and new results using Range/Attenuation images},\n  VOLUME = {32},\n}\n\n@ARTICLE{Song_2014,\n  AUTHOR = {Song, Y. and Glasbey, C.A. and Horgan, G.W. and Polder, G. and Dieleman, J.A. and van der Heijden, G.W.A.M.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2013.12.008},\n  DATE = {2014-02},\n  DOI = {10.1016/j.biosystemseng.2013.12.008},\n  JOURNALTITLE = {Biosystems Engineering},\n  PAGES = {203--215},\n  TITLE = {Automatic fruit recognition and counting from multiple images},\n  VOLUME = {118},\n}\n\n@ARTICLE{LeCun2015,\n  AUTHOR = {LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1038/nature14539},\n  DATE = {2015-05},\n  DOI = {10.1038/nature14539},\n  JOURNALTITLE = {Nature},\n  NUMBER = {7553},\n  PAGES = {436--444},\n  TITLE = {Deep learning},\n  VOLUME = {521},\n}\n\n@INPROCEEDINGS{Krizhevsky_2012,\n  AUTHOR = {Krizhevsky, Alex and Sutskever, Ilya and Hinton, Geoffrey E.},\n  LOCATION = {Lake Tahoe, Nevada},\n  PUBLISHER = {Curran Associates Inc.},\n  URL = {http://dl.acm.org/citation.cfm?id=2999134.2999257},\n  BOOKTITLE = {Proceedings of the 25th International Conference on Neural Information Processing Systems - Volume 1},\n  DATE = {2012},\n  PAGES = {1097--1105},\n  SERIES = {NIPS'12},\n  TITLE = {ImageNet Classification with Deep Convolutional Neural Networks},\n}\n\n@ARTICLE{Redmon_15,\n  AUTHOR = {Redmon, Joseph and Divvala, Santosh Kumar and Girshick, Ross B. and Farhadi, Ali},\n  URL = {http://arxiv.org/abs/1506.02640},\n  DATE = {2015},\n  EPRINT = {1506.02640},\n  EPRINTTYPE = {arXiv},\n  JOURNALTITLE = {CoRR},\n  TITLE = {You Only Look Once: Unified, Real-Time Object Detection},\n  VOLUME = {abs/1506.02640},\n}\n\n@ARTICLE{LiuAESR15,\n  AUTHOR = {Liu, Wei and Anguelov, Dragomir and Erhan, Dumitru and Szegedy, Christian and Reed, Scott E. and Fu, Cheng{-}Yang and Berg, Alexander C.},\n  URL = {http://arxiv.org/abs/1512.02325},\n  DATE = {2015},\n  EPRINT = {1512.02325},\n  EPRINTTYPE = {arXiv},\n  JOURNALTITLE = {CoRR},\n  TITLE = {{SSD:} Single Shot MultiBox Detector},\n  VOLUME = {abs/1512.02325},\n}\n\n@ARTICLE{HeZRS15,\n  AUTHOR = {He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},\n  URL = {http://arxiv.org/abs/1512.03385},\n  DATE = {2015},\n  EPRINT = {1512.03385},\n  EPRINTTYPE = {arXiv},\n  JOURNALTITLE = {CoRR},\n  TITLE = {Deep Residual Learning for Image Recognition},\n  VOLUME = {abs/1512.03385},\n}\n\n@ARTICLE{Linker_015,\n  AUTHOR = {Linker, Raphael and Kelman, Eliyahu},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2015.04.005},\n  DATE = {2015-06},\n  DOI = {10.1016/j.compag.2015.04.005},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {154--162},\n  TITLE = {Apple detection in nighttime tree images using the geometry of light patches around highlights},\n  VOLUME = {114},\n}\n\n@ARTICLE{Payne_2014,\n  AUTHOR = {Payne, A. and Walsh, K. and Subedi, P. and Jarvis, D.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2013.11.011},\n  DATE = {2014-01},\n  DOI = {10.1016/j.compag.2013.11.011},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {160--167},\n  TITLE = {Estimating mango crop yield using image analysis using fruit at `stone hardening' stage and night time imaging},\n  VOLUME = {100},\n}\n\n@ARTICLE{Kelman_2014,\n  AUTHOR = {Kelman, Eliyahu (Efim) and Linker, Raphael},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2013.11.007},\n  DATE = {2014-02},\n  DOI = {10.1016/j.biosystemseng.2013.11.007},\n  JOURNALTITLE = {Biosystems Engineering},\n  PAGES = {174--185},\n  TITLE = {Vision-based localisation of mature apples in tree images using convexity},\n  VOLUME = {118},\n}\n\n@ARTICLE{Stajnko2004,\n  AUTHOR = {Stajnko, D. and Lakota, M. and Ho{\\v{c}}evar, M.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016/s0168-1699(03)00086-3},\n  DATE = {2004-01},\n  DOI = {10.1016/s0168-1699(03)00086-3},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {1},\n  PAGES = {31--42},\n  TITLE = {Estimation of number and diameter of apple fruits in an orchard during the growing season by thermal imaging},\n  VOLUME = {42},\n}\n\n@ARTICLE{Si_2015,\n  AUTHOR = {Si, Yongsheng and Liu, Gang and Feng, Juan},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2015.01.010},\n  DATE = {2015-03},\n  DOI = {10.1016/j.compag.2015.01.010},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {68--74},\n  TITLE = {Location of apples in trees using stereoscopic vision},\n  VOLUME = {112},\n}\n\n@ARTICLE{Huanyu_2008,\n  AUTHOR = {Jiang, Huanyu and Peng, Yongshi and Ying, Yibin},\n  DATE = {2008-01},\n  JOURNALTITLE = {American Society of Agricultural and Biological Engineers Annual International Meeting 2008, ASABE 2008},\n  TITLE = {Measurement of 3-D Locations of Ripe Tomato by Binocular Stereo Vision for Tomato Harvesting},\n  VOLUME = {11},\n}\n\n@INPROCEEDINGS{Nguyen2014AppleDA,\n  AUTHOR = {Nguyen, Tien Thanh and Vandevoorde, Koenraad and Kayacan, Erdal and Baerdemaeker, Josse De and Saeys, Wouter and Mechatronics, MeBioS},\n  DATE = {2014},\n  TITLE = {Apple detection algorithm for robotic harvesting using a RGB-D camera},\n}\n\n@ARTICLE{GeirhosJSRBW17,\n  AUTHOR = {Geirhos, Robert and Janssen, David H. J. and Sch{\\\"{u}}tt, Heiko H. and Rauber, Jonas and Bethge, Matthias and Wichmann, Felix A.},\n  URL = {http://arxiv.org/abs/1706.06969},\n  DATE = {2017},\n  EPRINT = {1706.06969},\n  EPRINTTYPE = {arXiv},\n  JOURNALTITLE = {CoRR},\n  TITLE = {Comparing deep neural networks against humans: object recognition when the signal gets weaker},\n  VOLUME = {abs/1706.06969},\n}\n\n@ARTICLE{1602.07261,\n  AUTHOR = {Szegedy, Christian and Ioffe, Sergey and Vanhoucke, Vincent and Alemi, Alex},\n  DATE = {2016},\n  EPRINT = {arXiv:1602.07261},\n  TITLE = {Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning},\n}\n\n@INPROCEEDINGS{Bargoti_2017,\n  AUTHOR = {Bargoti, Suchet and Underwood, James},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Ficra.2017.7989417},\n  BOOKTITLE = {2017 {IEEE} International Conference on Robotics and Automation ({ICRA})},\n  DATE = {2017-05},\n  DOI = {10.1109/icra.2017.7989417},\n  TITLE = {Deep fruit detection in orchards},\n}\n\n@MISC{Aykin_2017,\n  AUTHOR = {Can Aykin, Simon P\\\"{o}cheim},\n  HOWPUBLISHED = {\\url{https://wiki.tum.de/display/lfdv/Layers+of+a+Convolutional+Neural+Network}},\n  NOTE = {Accessed: 2017-02-03},\n  TITLE = {Layers of a Convolutional Neural Network},\n}\n\n@INPROCEEDINGS{LeCun_2010,\n  AUTHOR = {LeCun, Yann and Kavukcuoglu, Koray and Farabet, Clement},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fiscas.2010.5537907},\n  BOOKTITLE = {Proceedings of 2010 {IEEE} International Symposium on Circuits and Systems},\n  DATE = {2010-05},\n  DOI = {10.1109/iscas.2010.5537907},\n  TITLE = {Convolutional networks and applications in vision},\n}\n\n@ARTICLE{Chen_2018,\n  AUTHOR = {Chen, Zhong and Zhang, Ting and Ouyang, Chao},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Frs10010139},\n  DATE = {2018-01},\n  DOI = {10.3390/rs10010139},\n  JOURNALTITLE = {Remote Sensing},\n  NUMBER = {1},\n  PAGES = {139},\n  TITLE = {End-to-End Airplane Detection Using Transfer Learning in Remote Sensing Images},\n  VOLUME = {10},\n}\n\n@ARTICLE{Lee_1990,\n  AUTHOR = {Lee, Yim-Kul and Rhodes, William T.},\n  PUBLISHER = {The Optical Society},\n  URL = {https://doi.org/10.1364%2Fol.15.001383},\n  DATE = {1990-12},\n  DOI = {10.1364/ol.15.001383},\n  JOURNALTITLE = {Optics Letters},\n  NUMBER = {23},\n  PAGES = {1383},\n  TITLE = {Nonlinear image processing by a rotating kernel transformation},\n  VOLUME = {15},\n}\n\n@ARTICLE{Zude_Sasse_2016,\n  AUTHOR = {Zude-Sasse, M. and Fountas, S. and Gemtos, T.A. and Abu-Khalaf, N. and and},\n  PUBLISHER = {International Society for Horticultural Science ({ISHS})},\n  URL = {https://doi.org/10.17660%2Fejhs.2016%2F81.2.2},\n  DATE = {2016-04},\n  DOI = {10.17660/ejhs.2016/81.2.2},\n  JOURNALTITLE = {European Journal of Horticultural Science},\n  NUMBER = {2},\n  PAGES = {78--90},\n  TITLE = {Applications of precision agriculture in horticultural crops},\n  VOLUME = {81},\n}\n\n@INPROCEEDINGS{de_Lima_2017,\n  AUTHOR = {de Lima, Yuri Oliveira and de Souza, Jano Moreira},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fcscwd.2017.8066668},\n  BOOKTITLE = {2017 {IEEE} 21st International Conference on Computer Supported Cooperative Work in Design ({CSCWD})},\n  DATE = {2017-04},\n  DOI = {10.1109/cscwd.2017.8066668},\n  TITLE = {The future of work: Insights for {CSCW}},\n}\n\n@ARTICLE{Harrison_2015,\n  AUTHOR = {Harrison, Peter and Wolyniak, Joseph},\n  PUBLISHER = {Oxford University Press ({OUP})},\n  URL = {https://doi.org/10.1093%2Fnotesj%2Fgjv080},\n  DATE = {2015-07},\n  DOI = {10.1093/notesj/gjv080},\n  JOURNALTITLE = {Notes and Queries},\n  NUMBER = {3},\n  PAGES = {465--467},\n  TITLE = {The History of `Transhumanism'},\n  VOLUME = {62},\n}\n\n@INPROCEEDINGS{Basava_2018,\n  AUTHOR = {Basava, Sharana and Prasannakumar, K R},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Ficisc.2018.8398985},\n  BOOKTITLE = {2018 2nd International Conference on Inventive Systems and Control ({ICISC})},\n  DATE = {2018-01},\n  DOI = {10.1109/icisc.2018.8398985},\n  TITLE = {Big data in agribusiness: Climate gauging for savvy farming},\n}\n\n@ARTICLE{Cola_o_2018,\n  AUTHOR = {Cola{\\c{c}}o, Andr{\\'{e}} F. and Molin, Jos{\\'{e}} P. and Rosell-Polo, Joan R. and Escol{\\`{a}}, Alexandre},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1038%2Fs41438-018-0043-0},\n  DATE = {2018-07},\n  DOI = {10.1038/s41438-018-0043-0},\n  JOURNALTITLE = {Horticulture Research},\n  NUMBER = {1},\n  TITLE = {Application of light detection and ranging and ultrasonic sensors to high-throughput phenotyping and precision horticulture: current status and challenges},\n  VOLUME = {5},\n}\n\n@ARTICLE{Huang_2018,\n  AUTHOR = {Huang, Yanbo and CHEN, Zhong-xin and YU, Tao and HUANG, Xiang-zhi and GU, Xing-fa},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fs2095-3119%2817%2961859-8},\n  DATE = {2018-09},\n  DOI = {10.1016/s2095-3119(17)61859-8},\n  JOURNALTITLE = {Journal of Integrative Agriculture},\n  NUMBER = {9},\n  PAGES = {1915--1931},\n  TITLE = {Agricultural remote sensing big data: Management and applications},\n  VOLUME = {17},\n}\n\n@ARTICLE{Manfrini2009,\n  AUTHOR = {Manfrini, Luigi and Taylor, James and Grappadelli, Luca},\n  BOOKTITLE = {European Journal of Horticultural Science},\n  DATE = {2009-04},\n  PAGES = {54--60},\n  TITLE = {Spatial Analysis of the Effect of Fruit Thinning on Apple Crop Load},\n  VOLUME = {74},\n}\n\n@ARTICLE{Beckett_1992,\n  AUTHOR = {Beckett, Philip},\n  PUBLISHER = {{SAGE} Publications},\n  URL = {https://doi.org/10.1177%2F030913339201600119},\n  DATE = {1992-03},\n  DOI = {10.1177/030913339201600119},\n  JOURNALTITLE = {Progress in Physical Geography},\n  NUMBER = {1},\n  PAGES = {120--122},\n  TITLE = {Statistical methods in soil and land resource survey},\n  VOLUME = {16},\n}\n\n@BOOK{brase2006precision,\n  AUTHOR = {Brase, T.A.},\n  PUBLISHER = {Thomson/Delmar Learning},\n  URL = {https://books.google.co.za/books?id=hEBkQgAACAAJ},\n  DATE = {2006},\n  ISBN = {9781401881054},\n  TITLE = {Precision Agriculture},\n}\n\n@ARTICLE{Slot_2018,\n  AUTHOR = {Slot, M. M. and van de Wiel, C. C. M. and Kleter, G. A. and Visser, R. G. F. and Kok, E. J.},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs11248-018-0076-z},\n  DATE = {2018-05},\n  DOI = {10.1007/s11248-018-0076-z},\n  JOURNALTITLE = {Transgenic Research},\n  NUMBER = {4},\n  PAGES = {321--329},\n  TITLE = {The assessment of field trials in {GMO} research around the world and their possible integration in field trials for variety registration},\n  VOLUME = {27},\n}\n\n@ARTICLE{Hedley_2014,\n  AUTHOR = {Hedley, Carolyn},\n  PUBLISHER = {Wiley},\n  URL = {https://doi.org/10.1002%2Fjsfa.6734},\n  DATE = {2014-06},\n  DOI = {10.1002/jsfa.6734},\n  JOURNALTITLE = {Journal of the Science of Food and Agriculture},\n  NUMBER = {1},\n  PAGES = {12--19},\n  TITLE = {The role of precision agriculture for improved nutrient management on farms},\n  VOLUME = {95},\n}\n\n@ARTICLE{Stafford_2000,\n  AUTHOR = {Stafford, John V.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1006%2Fjaer.2000.0577},\n  DATE = {2000-07},\n  DOI = {10.1006/jaer.2000.0577},\n  JOURNALTITLE = {Journal of Agricultural Engineering Research},\n  NUMBER = {3},\n  PAGES = {267--275},\n  TITLE = {Implementing Precision Agriculture in the 21st Century},\n  VOLUME = {76},\n}\n\n@INPROCEEDINGS{Pickett20041,\n  AUTHOR = {Pickett, T.D.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-8344269315\\&partnerID=40\\&md5=94805c8c1ed72ae6ed9a5c75916a7c20},\n  DATE = {2004},\n  JOURNALTITLE = {Proceedings of the Annual Meeting - Institute of Navigation},\n  NOTE = {cited By 1},\n  PAGES = {1--10},\n  TITLE = {Future navigation needs in agriculture},\n}\n\n@ARTICLE{Chen_2012,\n  AUTHOR = {Chen, Shu Fa and Feng, Cheng Long and Zhang, Shi Ping},\n  PUBLISHER = {Trans Tech Publications},\n  URL = {https://doi.org/10.4028%2Fwww.scientific.net%2Famm.249-250.610},\n  DATE = {2012-12},\n  DOI = {10.4028/www.scientific.net/amm.249-250.610},\n  JOURNALTITLE = {Applied Mechanics and Materials},\n  PAGES = {610--615},\n  TITLE = {Design and Research on Variable-Rate Fertilization Computer Control System},\n  VOLUME = {249-250},\n}\n\n@INPROCEEDINGS{Johnson1984114,\n  AUTHOR = {Johnson, Clarence E. and Shafer, Robert L. and Young, Steven C.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-0021314830&partnerID=40&md5=0e613713dda74029969a14f84564b502},\n  DATE = {1984},\n  JOURNALTITLE = {ASAE Publication},\n  PAGES = {114--119},\n  TITLE = {CONTROLLING AGRICULTURAL MACHINERY INTELLIGENTLY.},\n}\n\n@ARTICLE{Stafford_2000_book,\n  AUTHOR = {Stafford, John V.},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1023%2Fa%3A1011894914362},\n  DATE = {2000},\n  DOI = {10.1023/a:1011894914362},\n  JOURNALTITLE = {Precision Agriculture},\n  NUMBER = {3},\n  PAGES = {229--229},\n  VOLUME = {2},\n}\n\n@INPROCEEDINGS{Pierce_1994,\n  AUTHOR = {Pierce, F. J. and Robert, P. C. and Mangold, G.},\n  PUBLISHER = {Iowa State University, Digital Press},\n  URL = {https://doi.org/10.312742Ficm-180809-454},\n  BOOKTITLE = {Proceedings of the Integrated Crop Management Conference},\n  DATE = {1994},\n  DOI = {10.31274/icm-180809-454},\n  TITLE = {Site Specific Management: The Pros, the Cons, and the Realities},\n}\n\n@ARTICLE{Bastiaanssen_2000,\n  AUTHOR = {Bastiaanssen, Wim G.M and Molden, David J and Makin, Ian W},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fs0378-3774%2800%2900080-9},\n  DATE = {2000-12},\n  DOI = {10.1016/s0378-3774(00)00080-9},\n  JOURNALTITLE = {Agricultural Water Management},\n  NUMBER = {2},\n  PAGES = {137--155},\n  TITLE = {Remote sensing for irrigated agriculture: examples from research and possible applications},\n  VOLUME = {46},\n}\n\n@ARTICLE{Ojha_2015,\n  AUTHOR = {Ojha, Tamoghna and Misra, Sudip and Raghuwanshi, Narendra Singh},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2015.08.011},\n  DATE = {2015-10},\n  DOI = {10.1016/j.compag.2015.08.011},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {66--84},\n  TITLE = {Wireless sensor networks for agriculture: The state-of-the-art in practice and future challenges},\n  VOLUME = {118},\n}\n\n@INPROCEEDINGS{Mekala_2017,\n  AUTHOR = {Mekala, Mahammad Shareef and Viswanathan, P.},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Ficmdcs.2017.8211551},\n  BOOKTITLE = {2017 International conference on Microelectronic Devices, Circuits and Systems ({ICMDCS})},\n  DATE = {2017-08},\n  DOI = {10.1109/icmdcs.2017.8211551},\n  TITLE = {A Survey: Smart agriculture {IoT} with cloud computing},\n}\n\n@ARTICLE{Elijah_2018,\n  AUTHOR = {Elijah, Olakunle and Rahman, Tharek Abdul and Orikumhi, Igbafe and Leow, Chee Yen and Hindia, MHD Nour},\n  PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})},\n  URL = {https://doi.org/10.1109%2Fjiot.2018.2844296},\n  DATE = {2018},\n  DOI = {10.1109/jiot.2018.2844296},\n  JOURNALTITLE = {{IEEE} Internet of Things Journal},\n  PAGES = {1--1},\n  TITLE = {An Overview of Internet of Things ({IoT}) and Data Analytics in Agriculture: Benefits and Challenges},\n}\n\n@ARTICLE{Gill_2017,\n  AUTHOR = {Gill, Sukhpal Singh and Chana, Inderveer and Buyya, Rajkumar},\n  PUBLISHER = {{IGI} Global},\n  URL = {https://doi.org/10.4018%2Fjoeuc.2017100101},\n  DATE = {2017-10},\n  DOI = {10.4018/joeuc.2017100101},\n  JOURNALTITLE = {Journal of Organizational and End User Computing},\n  NUMBER = {4},\n  PAGES = {1--23},\n  TITLE = {{IoT} Based Agriculture as a Cloud and Big Data Service},\n  VOLUME = {29},\n}\n\n@ARTICLE{Sto_es_2016,\n  AUTHOR = {Sto{\\v{c}}es, Michal and Van{\\v{e}}k, Ji{\\v{r}}{\\'{\\i{}}} and Masner, Jan and Pavl{\\'{\\i{}}}k, J.},\n  PUBLISHER = {Czech University of Life Sciences Prague},\n  URL = {https://doi.org/10.7160%2Faol.2016.080108},\n  DATE = {2016-03},\n  DOI = {10.7160/aol.2016.080108},\n  JOURNALTITLE = {Agris on-line Papers in Economics and Informatics},\n  NUMBER = {1},\n  PAGES = {83--88},\n  TITLE = {Internet of Things ({IoT}) in Agriculture - Selected Aspects},\n  VOLUME = {{VIII}},\n}\n\n@ARTICLE{Wolfert_2017,\n  AUTHOR = {Wolfert, Sjaak and Ge, Lan and Verdouw, Cor and Bogaardt, Marc-Jeroen},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.agsy.2017.01.023},\n  DATE = {2017-05},\n  DOI = {10.1016/j.agsy.2017.01.023},\n  JOURNALTITLE = {Agricultural Systems},\n  PAGES = {69--80},\n  TITLE = {Big Data in Smart Farming {--} A review},\n  VOLUME = {153},\n}\n\n@ARTICLE{Pivoto_2018,\n  AUTHOR = {Pivoto, Dieisson and Waquil, Paulo Dabdab and Talamini, Edson and Finocchio, Caroline Pauletto Spanhol and Corte, Vitor Francisco Dalla and de Vargas Mores, Giana},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.inpa.2017.12.002},\n  DATE = {2018-03},\n  DOI = {10.1016/j.inpa.2017.12.002},\n  JOURNALTITLE = {Information Processing in Agriculture},\n  NUMBER = {1},\n  PAGES = {21--32},\n  TITLE = {Scientific development of smart farming technologies and their application in Brazil},\n  VOLUME = {5},\n}\n\n@ARTICLE{O_Grady_2017,\n  AUTHOR = {OGrady, Michael J. and OHare, Gregory M.P.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.inpa.2017.05.001},\n  DATE = {2017-09},\n  DOI = {10.1016/j.inpa.2017.05.001},\n  JOURNALTITLE = {Information Processing in Agriculture},\n  NUMBER = {3},\n  PAGES = {179--187},\n  TITLE = {Modelling the smart farm},\n  VOLUME = {4},\n}\n\n@ARTICLE{Kaloxylos_2012,\n  AUTHOR = {Kaloxylos, Alexandros and Eigenmann, Robert and Teye, Frederick and Politopoulou, Zoi and Wolfert, Sjaak and Shrank, Claudia and Dillinger, Markus and Lampropoulou, Ioanna and Antoniou, Eleni and Pesonen, Liisa and Nicole, Huether and Thomas, Floerchinger and Alonistioti, Nancy and Kormentzas, George},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2012.09.002},\n  DATE = {2012-11},\n  DOI = {10.1016/j.compag.2012.09.002},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {130--144},\n  TITLE = {Farm management systems and the Future Internet era},\n  VOLUME = {89},\n}\n\n@INPROCEEDINGS{Brown20121427,\n  AUTHOR = {Brown, J.H.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84878042468&partnerID=40&md5=53d51432d1e740d68e9143bb3fb6b4ad},\n  DATE = {2012},\n  JOURNALTITLE = {AUVSI Unmanned Systems North America Conference 2012},\n  NOTE = {cited By 0},\n  PAGES = {1427--1439},\n  TITLE = {Robotics in agriculture},\n  VOLUME = {2},\n}\n\n@ARTICLE{Slaughter_2008,\n  AUTHOR = {Slaughter, D.C. and Giles, D.K. and Downey, D.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2007.05.008},\n  DATE = {2008-04},\n  DOI = {10.1016/j.compag.2007.05.008},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {1},\n  PAGES = {63--78},\n  TITLE = {Autonomous robotic weed control systems: A review},\n  VOLUME = {61},\n}\n\n@ARTICLE{Patr_cio_2018,\n  AUTHOR = {Patricio, Diego Inacio and Rieder, Rafael},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2018.08.001},\n  DATE = {2018-10},\n  DOI = {10.1016/j.compag.2018.08.001},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {69--81},\n  TITLE = {Computer vision and artificial intelligence in precision agriculture for grain crops: A systematic review},\n  VOLUME = {153},\n}\n\n@ARTICLE{Ensmenger_2011,\n  AUTHOR = {Ensmenger, Nathan},\n  PUBLISHER = {University of Chicago Press},\n  URL = {https://doi.org/10.1086%2F663065},\n  DATE = {2011-09},\n  DOI = {10.1086/663065},\n  JOURNALTITLE = {Isis},\n  NUMBER = {3},\n  PAGES = {588--589},\n  TITLE = {The Quest for Artificial Intelligence: A History of Ideas and Achievements},\n  VOLUME = {102},\n}\n\n@ARTICLE{Alessio_2018,\n  AUTHOR = {Scalisi, Alessio and Bresilla, Kushtrim and Grilo, Filipa Sim\\~{o}es},\n  PUBLISHER = {SOI},\n  URL = {http://doi.org/10.26353/j.itahort/2017.2.3950},\n  DATE = {2018},\n  DOI = {10.26353/j.itahort/2017.2.3950},\n  ISSN = {1127-3496},\n  JOURNALTITLE = {Italus Hortus},\n  NUMBER = {24},\n  PAGES = {39--50},\n  TITLE = {The Quest for Artificial Intelligence: A History of Ideas and Achievements},\n}\n\n@ARTICLE{Vougioukas_2013,\n  AUTHOR = {Vougioukas, S. and Anastassiu, H.T. and Regen, C. and Zude, M.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2012.08.011},\n  DATE = {2013-04},\n  DOI = {10.1016/j.biosystemseng.2012.08.011},\n  JOURNALTITLE = {Biosystems Engineering},\n  NUMBER = {4},\n  PAGES = {454--465},\n  TITLE = {Influence of foliage on radio path losses ({PLs}) for wireless sensor network ({WSN}) planning in orchards},\n  VOLUME = {114},\n}\n\n@ARTICLE{Mirhosseini_2017,\n  AUTHOR = {Mirhosseini, Mina and Barani, Fatemeh and Nezamabadi-pour, Hossein},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.suscom.2017.08.006},\n  DATE = {2017-12},\n  DOI = {10.1016/j.suscom.2017.08.006},\n  JOURNALTITLE = {Sustainable Computing: Informatics and Systems},\n  PAGES = {38--47},\n  TITLE = {Design optimization of wireless sensor networks in precision agriculture using improved {BQIGSA}},\n  VOLUME = {16},\n}\n\n@ARTICLE{Park_2015,\n  AUTHOR = {Park, Junyoung and Lee, Sunggu and Yoo, Sungjoo},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.jpdc.2015.05.004},\n  DATE = {2015-09},\n  DOI = {10.1016/j.jpdc.2015.05.004},\n  JOURNALTITLE = {Journal of Parallel and Distributed Computing},\n  PAGES = {70--82},\n  TITLE = {Time slot assignment for convergecast in wireless sensor networks},\n  VOLUME = {83},\n}\n\n@ARTICLE{Carrabs_2015,\n  AUTHOR = {Carrabs, Francesco and Cerulli, Raffaele and DAmbrosio, Ciriaco and Gentili, Monica and Raiconi, Andrea},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.cor.2015.02.013},\n  DATE = {2015-08},\n  DOI = {10.1016/j.cor.2015.02.013},\n  JOURNALTITLE = {Computers {\\&} Operations Research},\n  PAGES = {121--137},\n  TITLE = {Maximizing lifetime in wireless sensor networks with multiple sensor families},\n  VOLUME = {60},\n}\n\n@ARTICLE{Ferentinos_2007,\n  AUTHOR = {Ferentinos, Konstantinos P. and Tsiligiridis, Theodore A.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.comnet.2006.06.013},\n  DATE = {2007-03},\n  DOI = {10.1016/j.comnet.2006.06.013},\n  JOURNALTITLE = {Computer Networks},\n  NUMBER = {4},\n  PAGES = {1031--1051},\n  TITLE = {Adaptive design optimization of wireless sensor networks using genetic algorithms},\n  VOLUME = {51},\n}\n\n@ARTICLE{Aqeel_ur_Rehman_2014,\n  AUTHOR = {Aqeel-ur-Rehman and Abbasi, Abu Zafar and Islam, Noman and Shaikh, Zubair Ahmed},\n  PUBLISHER = {Elsevier},\n  URL = {https://doi.org/10.1016\\%2Fj.csi.2011.03.004},\n  DATE = {2014-02},\n  DOI = {10.1016/j.csi.2011.03.004},\n  JOURNALTITLE = {Computer Standards \\& Interfaces},\n  NUMBER = {2},\n  PAGES = {263--270},\n  TITLE = {A review of wireless sensors and networks applications in agriculture},\n  VOLUME = {36},\n}\n\n@ARTICLE{Ruiz_Garcia_2009,\n  AUTHOR = {Ruiz-Garcia, Luis and Lunadei, Loredana and Barreiro, Pilar and Robla, Ignacio},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390\\%2Fs90604728},\n  DATE = {2009-06},\n  DOI = {10.3390/s90604728},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {6},\n  PAGES = {4728--4750},\n  TITLE = {A Review of Wireless Sensor Technologies and Applications in Agriculture and Food Industry: State of the Art and Current Trends},\n  VOLUME = {9},\n}\n\n@ARTICLE{akyildiz2002wireless,\n  AUTHOR = {Akyildiz, Ian F and Su, Weilian and Sankarasubramaniam, Yogesh and Cayirci, Erdal},\n  PUBLISHER = {Elsevier},\n  DATE = {2002},\n  JOURNALTITLE = {Computer networks},\n  NUMBER = {4},\n  PAGES = {393--422},\n  TITLE = {Wireless sensor networks: a survey},\n  VOLUME = {38},\n}\n\n@ARTICLE{Nikolidakis_2015,\n  AUTHOR = {Nikolidakis, Stefanos A. and Kandris, Dionisis and Vergados, Dimitrios D. and Douligeris, Christos},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2015.02.004},\n  DATE = {2015-04},\n  DOI = {10.1016/j.compag.2015.02.004},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {154--163},\n  TITLE = {Energy efficient automated control of irrigation in agriculture by using wireless sensor networks},\n  VOLUME = {113},\n}\n\n@ARTICLE{dobkin2005radio,\n  AUTHOR = {Dobkin, Daniel M and Wandinger, Titus},\n  DATE = {2005},\n  JOURNALTITLE = {High Frequency Electronics},\n  NUMBER = {8},\n  PAGES = {32--46},\n  TITLE = {A radio-oriented introduction to RFID-protocols, tags and applications},\n  VOLUME = {4},\n}\n\n@ARTICLE{li2006radio,\n  AUTHOR = {Li, Suhong and Visich, John K and Khumawala, Basheer M and Zhang, Chen},\n  PUBLISHER = {Emerald Group Publishing Limited},\n  DATE = {2006},\n  JOURNALTITLE = {Sensor Review},\n  NUMBER = {3},\n  PAGES = {193--202},\n  TITLE = {Radio frequency identification technology: applications, technical challenges and strategies},\n  VOLUME = {26},\n}\n\n@ARTICLE{Choudhury_2015,\n  AUTHOR = {Choudhury, Sushabhan and Kuchhal, Piyush and Singh, Rajesh and Anita},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.procs.2015.04.195},\n  DATE = {2015},\n  DOI = {10.1016/j.procs.2015.04.195},\n  JOURNALTITLE = {Procedia Computer Science},\n  PAGES = {367--372},\n  TITLE = {{ZigBee} and Bluetooth Network based Sensory Data Acquisition System},\n  VOLUME = {48},\n}\n\n@ARTICLE{Vuran_2018,\n  AUTHOR = {Vuran, Mehmet C. and Salam, Abdul and Wong, Rigoberto and Irmak, Suat},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.adhoc.2018.07.017},\n  DATE = {2018-12},\n  DOI = {10.1016/j.adhoc.2018.07.017},\n  JOURNALTITLE = {Ad Hoc Networks},\n  PAGES = {160--173},\n  TITLE = {Internet of underground things in precision agriculture: Architecture and technology aspects},\n  VOLUME = {81},\n}\n\n@INCOLLECTION{Wang_2013,\n  AUTHOR = {Wang, N. and Li, Z.},\n  PUBLISHER = {Elsevier},\n  URL = {https://doi.org/10.1533%2F9780857095763.1.171},\n  BOOKTITLE = {Robotics and Automation in the Food Industry},\n  DATE = {2013},\n  DOI = {10.1533/9780857095763.1.171},\n  PAGES = {171--199},\n  TITLE = {Wireless sensor networks ({WSNs}) in the agricultural and food industries},\n}\n\n@ARTICLE{Tzounis_2017,\n  AUTHOR = {Tzounis, Antonis and Katsoulas, Nikolaos and Bartzanas, Thomas and Kittas, Constantinos},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2017.09.007},\n  DATE = {2017-12},\n  DOI = {10.1016/j.biosystemseng.2017.09.007},\n  JOURNALTITLE = {Biosystems Engineering},\n  PAGES = {31--48},\n  TITLE = {Internet of Things in agriculture, recent advances and future challenges},\n  VOLUME = {164},\n}\n\n@INPROCEEDINGS{Chougule_2016,\n  AUTHOR = {Chougule, Archana and Jha, Vijay Kumar and Mukhopadhyay, Debajyoti},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fiota.2016.7562688},\n  BOOKTITLE = {2016 International Conference on Internet of Things and Applications ({IOTA})},\n  DATE = {2016-01},\n  DOI = {10.1109/iota.2016.7562688},\n  TITLE = {Using {IoT} for integrated pest management},\n}\n\n@ARTICLE{Liqiang_2011,\n  AUTHOR = {Liqiang, Zhao and Shouyi, Yin and Leibo, Liu and Zhen, Zhang and Shaojun., Wei},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.proenv.2011.12.088},\n  DATE = {2011},\n  DOI = {10.1016/j.proenv.2011.12.088},\n  JOURNALTITLE = {Procedia Environmental Sciences},\n  PAGES = {558--565},\n  TITLE = {A Crop Monitoring System Based on Wireless Sensor Network},\n  VOLUME = {11},\n}\n\n@INPROCEEDINGS{Jzau_Sheng_Lin_2008,\n  AUTHOR = {Lin, Jzau-Sheng and Liu, Chun-Zu},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Ficct.2008.4716133},\n  BOOKTITLE = {2008 11th {IEEE} International Conference on Communication Technology},\n  DATE = {2008-11},\n  DOI = {10.1109/icct.2008.4716133},\n  TITLE = {A monitoring system based on wireless sensor network and an {SoC} platform in precision agriculture},\n}\n\n@INPROCEEDINGS{Hu_2010,\n  AUTHOR = {Hu, Jing and Shen, Lianfeng and Yang, Yang and Lv, Ruichao},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fwcins.2010.5544151},\n  BOOKTITLE = {2010 {IEEE} International Conference on Wireless Communications, Networking and Information Security},\n  DATE = {2010-06},\n  DOI = {10.1109/wcins.2010.5544151},\n  TITLE = {Design and implementation of wireless sensor and actor network for precision agriculture},\n}\n\n@ARTICLE{Akyildiz_2004,\n  AUTHOR = {Akyildiz, Ian F. and Kasimoglu, Ismail H.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.adhoc.2004.04.003},\n  DATE = {2004-10},\n  DOI = {10.1016/j.adhoc.2004.04.003},\n  JOURNALTITLE = {Ad Hoc Networks},\n  NUMBER = {4},\n  PAGES = {351--367},\n  TITLE = {Wireless sensor and actor networks: research challenges},\n  VOLUME = {2},\n}\n\n@INPROCEEDINGS{Mainwaring200288,\n  AUTHOR = {Mainwaring, A. and Polastre, J. and Szewczyk, R. and Culler, D. and Anderson, J.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-0036986465&partnerID=40&md5=88de11e091b77d63b4e012d6047d50cc},\n  DATE = {2002},\n  JOURNALTITLE = {Proceedings of the ACM International Workshop on Wireless Sensor Networks and Applications},\n  PAGES = {88--97},\n  TITLE = {Wireless sensor networks for habitat monitoring},\n}\n\n@INPROCEEDINGS{Lv_2009,\n  AUTHOR = {Lv, Ruichao and Shen, Lianfeng and Hu, Jing},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Ficise.2009.460},\n  BOOKTITLE = {2009 First International Conference on Information Science and Engineering},\n  DATE = {2009},\n  DOI = {10.1109/icise.2009.460},\n  TITLE = {Design and Implementation of a Wireless Sensor Network Gateway Supporting Multi-Mode Wide Area Access and Video Monitoring},\n}\n\n@INPROCEEDINGS{Chougule201617,\n  AUTHOR = {Chougule, A. and Jha, V.K. and Mukhopadhyay, D.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84988965437&doi=10.1109%2fIOTA.2016.7562688&partnerID=40&md5=67026a72a94dbac834e2c9f98c35d25a},\n  DATE = {2016},\n  DOI = {10.1109/IOTA.2016.7562688},\n  JOURNALTITLE = {2016 International Conference on Internet of Things and Applications, IOTA 2016},\n  PAGES = {17--22},\n  TITLE = {Using IoT for integrated pest management},\n}\n\n@INPROCEEDINGS{Dinh_Le_2015,\n  AUTHOR = {Le, Tuan Dinh and Tan, Dat Ho},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fnics.2015.7302210},\n  BOOKTITLE = {2015 2nd National Foundation for Science and Technology Development Conference on Information and Computer Science ({NICS})},\n  DATE = {2015-09},\n  DOI = {10.1109/nics.2015.7302210},\n  TITLE = {Design and deploy a wireless sensor network for precision agriculture},\n}\n\n@ARTICLE{Chen_2018a,\n  AUTHOR = {Chen, Xianyi and Wang, Sun{'}an and Zhang, Binquan and Luo, Liang},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2018.02.009},\n  DATE = {2018-04},\n  DOI = {10.1016/j.compag.2018.02.009},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {91--108},\n  TITLE = {Multi-feature fusion tree trunk detection and orchard mobile robot localization using camera/ultrasonic sensors},\n  VOLUME = {147},\n}\n\n@ARTICLE{Sun_2009,\n  AUTHOR = {Sun, Y. and Li, L. and Lammers, P. Schulze and Zeng, Q. and Lin, J. and Schumann, H.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2009.06.009},\n  DATE = {2009-11},\n  DOI = {10.1016/j.compag.2009.06.009},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {1},\n  PAGES = {19--23},\n  TITLE = {A solar-powered wireless cell for dynamically monitoring soil water content},\n  VOLUME = {69},\n}\n\n@ARTICLE{Yunseop_Kim_2008,\n  AUTHOR = {Kim, Yunseop and Evans, R.G. and Iversen, W.M.},\n  PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})},\n  URL = {https://doi.org/10.1109%2Ftim.2008.917198},\n  DATE = {2008-07},\n  DOI = {10.1109/tim.2008.917198},\n  JOURNALTITLE = {{IEEE} Transactions on Instrumentation and Measurement},\n  NUMBER = {7},\n  PAGES = {1379--1387},\n  TITLE = {Remote Sensing and Control of an Irrigation System Using a Distributed Wireless Sensor Network},\n  VOLUME = {57},\n}\n\n@ARTICLE{Dong_2013,\n  AUTHOR = {Dong, Xin and Vuran, Mehmet C. and Irmak, Suat},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.adhoc.2012.06.012},\n  DATE = {2013-09},\n  DOI = {10.1016/j.adhoc.2012.06.012},\n  JOURNALTITLE = {Ad Hoc Networks},\n  NUMBER = {7},\n  PAGES = {1975--1987},\n  TITLE = {Autonomous precision agriculture through integration of wireless underground sensor networks with center pivot irrigation systems},\n  VOLUME = {11},\n}\n\n@ARTICLE{Akyildiz_2006,\n  AUTHOR = {Akyildiz, Ian F. and Stuntebeck, Erich P.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.adhoc.2006.04.003},\n  DATE = {2006-11},\n  DOI = {10.1016/j.adhoc.2006.04.003},\n  JOURNALTITLE = {Ad Hoc Networks},\n  NUMBER = {6},\n  PAGES = {669--686},\n  TITLE = {Wireless underground sensor networks: Research challenges},\n  VOLUME = {4},\n}\n\n@ARTICLE{Al_Turjman_2018,\n  AUTHOR = {Al-Turjman, Fadi},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2018.09.018},\n  DATE = {2018-09},\n  DOI = {10.1016/j.compag.2018.09.018},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  TITLE = {The road towards plant phenotyping via {WSNs}: An overview},\n}\n\n@ARTICLE{Torres_2017,\n  AUTHOR = {Torres, Roque and Ferrara, Giuseppe and Soto, Fulgencio and Lopez, Juan A. and Sanchez, Francisco and Mazzeo, Andrea and Perez-Pastor, Alejandro and Domingo, Rafael},\n  PUBLISHER = {{EDP} Sciences},\n  URL = {https://doi.org/10.1051%2Fctv%2F20173201072},\n  DATE = {2017},\n  DOI = {10.1051/ctv/20173201072},\n  JOURNALTITLE = {Ciencia e Tecnica Vitivinicola},\n  NUMBER = {1},\n  PAGES = {72--81},\n  TITLE = {Effects of soil and climate in a table grape vineyard with cover crops. Irrigation management using sensors networks},\n  VOLUME = {32},\n}\n\n@ARTICLE{Gautam_2017,\n  AUTHOR = {Gautam, Rahul and Singh, Agnisha and Karthik, K. and Pandey, S. and Scrimgeour, F. and Tiwari, M.K.},\n  PUBLISHER = {Elsevier},\n  URL = {https://doi.org/10.1016%2Fj.cie.2016.09.007},\n  DATE = {2017-01},\n  DOI = {10.1016/j.cie.2016.09.007},\n  JOURNALTITLE = {Computers \\& Industrial Engineering},\n  PAGES = {46--58},\n  TITLE = {Traceability using RFID and its formulation for a kiwifruit supply chain},\n  VOLUME = {103},\n}\n\n@ARTICLE{Ghaani_2016,\n  AUTHOR = {Ghaani, Masoud and Cozzolino, Carlo A. and Castelli, Giulia and Farris, Stefano},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.tifs.2016.02.008},\n  DATE = {2016-05},\n  DOI = {10.1016/j.tifs.2016.02.008},\n  JOURNALTITLE = {Trends in Food Science \\& Technology},\n  PAGES = {1--11},\n  TITLE = {An overview of the intelligent packaging technologies in the food sector},\n  VOLUME = {51},\n}\n\n@ARTICLE{Piramuthu_2013,\n  AUTHOR = {Piramuthu, Selwyn and Farahani, Poorya and Grunow, Martin},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.ejor.2012.09.024},\n  DATE = {2013-03},\n  DOI = {10.1016/j.ejor.2012.09.024},\n  JOURNALTITLE = {European Journal of Operational Research},\n  NUMBER = {2},\n  PAGES = {253--262},\n  TITLE = {{RFID}-generated traceability for contaminated product recall in perishable food supply networks},\n  VOLUME = {225},\n}\n\n@ARTICLE{Guo2014146,\n  AUTHOR = {Guo, X. and Zheng, L.H. and Li, M.Z. and Zhang, Y.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84899651938&doi=10.3965%2fj.ijabe.20140702.018&partnerID=40&md5=e745230e785b969b600a39e3c57f8611},\n  DATE = {2014},\n  DOI = {10.3965/j.ijabe.20140702.018},\n  JOURNALTITLE = {International Journal of Agricultural and Biological Engineering},\n  NUMBER = {2},\n  PAGES = {146--153},\n  TITLE = {Intelligent data acquisition and cloud services for apple orchard},\n  VOLUME = {7},\n}\n\n@INPROCEEDINGS{Wu_2013,\n  AUTHOR = {Wu, Chenxing and Zhang, Haihui and Zhang, Jiaming and Tian, Weipeng and Cheng, Hao},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Ficdma.2013.42},\n  BOOKTITLE = {2013 Fourth International Conference on Digital Manufacturing {\\&} Automation},\n  DATE = {2013-06},\n  DOI = {10.1109/icdma.2013.42},\n  TITLE = {An Orchard Management Systemwith {RFID}-Based Apple Tree Identify Detection},\n}\n\n@INPROCEEDINGS{Ampatzidis20123726,\n  AUTHOR = {Ampatzidis, Y. and Adhikari, B. and Scharf, P. and Whiting, M. and Zhang, Q.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-84871765509&partnerID=40&md5=3df562f44fe09aa56a93e2705380e32c},\n  DATE = {2012},\n  JOURNALTITLE = {American Society of Agricultural and Biological Engineers Annual International Meeting 2012, ASABE 2012},\n  PAGES = {3726--3737},\n  TITLE = {Preliminary testing of a system for evaluating picker efficiency in tree fruit},\n  VOLUME = {5},\n}\n\n@ARTICLE{Ampatzidis_2009,\n  AUTHOR = {Ampatzidis, Y.G. and Vougioukas, S.G.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2009.01.008},\n  DATE = {2009-05},\n  DOI = {10.1016/j.compag.2009.01.008},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {2},\n  PAGES = {166--172},\n  TITLE = {Field experiments for evaluating the incorporation of {RFID} and barcode registration and digital weighing technologies in manual fruit harvesting},\n  VOLUME = {66},\n}\n\n@ARTICLE{Luvisi_2011,\n  AUTHOR = {Luvisi, Andrea and Panattoni, Alessandra and Bandinelli, Roberto and Rinaldelli, Enrico and Pagano, Mario and Triolo, Enrico},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2011.03.001},\n  DATE = {2011-06},\n  DOI = {10.1016/j.biosystemseng.2011.03.001},\n  JOURNALTITLE = {Biosystems Engineering},\n  NUMBER = {2},\n  PAGES = {167--173},\n  TITLE = {Implanting {RFIDs} into Prunus to facilitate electronic identification in support of sanitary certification},\n  VOLUME = {109},\n}\n\n@ARTICLE{Sicari_2015,\n  AUTHOR = {Sicari, S. and Rizzardi, A. and Grieco, L.A. and Coen-Porisini, A.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.comnet.2014.11.008},\n  DATE = {2015-01},\n  DOI = {10.1016/j.comnet.2014.11.008},\n  JOURNALTITLE = {Computer Networks},\n  PAGES = {146--164},\n  TITLE = {Security, privacy and trust in Internet of Things: The road ahead},\n  VOLUME = {76},\n}\n\n@ARTICLE{McBratney_2005,\n  AUTHOR = {McBratney, Alex and Whelan, Brett and Ancev, Tihomir and Bouma, Johan},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs11119-005-0681-8},\n  DATE = {2005-02},\n  DOI = {10.1007/s11119-005-0681-8},\n  JOURNALTITLE = {Precision Agriculture},\n  NUMBER = {1},\n  PAGES = {7--23},\n  TITLE = {Future Directions of Precision Agriculture},\n  VOLUME = {6},\n}\n\n@ARTICLE{Fountas_2006,\n  AUTHOR = {Fountas, S. and Wulfsohn, D. and Blackmore, B.S. and Jacobsen, H.L. and Pedersen, S.M.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.agsy.2004.12.003},\n  DATE = {2006-02},\n  DOI = {10.1016/j.agsy.2004.12.003},\n  JOURNALTITLE = {Agricultural Systems},\n  NUMBER = {2},\n  PAGES = {192--210},\n  TITLE = {A model of decision-making and information flows for information-intensive agriculture},\n  VOLUME = {87},\n}\n\n@ARTICLE{_zk_se_2015,\n  AUTHOR = {Ozkose, Hakan and Ari, Emin S. and Gencer, Cevriye},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.sbspro.2015.06.147},\n  DATE = {2015-07},\n  DOI = {10.1016/j.sbspro.2015.06.147},\n  JOURNALTITLE = {Procedia - Social and Behavioral Sciences},\n  PAGES = {1042--1050},\n  TITLE = {Yesterday, Today and Tomorrow of Big Data},\n  VOLUME = {195},\n}\n\n@ARTICLE{Philip_Chen_2014,\n  AUTHOR = {Chen, C.L. Philip and Zhang, Chun-Yang},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.ins.2014.01.015},\n  DATE = {2014-08},\n  DOI = {10.1016/j.ins.2014.01.015},\n  JOURNALTITLE = {Information Sciences},\n  PAGES = {314--347},\n  TITLE = {Data-intensive applications, challenges, techniques and technologies: A survey on Big Data},\n  VOLUME = {275},\n}\n\n@ARTICLE{Li_2018,\n  AUTHOR = {Li, Xuewei and Li, Xueyan},\n  PUBLISHER = {Institute of Electrical and Electronics Engineers (IEEE)},\n  URL = {https://doi.org/10.1109%2Fmcse.2018.042781329},\n  DATE = {2018-07},\n  DOI = {10.1109/mcse.2018.042781329},\n  JOURNALTITLE = {Computing in Science \\& Engineering},\n  NUMBER = {4},\n  PAGES = {75--88},\n  TITLE = {Big Data and Its Key Technology in the Future},\n  VOLUME = {20},\n}\n\n@ARTICLE{Kamilaris_2017,\n  AUTHOR = {Kamilaris, Andreas and Kartakoullis, Andreas and Prenafeta-Boldu, Francesc X.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2017.09.037},\n  DATE = {2017-12},\n  DOI = {10.1016/j.compag.2017.09.037},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {23--37},\n  TITLE = {A review on the practice of big data analysis in agriculture},\n  VOLUME = {143},\n}\n\n@ARTICLE{Tan_2016,\n  AUTHOR = {Tan, Li},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.ifacol.2016.10.061},\n  DATE = {2016},\n  DOI = {10.1016/j.ifacol.2016.10.061},\n  JOURNALTITLE = {{IFAC}-{PapersOnLine}},\n  NUMBER = {16},\n  PAGES = {330--335},\n  TITLE = {Cloud-based Decision Support and Automation for Precision Agriculture in Orchards},\n  VOLUME = {49},\n}\n\n@INCOLLECTION{Sahu_2018,\n  AUTHOR = {Sahu, Shriya and Chawla, Meenu and Khare, Nilay},\n  PUBLISHER = {Springer Singapore},\n  URL = {https://doi.org/10.1007%2F978-981-13-1498-8_15},\n  BOOKTITLE = {Advances in Intelligent Systems and Computing},\n  DATE = {2018-09},\n  DOI = {10.1007/978-981-13-1498-8_15},\n  PAGES = {165--177},\n  TITLE = {Viable Crop Prediction Scenario in BigData Using a Novel Approach},\n}\n\n@INPROCEEDINGS{Bendre_2015,\n  AUTHOR = {Bendre, M. R. and Thool, R. C. and Thool, V. R.},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fngct.2015.7375220},\n  BOOKTITLE = {2015 1st International Conference on Next Generation Computing Technologies NGCT},\n  DATE = {2015-09},\n  DOI = {10.1109/ngct.2015.7375220},\n  TITLE = {Big data in precision agriculture: Weather forecasting for future farming},\n}\n\n@INPROCEEDINGS{Zhang_2017,\n  AUTHOR = {Zhang, Peng and Zhang, Qian and Liu, Fusheng and Li, Junqing and Cao, Ning and Song, Changqing},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fcse-euc.2017.258},\n  BOOKTITLE = {22017 {IEEE} International Conference on Computational Science and Engineering ({CSE}) and {IEEE} International Conference on Embedded and Ubiquitous Computing ({EUC})},\n  DATE = {2017-07},\n  DOI = {10.1109/cse-euc.2017.258},\n  TITLE = {The Construction of the Integration of Water and Fertilizer Smart Water Saving Irrigation System Based on Big Data},\n}\n\n@INPROCEEDINGS{Barbouchi_2016,\n  AUTHOR = {Barbouchi, Meriem and Chokmani, Karem and Abdelfattah, Riadh and Aissa, Nadhira Ben},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fatsip.2016.7523143},\n  BOOKTITLE = {2016 2nd International Conference on Advanced Technologies for Signal and Image Processing ({ATSIP})},\n  DATE = {2016-03},\n  DOI = {10.1109/atsip.2016.7523143},\n  TITLE = {Yield estimation of the winter wheat using Radarsat 2 polarimetric {SAR} reponse},\n}\n\n@ARTICLE{Badr_2016,\n  AUTHOR = {Badr, G. and Klein, L. J. and Freitag, M. and Albrecht, C. M. and Marianno, F. J. and Lu, S. and Shao, X. and Hinds, N. and Hoogenboom, G. and Hamann, H. F.},\n  PUBLISHER = {IBM},\n  URL = {https://doi.org/10.1147%2Fjrd.2016.2591698},\n  DATE = {2016-09},\n  DOI = {10.1147/jrd.2016.2591698},\n  JOURNALTITLE = {{IBM} Journal of Research and Development},\n  NUMBER = {5/6},\n  PAGES = {5:1--5:11},\n  TITLE = {Toward large-scale crop production forecasts for global food security},\n  VOLUME = {60},\n}\n\n@INPROCEEDINGS{Suwantong_2016,\n  AUTHOR = {Suwantong, Rata and Srestasathiern, Panu and Lawawirojwong, Siam and Rakwatin, Preesan},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Facc.2016.7525476},\n  BOOKTITLE = {2016 American Control Conference ({ACC})},\n  DATE = {2016-07},\n  DOI = {10.1109/acc.2016.7525476},\n  TITLE = {Moving Horizon Estimator with Pre-Estimation for crop start date estimation in tropical area},\n}\n\n@ARTICLE{Wang_2018,\n  AUTHOR = {Wang, Tao and Chen, Jian and Fan, Yangyang and Qiu, Zhengjun and He, Yong},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2018.07.017},\n  DATE = {2018-09},\n  DOI = {10.1016/j.compag.2018.07.017},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {302--313},\n  TITLE = {{SeeFruits}: Design and evaluation of a cloud-based ultra-portable {NIRS} system for sweet cherry quality detection},\n  VOLUME = {152},\n}\n\n@ARTICLE{Xia_2018,\n  AUTHOR = {Xia, JiAn and Yang, YuWang and Cao, HongXin and Han, Chen and Ge, DaoKuo and Zhang, WenYu},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2017.12.012},\n  DATE = {2018-02},\n  DOI = {10.1016/j.compag.2017.12.012},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {27--34},\n  TITLE = {Visible-near infrared spectrum-based classification of apple chilling injury on cloud computing platform},\n  VOLUME = {145},\n}\n\n@ARTICLE{Jayaraman_2016,\n  AUTHOR = {Jayaraman, Prem and Yavari, Ali and Georgakopoulos, Dimitrios and Morshed, Ahsan and Zaslavsky, Arkady},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fs16111884},\n  DATE = {2016-11},\n  DOI = {10.3390/s16111884},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {11},\n  PAGES = {1884},\n  TITLE = {Internet of Things Platform for Smart Farming: Experiences and Lessons Learnt},\n  VOLUME = {16},\n}\n\n@ARTICLE{Nguyen_2017,\n  AUTHOR = {Nguyen, Van-Quyet and Nguyen, Sinh Ngoc and Kim, Kyungbaek},\n  PUBLISHER = {Digital Contents Society},\n  URL = {https://doi.org/10.9728%2Fdcs.2017.18.1.149},\n  DATE = {2017-02},\n  DOI = {10.9728/dcs.2017.18.1.149},\n  JOURNALTITLE = {Journal of Digital Contents Society},\n  NUMBER = {1},\n  PAGES = {149--158},\n  TITLE = {Design of a Platform for Collecting and Analyzing Agricultural Big Data},\n  VOLUME = {18},\n}\n\n@ARTICLE{Woodard_2016,\n  AUTHOR = {Woodard, Joshua},\n  PUBLISHER = {Emerald},\n  URL = {https://doi.org/10.1108%2Fafr-03-2016-0018},\n  DATE = {2016-05},\n  DOI = {10.1108/afr-03-2016-0018},\n  JOURNALTITLE = {Agricultural Finance Review},\n  NUMBER = {1},\n  PAGES = {15--26},\n  TITLE = {Big data and Ag-Analytics},\n  VOLUME = {76},\n}\n\n@ARTICLE{Zhang_2013,\n  AUTHOR = {Zhang, Fang and Fu, Li Si},\n  PUBLISHER = {Trans Tech Publications},\n  URL = {https://doi.org/10.4028%2Fwww.scientific.net%2Famm.462-463.72},\n  DATE = {2013-11},\n  DOI = {10.4028/www.scientific.net/amm.462-463.72},\n  JOURNALTITLE = {Applied Mechanics and Materials},\n  PAGES = {72--76},\n  TITLE = {Application of Computer Vision Technology in Agricultural Field},\n  VOLUME = {462-463},\n}\n\n@ARTICLE{Basu_2018,\n  AUTHOR = {Basu, Subhajit and Omotubora, Adekemi and Beeson, Matt and Fox, Charles},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs00146-018-0846-4},\n  DATE = {2018-05},\n  DOI = {10.1007/s00146-018-0846-4},\n  JOURNALTITLE = {{AI} {\\&} {SOCIETY}},\n  TITLE = {Legal framework for small autonomous agricultural robots},\n}\n\n@ARTICLE{Emmi_2014,\n  AUTHOR = {Emmi, Luis and Gonzalez-de-Soto, Mariano and Pajares, Gonzalo and Gonzalez-de-Santos, Pablo},\n  PUBLISHER = {Hindawi Limited},\n  URL = {https://doi.org/10.1155%2F2014%2F404059},\n  DATE = {2014},\n  DOI = {10.1155/2014/404059},\n  JOURNALTITLE = {The Scientific World Journal},\n  PAGES = {1--21},\n  TITLE = {New Trends in Robotics for Agriculture: Integration and Assessment of a Real Fleet of Robots},\n  VOLUME = {2014},\n}\n\n@ARTICLE{Reid_2000,\n  AUTHOR = {Reid, John F. and Zhang, Qin and Noguchi, Noboru and Dickson, Monte},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fs0168-1699%2899%2900061-7},\n  DATE = {2000-01},\n  DOI = {10.1016/s0168-1699(99)00061-7},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {1-2},\n  PAGES = {155--167},\n  TITLE = {Agricultural automatic guidance research in North America},\n  VOLUME = {25},\n}\n\n@ARTICLE{Noguchi_2001,\n  AUTHOR = {Noguchi, Noboru and Zhang, Qin and Han, Shufeng and Reid, John F.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fs1474-6670%2817%2933136-1},\n  DATE = {2001-09},\n  DOI = {10.1016/s1474-6670(17)33136-1},\n  JOURNALTITLE = {{IFAC} Proceedings Volumes},\n  NUMBER = {19},\n  PAGES = {197--202},\n  TITLE = {Autonomous Agricultural Tractor with an Intelligent Navigation System},\n  VOLUME = {34},\n}\n\n@ARTICLE{Eizicovits_2014,\n  AUTHOR = {Eizicovits, Danny and Berman, Sigal},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.robot.2014.03.011},\n  DATE = {2014-08},\n  DOI = {10.1016/j.robot.2014.03.011},\n  JOURNALTITLE = {Robotics and Autonomous Systems},\n  NUMBER = {8},\n  PAGES = {1208--1219},\n  TITLE = {Efficient sensory-grounded grasp pose quality mapping for gripper design and online grasp planning},\n  VOLUME = {62},\n}\n\n@ARTICLE{Bechar_2017,\n  AUTHOR = {Bechar, Avital and Vigneault, Cl{\\'{e}}ment},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.biosystemseng.2016.11.004},\n  DATE = {2017-01},\n  DOI = {10.1016/j.biosystemseng.2016.11.004},\n  JOURNALTITLE = {Biosystems Engineering},\n  PAGES = {110--128},\n  TITLE = {Agricultural robots for field operations. Part 2: Operations and systems},\n  VOLUME = {153},\n}\n\n@ARTICLE{Xia_2015,\n  AUTHOR = {Xia, Chunlei and Wang, Longtan and Chung, Bu-Keun and Lee, Jang-Myung},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fs150820463},\n  DATE = {2015-08},\n  DOI = {10.3390/s150820463},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {8},\n  PAGES = {20463--20479},\n  TITLE = {In Situ 3D Segmentation of Individual Plant Leaves Using a {RGB}-D Camera for Agricultural Automation},\n  VOLUME = {15},\n}\n\n@ARTICLE{Bechar_2009,\n  AUTHOR = {Bechar, A. and Meyer, J. and Edan, Y.},\n  PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})},\n  URL = {https://doi.org/10.1109%2Ftsmcc.2009.2020174},\n  DATE = {2009-11},\n  DOI = {10.1109/tsmcc.2009.2020174},\n  JOURNALTITLE = {{IEEE} Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews)},\n  NUMBER = {6},\n  PAGES = {611--620},\n  TITLE = {An Objective Function to Evaluate Performance of Human{--}Robot Collaboration in Target Recognition Tasks},\n  VOLUME = {39},\n}\n\n@ARTICLE{Oren_2011,\n  AUTHOR = {Oren, Y. and Bechar, A. and Edan, Y.},\n  PUBLISHER = {Cambridge University Press ({CUP})},\n  URL = {https://doi.org/10.1017%2Fs0263574711001020},\n  DATE = {2011-10},\n  DOI = {10.1017/s0263574711001020},\n  JOURNALTITLE = {Robotica},\n  NUMBER = {05},\n  PAGES = {813--826},\n  TITLE = {Performance analysis of a human{--}robot collaborative target recognition system},\n  VOLUME = {30},\n}\n\n@INPROCEEDINGS{Anil_2015,\n  AUTHOR = {Anil, H. and k.s. Nikhil and Chaitra, V. and Gurusharan, B.S.},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Fisms.2015.2},\n  BOOKTITLE = {2015 6th International Conference on Intelligent Systems, Modelling and Simulation},\n  DATE = {2015-02},\n  DOI = {10.1109/isms.2015.2},\n  TITLE = {Revolutionizing Farming Using Swarm Robotics},\n}\n\n@ARTICLE{Emmi_2013,\n  AUTHOR = {Emmi, Luis and Paredes-Madrid, Leonel and Ribeiro, Angela and Pajares, Gonzalo and Gonzalez-de-Santos, Pablo},\n  PUBLISHER = {Emerald},\n  URL = {https://doi.org/10.1108%2F01439911311294246},\n  DATE = {2013-01},\n  DOI = {10.1108/01439911311294246},\n  JOURNALTITLE = {Industrial Robot: An International Journal},\n  NUMBER = {1},\n  PAGES = {41--58},\n  TITLE = {Fleets of robots for precision agriculture: a simulation environment},\n  VOLUME = {40},\n}\n\n@ARTICLE{Tan_2013,\n  AUTHOR = {Tan, Ying and Zheng, Zhong-yang},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.dt.2013.03.001},\n  DATE = {2013-03},\n  DOI = {10.1016/j.dt.2013.03.001},\n  JOURNALTITLE = {Defence Technology},\n  NUMBER = {1},\n  PAGES = {18--39},\n  TITLE = {Research Advance in Swarm Robotics},\n  VOLUME = {9},\n}\n\n@ARTICLE{Malavazi_2018,\n  AUTHOR = {Malavazi, Flavio B.P. and Guyonneau, Remy and Fasquel, Jean-Baptiste and Lagrange, Sebastien and Mercier, Franck},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2018.08.034},\n  DATE = {2018-11},\n  DOI = {10.1016/j.compag.2018.08.034},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {71--79},\n  TITLE = {{LiDAR}-only based navigation algorithm for an autonomous agricultural robot},\n  VOLUME = {154},\n}\n\n@ARTICLE{Baluja_2012,\n  AUTHOR = {Baluja, Javier and Diago, Maria P. and Balda, Pedro and Zorer, Roberto and Meggio, Franco and Morales, Fermin and Tardaguila, Javier},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs00271-012-0382-9},\n  DATE = {2012-08},\n  DOI = {10.1007/s00271-012-0382-9},\n  JOURNALTITLE = {Irrigation Science},\n  NUMBER = {6},\n  PAGES = {511--522},\n  TITLE = {Assessment of vineyard water status variability by thermal and multispectral imagery using an unmanned aerial vehicle ({UAV})},\n  VOLUME = {30},\n}\n\n@ARTICLE{Gongal_2016,\n  AUTHOR = {Gongal, A. and Silwal, A. and Amatya, S. and Karkee, M. and Zhang, Q. and Lewis, K.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2015.10.022},\n  DATE = {2016-01},\n  DOI = {10.1016/j.compag.2015.10.022},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {26--35},\n  TITLE = {Apple crop-load estimation with over-the-row machine vision system},\n  VOLUME = {120},\n}\n\n@ARTICLE{Addicott_1955,\n  AUTHOR = {Addicott, F T and Lynch, R S},\n  PUBLISHER = {Annual Reviews},\n  URL = {https://doi.org/10.1146%2Fannurev.pp.06.060155.001235},\n  DATE = {1955-06},\n  DOI = {10.1146/annurev.pp.06.060155.001235},\n  JOURNALTITLE = {Annual Review of Plant Physiology},\n  NUMBER = {1},\n  PAGES = {211--238},\n  TITLE = {Physiology of Abscission},\n  VOLUME = {6},\n}\n\n@ARTICLE{Pla_1995,\n  AUTHOR = {Pla, F. and Juste, F.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2F0168-1699%2895%2900029-1},\n  DATE = {1995-12},\n  DOI = {10.1016/0168-1699(95)00029-1},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {4},\n  PAGES = {301--314},\n  TITLE = {A thinning-based algorithm to characterize fruit stems from profile images},\n  VOLUME = {13},\n}\n\n@INPROCEEDINGS{Gebbers_2013,\n  AUTHOR = {Gebbers, Robin and Pflanz, Michael and Betz, Adolf and Hille, Benjamin and Mattner, Jens and Rachow-Autrum, Thomas and Ozyurtlu, Mustafa and Schischmanow, Adrian and Scheele, Martin and Schrenk, Johannes and Schrenk, Ludwig},\n  LANGUAGE = {English},\n  LOCATION = {Potsdam, Germany},\n  DATE = {2013},\n  ISSN = {16175468},\n  JOURNALTITLE = {Lecture Notes in Informatics (LNI), Proceedings - Series of the Gesellschaft fur Informatik (GI)},\n  PAGES = {95--98},\n  TITLE = {Opti thin - implementation of precision horticulture by tree-specific mechanical thinning},\n  VOLUME = {P-211},\n}\n\n@ARTICLE{westwood1970,\n  AUTHOR = {Westwood, MN and Roberts, AN and others},\n  DATE = {1970},\n  JOURNALTITLE = {Journal of the American Society of Horticultural Science},\n  PAGES = {28--30},\n  TITLE = {The relationship between trunk cross-sectional area and weight of apple trees.},\n  VOLUME = {95},\n}\n\n@ARTICLE{forshey1986,\n  AUTHOR = {Forshey, Chester},\n  PUBLISHER = {New York State Agricultural Experiment Station},\n  DATE = {1986},\n  TITLE = {Chemical fruit thinning of apples},\n}\n\n@ARTICLE{wright2006fruit,\n  AUTHOR = {Wright, AH and Embree, CG and Nichols, DS and Prange, RK and Harrison, PA and Delong, JM},\n  PUBLISHER = {Taylor \\& Francis},\n  DATE = {2006},\n  JOURNALTITLE = {The Journal of Horticultural Science and Biotechnology},\n  NUMBER = {3},\n  PAGES = {397--401},\n  TITLE = {Fruit mass, colour and yield of \\textquoteleft{}{}{}{}Honeycrisp\\textquoteright{}{}{}{}\\x{2122} apples are influenced by manually-adjusted fruit population and tree form},\n  VOLUME = {81},\n}\n\n@ARTICLE{koike2003influence,\n  AUTHOR = {Koike, Hiroo and Tamai, Hiroshi and Ono, Takashi and Shigehara, Izumi},\n  PUBLISHER = {American Pomological Society},\n  DATE = {2003},\n  JOURNALTITLE = {Journal of the American Pomological Society},\n  NUMBER = {4},\n  PAGES = {169},\n  TITLE = {Influence of time of thinning on yield, fruit quality and return flowering of'Fuji'apple},\n  VOLUME = {57},\n}\n\n@ARTICLE{wright2006evaluating,\n  AUTHOR = {Wright, H and Nichols, D and Embree, C},\n  DATE = {2006},\n  JOURNALTITLE = {Acta horticulturae},\n  TITLE = {Evaluating the accountability of trunk size and canopy volume models for determining apple tree production potential across diverse management regimes},\n}\n\n@INCOLLECTION{Cohen_2011,\n  AUTHOR = {Cohen, Oded and Linker, Raphael and Naor, Amos},\n  PUBLISHER = {Springer Berlin Heidelberg},\n  URL = {https://doi.org/10.1007%2F978-3-642-18333-1_77},\n  BOOKTITLE = {Computer and Computing Technologies in Agriculture {IV}},\n  DATE = {2011},\n  DOI = {10.1007/978-3-642-18333-1_77},\n  PAGES = {630--642},\n  TITLE = {Estimation of the Number of Apples in Color Images Recorded in Orchards},\n}\n\n@ARTICLE{volz1988regulation,\n  AUTHOR = {Volz, RK},\n  PUBLISHER = {Taylor \\& Francis},\n  DATE = {1988},\n  JOURNALTITLE = {New Zealand Journal of Experimental Agriculture},\n  NUMBER = {1},\n  PAGES = {47--53},\n  TITLE = {Regulation and estimation of crop load on \\textquoteleft{}{}{}{}Gala\\textquoteright{}{}{}{}apple trees},\n  VOLUME = {16},\n}\n\n@ARTICLE{mizushima2011cost,\n  AUTHOR = {Mizushima, Akira and Lu, Renfu},\n  PUBLISHER = {American Society of Agricultural and Biological Engineers},\n  DATE = {2011},\n  JOURNALTITLE = {Applied engineering in agriculture},\n  NUMBER = {1},\n  PAGES = {33--40},\n  TITLE = {Cost benefits analysis of in-field presorting for the apple industry},\n  VOLUME = {27},\n}\n\n@ARTICLE{Wulfsohn_2011,\n  AUTHOR = {Wulfsohn, Dvoralai and Zamora, Felipe Aravena and T{\\'{e}}llez, Camilla Potin and Lagos, In{\\'{e}}s Zamora and Garc{\\'{\\i{}}}a-Fi{\\~{n}}ana, Marta},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs11119-011-9245-2},\n  DATE = {2011-09},\n  DOI = {10.1007/s11119-011-9245-2},\n  JOURNALTITLE = {Precision Agriculture},\n  NUMBER = {2},\n  PAGES = {256--275},\n  TITLE = {Multilevel systematic sampling to estimate total fruit number for yield forecasts},\n  VOLUME = {13},\n}\n\n@BOOK{peach2008,\n  EDITOR = {Layne, D. and Bassi, D.},\n  PUBLISHER = {CABI},\n  URL = {https://doi.org/10.1079%2F9781845933869.0000},\n  DATE = {2008},\n  DOI = {10.1079/9781845933869.0000},\n  TITLE = {The peach: botany, production and uses},\n}\n\n@ARTICLE{Aggelopoulou_2010,\n  AUTHOR = {Aggelopoulou, A. D. and Bochtis, D. and Fountas, S. and Swain, K. C. and Gemtos, T. A. and Nanos, G. D.},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs11119-010-9187-0},\n  DATE = {2010-08},\n  DOI = {10.1007/s11119-010-9187-0},\n  JOURNALTITLE = {Precision Agriculture},\n  NUMBER = {3},\n  PAGES = {448--456},\n  TITLE = {Yield prediction in apple orchards based on image processing},\n  VOLUME = {12},\n}\n\n@ARTICLE{Linker_2012,\n  AUTHOR = {Linker, Raphael and Cohen, Oded and Naor, Amos},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2011.11.007},\n  DATE = {2012-02},\n  DOI = {10.1016/j.compag.2011.11.007},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {45--57},\n  TITLE = {Determination of the number of green apples in {RGB} images recorded in orchards},\n  VOLUME = {81},\n}\n\n@INPROCEEDINGS{Gang_Pan_2007,\n  AUTHOR = {Pan, Gang and Li, Feng-min and Sun, Guo-jun},\n  PUBLISHER = {IEEE},\n  URL = {https://doi.org/10.1109%2Figarss.2007.4422917},\n  BOOKTITLE = {2007 {IEEE} International Geoscience and Remote Sensing Symposium},\n  DATE = {2007},\n  DOI = {10.1109/igarss.2007.4422917},\n  TITLE = {Digital camera based measurement of crop cover for wheat yield prediction},\n}\n\n@INPROCEEDINGS{Kishore_2008,\n  AUTHOR = {Swain, {Kishore C.} and Zaman, Qamar and Jayasuriya, {Hemantha P W} and Zhang, Fangming},\n  LANGUAGE = {English},\n  PUBLISHER = {American Society of Agricultural and Biological Engineers},\n  BOOKTITLE = {American Society of Agricultural and Biological Engineers Annual International Meeting 2008, ASABE 2008},\n  DATE = {2008},\n  ISBN = {9781605605364},\n  PAGES = {134--144},\n  TITLE = {Estimation of rice yield and protein content using remote sensing images acquired by radio controlled unmanned helicopter},\n  VOLUME = {1},\n}\n\n@ARTICLE{Q_U_Zaman_2008,\n  AUTHOR = {Zaman, Q. U. and Schumann, A. W. and Percival, D. C. and Gordon, R. J.},\n  PUBLISHER = {American Society of Agricultural and Biological Engineers ({ASABE})},\n  URL = {https://doi.org/10.13031%2F2013.25302},\n  DATE = {2008},\n  DOI = {10.13031/2013.25302},\n  JOURNALTITLE = {Transactions of the {ASABE}},\n  NUMBER = {5},\n  PAGES = {1539--1544},\n  TITLE = {Estimation of Wild Blueberry Fruit Yield Using Digital Color Photography},\n  VOLUME = {51},\n}\n\n@ARTICLE{Cheng_2017,\n  AUTHOR = {Cheng, Hong and Damerow, Lutz and Sun, Yurui and Blanke, Michael},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fjimaging3010006},\n  DATE = {2017-01},\n  DOI = {10.3390/jimaging3010006},\n  JOURNALTITLE = {Journal of Imaging},\n  NUMBER = {1},\n  PAGES = {6},\n  TITLE = {Early Yield Prediction Using Image Analysis of Apple Fruit and Tree Canopy Features with Neural Networks},\n  VOLUME = {3},\n}\n\n@ARTICLE{Kim_2008,\n  AUTHOR = {Kim, Yunseop and Reid, John F. and Zhang, Qin},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2007.09.008},\n  DATE = {2008-03},\n  DOI = {10.1016/j.compag.2007.09.008},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {2},\n  PAGES = {279--288},\n  TITLE = {Fuzzy logic control of a multispectral imaging sensor for in-field plant sensing},\n  VOLUME = {60},\n}\n\n@ARTICLE{Mehl_2004,\n  AUTHOR = {Mehl, Patrick M and Chen, Yud-Ren and Kim, Moon S and Chan, Diane E},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fs0260-8774%2803%2900188-2},\n  DATE = {2004-01},\n  DOI = {10.1016/s0260-8774(03)00188-2},\n  JOURNALTITLE = {Journal of Food Engineering},\n  NUMBER = {1},\n  PAGES = {67--81},\n  TITLE = {Development of hyperspectral imaging technique for the detection of apple surface defects and contaminations},\n  VOLUME = {61},\n}\n\n@ARTICLE{Okamoto_2009,\n  AUTHOR = {Okamoto, Hiroshi and Lee, Won Suk},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2009.02.004},\n  DATE = {2009-05},\n  DOI = {10.1016/j.compag.2009.02.004},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {2},\n  PAGES = {201--208},\n  TITLE = {Green citrus detection using hyperspectral imaging},\n  VOLUME = {66},\n}\n\n@ARTICLE{Rodriguez_2004,\n  AUTHOR = {Rodriguez, J. C. and Duchemin, B. and Hadria, R. and Watts, C. and Garatuza, J. and Chehbouni, A. and Khabba, S. and Boulet, G. and Palacios, E. and Lahrouni, A.},\n  PUBLISHER = {{EDP} Sciences},\n  URL = {https://doi.org/10.1051%2Fagro%3A2004037},\n  DATE = {2004-09},\n  DOI = {10.1051/agro:2004037},\n  JOURNALTITLE = {Agronomie},\n  NUMBER = {6-7},\n  PAGES = {295--304},\n  TITLE = {Wheat yield estimation using remote sensing and the {STICS} model in the semiarid Yaqui valley, Mexico},\n  VOLUME = {24},\n}\n\n@ARTICLE{Yang_2004,\n  AUTHOR = {Yang, Chenghai and Everitt, James H. and Bradford, Joe M. and Murden, Dale},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs11119-004-5319-8},\n  DATE = {2004-10},\n  DOI = {10.1007/s11119-004-5319-8},\n  JOURNALTITLE = {Precision Agriculture},\n  NUMBER = {5},\n  PAGES = {445--461},\n  TITLE = {Airborne Hyperspectral Imagery and Yield Monitor Data for Mapping Cotton Yield Variability},\n  VOLUME = {5},\n}\n\n@ARTICLE{Ye_2007,\n  AUTHOR = {Ye, Xujun and Sakai, Kenshi and Manago, Masafumi and Asada, Shin-ichi and Sasao, Akira},\n  PUBLISHER = {Springer Nature},\n  URL = {https://doi.org/10.1007%2Fs11119-007-9032-2},\n  DATE = {2007-04},\n  DOI = {10.1007/s11119-007-9032-2},\n  JOURNALTITLE = {Precision Agriculture},\n  NUMBER = {3},\n  PAGES = {111--125},\n  TITLE = {Prediction of citrus yield from airborne hyperspectral imagery},\n  VOLUME = {8},\n}\n\n@ARTICLE{Dorj_2017,\n  AUTHOR = {Dorj, Ulzii-Orshikh and Lee, Malrey and Yun, Sang-seok},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2017.05.019},\n  DATE = {2017-08},\n  DOI = {10.1016/j.compag.2017.05.019},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {103--112},\n  TITLE = {An yield estimation in citrus orchards via fruit detection and counting using image processing},\n  VOLUME = {140},\n}\n\n@ARTICLE{Escol__2011,\n  AUTHOR = {Escol{\\`{a}}, Alexandre and Planas, Santiago and Rosell, Joan Ramon and Pomar, Jes{\\'{u}}s and Camp, Ferran and Solanelles, Francesc and Gracia, Felip and Llorens, Jordi and Gil, Emilio},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fs110302459},\n  DATE = {2011-02},\n  DOI = {10.3390/s110302459},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {3},\n  PAGES = {2459--2477},\n  TITLE = {Performance of an Ultrasonic Ranging Sensor in Apple Tree Canopies},\n  VOLUME = {11},\n}\n\n@ARTICLE{Llorens_2011,\n  AUTHOR = {Llorens, Jordi and Gil, Emilio and Llop, Jordi and Escol{\\`{a}}, Alexandre},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fs110202177},\n  DATE = {2011-02},\n  DOI = {10.3390/s110202177},\n  JOURNALTITLE = {Sensors},\n  NUMBER = {2},\n  PAGES = {2177--2194},\n  TITLE = {Ultrasonic and {LIDAR} Sensors for Electronic Canopy Characterization in Vineyards: Advances to Improve Pesticide Application Methods},\n  VOLUME = {11},\n}\n\n@ARTICLE{Auat_Cheein_2015,\n  AUTHOR = {Cheein, Fernando A. Auat and Guivant, Jos{\\'{e}} and Sanz, Ricardo and Escol{\\`{a}}, Alexandre and Yand{\\'{u}}n, Francisco and Torres-Torriti, Miguel and Rosell-Polo, Joan R.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2015.09.017},\n  DATE = {2015-10},\n  DOI = {10.1016/j.compag.2015.09.017},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {361--371},\n  TITLE = {Real-time approaches for characterization of fully and partially scanned canopies in groves},\n  VOLUME = {118},\n}\n\n@ARTICLE{Pfeiffer_2018,\n  AUTHOR = {Pfeiffer, Sebasti{\\'{a}}n Arriagada and Guevara, Javier and Cheein, Fernando Auat and Sanz, Ricardo},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2018.01.022},\n  DATE = {2018-03},\n  DOI = {10.1016/j.compag.2018.01.022},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {104--113},\n  TITLE = {Mechatronic terrestrial {LiDAR} for canopy porosity and crown surface estimation},\n  VOLUME = {146},\n}\n\n@ARTICLE{Sanz_2018,\n  AUTHOR = {Sanz, Ricardo and Llorens, Jordi and Escol{\\`{a}}, Alexandre and Arn{\\'{o}}, Jaume and Planas, Santiago and Rom{\\'{a}}n, Carla and Rosell-Polo, Joan R.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.agrformet.2018.06.017},\n  DATE = {2018-10},\n  DOI = {10.1016/j.agrformet.2018.06.017},\n  JOURNALTITLE = {Agricultural and Forest Meteorology},\n  PAGES = {229--239},\n  TITLE = {{LIDAR} and non-{LIDAR}-based canopy parameters to estimate the leaf area in fruit trees and vineyard},\n  VOLUME = {260-261},\n}\n\n@ARTICLE{J_Wei_2004,\n  AUTHOR = {Wei, J. and Salyani, M.},\n  PUBLISHER = {American Society of Agricultural and Biological Engineers ({ASABE})},\n  URL = {https://doi.org/10.13031%2F2013.17795},\n  DATE = {2004},\n  DOI = {10.13031/2013.17795},\n  JOURNALTITLE = {Transactions of the {ASAE}},\n  NUMBER = {6},\n  PAGES = {2101--2107},\n  TITLE = {{DEVELOPMENT} {OF} A {LASER} {SCANNER} {FOR} {MEASURING} {TREE} {CANOPY} {CHARACTERISTICS}: {PHASE} 1. {PROTOTYPE} {DEVELOPMENT}},\n  VOLUME = {47},\n}\n\n@ARTICLE{bulanon2010fruit,\n  AUTHOR = {Bulanon, DM and Kataoka, T},\n  DATE = {2010},\n  JOURNALTITLE = {Agricultural Engineering International: CIGR Journal},\n  NUMBER = {1},\n  TITLE = {Fruit detection system and an end effector for robotic harvesting of Fuji apples},\n  VOLUME = {12},\n}\n\n@ARTICLE{Bulanon_2002,\n  AUTHOR = {Bulanon, D.M. and Kataoka, T. and Ota, Y. and Hiroma, T.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1006%2Fbioe.2002.0132},\n  DATE = {2002-12},\n  DOI = {10.1006/bioe.2002.0132},\n  JOURNALTITLE = {Biosystems Engineering},\n  NUMBER = {4},\n  PAGES = {405--412},\n  TITLE = {{AE}{---}Automation and Emerging Technologies},\n  VOLUME = {83},\n}\n\n@ARTICLE{Leemans_1999,\n  AUTHOR = {Leemans, V and Magein, H and Destain, M.-F},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fs0168-1699%2899%2900006-x},\n  DATE = {1999-06},\n  DOI = {10.1016/s0168-1699(99)00006-x},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  NUMBER = {1},\n  PAGES = {43--53},\n  TITLE = {Defect segmentation on `Jonagold' apples using colour vision and a Bayesian classification method},\n  VOLUME = {23},\n}\n\n@ARTICLE{Ji_2012,\n  AUTHOR = {Ji, Wei and Zhao, Dean and Cheng, Fengyi and Xu, Bo and Zhang, Ying and Wang, Jinjing},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compeleceng.2011.11.005},\n  DATE = {2012-09},\n  DOI = {10.1016/j.compeleceng.2011.11.005},\n  JOURNALTITLE = {Computers {\\&} Electrical Engineering},\n  NUMBER = {5},\n  PAGES = {1186--1195},\n  TITLE = {Automatic recognition vision system guided for apple harvesting robot},\n  VOLUME = {38},\n}\n\n@ARTICLE{adamsen2000method,\n  AUTHOR = {Adamsen, FJ and Coffelt, TA and Nelson, John M and Barnes, Edward M and Rice, Robert C},\n  PUBLISHER = {Crop Science Society of America},\n  DATE = {2000},\n  JOURNALTITLE = {Crop Science},\n  NUMBER = {3},\n  PAGES = {704--709},\n  TITLE = {Method for using images from a color digital camera to estimate flower number},\n  VOLUME = {40},\n}\n\n@ARTICLE{Giusti_2016,\n  AUTHOR = {Giusti, Alessandro and Guzzi, Jerome and Ciresan, Dan C. and He, Fang-Lin and Rodriguez, Juan P. and Fontana, Flavio and Faessler, Matthias and Forster, Christian and Schmidhuber, Jurgen and Caro, Gianni Di and Scaramuzza, Davide and Gambardella, Luca M.},\n  PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})},\n  URL = {https://doi.org/10.1109%2Flra.2015.2509024},\n  DATE = {2016-07},\n  DOI = {10.1109/lra.2015.2509024},\n  JOURNALTITLE = {{IEEE} Robotics and Automation Letters},\n  NUMBER = {2},\n  PAGES = {661--667},\n  TITLE = {A Machine Learning Approach to Visual Perception of Forest Trails for Mobile Robots},\n  VOLUME = {1},\n}\n\n@ARTICLE{Reid_1987,\n  AUTHOR = {Reid, J. and Searcy, S.},\n  PUBLISHER = {Institute of Electrical and Electronics Engineers ({IEEE})},\n  URL = {https://doi.org/10.1109%2Fmcs.1987.1105271},\n  DATE = {1987-04},\n  DOI = {10.1109/mcs.1987.1105271},\n  JOURNALTITLE = {{IEEE} Control Systems Magazine},\n  NUMBER = {2},\n  PAGES = {39--43},\n  TITLE = {Vision-based guidance of an agriculture tractor},\n  VOLUME = {7},\n}\n\n@ARTICLE{Hiremath_2014,\n  AUTHOR = {Hiremath, Santosh A. and van der Heijden, Gerie W.A.M. and van Evert, Frits K. and Stein, Alfred and ter Braak, Cajo J.F.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2013.10.005},\n  DATE = {2014-01},\n  DOI = {10.1016/j.compag.2013.10.005},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {41--50},\n  TITLE = {Laser range finder model for autonomous navigation of a robot in a maize field using a particle filter},\n  VOLUME = {100},\n}\n\n@ARTICLE{P_rez_Ruiz_2012,\n  AUTHOR = {P{\\'{e}}rez-Ruiz, M. and Slaughter, D.C. and Gliever, C.J. and Upadhyaya, S.K.},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2011.10.006},\n  DATE = {2012-01},\n  DOI = {10.1016/j.compag.2011.10.006},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {41--49},\n  TITLE = {Automatic {GPS}-based intra-row weed knife control system for transplanted row crops},\n  VOLUME = {80},\n}\n\n@ARTICLE{Aquino_2018,\n  AUTHOR = {Aquino, Arturo and Millan, Borja and Diago, Maria-Paz and Tardaguila, Javier},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.compag.2017.11.026},\n  DATE = {2018-01},\n  DOI = {10.1016/j.compag.2017.11.026},\n  JOURNALTITLE = {Computers and Electronics in Agriculture},\n  PAGES = {26--36},\n  TITLE = {Automated early yield prediction in vineyards from on-the-go image acquisition},\n  VOLUME = {144},\n}\n\n@ARTICLE{Brunella_2007,\n  AUTHOR = {Morandi, Brunella and Manfrini, Luigi and Zibordi, Marco and Noferini, Massimo and Fiori, Giovanni and Grappadelli, Luca Corelli},\n  DATE = {2007},\n  ISSN = {00185345},\n  JOURNALTITLE = {HortScience},\n  NUMBER = {6},\n  PAGES = {1380--1382},\n  TITLE = {A low-cost device for accurate and continuous measurements of fruit diameter},\n  VOLUME = {42},\n}\n\n@ARTICLE{Manfrini_2009,\n  AUTHOR = {Manfrini, L. and Taylor, J.A. and Grappadelli, L.C.},\n  URL = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-67649510901&partnerID=40&md5=97cfa3c2408b54db6924c817659a2aae},\n  DATE = {2009},\n  JOURNALTITLE = {European Journal of Horticultural Science},\n  NOTE = {cited By 5},\n  NUMBER = {2},\n  PAGES = {54--60},\n  TITLE = {Spatial analysis of the effect of fruit thinning on apple crop load},\n  VOLUME = {74},\n}\n\n@ARTICLE{Duhan_2017,\n  AUTHOR = {Duhan, Joginder Singh and Kumar, Ravinder and Kumar, Naresh and Kaur, Pawan and Nehra, Kiran and Duhan, Surekha},\n  PUBLISHER = {Elsevier {BV}},\n  URL = {https://doi.org/10.1016%2Fj.btre.2017.03.002},\n  DATE = {2017-09},\n  DOI = {10.1016/j.btre.2017.03.002},\n  JOURNALTITLE = {Biotechnology Reports},\n  PAGES = {11--23},\n  TITLE = {Nanotechnology: The new perspective in precision agriculture},\n  VOLUME = {15},\n}\n\n@ARTICLE{He_2018,\n  AUTHOR = {He, Long and Schupp, James},\n  PUBLISHER = {{MDPI} {AG}},\n  URL = {https://doi.org/10.3390%2Fagronomy8100211},\n  DATE = {2018-09},\n  DOI = {10.3390/agronomy8100211},\n  JOURNALTITLE = {Agronomy},\n  NUMBER = {10},\n  PAGES = {211},\n  TITLE = {Sensing and Automation in Pruning of Apple Trees: A Review},\n  VOLUME = {8},\n}\n\n"
  },
  {
    "path": ".config/promptline",
    "content": "#!/usr/bin/env sh\n\nfunction preexec() {\n    timer=${timer:-$SECONDS}\n}\n\nfunction precmd() {\n    if [ $timer ]; then\n        export timer_show=$(($SECONDS - $timer))\n        unset timer\n    fi\n}\n\nfunction __promptline_host {\n    printf $(uname -a | cut -d\" \"  -f2)\n}\nfunction __sudo_warning {\n    [[ $(trap \"\" XFSZ; LC_ALL=C sudo -n true 2>&1) != *\"password is required\" ]] && printf 'SUDO'\n}\n\nfunction __load_average {\n    eval loadav01=$(uptime | awk ' {print substr($0,length($0)-15)}' | awk '{print $1}' | sed 's/,//g')\n    printf \"$loadav01\"\n}\n\nfunction __promptline_vcs_branch {\n    local branch\n    if hash git 2>/dev/null; then\n        if branch=$( { git symbolic-ref --quiet HEAD || git rev-parse --short HEAD; } 2>/dev/null ); then\n        branch=${branch##*/}\n        printf \"%s\" \"${branch:-unknown}\"\n        return\n        fi\n    fi\n    return 1 \n}\n\nfunction __is_in_container {\n    if [[ -n $(echo $INDIRENV) ]]; then\n        [[ -n $(echo $ENVNAME) ]] && printf \" $ENVNAME \" || printf ' ■ '\n    else\n        [[ -n $(awk -F/ '$2 == \"docker\"' /proc/self/cgroup) ]] && printf ' ⊙ '\n        [[ -n $(echo $IN_NIX_SHELL) ]] && printf ' × '\n    fi\n}\n\nfunction __promptline_cwd {\n    local dir_limit=\"4\"\n    local truncation=\"⋯\"\n    local first_char\n    local part_count=0\n    local formatted_cwd=\"\"\n    local dir_sep=\"  \"\n    local tilde=\"~\"\n    local cwd=\"${PWD/#$HOME/$tilde}\"\n    [[ -n ${ZSH_VERSION-} ]] && first_char=$cwd[1,1] || first_char=${cwd::1}\n    cwd=\"${cwd#\\~}\"\n    while [[ \"$cwd\" == */* && \"$cwd\" != \"/\" ]]; do\n        local part=\"${cwd##*/}\"\n        cwd=\"${cwd%/*}\"\n        formatted_cwd=\"$dir_sep$part$formatted_cwd\"\n        part_count=$((part_count+1))\n        [[ $part_count -eq $dir_limit ]] && first_char=\"$truncation\" && break\n    done\n    printf \"%s\" \"$first_char$formatted_cwd\"\n}\n\nfunction __promptline_left_prompt {\n    #HOST\n    prefix=\"${accentBG}${space}\" suffix=\"${space}${background}${accentTX}${arrFL}${blackTX}${accentBG}\"; printf \"%s\" \"$prefix\" \"$(__promptline_host)\" \"$suffix\"\n    #USER\n    prefix=\"${greyBG}${arrFL}${blackTX}${greyBG}${space}\" suffix=\"${space}${greyTX}\"; printf \"%s\" \"$prefix\" \"$USER\" \"$suffix\"\n    #SUDO WARN\n    prefix=\"${redBG}${arrFL}${foreground}${redBG}${space}\" suffix=\"${space}${redTX}\"; [[ -n $(__sudo_warning) ]] && printf \"%s\" \"$prefix\" \"$(__sudo_warning)\" \"$suffix\"\n    #CONTAINER\n    prefix=\"${background}${arrFL}${blackTX}${accentBG}${arrFL}${foreground}${accentBG}\" suffix=\"${accentTX}\"; [[ -n $(__is_in_container) ]] && printf \"%s\" \"$prefix\" \"$(__is_in_container)\" \"$suffix\"\n    [[ -n $(__is_in_container) ]] && endARR=\"$arrEL$redBG$blackTX$arrFL$redBG$redTX$background$arrFL$greyTX\"\n    #PATH\n    [[ $(__promptline_vcs_branch) = \"master\" ]] && conTX=$accentTX\n    prefix=\"${defaultBG}${arrFL}${conTX}${space}\" suffix=\"${space}${conTX}${arrEL}${darkTX}${space}\"; [[ -n $(__promptline_cwd) ]] && printf \"%s\" \"$prefix\" \"$(__promptline_cwd)\" \"$suffix\"\n}\n\nfunction __promptline_right_prompt {\n    #WARN\n    prefix=\"${space}${redTX}${arrFR}${redBG}${blackTX}\" suffix=\"${space}${blackTX}${arrFR}${darkTX}${background}\"; [[ $last_exit_code -gt 0 ]] && printf \"%s\" \"$prefix \" $last_exit_code \"$suffix\"\n    #GIT\n    [[ $(__promptline_vcs_branch) = \"master\" ]] && conTX=$accentTX\n    prefix=\"${conTX}${arrER}${space}\" suffix=\"${space}${darkTX}\";\n    if [[ -n $(__promptline_vcs_branch) ]]; then\n        if [[ -n ${ZSH_VERSION-} ]]; then\n            printf \"%s\" \"$prefix${conTX}\" '$GITSTATUS_PROMPT' \"$suffix\"\n        elif [[ -n ${FISH_VERSION-} ]]; then\n            printf \"%s\" \"$prefix${defaultFG}\" \"$(echo $3)\" \"$suffix\"\n        fi\n    fi\n    #CMD TIME\n    prefix=\"${greyTX}${arrER}${arrFR}${blackTX}${greyBG}${space}\" suffix=\"${space}${blackTX}${arrER}\"; [[ -n $timer_show ]] && printf \"%s\" \"$prefix\" \"$timer_show\" \"$suffix\"\n    #LOAD AVERAGE\n    prefix=\"${greyTX}${arrFR}${blackTX}${greyBG}${space}\" suffix=\"${space}${greyTX}\"; printf \"%s\" \"$prefix\" \"$(__load_average)\" \"$suffix\"\n    #VIM MODE\n    prefix=\"${accentTX}${arrFR}${foreground}${accentBG}${space}\" suffix=\"${space}${defaultBG}${defaultFG}\";\n    if [[ -n ${ZSH_VERSION-} ]]; then\n        vimode='${${KEYMAP/vicmd/NORMAL}/(main|viins)/INSERT}'\n        printf \"%s\" \"$prefix\" $vimode \"$suffix\"\n    elif [[ -n ${FISH_VERSION-} ]]; then\n        [[ $2 = \"default\" ]] && vimode=\"NORMAL\" || vimode=\"INSERT\"\n        printf \"%s\" \"$prefix\" \"$vimode\" \"$suffix\"\n    fi\n}\n\nfunction __promptline {\n    last_exit_code=\"${PROMPTLINE_LAST_EXIT_CODE:-$?}\"\n    esc=$'\u001b['\n    end_esc=m\n\n    if [[ -n ${ZSH_VERSION-} ]]; then\n        local noprint='%{' end_noprint='%}'\n    elif [[ -n ${FISH_VERSION-} ]]; then\n        local noprint='' end_noprint=''\n    else\n        local noprint='\\[' end_noprint='\\]'\n    fi\n\n    local IN=\"$noprint$esc\"\n    local EN=\"$end_esc$end_noprint\"\n    local space=\" \"\n    local arrFL=\"\"\n    local arrFR=\"\"\n    local arrEL=\"\"\n    local arrER=\"\"\n    local endARR=\"\"\n    local defaultFG=\"${IN}0${EN}\"\n    local defaultBG=\"${IN}49${EN}\"\n    local foreground=\"${IN}38;5;15${EN}\"\n    local background=\"${IN}48;5;0${EN}\"\n    local blackTX=\"${IN}38;5;0${EN}\"\n    local accentBG=\"${IN}48;5;1${EN}\"\n    local accentTX=\"${IN}38;5;1${EN}\"\n    local accent2BG=\"${IN}48;5;2${EN}\"\n    local accent2TX=\"${IN}38;5;2${EN}\"\n    local accent3BG=\"${IN}48;5;3${EN}\"\n    local accent3TX=\"${IN}38;5;3${EN}\"\n    local accent4BG=\"${IN}48;5;4${EN}\"\n    local accent4TX=\"${IN}38;5;4${EN}\"\n    local primeTX=\"${IN}38;5;1${EN}\"\n    local secondTX=\"${IN}38;5;2${EN}\"\n    local greyBG=\"${IN}48;5;7${EN}\"\n    local greyTX=\"${IN}38;5;7${EN}\"\n    local darkTX=\"${IN}38;5;59${EN}\"\n    local redTX=\"${IN}38;5;124${EN}\"\n    local redBG=\"${IN}48;5;124${EN}\"\n    local blueTX=\"${IN}38;5;27${EN}\"\n    local blueBG=\"${IN}48;5;27${EN}\"\n    local greenTX=\"${IN}38;5;40${EN}\"\n    local greenBG=\"${IN}48;5;40${EN}\"\n    local conTX=$darkTX\n    local NLD=\"\\e[0m\"\n    local BLD=\"\\e[32;1m\"\n\n\n    if [[ -n ${ZSH_VERSION-} ]]; then\n    PROMPT=\"$(__promptline_left_prompt)\"\n    RPROMPT=\" $(__promptline_right_prompt)\"\n    elif [[ -n ${FISH_VERSION-} ]]; then\n        if [[ -n \"$1\" ]]; then\n            [[ \"$1\" = \"left\" ]] && __promptline_left_prompt || __promptline_right_prompt $@\n        else\n            __promptline_left_prompt\n        fi\n    else\n        PS1=\"$(__promptline_left_prompt)\"\n    fi\n}\n\nif [[ -n ${ZSH_VERSION-} ]]; then\n  if [[ ! ${precmd_functions[(r)__promptline]} == __promptline ]]; then\n    precmd_functions+=(__promptline)\n  fi\nelif [[ -n ${FISH_VERSION-} ]]; then\n  __promptline \"$@\"\nelse\n  if [[ ! \"$PROMPT_COMMAND\" == *__promptline* ]]; then\n    PROMPT_COMMAND='__promptline;'$'\\n'\"$PROMPT_COMMAND\"\n  fi\nfi\n"
  },
  {
    "path": ".config/qutebrowser/autoconfig.yml",
    "content": "# DO NOT edit this file by hand, qutebrowser will overwrite it.\n# Instead, create a config.py - see :help for details.\n\nconfig_version: 2\nsettings:\n  aliases:\n    global:\n      q: tab-close\n      w: session-save\n      wq: quit --save\n"
  },
  {
    "path": ".config/qutebrowser/bookmarks/urls",
    "content": ""
  },
  {
    "path": ".config/qutebrowser/config.py",
    "content": "# Autogenerated config.py\n# Documentation:\n#   qute://help/configuring.html\n#   qute://help/settings.html\n\n# Uncomment this to still load settings configured via autoconfig.yml\n# config.load_autoconfig()\n\n# Aliases for commands. The keys of the given dictionary are the\n# aliases, while the values are the commands they map to.\n# Type: Dict\nc.aliases = {'Q': 'close', 'q': 'tab-close', 'w': 'session-save', 'wq': 'quit --save'}\n\n# Enable JavaScript.\n# Type: Bool\nconfig.set('content.javascript.enabled', True, 'file://*')\n\n# Enable JavaScript.\n# Type: Bool\nconfig.set('content.javascript.enabled', True, 'chrome://*/*')\n\n# Enable JavaScript.\n# Type: Bool\nconfig.set('content.javascript.enabled', True, 'qute://*/*')\n\n# Shrink the completion to be smaller than the configured size if there\n# are no scrollbars.\n# Type: Bool\nc.completion.shrink = True\n\n# Width (in pixels) of the scrollbar in the completion window.\n# Type: Int\nc.completion.scrollbar.width = 0\n\n# Padding (in pixels) of the scrollbar handle in the completion window.\n# Type: Int\nc.completion.scrollbar.padding = 0\n\n# Padding (in pixels) for the statusbar.\n# Type: Padding\nc.statusbar.padding = {'bottom': 2, 'left': 5, 'right': 5, 'top': 2}\n\n# Position of the status bar.\n# Type: VerticalPosition\n# Valid values:\n#   - top\n#   - bottom\nc.statusbar.position = 'bottom'\n\n# How to behave when the close mouse button is pressed on the tab bar.\n# Type: String\n# Valid values:\n#   - new-tab: Open a new tab.\n#   - close-current: Close the current tab.\n#   - close-last: Close the last tab.\n#   - ignore: Don't do anything.\nc.tabs.close_mouse_button_on_bar = 'new-tab'\n\n# Scaling factor for favicons in the tab bar. The tab size is unchanged,\n# so big favicons also require extra `tabs.padding`.\n# Type: Float\nc.tabs.favicons.scale = 1.0\n\n# When to show favicons in the tab bar.\n# Type: String\n# Valid values:\n#   - always: Always show favicons.\n#   - never: Always hide favicons.\n#   - pinned: Show favicons only on pinned tabs.\nc.tabs.favicons.show = 'never'\n\n# Position of new tabs which are not opened from another tab. See\n# `tabs.new_position.stacking` for controlling stacking behavior.\n# Type: NewTabPosition\n# Valid values:\n#   - prev: Before the current tab.\n#   - next: After the current tab.\n#   - first: At the beginning.\n#   - last: At the end.\nc.tabs.new_position.unrelated = 'last'\n\n# Padding (in pixels) around text for tabs.\n# Type: Padding\nc.tabs.padding = {'bottom': 2, 'left': 5, 'right': 5, 'top': 2}\n\n# Width (in pixels) of the progress indicator (0 to disable).\n# Type: Int\nc.tabs.indicator.width = 0\n\n# Padding (in pixels) for tab indicators.\n# Type: Padding\nc.tabs.indicator.padding = {'bottom': 2, 'left': 2, 'right': 2, 'top': 2}\n\n# Default zoom level.\n# Type: Perc\nc.zoom.default = '200%'\n\n# Text color of the completion widget. May be a single color to use for\n# all columns or a list of three colors, one for each column.\n# Type: List of QtColor, or QtColor\nc.colors.completion.fg = '#c5c4c4'\n\n# Background color of the completion widget for odd rows.\n# Type: QssColor\nc.colors.completion.odd.bg = '#181414'\n\n# Background color of the completion widget for even rows.\n# Type: QssColor\nc.colors.completion.even.bg = '#181414'\n\n# Foreground color of completion widget category headers.\n# Type: QtColor\nc.colors.completion.category.fg = '#c5c4c4'\n\n# Background color of the completion widget category headers.\n# Type: QssColor\nc.colors.completion.category.bg = '#181414'\n\n# Top border color of the completion widget category headers.\n# Type: QssColor\nc.colors.completion.category.border.top = '#181414'\n\n# Bottom border color of the completion widget category headers.\n# Type: QssColor\nc.colors.completion.category.border.bottom = '#181414'\n\n# Foreground color of the selected completion item.\n# Type: QtColor\nc.colors.completion.item.selected.fg = '#c5c4c4'\n\n# Background color of the selected completion item.\n# Type: QssColor\nc.colors.completion.item.selected.bg = '#ff7c5d'\n\n# Top border color of the completion widget category headers.\n# Type: QssColor\nc.colors.completion.item.selected.border.top = '#181414'\n\n# Bottom border color of the selected completion item.\n# Type: QssColor\nc.colors.completion.item.selected.border.bottom = '#181414'\n\n# Foreground color of the matched text in the completion.\n# Type: QtColor\nc.colors.completion.match.fg = '#ffb580'\n\n# Color of the scrollbar handle in the completion view.\n# Type: QssColor\nc.colors.completion.scrollbar.fg = '#c5c4c4'\n\n# Color of the scrollbar in the completion view.\n# Type: QssColor\nc.colors.completion.scrollbar.bg = '#181414'\n\n# Background color for the download bar.\n# Type: QssColor\nc.colors.downloads.bar.bg = '#181414'\n\n# Color gradient stop for download backgrounds.\n# Type: QtColor\nc.colors.downloads.stop.bg = '#ffb580'\n\n# Color gradient interpolation system for download backgrounds.\n# Type: ColorSystem\n# Valid values:\n#   - rgb: Interpolate in the RGB color system.\n#   - hsv: Interpolate in the HSV color system.\n#   - hsl: Interpolate in the HSL color system.\n#   - none: Don't show a gradient.\nc.colors.downloads.system.bg = 'none'\n\n# Foreground color for downloads with errors.\n# Type: QtColor\nc.colors.downloads.error.fg = '#c5c4c4'\n\n# Background color for downloads with errors.\n# Type: QtColor\nc.colors.downloads.error.bg = '#ff7c5d'\n\n# Font color for hints.\n# Type: QssColor\nc.colors.hints.fg = '#181414'\n\n# Background color for hints. Note that you can use a `rgba(...)` value\n# for transparency.\n# Type: QssColor\nc.colors.hints.bg = '#ff3d44'\n\n# Font color for the matched part of hints.\n# Type: QssColor\nc.colors.hints.match.fg = '#ff6f04'\n\n# Text color for the keyhint widget.\n# Type: QssColor\nc.colors.keyhint.fg = '#c5c4c4'\n\n# Highlight color for keys to complete the current keychain.\n# Type: QssColor\nc.colors.keyhint.suffix.fg = '#ff3d44'\n\n# Background color of the keyhint widget.\n# Type: QssColor\nc.colors.keyhint.bg = '#181414'\n\n# Foreground color of an error message.\n# Type: QssColor\nc.colors.messages.error.fg = '#c5c4c4'\n\n# Background color of an error message.\n# Type: QssColor\nc.colors.messages.error.bg = '#ff7c5d'\n\n# Border color of an error message.\n# Type: QssColor\nc.colors.messages.error.border = '#ff7c5d'\n\n# Foreground color of a warning message.\n# Type: QssColor\nc.colors.messages.warning.fg = '#c5c4c4'\n\n# Background color of a warning message.\n# Type: QssColor\nc.colors.messages.warning.bg = '#881100'\n\n# Border color of a warning message.\n# Type: QssColor\nc.colors.messages.warning.border = '#881100'\n\n# Foreground color of an info message.\n# Type: QssColor\nc.colors.messages.info.fg = '#c5c4c4'\n\n# Background color of an info message.\n# Type: QssColor\nc.colors.messages.info.bg = '#ff6f04'\n\n# Border color of an info message.\n# Type: QssColor\nc.colors.messages.info.border = '#ff6f04'\n\n# Foreground color for prompts.\n# Type: QssColor\nc.colors.prompts.fg = '#c5c4c4'\n\n# Border used around UI elements in prompts.\n# Type: String\nc.colors.prompts.border = '1px solid #181414'\n\n# Background color for prompts.\n# Type: QssColor\nc.colors.prompts.bg = '#181414'\n\n# Background color for the selected item in filename prompts.\n# Type: QssColor\nc.colors.prompts.selected.bg = '#ff7c5d'\n\n# Foreground color of the statusbar.\n# Type: QssColor\nc.colors.statusbar.normal.fg = '#c5c4c4'\n\n# Background color of the statusbar.\n# Type: QssColor\nc.colors.statusbar.normal.bg = '#181414'\n\n# Foreground color of the statusbar in insert mode.\n# Type: QssColor\nc.colors.statusbar.insert.fg = '#181414'\n\n# Background color of the statusbar in insert mode.\n# Type: QssColor\nc.colors.statusbar.insert.bg = '#ff6f04'\n\n# Foreground color of the statusbar in passthrough mode.\n# Type: QssColor\nc.colors.statusbar.passthrough.fg = '#c5c4c4'\n\n# Background color of the statusbar in passthrough mode.\n# Type: QssColor\nc.colors.statusbar.passthrough.bg = '#ff6f04'\n\n# Foreground color of the statusbar in private browsing mode.\n# Type: QssColor\nc.colors.statusbar.private.fg = '#c5c4c4'\n\n# Background color of the statusbar in private browsing mode.\n# Type: QssColor\nc.colors.statusbar.private.bg = '#181414'\n\n# Foreground color of the statusbar in command mode.\n# Type: QssColor\nc.colors.statusbar.command.fg = '#c5c4c4'\n\n# Background color of the statusbar in command mode.\n# Type: QssColor\nc.colors.statusbar.command.bg = '#181414'\n\n# Foreground color of the statusbar in private browsing + command mode.\n# Type: QssColor\nc.colors.statusbar.command.private.fg = '#c5c4c4'\n\n# Background color of the statusbar in private browsing + command mode.\n# Type: QssColor\nc.colors.statusbar.command.private.bg = '#181414'\n\n# Foreground color of the statusbar in caret mode.\n# Type: QssColor\nc.colors.statusbar.caret.fg = '#c5c4c4'\n\n# Background color of the statusbar in caret mode.\n# Type: QssColor\nc.colors.statusbar.caret.bg = '#ffb580'\n\n# Foreground color of the statusbar in caret mode with a selection.\n# Type: QssColor\nc.colors.statusbar.caret.selection.fg = '#c5c4c4'\n\n# Background color of the statusbar in caret mode with a selection.\n# Type: QssColor\nc.colors.statusbar.caret.selection.bg = '#ffb580'\n\n# Background color of the progress bar.\n# Type: QssColor\nc.colors.statusbar.progress.bg = '#c5c4c4'\n\n# Default foreground color of the URL in the statusbar.\n# Type: QssColor\nc.colors.statusbar.url.fg = '#c5c4c4'\n\n# Foreground color of the URL in the statusbar on error.\n# Type: QssColor\nc.colors.statusbar.url.error.fg = '#ff7c5d'\n\n# Foreground color of the URL in the statusbar for hovered links.\n# Type: QssColor\nc.colors.statusbar.url.hover.fg = '#ff6f04'\n\n# Foreground color of the URL in the statusbar on successful load\n# (http).\n# Type: QssColor\nc.colors.statusbar.url.success.http.fg = '#c5c4c4'\n\n# Foreground color of the URL in the statusbar on successful load\n# (https).\n# Type: QssColor\nc.colors.statusbar.url.success.https.fg = '#d32a00'\n\n# Foreground color of the URL in the statusbar when there's a warning.\n# Type: QssColor\nc.colors.statusbar.url.warn.fg = '#881100'\n\n# Background color of the tab bar.\n# Type: QtColor\nc.colors.tabs.bar.bg = '#181414'\n\n# Color for the tab indicator on errors.\n# Type: QtColor\nc.colors.tabs.indicator.error = '#ff7c5d'\n\n# Color gradient interpolation system for the tab indicator.\n# Type: ColorSystem\n# Valid values:\n#   - rgb: Interpolate in the RGB color system.\n#   - hsv: Interpolate in the HSV color system.\n#   - hsl: Interpolate in the HSL color system.\n#   - none: Don't show a gradient.\nc.colors.tabs.indicator.system = 'none'\n\n# Foreground color of unselected odd tabs.\n# Type: QtColor\nc.colors.tabs.odd.fg = '#c5c4c4'\n\n# Background color of unselected odd tabs.\n# Type: QtColor\nc.colors.tabs.odd.bg = '#181414'\n\n# Foreground color of unselected even tabs.\n# Type: QtColor\nc.colors.tabs.even.fg = '#c5c4c4'\n\n# Background color of unselected even tabs.\n# Type: QtColor\nc.colors.tabs.even.bg = '#181414'\n\n# Foreground color of selected odd tabs.\n# Type: QtColor\nc.colors.tabs.selected.odd.fg = '#181414'\n\n# Background color of selected odd tabs.\n# Type: QtColor\nc.colors.tabs.selected.odd.bg = '#ff6f04'\n\n# Foreground color of selected even tabs.\n# Type: QtColor\nc.colors.tabs.selected.even.fg = '#181414'\n\n# Background color of selected even tabs.\n# Type: QtColor\nc.colors.tabs.selected.even.bg = '#ff6f04'\n\n# Background color for webpages if unset (or empty to use the theme's\n# color).\n# Type: QtColor\nc.colors.webpage.bg = '#181414'\n\n# Default monospace fonts. Whenever \"monospace\" is used in a font\n# setting, it's replaced with the fonts listed here.\n# Type: Font\nc.fonts.monospace = '\\'Iosevka Term SS01\\', \\'Droid Sans Mono\\', Terminus, Monospace, \"DejaVu Sans Mono\", Monaco, \"Bitstream Vera Sans Mono\", \"Andale Mono\", \"Courier New\", Courier, \"Liberation Mono\", monospace, Fixed, Consolas, Terminal'\n\n# Font used in the completion widget.\n# Type: Font\nc.fonts.completion.entry = '12pt monospace'\n\n# Font used in the completion categories.\n# Type: Font\nc.fonts.completion.category = 'bold 12pt monospace'\n\n# Font used for the debugging console.\n# Type: QtFont\nc.fonts.debug_console = '12pt monospace'\n\n# Font used for the downloadbar.\n# Type: Font\nc.fonts.downloads = '12pt monospace'\n\n# Font used for the hints.\n# Type: Font\nc.fonts.hints = 'bold 12pt monospace'\n\n# Font used in the keyhint widget.\n# Type: Font\nc.fonts.keyhint = '12pt monospace'\n\n# Font used for error messages.\n# Type: Font\nc.fonts.messages.error = '12pt monospace'\n\n# Font used for info messages.\n# Type: Font\nc.fonts.messages.info = '12pt monospace'\n\n# Font used for warning messages.\n# Type: Font\nc.fonts.messages.warning = '12pt monospace'\n\n# Font used for prompts.\n# Type: Font\nc.fonts.prompts = '12pt sans-serif'\n\n# Font used in the statusbar.\n# Type: Font\nc.fonts.statusbar = '12pt monospace'\n\n# Font used in the tab bar.\n# Type: QtFont\nc.fonts.tabs = '12pt monospace'\n\nconfig.source('qutewal.py')\n"
  },
  {
    "path": ".config/qutebrowser/iqutefy.py",
    "content": "#!/usr/bin/env python3\n\nimport os\nimport signal\nimport sys\nfrom pathlib import Path\n\nimport daemon\nimport psutil\nfrom daemon.pidfile import PIDLockFile\nfrom inotify_simple import INotify, flags\n\n\ndef cleanup():\n    os.remove(pidfile)\n    sys.exit()\n\n\npidfile = '/tmp/iqutefy.pid'\n\n# check if pidfile refers to dead process\n# if so, remove it\nif os.path.isfile(pidfile):\n    with open(pidfile) as pf:\n        pid = int(pf.readline())\n    if not psutil.pid_exists(pid):\n        os.remove(pidfile)\n\nwith daemon.DaemonContext(\n        detach_process=False,\n        pidfile=PIDLockFile(pidfile),\n        signal_map={signal.SIGTERM: cleanup}):\n    inotify = INotify()\n    watch_flags = flags.CREATE | flags.MODIFY\n    wd = inotify.add_watch(sys.argv[1], watch_flags)\n    process = psutil.Process()\n\n    # inotify iterator runs out immediately\n    while True:\n        for event in inotify.read():\n            os.system('qutebrowser :config-source')\n\n    # kill after qutebrowser exits\n    # not reached on SIGKILL\n    cleanup()\n"
  },
  {
    "path": ".config/qutebrowser/quickmarks",
    "content": ""
  },
  {
    "path": ".config/qutebrowser/qutewal.py",
    "content": "import json\nimport os\n\nqutewal_dynamic_loading = True\n\nhome = os.getenv('HOME')\ncolors_relative = '.cache/wal/colors.json'\ndaemon_relative = '.config/qutebrowser/iqutefy.py'\ncolors_absolute = os.path.join(home, colors_relative)\ndaemon_absolute = os.path.join(home, daemon_relative)\n\nif os.path.isfile(colors_absolute):\n    with open(colors_absolute) as colorfile:\n        colors = json.load(colorfile)\n\n    # Background color of the completion widget category headers.\n    # Type: QssColor\n    c.colors.completion.category.bg = colors['special']['background']\n\n    # Bottom border color of the completion widget category headers.\n    # Type: QssColor\n    c.colors.completion.category.border.bottom = colors['special'][\n        'background']\n\n    # Top border color of the completion widget category headers.\n    # Type: QssColor\n    c.colors.completion.category.border.top = colors['special']['background']\n\n    # Foreground color of completion widget category headers.\n    # Type: QtColor\n    c.colors.completion.category.fg = colors['special']['foreground']\n\n    # Background color of the completion widget for even rows.\n    # Type: QssColor\n    c.colors.completion.even.bg = colors['special']['background']\n\n    # Background color of the completion widget for odd rows.\n    # Type: QssColor\n    c.colors.completion.odd.bg = colors['special']['background']\n\n    # Text color of the completion widget.\n    # Type: QtColor\n    c.colors.completion.fg = colors['special']['foreground']\n\n    # Background color of the selected completion item.\n    # Type: QssColor\n    c.colors.completion.item.selected.bg = colors['colors']['color5']\n\n    # Bottom border color of the selected completion item.\n    # Type: QssColor\n    c.colors.completion.item.selected.border.bottom = colors['special'][\n        'background']\n\n    # Top border color of the completion widget category headers.\n    # Type: QssColor\n    c.colors.completion.item.selected.border.top = colors['special'][\n        'background']\n\n    # Foreground color of the selected completion item.\n    # Type: QtColor\n    c.colors.completion.item.selected.fg = colors['special']['foreground']\n\n    # Foreground color of the matched text in the completion.\n    # Type: QssColor\n    c.colors.completion.match.fg = colors['colors']['color6']\n\n    # Color of the scrollbar in completion view\n    # Type: QssColor\n    c.colors.completion.scrollbar.bg = colors['special']['background']\n\n    # Color of the scrollbar handle in completion view.\n    # Type: QssColor\n    c.colors.completion.scrollbar.fg = colors['special']['foreground']\n\n    # Background color for the download bar.\n    # Type: QssColor\n    c.colors.downloads.bar.bg = colors['special']['background']\n\n    # Background color for downloads with errors.\n    # Type: QtColor\n    c.colors.downloads.error.bg = colors['colors']['color5']\n\n    # Foreground color for downloads with errors.\n    # Type: QtColor\n    c.colors.downloads.error.fg = colors['special']['foreground']\n\n    # Color gradient stop for download backgrounds.\n    # Type: QtColor\n    c.colors.downloads.stop.bg = colors['colors']['color6']\n\n    # Color gradient interpolation system for download backgrounds.\n    # Type: ColorSystem\n    # Valid values:\n    #   - rgb: Interpolate in the RGB color system.\n    #   - hsv: Interpolate in the HSV color system.\n    #   - hsl: Interpolate in the HSL color system.\n    #   - none: Don't show a gradient.\n    c.colors.downloads.system.bg = 'none'\n\n    # Background color for hints. Note that you can use a `rgba(...)` value\n    # for transparency.\n    # Type: QssColor\n    c.colors.hints.bg = colors['colors']['color3']\n\n    # Font color for hints.\n    # Type: QssColor\n    c.colors.hints.fg = colors['special']['background']\n\n    # Font color for the matched part of hints.\n    # Type: QssColor\n    c.colors.hints.match.fg = colors['colors']['color4']\n\n    # Background color of the keyhint widget.\n    # Type: QssColor\n    c.colors.keyhint.bg = colors['special']['background']\n\n    # Text color for the keyhint widget.\n    # Type: QssColor\n    c.colors.keyhint.fg = colors['special']['foreground']\n\n    # Highlight color for keys to complete the current keychain.\n    # Type: QssColor\n    c.colors.keyhint.suffix.fg = colors['colors']['color3']\n\n    # Background color of an error message.\n    # Type: QssColor\n    c.colors.messages.error.bg = colors['colors']['color5']\n\n    # Border color of an error message.\n    # Type: QssColor\n    c.colors.messages.error.border = colors['colors']['color5']\n\n    # Foreground color of an error message.\n    # Type: QssColor\n    c.colors.messages.error.fg = colors['special']['foreground']\n\n    # Background color of an info message.\n    # Type: QssColor\n    c.colors.messages.info.bg = colors['colors']['color4']\n\n    # Border color of an info message.\n    # Type: QssColor\n    c.colors.messages.info.border = colors['colors']['color4']\n\n    # Foreground color an info message.\n    # Type: QssColor\n    c.colors.messages.info.fg = colors['special']['foreground']\n\n    # Background color of a warning message.\n    # Type: QssColor\n    c.colors.messages.warning.bg = colors['colors']['color1']\n\n    # Border color of a warning message.\n    # Type: QssColor\n    c.colors.messages.warning.border = colors['colors']['color1']\n\n    # Foreground color a warning message.\n    # Type: QssColor\n    c.colors.messages.warning.fg = colors['special']['foreground']\n\n    # Background color for prompts.\n    # Type: QssColor\n    c.colors.prompts.bg = colors['special']['background']\n\n    # # Border used around UI elements in prompts.\n    # # Type: String\n    c.colors.prompts.border = '1px solid ' + colors['special']['background']\n\n    # Foreground color for prompts.\n    # Type: QssColor\n    c.colors.prompts.fg = colors['special']['foreground']\n\n    # Background color for the selected item in filename prompts.\n    # Type: QssColor\n    c.colors.prompts.selected.bg = colors['colors']['color5']\n\n    # Background color of the statusbar in caret mode.\n    # Type: QssColor\n    c.colors.statusbar.caret.bg = colors['colors']['color6']\n\n    # Foreground color of the statusbar in caret mode.\n    # Type: QssColor\n    c.colors.statusbar.caret.fg = colors['special']['cursor']\n\n    # Background color of the statusbar in caret mode with a selection.\n    # Type: QssColor\n    c.colors.statusbar.caret.selection.bg = colors['colors']['color6']\n\n    # Foreground color of the statusbar in caret mode with a selection.\n    # Type: QssColor\n    c.colors.statusbar.caret.selection.fg = colors['special']['foreground']\n\n    # Background color of the statusbar in command mode.\n    # Type: QssColor\n    c.colors.statusbar.command.bg = colors['special']['background']\n\n    # Foreground color of the statusbar in command mode.\n    # Type: QssColor\n    c.colors.statusbar.command.fg = colors['special']['foreground']\n\n    # Background color of the statusbar in private browsing + command mode.\n    # Type: QssColor\n    c.colors.statusbar.command.private.bg = colors['special']['background']\n\n    # Foreground color of the statusbar in private browsing + command mode.\n    # Type: QssColor\n    c.colors.statusbar.command.private.fg = colors['special']['foreground']\n\n    # Background color of the statusbar in insert mode.\n    # Type: QssColor\n    c.colors.statusbar.insert.bg = colors['colors']['color4']\n\n    # Foreground color of the statusbar in insert mode.\n    # Type: QssColor\n    c.colors.statusbar.insert.fg = colors['special']['background']\n\n    # Background color of the statusbar.\n    # Type: QssColor\n    c.colors.statusbar.normal.bg = colors['special']['background']\n\n    # Foreground color of the statusbar.\n    # Type: QssColor\n    c.colors.statusbar.normal.fg = colors['special']['foreground']\n\n    # Background color of the statusbar in passthrough mode.\n    # Type: QssColor\n    c.colors.statusbar.passthrough.bg = colors['colors']['color4']\n\n    # Foreground color of the statusbar in passthrough mode.\n    # Type: QssColor\n    c.colors.statusbar.passthrough.fg = colors['special']['foreground']\n\n    # Background color of the statusbar in private browsing mode.\n    # Type: QssColor\n    c.colors.statusbar.private.bg = colors['special']['background']\n\n    # Foreground color of the statusbar in private browsing mode.\n    # Type: QssColor\n    c.colors.statusbar.private.fg = colors['special']['foreground']\n\n    # Background color of the progress bar.\n    # Type: QssColor\n    c.colors.statusbar.progress.bg = colors['special']['foreground']\n\n    # Foreground color of the URL in the statusbar on error.\n    # Type: QssColor\n    c.colors.statusbar.url.error.fg = colors['colors']['color5']\n\n    # Default foreground color of the URL in the statusbar.\n    # Type: QssColor\n    c.colors.statusbar.url.fg = colors['special']['foreground']\n\n    # Foreground color of the URL in the statusbar for hovered links.\n    # Type: QssColor\n    c.colors.statusbar.url.hover.fg = colors['colors']['color4']\n\n    # Foreground color of the URL in the statusbar on successful load\n    # (http).\n    # Type: QssColor\n    c.colors.statusbar.url.success.http.fg = colors['special']['foreground']\n\n    # Foreground color of the URL in the statusbar on successful load\n    # (https).\n    # Type: QssColor\n    c.colors.statusbar.url.success.https.fg = colors['colors']['color2']\n\n    # Foreground color of the URL in the statusbar when there's a warning.\n    # Type: QssColor\n    c.colors.statusbar.url.warn.fg = colors['colors']['color1']\n\n    # Background color of the tab bar.\n    # Type: QtColor\n    c.colors.tabs.bar.bg = colors['special']['background']\n\n    # Background color of unselected even tabs.\n    # Type: QtColor\n    c.colors.tabs.even.bg = colors['special']['background']\n\n    # Foreground color of unselected even tabs.\n    # Type: QtColor\n    c.colors.tabs.even.fg = colors['special']['foreground']\n\n    # Color for the tab indicator on errors.\n    # Type: QtColor\n    c.colors.tabs.indicator.error = colors['colors']['color5']\n\n    # Color gradient start for the tab indicator.\n    # Type: QtColor\n    # c.colors.tabs.indicator.start = colors['colors']['color5']\n\n    # Color gradient end for the tab indicator.\n    # Type: QtColor\n    # c.colors.tabs.indicator.stop = colors['colors']['color1']\n\n    # Color gradient interpolation system for the tab indicator.\n    # Type: ColorSystem\n    # Valid values:\n    #   - rgb: Interpolate in the RGB color system.\n    #   - hsv: Interpolate in the HSV color system.\n    #   - hsl: Interpolate in the HSL color system.\n    #   - none: Don't show a gradient.\n    c.colors.tabs.indicator.system = 'none'\n\n    # Background color of unselected odd tabs.\n    # Type: QtColor\n    c.colors.tabs.odd.bg = colors['special']['background']\n\n    # Foreground color of unselected odd tabs.\n    # Type: QtColor\n    c.colors.tabs.odd.fg = colors['special']['foreground']\n\n    # Background color of selected even tabs.\n    # Type: QtColor\n    c.colors.tabs.selected.even.bg = colors['colors']['color4']\n\n    # Foreground color of selected even tabs.\n    # Type: QtColor\n    c.colors.tabs.selected.even.fg = colors['special']['background']\n\n    # Background color of selected odd tabs.\n    # Type: QtColor\n    c.colors.tabs.selected.odd.bg = colors['colors']['color4']\n\n    # Foreground color of selected odd tabs.\n    # Type: QtColor\n    c.colors.tabs.selected.odd.fg = colors['special']['background']\n\n    # Background color for webpages if unset (or empty to use the theme's\n    # color)\n    # Type: QtColor\n    c.colors.webpage.bg = colors['special']['background']\n\n    if qutewal_dynamic_loading or bool(os.getenv('QUTEWAL_DYNAMIC_LOADING')):\n        import signal\n        import subprocess\n        import prctl\n\n        # start iqutefy to refresh colors on the fly\n        iqutefyd = subprocess.Popen(\n            [daemon_absolute, colors_absolute],\n            preexec_fn=lambda: prctl.set_pdeathsig(signal.SIGTERM))\n"
  },
  {
    "path": ".config/rofi/menu/BROWSE",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\n# BACKGROUND=$(xrdb -query | grep 'color0:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#FFFFFF}; bckgrd: ${BACKGROUND:-#000000};}\")\nBROWSER=firefox\n\nsrch=search\nmark=bookmarks\ntube=youtube\n\nanother=$(echo \"$mark\n$srch\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"search: \")\n\n\nif [ \"$another\" == \"$srch\" ] ; then\n\tsurfraw -browser=$BROWSER $(sr -elvi | awk -F'-' '{print $1}' | sed '/:/d' | awk '{$1=$1};1' | rofi \"${ROFI_OPTIONS[@]}\" -kb-row-select 'Tab' -kb-row-tab 'Control+space' -dmenu -i -p 'bangs: ')\n\n#elif [ \"$another\" == \"$tube\" ] ; then\n#\texec ~/.config/rofi/menu/uplay\n\nelif [ \"$another\" == \"$mark\" ] ; then\n  exec ~/.config/rofi/menu/buku\n\nelif [ -z \"$another\" ] ; then\n\tsurfraw -browser=$BROWSER $(sr -elvi | awk -F'-' '{print $1}' | sed '/:/d' | awk '{$1=$1};1' | rofi \"${ROFI_OPTIONS[@]}\" -kb-row-select 'Tab' -kb-row-tab 'Control+space' -dmenu -i -p 'bangs: ')\n\nelse\n\t$BROWSER \"https://duckduckgo.com/?q=$another\"\n  #exec nohup $another > /dev/null 2>&1 &\nfi\n"
  },
  {
    "path": ".config/rofi/menu/CONFIG",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_full -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\nedit_with=\"kitty --class=til\"\n\nanother=$(echo \"CONFIGS\nSCRIPTS\nALIASES\nROFMENU\nPROFILE\" | awk '{print $(NF-1)}' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"CONFIGS: \")\n\n\n\nbrowse(){\n\tselected=$(ls \"$1/\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"$1: \")\n\t[[ -z $selected ]] && exit\n\tif [[ -f $1/$selected ]]; then\n\t\t$edit_with -e nvim $1/$selected\n\telif [[ -d $1/$selected ]]; then\n\t\tbrowse $1/$selected\n\telse\n\t\ttouch $1/$selected\n\t\tchmod +x $1/$selected\n\t\t$edit_with -e nvim $1/$selected\n\tfi\n}\n\n\n\nif [ \"$another\" == \"PROFILE\" ] ; then\n\tselected=$(echo \"$HOME/dots/.zshrc\n$HOME/dots/.bashrc\n$HOME/dots/.tmux.conf\n$HOME/dots/.gitconfig\n$HOME/dots/.startup\n$HOME/dots/.profile\n$HOME/.variables \" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"shell: \")\n[[ -z $selected ]] && exit\n\t$edit_with -e nvim $selected\n\nelif [ \"$another\" == \"CONFIGS\" ] ; then\n\tbrowse /home/bresilla/dots/.config;\n\nelif [ \"$another\" == \"SYSTEMS\" ] ; then\n\tbash /home/bresilla/dots/.config/rofi/menu/system;\n\nelif [ \"$another\" == \"SCRIPTS\" ] ; then\n\tbrowse /home/bresilla/dots/.sbin;\n\nelif [ \"$another\" == \"ALIASES\" ] ; then\n\tbrowse /home/bresilla/dots/.func;\n\nelif [ \"$another\" == \"ROFMENU\" ] ; then\n\tbrowse /home/bresilla/dots/.config/rofi/menu;\n\nelse\n    echo $another\nfi\n"
  },
  {
    "path": ".config/rofi/menu/buku",
    "content": "#!/usr/bin/env bash\n\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\n#LINK=$(buku --nc -p -f 4 | awk -F'\\t' '{print $1 \"\\t\\t\\t\\t\" $3 \"\\t\\t\" $4 \"\\t\\t\" $2}' | tail -n +2 | column -t -s $'\\t' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p 'buku: ' | sed 's/ .*//;s/[^0-9]//g') \nLINK=$(buku --nc -p -f 4 | awk -F'\\t' '{print $1 \"\\t\\t\\t\\t\" $3 \"\\t\\t\" $4 \"\\t\\t\" $2}' | tail -n +2 | column -t -s $'\\t' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p 'buku: ' | sed 's/ .*//;s/[^0-9]//g') \n\n[[ -z $LINK ]] && exit 1\nbuku -o $LINK\n"
  },
  {
    "path": ".config/rofi/menu/contacts",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\n# BACKGROUND=$(xrdb -query | grep 'color0:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#FFFFFF}; bckgrd: ${BACKGROUND:-#000000};}\")\n\n name=$(CLIntacts  --database=/home/bresilla/Sets/contacts list -i $(CLIntacts --database=/home/bresilla/Sets/contacts list | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"contacts: \" | cut -d. -f1))\n\nif [ -z \"$name\" ] ; then\n    echo \"nothing selected\"\nelse\n    printf \"$name\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"contacts: \" | cut -d. -f2 | xargs | xclip -sel clip\nfi\n"
  },
  {
    "path": ".config/rofi/menu/locate",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\nanother=$(echo \"data\nhome\" | awk '{print $(NF-1)}' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"search: \")\n\n\nif [ \"$another\" == \"home\" ] ; then\n\tfind /home/bresilla -not -path \"/home/bresilla/.*\" | rofi \"${ROFI_OPTIONS[@]}\" -threads 0 -dmenu -i -p 'locate:' | xargs -r -0 xdg-open;\n\nelif [ \"$another\" == \"data\" ] ; then\n\tfind /home/bresilla/DATA | rofi \"${ROFI_OPTIONS[@]}\" -threads 0 -dmenu -i -p 'locate:' | xargs -r -0 xdg-open;\n\nelse\n    echo $another\nfi\n\n\n\n"
  },
  {
    "path": ".config/rofi/menu/marks",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\nbookmarks=$1\n\nif [ -z \"$3\" ];\n\tthen BROWSER=\"firefox\"\nelse\n\tBROWSER=$3\nfi\n\noutput=$(cat $bookmarks | awk '{print $1}' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p 'bookmarks: ')\nchoice=$?\n    \nif [ $choice -ne 0 ]; then\n    \techo \"$choice\"\nelse\n\turl=$(cat $bookmarks | grep \"$output\" | awk '{print $2}');\n\techo $url\n    if [ ${#url} -gt 0 ]; then\n        $BROWSER $url\n    fi\nfi\n"
  },
  {
    "path": ".config/rofi/menu/monitors",
    "content": "#!/bin/bash\n\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nPADDINGS=\"40% 0 0 35%\"\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_icon -theme-str \"*{accent: ${FOREGROUND:-#000000}; spacing: $PADDINGS;}\")\n\n disp=$(echo -e \"1\\n2\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"Select layout:\")\n        if [ \"$disp\" == \"1\" ] ; then\n            exec xrandr --output \"eDP-1\" --primary --mode 3840x2160 --pos 0x0 --output \"DP1\" --off\n        elif [ \"$disp\" == \"2\" ] ; then\n            exec xrandr --output \"eDP-1\" --primary --mode 3840x2160 --pos 0x1080 --output \"DP1\" --mode 1920x1080 --pos 920x0\n        fi\n"
  },
  {
    "path": ".config/rofi/menu/mount",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_full -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\n\nselect=$(echo \"MOUNT\nUMOUNT\" | awk '{print $(NF-1)}' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"Choose to: \")\n\nif [ \"$select\" == \"MOUNT\" ] ; then\n\tmountable=$(lsblk -lp | grep part | grep -v \"t /\" | awk '{print $1, \"(\" $4 \")\"}')\n\tmountdrive=$(echo \"$mountable\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"Choose drive to mount:\" | awk '{print $1}'); \n\t[[ -z $mountdrive ]] && echo \"exiting 1\" && exit\n\tdirectory=$(find /media /home -type d -maxdepth 3 2>/dev/null)\n\tmountpoint=$(echo \"$directory\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"Choose mounting directory:\"); \n\t[[ -z $mountpoint ]] && echo \"exiting 2\" && exit\n\t[[ ! -d \"$mountpoint\" ]] &&\tprompt=$(echo -e \"No\\nYes\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p  \"Create $mountpoint?\");\n\t[[ \"$prompt\" = No ]] && echo \"exiting 3\" && exit\n\tSUDO_ASKPASS=/home/bresilla/.sbin/askpass sudo -A mkdir -p $mountpoint && sudo mount $mountdrive $mountpoint\nfi\n\nif [ \"$select\" == \"UMOUNT\" ] ; then\n\tmounted=$(lsblk -lp | grep \"t /\" | grep -v \"\\(/boot\\|/home\\|/\\)$\" | awk '{print $1, \"(\" $4 \")\", \"on\", $7}')\n\tunmountdrive=$(echo \"$mounted\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"Choose drive to unmount:\");\n\t[[ -z $unmountdrive ]] && echo \"exiting 4\" && exit\n\tdrive=$(echo $unmountdrive | awk '{print $1}')\n\tfolder=$(echo $unmountdrive | awk '{print $4}')\n\tSUDO_ASKPASS=/home/bresilla/.sbin/askpass sudo -A umount $drive && sudo -A rm -r $folder\nfi\n"
  },
  {
    "path": ".config/rofi/menu/note",
    "content": "#!/usr/bin/env bash\n\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\nNOTE=$(dnote view | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p 'notes: ' | awk '{print $2}');\n[[ -z $NOTE ]] && exit 1\nPAGE=$(dnote view $NOTE | tail -n+2 | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p 'pages: ' | awk '{print $1}' | cut -d \"(\" -f2 | cut -d \")\" -f1);\n[[ -z $PAGE ]] && exit 1\nkitty -e dnote edit $NOTE $PAGE\n"
  },
  {
    "path": ".config/rofi/menu/pass",
    "content": "#!/usr/bin/env bash\n\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\n# rofi-pass\n# (c) 2015 Rasmus Steinke <rasi@xssn.at>\nbasecommand=\"$0\"\n\n# set default settings\n_rofi () {\n\trofi \"${ROFI_OPTIONS[@]}\" -no-auto-select -i \"$@\"\n}\n\n_image_viewer () {\n\tfeh -\n}\n\n# We expect to find these fields in pass(1)'s output\nURL_field='url'\nUSERNAME_field='user'\nAUTOTYPE_field='autotype'\nOTPmethod_field='otp_method'\n\ndefault_autotype=\"user :tab pass\"\ndelay=2\nwait=0.2\nxdotool_delay=12\ndefault_do='menu' # menu, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl\nauto_enter='false'\nnotify='false'\nhelp_color=\"\"\nclip=primary\nclip_clear=45\ndefault_user=\"${ROFI_PASS_DEFAULT_USER-$(whoami)}\"\ndefault_user2=john_doe\npassword_length=12\nfix_layout=false\n\n# default shortcuts\nautotype=\"Alt+1\"\ntype_user=\"Alt+2\"\ntype_pass=\"Alt+3\"\nopen_url=\"Alt+4\"\ncopy_name=\"Alt+u\"\ncopy_url=\"Alt+l\"\ncopy_pass=\"Alt+p\"\nshow=\"Alt+o\"\ncopy_menu=\"Alt+c\"\naction_menu=\"Alt+a\"\ntype_menu=\"Alt+t\"\nhelp=\"Alt+h\"\nswitch=\"Alt+x\"\ninsert_pass=\"Alt+n\"\nqrcode=\"Alt+q\"\nprevious_root=\"Shift+Left\"\nnext_root=\"Shift+Right\"\n\n# Safe permissions\numask 077\n\nhas_qrencode() {\n\tcommand -v qrencode >/dev/null 2>&1\n}\n\n# get all password files and create an array\nlist_passwords() {\n\tcd \"${root}\" || exit\n\tpw_list=(**/*.gpg)\n\tprintf '%s\\n' \"${pw_list[@]%.gpg}\" | sort -n\n\n}\n\ndoClip () {\n\tcase \"$clip\" in\n\t\t\"primary\") xclip ;;\n\t\t\"clipboard\") xclip -selection clipboard;;\n\t\t\"both\") xclip; xclip -o | xclip -selection clipboard;;\n\tesac\n}\n\ncheckIfPass () {\n\tprintf '%s\\n' \"${root}: $selected_password\" >| \"$HOME/.cache/rofi-pass/last_used\"\n}\n\n\nautopass () {\n\tx_repeat_enabled=$(xset q | awk '/auto repeat:/ {print $3}')\n\txset r off\n\n\trm -f \"$HOME/.cache/rofi-pass/last_used\"\n\tprintf '%s\\n' \"${root}: $selected_password\" > \"$HOME/.cache/rofi-pass/last_used\"\n\tfor word in ${stuff[\"$AUTOTYPE_field\"]}; do\n\t\tcase \"$word\" in\n\t\t\t\":tab\") xdotool key Tab;;\n\t\t\t\":space\") xdotool key space;;\n\t\t\t\":delay\") sleep \"${delay}\";;\n\t\t\t\":enter\") xdotool key Return;;\n\t\t\t\":otp\") printf '%s' \"$(generateOTP)\" | xdotool type --delay ${xdotool_delay} --clearmodifiers --file -;;\n\t\t\t\"pass\") printf '%s' \"${password}\" | xdotool type --delay ${xdotool_delay} --clearmodifiers --file -;;\n\t\t\t*) printf '%s' \"${stuff[${word}]}\" | xdotool type --delay ${xdotool_delay} --clearmodifiers --file -;;\n\t\tesac\n\tdone\n\n\tif [[ ${auto_enter} == \"true\" ]]; then\n\t\txdotool key Return\n\tfi\n\n\txset r \"$x_repeat_enabled\"\n\tunset x_repeat_enabled\n\tclearUp\n}\n\ngenerateQrCode() {\n\thas_qrencode\n\n\tif [[ $? -eq \"1\" ]]; then\n\t\tprintf '%s\\n' \"qrencode not found\" | _rofi -dmenu\n\t\texit_code=$?\n\t\tif [[ $exit_code -eq \"1\" ]]; then\n\t\t\texit\n\t\telse\n\t\t\t\"${basecommand}\"\n\t\tfi\n\tfi\n\n\tcheckIfPass\n\tpass \"$selected_password\" | head -n 1 | qrencode -d 300 -v 8 -l H -o - | _image_viewer\n\tif [[ $? -eq \"1\" ]]; then\n\t\tprintf '%s\\n' \"\" | _rofi -dmenu -mesg \"Image viewer not defined or cannot read from pipe\"\n\t\texit_value=$?\n\t\tif [[ $exit_value -eq \"1\" ]]; then\n\t\t\texit\n\t\telse\n\t\t\t\"${basecommand}\"\n\t\tfi\n\tfi\n\tclearUp\n}\n\nopenURL () {\n\tcheckIfPass\n\t$BROWSER \"$(PASSWORD_STORE_DIR=\"${root}\" pass \"$selected_password\" | grep \"${URL_field}: \" | gawk '{sub(/:/,\"\")}{print $2}1' | head -1)\"; exit;\n\tclearUp\n}\n\ntypeUser () {\n\tcheckIfPass\n\n\tx_repeat_enabled=$(xset q | awk '/auto repeat:/ {print $3}')\n\txset r off\n\n\tprintf '%s' \"${stuff[${USERNAME_field}]}\" | xdotool type --delay ${xdotool_delay} --clearmodifiers --file -\n\n\txset r \"$x_repeat_enabled\"\n\tunset x_repeat_enabled\n\n\tclearUp\n}\n\ntypePass () {\n\tcheckIfPass\n\n\tx_repeat_enabled=$(xset q | awk '/auto repeat:/ {print $3}')\n\txset r off\n\n\tprintf '%s' \"${password}\" | xdotool type --delay ${xdotool_delay} --clearmodifiers --file -\n\n\tif [[ $notify == \"true\" ]]; then\n\t\tif [[ \"${stuff[notify]}\" == \"false\" ]]; then\n\t\t\t:\n\t\telse\n\t\t\tnotify-send \"rofi-pass\" \"finished typing password\";\n\t\tfi\n\telif [[ $notify == \"false\" ]]; then\n\t\tif [[ \"${stuff[notify]}\" == \"true\" ]]; then\n\t\t\tnotify-send \"rofi-pass\" \"finished typing password\";\n\t\telse\n\t\t\t:\n\t\tfi\n\tfi\n\n\txset r \"$x_repeat_enabled\"\n\tunset x_repeat_enabled\n\tclearUp\n}\n\ntypeField () {\n\tcheckIfPass\n\tlocal to_type\n\n\tx_repeat_enabled=$(xset q | awk '/auto repeat:/ {print $3}')\n\txset r off\n\n\tcase $typefield in\n\t\t\"OTP\") to_type=\"$(generateOTP)\" ;;\n\t\t*) to_type=\"${stuff[${typefield}]}\" ;;\n\tesac\n\n\tprintf '%s' \"$to_type\" | xdotool type --delay ${xdotool_delay} --clearmodifiers --file -\n\n\txset r \"$x_repeat_enabled\"\n\tunset x_repeat_enabled\n\tunset to_type\n\n\tclearUp\n}\n\ngenerateOTP () {\n\tcheckIfPass\n\n\t# First, we check if there is a non-conventional OTP command in the pass file\n\tif PASSWORD_STORE_DIR=\"${root}\" pass \"$selected_password\" | grep -q \"${OTPmethod_field}: \"; then\n\t\t# We execute the commands after otp_method: AS-IS\n\t\tbash -c \"$(PASSWORD_STORE_DIR=\"${root}\" pass \"$selected_password\" | grep \"${OTPmethod_field}: \" | cut -d' ' -f2-)\"\n\telse\n\t\t# If there is no method defined, fallback to pass-otp\n\t\tPASSWORD_STORE_DIR=\"${root}\" pass otp \"$selected_password\"\n\tfi\n\n\tclearUp\n}\n\ncopyUser () {\n\tcheckIfPass\n\tprintf '%s' \"${stuff[${USERNAME_field}]}\" | doClip\n\tclearUp\n}\n\ncopyField () {\n\tcheckIfPass\n\tprintf '%s' \"${stuff[${copyfield}]}\" | doClip\n\tclearUp\n}\n\ncopyURL () {\n\tcheckIfPass\n\tprintf '%s' \"${stuff[${URL_field}]}\" | doClip\n\tclearUp\n}\n\ncopyPass () {\n\tcheckIfPass\n\tprintf '%s' \"$password\" | doClip\n\tif [[ $notify == \"true\" ]]; then\n\t\tnotify-send \"rofi-pass\" \"Copied Password\\\\nClearing in $clip_clear seconds\"\n\tfi\n\n\tif [[ $notify == \"true\" ]]; then\n\t\t(sleep $clip_clear; printf '%s' \"\" | xclip; printf '%s' \"\" | xclip -selection clipboard | notify-send \"rofi-pass\" \"Clipboard cleared\") &\n\telif [[ $notify == \"false\" ]]; then\n\t\t(sleep $clip_clear; printf '%s' \"\" | xclip; printf '%s' \"\" | xclip -selection clipboard) &\n\tfi\n}\n\nviewEntry () {\n\tcheckIfPass\n\tshowEntry \"${selected_password}\"\n}\n\ngeneratePass () {\n\taskmenu_content=(\n\t\t\"Yes\"\n\t\t\"No\")\n\n\taskGenMenu=$(printf '%s\\n' \"${askmenu_content[@]}\" | _rofi -dmenu -p \"Generate new Password for ${selected_password}? > \")\n\taskgen_exit=$?\n\n\tif [[ $askgen_exit -eq 1 ]]; then\n\t\texit\n\tfi\n\tif [[ $askGenMenu == \"Yes\" ]]; then\n\t\ttrue\n\telif [[ $askGenMenu == \"No\" ]]; then\n\t\tactionMenu\n\tfi\n\n\tcheckIfPass\n\n\tsymbols_content=(\n\t\t\"0  Cancel\"\n\t\t\"1  Yes\"\n\t\t\"2  No\")\n\n\tsymbols=$(printf '%s\\n' \"${symbols_content[@]}\" | _rofi -dmenu -p \"Use Symbols? > \")\n\tsymbols_val=$?\n\n\tif [[ $symbols_val -eq 1 ]]; then\n\t\texit\n\tfi\n\tif [[ $symbols == \"0  Cancel\" ]]; then\n\t\tmainMenu;\n\telif [[ $symbols == \"1  Yes\" ]]; then\n\t\tsymbols=\"\";\n\telif [[ $symbols == \"2  No\" ]]; then\n\t\tsymbols=\"-n\";\n\tfi\n\n\tHELP=\"<span color='$help_color'>Enter Number or hit Enter to use default length</span>\"\n\tlength=$(printf '%s' \"\" | _rofi -dmenu -mesg \"${HELP}\" -p \"Password length? (Default: ${password_length}) > \")\n\tlength_exit=$?\n\n\tif [[ $length_exit -eq 1 ]]; then\n\t\texit\n\tfi\n\tif [[ $length == \"\" ]]; then\n\t\tPASSWORD_STORE_DIR=\"${root}\" pass generate ${symbols} -i \"$selected_password\" \"${password_length}\" > /dev/null;\n\telse\n\t\tPASSWORD_STORE_DIR=\"${root}\" pass generate ${symbols} -i \"$selected_password\" \"${length}\" > /dev/null;\n\tfi\n}\n\n# main Menu\nmainMenu () {\n\tif [[ $1 == \"--bmarks\" ]]; then\n\t\tselected_password=\"$(list_passwords 2>/dev/null \\\n\t\t| _rofi -mesg \"Bookmarks Mode. ${switch} to switch\" \\\n\t\t-dmenu \\\n\t\t-kb-custom-10 \"${switch}\" \\\n\t\t-select \"$entry\" \\\n\t\t-p \"rofi-pass > \")\"\n\n\t\trofi_exit=$?\n\n\t\tif [[ $rofi_exit -eq 1 ]]; then\n\t\t\texit\n\t\telif [[ $rofi_exit -eq 19 ]]; then\n\t\t\t${basecommand}\n\t\telif [[ $rofi_exit -eq 0 ]]; then\n\t\t\topenURL\n\t\tfi\n\telse\n\t\tunset selected_password\n\n\t\targs=( -dmenu\n\t\t\t-kb-custom-1 \"${autotype}\"\n\t\t\t-kb-custom-2 \"${type_user}\"\n\t\t\t-kb-custom-3 \"${type_pass}\"\n\t\t\t-kb-custom-4 \"${open_url}\"\n\t\t\t-kb-custom-5 \"${copy_name}\"\n\t\t\t-kb-custom-6 \"${copy_pass}\"\n\t\t\t-kb-custom-7 \"${show}\"\n\t\t\t-kb-custom-8 \"${copy_url}\"\n\t\t\t-kb-custom-9 \"${type_menu}\"\n\t\t\t-kb-custom-10 \"${previous_root}\"\n\t\t\t-kb-custom-11 \"${next_root}\"\n\t\t\t-kb-custom-14 \"${action_menu}\"\n\t\t\t-kb-custom-15 \"${copy_menu}\"\n\t\t\t-kb-custom-16 \"${help}\"\n\t\t\t-kb-custom-17 \"${switch}\"\n\t\t\t-kb-custom-18 \"${insert_pass}\"\n\t\t\t-kb-custom-19 \"${qrcode}\")\n\t\targs+=(-kb-mode-previous \"\"    # These keyboard shortcut options are needed, because\n\t\t\t-kb-mode-next \"\"            # Shift+<Left|Right> are otherwise taken by rofi.\n\t\t\t-select \"$entry\"\n\t\t\t-p \"> \")\n\n\t\tif [[ ${#roots[@]} -gt \"1\" || $custom_root == \"true\" ]]; then\n\t\t\targs+=(-mesg \"PW Store: ${root}\")\n\t\tfi\n\n\t\tselected_password=\"$(list_passwords 2>/dev/null | _rofi \"${args[@]}\")\"\n\n\t\trofi_exit=$?\n\t\tif [[ $rofi_exit -eq 1 ]]; then\n\t\t\texit\n\t\tfi\n\n\t\t# Actions based on exit code, which do not need the entry.\n\t\t# The exit code for -kb-custom-X is X+9.\n\t\tcase \"${rofi_exit}\" in\n\t\t\t19) roots_index=$(( (roots_index-1+roots_length) % roots_length)); root=${roots[$roots_index]}; mainMenu; return;;\n\t\t\t20) roots_index=$(( (roots_index+1) % roots_length)); root=${roots[$roots_index]}; mainMenu; return;;\n\t\t\t25) helpMenu; return;;\n\t\t\t26) ${basecommand} --bmarks; return;;\n\t\tesac\n\n\t\tmapfile -t password_temp < <(PASSWORD_STORE_DIR=\"${root}\" pass show \"$selected_password\")\n\t\tpassword=${password_temp[0]}\n\n\t\tif [[ ${password} == \"#FILE=\"* ]]; then\n\t\t\tpass_file=\"${password#*=}\"\n\t\t\tmapfile -t password_temp2 < <(PASSWORD_STORE_DIR=\"${root}\" pass show \"${pass_file}\")\n\t\t\tpassword=${password_temp2[0]}\n\t\tfi\n\n\t\tfields=$(printf '%s\\n' \"${password_temp[@]:1}\" | awk '$1 ~ /:$/ || /otpauth:\\/\\// {$1=$1;print}')\n\t\tdeclare -A stuff\n\t\tstuff[\"pass\"]=${password}\n\t\n\t\tif [[ -n $fields ]]; then\n\t\t\twhile read -r LINE; do\n\t\t\t\tunset _id _val\n\t\t\t\tcase \"$LINE\" in\n\t\t\t\t\t\"otpauth://\"*|\"${OTPmethod_field}\"*)\n\t\t\t\t\t\t_id=\"OTP\"\n\t\t\t\t\t\t_val=\"\"\n\t\t\t\t\t\t;;\n\t\t\t\t\t*)\n\t\t\t\t\t\t_id=\"${LINE%%: *}\"\n\t\t\t\t\t\t_val=\"${LINE#* }\"\n\t\t\t\t\t;;\n\t\t\t\tesac\n\n\t\t\t\tif [[ -n \"$_id\" ]]; then\n\t\t\t\t\tstuff[\"${_id}\"]=${_val}\n\t\t\t\tfi\n\t\t\tdone < <(printf '%s\\n' \"${fields}\")\n\n\t\t\tif test \"${stuff['autotype']+autotype}\"; then\n\t\t\t\t:\n\t\t\telse\n\t\t\t\tstuff[\"autotype\"]=\"${USERNAME_field} :tab pass\"\n\t\t\tfi\n\t\tfi\n\tfi\n\n\tif [[ -z \"${stuff[\"${AUTOTYPE_field}\"]}\" ]]; then\n\t\tif [[ -n $default_autotype ]]; then\n\t\t\tstuff[\"${AUTOTYPE_field}\"]=\"${default_autotype}\"\n\t\tfi\n\tfi\n\tif [[ -z \"${stuff[\"${USERNAME_field}\"]}\" ]]; then\n\t\tif [[ -n $default_user ]]; then\n\t\t\tif [[ \"$default_user\" == \":filename\" ]]; then\n\t\t    \tstuff[\"${USERNAME_field}\"]=\"$(basename $selected_password)\"\n\t\t    else\n\t\t    \tstuff[\"${USERNAME_field}\"]=\"${default_user}\"\n    \t\tfi\n\t\tfi\n\tfi\n\tpass_content=\"$(for key in \"${!stuff[@]}\"; do printf '%s\\n' \"${key}: ${stuff[$key]}\"; done)\"\n\n\t# actions based on keypresses\n\t# The exit code for -kb-custom-X is X+9.\n\tcase \"${rofi_exit}\" in\n\t\t0) typeMenu;;\n\t\t10) sleep $wait; autopass;;\n\t\t11) sleep $wait; typeUser;;\n\t\t12) sleep $wait; typePass;;\n\t\t13) openURL;;\n\t\t14) copyUser;;\n\t\t15) copyPass;;\n\t\t16) viewEntry;;\n\t\t17) copyURL;;\n\t\t18) default_do=\"menu\" typeMenu;;\n\t\t23) actionMenu;;\n\t\t24) copyMenu;;\n\t\t27) insertPass;;\n\t\t28) generateQrCode;;\n\tesac\n\tclearUp\n}\n\n\nclearUp () {\n\tpassword=''\n\tselected_password=''\n\tunset stuff\n\tunset password\n\tunset selected_password\n\tunset password_temp\n\tunset stuff\n}\n\nhelpMenu () {\n\tprintf '%s' \"${autotype}: Autotype\n\t${type_user}: Type Username\n\t${type_pass}: Type Password\n\t${qrcode}: Generate and display qrcode\n\t---\n\t${copy_name}: Copy Username\n\t${copy_pass}: Copy Password\n\t${copy_url}: Copy URL\n\t${open_url}: Open URL\n\t${copy_menu}: Copy Custom Field\n\t---\n\t${action_menu}: Edit, Move, Delete, Re-generate Submenu\n\t${show}: Show Password File\n\t${insert_pass}: Insert new Pass Entry\n\t${switch}: Switch Pass/Bookmark Mode\n\t---\n\t${previous_root}: Switch to previous password store (--root)\n\t${next_root}: Switch to next password store (--root)\n\t\" | _rofi -dmenu -mesg \"Hint: All hotkeys are configurable in config file\" -p \"Help > \"\n\thelp_val=$?\n\n\tif [[ $help_val -eq 1 ]]; then\n\t\texit;\n\telse\n\t\tunset helptext; mainMenu;\n\tfi\n}\n\n\ntypeMenu () {\n\tif [[ -n $default_do ]]; then\n\t\tif [[ $default_do == \"menu\" ]]; then\n\t\t\tcheckIfPass\n\t\t\tlocal -a keys=(\"${!stuff[@]}\")\n\t\t\tkeys=(\"${keys[@]/$AUTOTYPE_field}\")\n\t\t\ttypefield=$({ printf '%s' \"${AUTOTYPE_field}\" ; printf '%s\\n' \"${keys[@]}\" | sort; } | _rofi -dmenu  -p \"Choose Field to type > \")\n\t\t\ttypefield_exit=$?\n\t\t\tif [[ $typefield_exit -eq 1 ]]; then\n\t\t\t\texit\n\t\t\tfi\n\t\t\tcase \"$typefield\" in\n\t\t\t\t'') exit;;\n\t\t\t\t'pass') sleep $wait; typePass;;\n\t\t\t\t\"${AUTOTYPE_field}\") sleep $wait; autopass;;\n\t\t\t\t*) sleep $wait; typeField\n\t\t\tesac\n\t\t\tclearUp\n\t\telif [[ $default_do == \"${AUTOTYPE_field}\" ]]; then\n\t\t\tsleep $wait; autopass\n\t\telse\n\t\t\t${default_do}\n\t\tfi\n\tfi\n}\n\ncopyMenu () {\n\tcheckIfPass\n\tcopyfield=$(printf '%s\\n' \"${!stuff[@]}\" | sort | _rofi -dmenu  -p \"Choose Field to copy > \")\n\tval=$?\n\tif [[ $val -eq 1 ]]; then\n\t\texit;\n\tfi\n\tif [[ $copyfield == \"pass\" ]]; then\n\t\tcopyPass;\n\telse\n\t\tcopyField\n\tfi\n\tclearUp\n}\n\nactionMenu () {\n\tcheckIfPass\n\taction_content=(\"< Return\"\n\t\t\"---\"\n\t\t\"1 Move Password File\"\n\t\t\"2 Copy Password File\"\n\t\t\"3 Delete Password File\"\n\t\t\"4 Edit Password File\"\n\t\t\"5 Generate New Password\")\n\n\taction=$(printf '%s\\n' \"${action_content[@]}\" | _rofi -dmenu -p \"Choose Action > \")\n\tif [[ ${action} == \"1 Move Password File\" ]]; then\n\t\tmanageEntry move;\n\telif [[ ${action} == \"3 Delete Password File\" ]]; then\n\t\tmanageEntry delete;\n\telif [[ ${action} == \"2 Copy Password File\" ]]; then\n\t\tmanageEntry copy;\n\telif [[ ${action} == \"4 Edit Password File\" ]]; then\n\t\tmanageEntry edit;\n\telif [[ ${action} == \"5 Generate New Password\" ]]; then\n\t\tgeneratePass;\n\telif [[ ${action} == \"< Return\" ]]; then\n\t\tmainMenu;\n\telif [[ ${action} == \"\" ]]; then\n\t\texit\n\tfi\n}\n\nshowEntry () {\n\tif [[ -z $pass_content ]]; then\n\t\tpass_temp=$(PASSWORD_STORE_DIR=\"${root}\" pass show \"$selected_password\")\n\t\tpassword=\"${pass_temp%%$'\\n'*}\"\n\t\tpass_key_value=$(printf '%s\\n' \"${pass_temp}\" | tail -n+2 | grep ': ')\n\t\tdeclare -A stuff\n\n\t\twhile read -r LINE; do\n\t\t\t_id=\"${LINE%%: *}\"\n\t\t\t_val=\"${LINE#* }\"\n\t\t\tstuff[\"${_id}\"]=${_val}\n\t\tdone < <(printf '%s\\n' \"${pass_key_value}\")\n\n\t\tstuff[\"pass\"]=${password}\n\n\t\tif test \"${stuff['autotype']+autotype}\"; then\n\t\t\t:\n\t\telse\n\t\t\tstuff[\"autotype\"]=\"${USERNAME_field} :tab pass\"\n\t\tfi\n\n\t\tpass_content=\"$(for key in \"${!stuff[@]}\"; do printf '%s\\n' \"${key}: ${stuff[$key]}\"; done)\"\n\tfi\n\n\tbla_content=(\"< Return\"\n\t\t\"${pass_content}\")\n\n\tbla=$(printf '%s\\n' \"${bla_content[@]}\" | _rofi -dmenu -mesg \"Enter: Copy entry to clipboard\" -p \"> \")\n\trofi_exit=$?\n\n\tword=$(printf '%s' \"$bla\" | gawk -F': ' '{print $1}')\n\n\tif [[ ${rofi_exit} -eq 1 ]]; then\n\t\texit\n\telif [[ ${rofi_exit} -eq 0 ]]; then\n\t\tif [[ ${bla} == \"< Return\" ]]; then\n\t\t\tmainMenu\n\t\telse\n\t\t\tif [[ -z $(printf '%s' \"${stuff[${word}]}\") ]]; then\n\t\t\t\tprintf '%s' \"$word\" | doClip\n\t\t\telse\n\t\t\t\tprintf '%s' \"${stuff[${word}]}\" | doClip\n\t\t\tfi\n\t\t\tif [[ $notify == \"true\" ]]; then\n\t\t\t\tnotify-send \"rofi-pass\" \"Copied Password\\\\nClearing in $clip_clear seconds\"\n\t\t\tfi\n\t\t\tif [[ $notify == \"true\" ]]; then\n\t\t\t\t(sleep $clip_clear; printf '%s' \"\" | xclip; printf '%s' \"\" | xclip -selection clipboard | notify-send \"rofi-pass\" \"Clipboard cleared\") &\n\t\t\telif [[ $notify == \"false\" ]]; \tthen\n\t\t\t\t(sleep $clip_clear; printf '%s' \"\" | xclip; printf '%s' \"\" | xclip -selection clipboard) &\n\t\t\tfi\n\t\t\texit\n\t\tfi\n\tfi\n\texit\n\tunset stuff\n\tunset password\n\tunset selected_password\n\tunset password_temp\n\tunset stuff\n\texit\n}\n\nmanageEntry () {\n\tif [[ \"$1\" == \"edit\" ]]; then\n\t\tEDITOR=$EDITOR PASSWORD_STORE_DIR=\"${root}\" pass edit \"${selected_password}\"\n\t\tmainMenu\n\telif [[ $1 == \"move\" ]]; then\n\t\tcd \"${root}\" || exit\n\t\tgroup_array=(*/)\n\t\tgroup=$(printf '%s\\n' \"${group_array[@]%/}\" | _rofi -dmenu -p \"Choose Group > \")\n\t\tif [[ $group == \"\" ]]; then\n\t\t\texit\n\t\tfi\n\t\tPASSWORD_STORE_DIR=\"${root}\" pass mv \"$selected_password\" \"${group}\"\n\t\tmainMenu\n\telif [[ $1 == \"copy\" ]]; then\n\t\tcd \"${root}\" || exit\n\t\tgroup_array=(*/)\n\t\tgroup=$(printf '%s\\n' \"${group_array[@]%/}\" | _rofi -dmenu -p \"Choose Group > \")\n\t\tif [[ $group == \"\" ]]; then\n\t\t\texit\n\t\telse\n\t\t\tnew_name=\"$(listgpg | _rofi -dmenu -format 'f' -mesg \"Copying to same Group. Please enter a name for the new entry\" -p \"> \")\"\n\t\tfi\n\t\tPASSWORD_STORE_DIR=\"${root}\" pass cp \"$selected_password\" \"${group}/${new_name}\"\n\t\tmainMenu\n\telif [[ \"$1\" == \"delete\" ]]; then\n\t\tHELP=\"<span color='$help_color'>Selected entry: ${selected_password}</span>\"\n\t\task_content=(\"Yes\"\n\t\t\t\"No\")\n\t\task=$(printf '%s\\n' \"${ask_content[@]}\" | _rofi -mesg \"${HELP}\" -dmenu -p \"Are You Sure? > \")\n\t\tif [[ \"$ask\" == \"Yes\" ]]; then\n\t\t\tPASSWORD_STORE_DIR=\"${root}\" pass rm --force \"${selected_password}\"\n\t\telif [[ \"$ask\" == \"No\" ]]; then\n\t\t\tmainMenu\n\t\telif [[ -z \"$ask\" ]]; then\n\t\t\texit\n\t\tfi\n\telse\n\t\tmainMenu\n\tfi\n}\n\nlistgpg () {\n\tpw_list=(**/*.gpg)\n\tprintf '%s\\n' \"${pw_list[@]}\" | sort -n\n}\n\ninsertPass () {\n\turl=$(xclip --selection clipboard -o)\n\n\tif [[ \"${url:0:4}\" == \"http\" ]]; then\n\t\tdomain_name=\"$(printf '%s\\n' \"${url}\" | awk -F / '{l=split($3,a,\".\"); print (a[l-1]==\"com\"?a[l-2] OFS:X) a[l-1] OFS a[l]}' OFS=\".\")\"\n\t\thelp_content=\"Domain: ${domain_name}\n\t\tType name, make sure it is unique\"\n\telse\n\t\thelp_content=\"Hint: Copy URL to clipboard before calling this menu.\n\t\tType name, make sure it is unique\"\n\tfi\n\n\tcd \"${root}\" || exit\n\tgroup_array=(*/)\n\tgrouplist=$(printf '%s\\n' \"${group_array[@]%/}\")\n\tname=\"$(listgpg | _rofi -dmenu -format 'f' -filter \"${domain_name}\" -mesg \"${help_content}\" -p \"> \")\"\n\tval=$?\n\n\tif [[ $val -eq 1 ]]; then\n\t\texit\n\tfi\n\n\tuser_content=(\"${default_user2}\"\n\t\t\"${USER}\"\n\t\t\"${default_user}\")\n\n\tuser=$(printf '%s\\n' \"${user_content[@]}\" | _rofi -dmenu -mesg \"Chose Username or type\" -p \"> \")\n\tval=$?\n\n\tif [[ $val -eq 1 ]]; then\n\t\texit\n\tfi\n\n\tgroup_content=(\"No Group\"\n\t\t\"---\"\n\t\t\"${grouplist}\")\n\n\tgroup=$(printf '%s\\n' \"${group_content[@]}\" | _rofi -dmenu -p \"Choose Group > \")\n\tval=$?\n\n\tif [[ $val -eq 1 ]]; then\n\t\texit\n\tfi\n\n\tpw=$(printf '%s' \"Generate\" | _rofi -dmenu -p \"Password > \" -mesg \"Type Password or hit Enter to generate one\")\n\n\tif [[ $pw == \"Generate\" ]]; then\n\t\tpw=$(_pwgen \"${password_length}\")\n\tfi\n\n\tclear\n\n\tif [[ \"$group\" == \"No Group\" ]]; then\n\t\tif [[ $url == http* ]]; then\n\t\t\tpass_content=(\"${pw}\"\n\t\t\t\t\"---\"\n\t\t\t\t\"${USERNAME_field}: ${user}\"\n\t\t\t\t\"${URL_field}: ${url}\")\n\t\t\tprintf '%s\\n' \"${pass_content[@]}\" | PASSWORD_STORE_DIR=\"${root}\" pass insert -m \"${name}\" > /dev/null && PASSWORD_STORE_DIR=\"${root}\" pass edit \"${name}\"\n\t\telse\n\t\t\tpass_content=(\"${pw}\"\n\t\t\t\t\"---\"\n\t\t\t\t\"${USERNAME_field}: ${user}\")\n\t\t\tprintf '%s\\n' \"${pass_content[@]}\" | PASSWORD_STORE_DIR=\"${root}\" pass insert -m \"${name}\" > /dev/null && PASSWORD_STORE_DIR=\"${root}\" pass edit \"${name}\"\n\t\tfi\n\telse\n\t\tif [[ $url == http* ]]; then\n\t\t\tpass_content=(\"${pw}\"\n\t\t\t\t\"---\"\n\t\t\t\t\"${USERNAME_field}: ${user}\"\n\t\t\t\t\"${URL_field}: ${url}\")\n\t\t\tprintf '%s\\n' \"${pass_content[@]}\" | PASSWORD_STORE_DIR=\"${root}\" pass insert -m \"${group}/${name}\" > /dev/null && PASSWORD_STORE_DIR=\"${root}\" pass edit \"${group}/${name}\"\n\t\telse\n\t\t\tpass_content=(\"${pw}\"\n\t\t\t\t\"---\"\n\t\t\t\t\"${USERNAME_field}: ${user}\")\n\t\t\tprintf '%s\\n' \"${pass_content[@]}\" | PASSWORD_STORE_DIR=\"${root}\" pass insert -m \"${group}/${name}\" > /dev/null\n\t\t\tif [[ $edit_new_pass == \"true\" ]]; then\n\t\t\t\tPASSWORD_STORE_DIR=\"${root}\" pass edit \"${group}/${name}\"\n\t\t\tfi\n\t\tfi\n\tfi\n}\n\nhelp_msg () {\n\tcat <<'EOF' \n\tUsage:\n\trofi-pass [command]\n\n\tCommands:\n\t--insert         insert new entry to password store\n\t--root           set custom root directories (colon separated)\n\t--last-used      highlight last used item\n\t--show-last      show details of last used Entry\n\t--bmarks         start in bookmarks mode\n\n\trofi-pass version 1.5.3\nEOF\n}\n\nget_config_file () {\n\tconfigs=(\"$ROFI_PASS_CONFIG\"\n\t\t\"$HOME/.config/rofi-pass/config\"\n\t\t\"/etc/rofi-pass.conf\")\n\n\t# return the first config file with a valid path\n\tfor config in \"${configs[@]}\"; do\n\t\t# '! -z' is needed in case ROFI_PASS_CONFIG is not set\n\t\tif [[ ! -z \"${config}\" && -f \"${config}\" ]]; then\n\t\t\tprintf \"%s\" \"$config\"\n\t\t\treturn\n\t\tfi\n\tdone\n}\n\nmain () {\n\t# enable extended globbing\n\tshopt -s nullglob globstar\n\n\t# load config file\n\tconfig_file=\"$(get_config_file)\"\n\t[[ ! -z \"$config_file\" ]] && source \"$config_file\"\n\n\t# create tmp dir\n\tif [[ ! -d \"$HOME/.cache/rofi-pass\" ]]; then\n\t\tmkdir \"$HOME/.cache/rofi-pass\"\n\tfi\n\n\t# fix keyboard layout if enabled in config\n\tif [[ $fix_layout == \"true\" ]]; then\n\t\tlayout_cmd\n\tfi\n\n\t# set help color\n\tif [[ $help_color == \"\" ]]; then\n\t\thelp_color=$(rofi -dump-xresources | grep 'rofi.color.normal' | gawk -F ',' '/,/{gsub(/ /, \"\", $2); print $2}')\n\tfi\n\n\t# check for BROWSER variable, use xdg-open as fallback\n\tif [[ -z $BROWSER ]]; then\n\t\texport BROWSER=xdg-open\n\tfi\n\n\t# check if alternative root directory was given on commandline\n\tif [[ -r \"$HOME/.cache/rofi-pass/last_used\" ]] && [[ $1 == \"--last-used\" || $1 == \"--show-last\" ]]; then\n\t\troots=(\"$(awk -F ': ' '{ print $1 }' \"$HOME/.cache/rofi-pass/last_used\")\")\n\telif [[ -n \"$2\" && \"$1\" == \"--root\" ]]; then\n\t\tcustom_root=true; IFS=: read -r -a roots <<< \"$2\"\n\telif [[ -n $root ]]; then\n\t\tcustom_root=true; IFS=: read -r -a roots <<< \"${root}\"\n\telif [[ -n ${PASSWORD_STORE_DIR} ]]; then\n\t\troots=(\"${PASSWORD_STORE_DIR}\")\n\telse\n\t\troots=(\"$HOME/.password-store\")\n\tfi\n\troots_index=0\n\troots_length=${#roots[@]}\n\texport root=${roots[$roots_index]}\n\texport PASSWORD_STORE_DIR=\"${root}\"\n\tcase $1 in\n\t\t--insert)\n\t\t\tinsertPass\n\t\t\t;;\n\t\t--root)\n\t\t\tmainMenu\n\t\t\t;;\n\t\t--help)\n\t\t\thelp_msg\n\t\t\t;;\n\t\t--last-used)\n\t\t\tif [[ -r \"$HOME/.cache/rofi-pass/last_used\" ]]; then\n\t\t\t\tentry=\"$(awk -F ': ' '{ print $2 }' \"$HOME/.cache/rofi-pass/last_used\")\"\n\t\t\tfi\n\t\t\tmainMenu\n\t\t\t;;\n\t\t--show-last)\n\t\t\tif [[ -r \"$HOME/.cache/rofi-pass/last_used\" ]]; then\n\t\t\t\tselected_password=\"$(awk -F ': ' '{ print $2 }' \"$HOME/.cache/rofi-pass/last_used\")\" viewEntry\n\t\t\telse\n\t\t\t\tmainMenu\n\t\t\tfi\n\t\t\t;;\n\t\t--bmarks)\n\t\t\tmainMenu --bmarks;\n\t\t\t;;\n\t\t*)\n\t\t\tmainMenu\n\t\t\t;;\n\tesac\n}\n\nmain \"$@\"\n\n\n"
  },
  {
    "path": ".config/rofi/menu/rofis",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_full -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\nbrowse(){\n\tselected=$(ls \"$1/\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"$1: \")\n\t[[ -z $selected ]] && exit\n\tif [[ -f $1/$selected ]]; then\n\t\tgedit $1/$selected\n\telif [[ -d $1/$selected ]]; then\n\t\tbrowse $1/$selected\n\telse\n\t\ttouch $1/$selected\n\t\tchmod +x $1/$selected\n\t\tgedit $1/$selected\n\tfi\n}\n\nanother=$(browse /home/bresilla/dots/.config/rofi/menu | awk '{print $(NF-1)}' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p \"SYSTEM: \")\n"
  },
  {
    "path": ".config/rofi/menu/screenshot",
    "content": "#!/bin/bash\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nPADDINGS=\"40% 0 0 40%\"\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_icon -theme-str \"*{accent: ${FOREGROUND:-#000000}; spacing: $PADDINGS;}\")\n\nzoom=\"\"\ncolor=\"\"\nrecord=\"\"\nscreenshot=\"\"\n\noptions=\"$zoom\\n$color\\n$record\\n$screenshot\"\nchosen=\"$(echo -e \"$options\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -selected-row 2)\"\n\nPADDINGS=\"40% 0 0 46%\"\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_icon -theme-str \"*{accent: ${FOREGROUND:-#000000}; spacing: $PADDINGS;}\")\n\ncase $chosen in\n    $zoom)\n        disp=$(echo -e \"\\n\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -selected-row 2)\n        sleep .2\n        if [ \"$disp\" == \"\" ] ; then\n            slop -r boxzoom\n        elif [ \"$disp\" == \"\" ] ; then\n            slop -r crosshair\n        fi\n        ;;\n    $color)\n        # pastel pick | pastel format hex | xclip -sel clip\n        xcolor | xclip -sel clip\n        ;;\n    $record)\n        disp=$(echo -e \"\\n\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -selected-row 2)\n        if [ \"$disp\" == \"\" ] ; then\n            exec /home/bresilla/.sbin/recffm -w\n        elif [ \"$disp\" == \"\" ] ; then\n            killall ffmpeg\n            exec /home/bresilla/.sbin/recffm -g\n        fi\n        ;;\n    $screenshot)\n        disp=$(echo -e \"\\n\" | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -selected-row 2)\n        if [ \"$disp\" == \"\" ] ; then\n            filename=/home/bresilla/temp/$(date +%s).png\n        elif [ \"$disp\" == \"\" ] ; then\n            filename=/tmp/$(date +%s).png\n        fi\n        maim -s | tee $filename | xclip -sel clip -t image/png -i && sxiv $filename\n        ;;\nesac\n"
  },
  {
    "path": ".config/rofi/menu/task",
    "content": "#!/usr/bin/env bash\n\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\nTASK=$(task | tail -n+4 | head -n-2 | awk '{print $0}' | column -t -s $'\\t' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -i -p 'task: ' | awk '{print $1}') \n\n[[ -z $TASK ]] && exit 1\ntask done $TASK\n"
  },
  {
    "path": ".config/rofi/menu/uplay",
    "content": "#!/bin/bash\n\nFOREGROUND=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nROFI_OPTIONS=(-theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\")\n\nsearch='results?search_query='\nplaylist='&sp=EgIQA0IECAESAA%253D%253D'\nentries=0\n\ninput=`rofi \"${ROFI_OPTIONS[@]}\" -dmenu -p \"youtube\" | sed 's/ /+/g'`\n\nresult=$(curl -s \"https://www.youtube.com/$search$input\" 2>/dev/null) <<< $result\n\ntitle=`echo -e $(\nwhile IFS= read -r line\n  do\n    if [[ $line == *'title=\"'* && $line == *'href=\"'* && $line == *'data-sessionlink=\"'* && $line != *'u003'* && $line != *'title=\"__title__\"'* && $line != *'href=\"//www.youtube.com/upload\"'* ]];\n      then\n\tline=$(echo $line | cut -f5 -d'>' | cut -f1 -d '<' |  sed '/^$/d' | perl -MHTML::Entities -pe 'decode_entities($_);')\n\tif [[ $line != '' && $line != ' ' ]];\n\tthen\n\t    entries=$((entries+1))\n\t    echo -e \"$line<RETURN>\"\n        fi\n    fi\t\ndone <<< \"$result\"\n) | sed 's/<RETURN>/\\n/g' | sed 's/^[ ]//' | rofi \"${ROFI_OPTIONS[@]}\" -dmenu -p \"results\"`\n\nwhile IFS= read -r line\n  do\n    if [[ $line == *'title=\"'* && $line == *'href=\"'* && $line == *'data-sessionlink=\"'* && $line != *'u003'* && $line != *'title=\"__title__\"'* && $line != *'href=\"//www.youtube.com/upload\"'* ]];\n      then \n        bline=$line\n        line=$(echo $line | cut -f5 -d'>' | cut -f1 -d '<' |  sed '/^$/d' | perl -MHTML::Entities -pe 'decode_entities($_);')\n        if [[ $line != '' && $line != ' ' ]];\n          then\n            if [[ \"$line\" == \"$title\"  ]]; \n\t      then\n                link=\"https://www.youtube.com\"\n                link+=$(echo $bline | cut -f4 -d'>' | cut -f2 -d'\"' | cut -f1 -d '\"')\n\t    fi\n\n        fi\n    fi  \ndone <<< \"$result\"\necho $link\nmpv --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' --input-file /home/bresilla/.config/mpv/control --speed 1.0 \"$link\"\n"
  },
  {
    "path": ".config/rofi/rofi_bar",
    "content": "/**\n * ROFI Color theme2\n * User: bresilla\n copy those lines to: ~/.conf/rofi/ or ~/.Xdefaults\n\trofi.fullscreen:true\n\trofi.theme: ~/.i3/rofi.rasi\n */\n\n* {\n\taccent: #FFFFFF;\n\tbckgrd: #000000;\n\tselect: @accent;\n\n\tforeground:         @accent;\n\tforeground-alt:    \t#ebebeb;\n\tbackground:\t\t\t@bckgrd;\n\tbackground-alt: \trgba(255, 255, 255, 0.1);\n\ttransparent:\t\trgba(0, 0, 0, 0);\n\turgentcolor:      \t#e53714;\n\n    fromtop: 20%;\n   font: \t\t\t\t\"Monoid 14\";\n   border-color:        @background;\n   separatorcolor:      @foreground;\n   background-color: \t@background;\n}\n\n#window {\n   background-color: \t@background;\n   anchor: \t\t\t\tnorth;\n   location: \t\t\tnorth;\n   y-offset: \t\t\t@fromtop;\n    border-radius:      8px;\n}\n\n#mainbox {\n   background-color: \t@background;\n}\n\n#listview {\n   fixed-height: \t\tfalse;\n   dynamic: \t\t\ttrue;\n   scrollbar: \t\t\tfalse;\n   padding: \t\t\t10px;\n   border:              5px;\n   background: \t\t\t@background;\n}\n\n#element {\n    padding: \t\t\t10px 25px 10px 25px;\n    border-radius:      4px;\n}\n\n#element.normal.normal {\n   background-color: \t@background;\n   text-color: \t\t\t@foreground-alt;\n}\n\n#element.normal.urgent {\n   background-color: \t@background;\n   text-color: \t\t\t@urgentcolor;\n}\n\n#element.normal.active {\n   background-color: \t@background;\n   text-color: \t\t\t@foreground;\n}\n\n#element.selected.normal {\n    background-color: \t@background-alt;\n    text-color:       \t@foreground;\n}\n\n#element.selected.urgent {\n    background-color: \t@urgentcolor;\n    text-color:       \t@background;\n}\n\n#element.selected.active {\n    background-color: \t@foreground;\n    text-color:       \t@thi;\n}\n\n#element.alternate.normal {\n    background-color: \t@background;\n    text-color:       \t@foreground-alt;\n}\n\n#element.alternate.urgent {\n    background-color: \t@background;\n    text-color:       \t@urgentcolor;\n}\n\n#element.alternate.active {\n    background-color: \t@background;\n    text-color:       \t@foreground;\n}\n\n#button {\n   background-color: \t@background;\n   text-color:       \t@background;\n}\n\n\n#button.selected {\n    text-color:      \t@foreground;\n}\n#inputbar {\n   padding: \t\t\t0 -1% 0 0;\n}\n\n#prompt {\n   background-color:\t@foreground;\n   text-color:\t\t\t@background;\n   padding: \t\t\t10 1% 10 1%;\n}\n\n#entry {\n   background-color: \t@background-alt;\n   text-color:\t\t\t@foreground;\n   border-radius:       4px;\n   padding: \t\t\t10 0 10 10;\n}\n"
  },
  {
    "path": ".config/rofi/rofi_full",
    "content": "/**\n * ROFI Color theme\n * User: bresilla\n copy those lines to: ~/.conf/rofi/ or ~/.Xdefaults\n\trofi.fullscreen:true\n\trofi.theme: ~/.i3/rofi.rasi\n */\n\n* {\n\taccent: #FFFFFF;\n    foreground:         \t\t@accent;\n    background:         \t\trgba(0, 0, 0, 0.80);\n    transparent:\t\t\t\trgba(0, 0, 0, 0);\n\n    normal-background: \t\t\t@transparent;\n    normal-foreground: \t\t\t@foreground;\n    urgent-background: \t\t\t@transparent;\n    urgent-foreground:\t\t\t@foreground;\n    active-background: \t\t\t@transparent;\n    active-foreground:\t\t\t@foreground;\n\n    selected-normal-background:  @foreground;\n    selected-normal-foreground:  @background;\n    selected-urgent-background:  @foreground;\n    selected-urgent-foreground:  @background;\n    selected-active-background:  @foreground;\n    selected-active-foreground:  @background;\n\n    alternate-normal-background: @transparent;\n    alternate-normal-foreground: @foreground;\n    alternate-active-background: @transparent;\n    alternate-active-foreground: @active-foreground;\n    alternate-urgent-background: @transparent;\n    alternate-urgent-foreground: @urgent-foreground;\n\n    font: \t\t\t\t         \"Monoid 14\";\n    border-color:                @background;\n    separatorcolor:              @foreground;\n    background-color:            @transparent;\n    spacing:                     10;\n}\n\n#window {\n    background-color: \t\t@background;\n    border:   \t\t\t\t0;\n    padding: \t\t\t\t0;\n    fullscreen:             true;\n}\n#mainbox {\n    border:   \t\t\t\t0;\n    padding: \t\t\t\t30%;\n}\n#message {\n    border:       \t\t\t2px 0px 0px ;\n    border-color: \t\t\t@separatorcolor;\n    padding: \t\t\t\t10 1% 10;\n}\n#textbox {\n    text-color: \t\t\t@foreground;\n}\n#listview {\n    fixed-height: \t\t\t0;\n    border:       \t\t\t2px 0px 0px ;\n    border-color: \t\t\t@separatorcolor;\n    spacing:      \t\t\t10px;\n    padding: \t\t\t\t10 1% 10;\n}\n\n#element {\n    border:  \t\t\t\t0;\n    padding: \t\t\t\t10 10 10;\n    border-radius: 4px;\n}\n#element.normal.normal {\n    background-color: \t\t@normal-background;\n    text-color:       \t\t@normal-foreground;\n}\n#element.normal.urgent {\n    background-color: \t\t@urgent-background;\n    text-color:       \t\t@urgent-foreground;\n}\n#element.normal.active {\n    background-color: \t\t@active-background;\n    text-color:       \t\t@active-foreground;\n}\n#element.selected.normal {\n    background-color: \t\t@selected-normal-background;\n    text-color:       \t\t@selected-normal-foreground;\n}\n#element.selected.urgent {\n    background-color: \t\t@selected-urgent-background;\n    text-color:       \t\t@selected-urgent-foreground;\n}\n#element.selected.active {\n    background-color: \t\t@selected-active-background;\n    text-color:       \t\t@selected-active-foreground;\n}\n#element.alternate.normal {\n    background-color: \t\t@alternate-normal-background;\n    text-color:       \t\t@alternate-normal-foreground;\n}\n#element.alternate.urgent {\n    background-color: \t\t@alternate-urgent-background;\n    text-color:       \t\t@alternate-urgent-foreground;\n}\n#element.alternate.active {\n    background-color: \t\t@alternate-active-background;\n    text-color:       \t\t@alternate-active-foreground;\n}\n\n#scrollbar {\n    width:        \t\t\t4px ;\n    border:       \t\t\t0;\n    handle-width: \t\t\t8px ;\n    padding:      \t\t\t0;\n}\n#sidebar {\n    border:       \t\t\t2px 0px 0px ;\n    border-color: \t\t\t@separatorcolor;\n}\n#button.selected {\n    background-color: \t\t@selected-normal-background;\n    text-color:       \t\t@selected-normal-foreground;\n}\n#inputbar {\n    spacing:    \t\t\t0;\n    text-color: \t\t\t@normal-foreground;\n    padding:    \t\t\t1px ;\n}\n#case-indicator {\n    spacing:    \t\t\t0;\n    text-color: \t\t\t@normal-foreground;\n}\n#entry {\n    spacing:    \t\t\t0;\n    text-color: \t\t\t@normal-foreground;\n}\n#prompt, button{\n    spacing:    \t\t\t0;\n    text-color: \t\t\t@normal-foreground;\n}\n"
  },
  {
    "path": ".config/rofi/rofi_fuzzy",
    "content": "/**\n * ROFI Color theme2\n * User: bresilla\n copy those lines to: ~/.conf/rofi/ or ~/.Xdefaults\n\trofi.fullscreen:true\n\trofi.theme: ~/.i3/rofi.rasi\n */\n\n* {\n\taccent: #FFFFFF;\n\tbckgrd: #121212;\n\tselect: #161A1B;\n\n\n\n\tforeground:         @accent;\n\tforeground-alt:    \t#ebebeb;\n\tbackground:\t\t\t@bckgrd;\n\tbackground-alt: \t@select;\n\ttransparent:\t\trgba(0, 0, 0, 0);\n\turgentcolor:      \t#e53714;\n\n\n   font: \t\t\t\t\"Monoid 14\";\n   border-color:        @background;\n   separatorcolor:      @foreground;\n   background-color: \t@background;\n}\n\n#window {\n   background-color: \t@background;\n   anchor: \t\t\t\tnorth;\n   location: \t\t\tnorth;\n   y-offset: \t\t\t20;\n   width:               99%;\n}\n\n#mainbox {\n   background-color: \t@background;\n   spacing:\t\t\t\t0px;\n   children: \t\t\t[inputbar, message, sidebar, listview];\n}\n\n#message {\n   background-color:\t@background;\n   padding: \t\t\t10 1% 10;\n}\n\n#textbox {\n   text-color:\t\t\t@background;\n   background-color:\t@foreground;\n}\n\n#listview {\n   fixed-height: \t\tfalse;\n   dynamic: \t\t\ttrue;\n   scrollbar: \t\t\tfalse;\n   padding: \t\t\t10px;\n   background: \t\t\t@background;\n}\n\n#element {\n    border:  \t\t\t0;\n    padding: \t\t\t10px;\n}\n\n#element.normal.normal {\n   background-color: \t@background;\n   text-color: \t\t\t@foreground-alt;\n}\n\n#element.normal.urgent {\n   background-color: \t@background;\n   text-color: \t\t\t@urgentcolor;\n}\n\n#element.normal.active {\n   background-color: \t@background;\n   text-color: \t\t\t@foreground;\n}\n\n#element.selected.normal {\n    background-color: \t@background-alt;\n    text-color:       \t@foreground;\n}\n\n#element.selected.urgent {\n    background-color: \t@urgentcolor;\n    text-color:       \t@background;\n}\n\n#element.selected.active {\n    background-color: \t@foreground;\n    text-color:       \t@thi;\n}\n\n#element.alternate.normal {\n    background-color: \t@background;\n    text-color:       \t@foreground-alt;\n}\n\n#element.alternate.urgent {\n    background-color: \t@background;\n    text-color:       \t@urgentcolor;\n}\n\n#element.alternate.active {\n    background-color: \t@background;\n    text-color:       \t@foreground;\n}\n\n#button {\n   background-color: \t@background;\n   text-color:       \t@background;\n}\n\n\n#button.selected {\n    text-color:      \t@foreground;\n}\n\n#inputbar {\n   background-color: \t@foreground;\n   spacing:\t\t\t\t0px;\n}\n\n#prompt {\n   padding:\t\t\t\t6px 9px;\n   background-color:\t@foreground;\n   text-color:\t\t\t@background-alt;\n   padding: \t\t\t10 1% 10;\n}\n\n#entry {\n   padding:\t\t\t\t6px 10px;\n   background-color:\t@background-alt;\n   text-color:\t\t\t@foreground;\n   padding: \t\t\t10px;\n}\n"
  },
  {
    "path": ".config/rofi/rofi_icon",
    "content": "/**\n * ROFI Color theme\n * User: bresilla\n copy those lines to: ~/.conf/rofi/ or ~/.Xdefaults\n\trofi.fullscreen:true\n\trofi.theme: ~/.i3/rofi.rasi\n */\n\n* {\n\taccent: #FFFFFF;\n    spacing: 40% 0 0 32%;\n\n    foreground:         \t\t@accent;\n    background:         \t\trgba(0, 0, 0, 0.80);\n    transparent:\t\t\t\trgba(0, 0, 0, 0);\n    background-light:      \t\trgba(255, 255, 255, 0.20);\n\n    normal-background: \t\t\t@transparent;\n    normal-foreground: \t\t\t@foreground;\n    urgent-background: \t\t\t@transparent;\n    urgent-foreground:\t\t\t@foreground;\n    active-background: \t\t\t@transparent;\n    active-foreground:\t\t\t@foreground;\n\n    selected-normal-background:  @foreground;\n    selected-normal-foreground:  @background;\n    selected-urgent-background:  @foreground;\n    selected-urgent-foreground:  @background;\n    selected-active-background:  @foreground;\n    selected-active-foreground:  @background;\n\n    alternate-normal-background: @transparent;\n    alternate-normal-foreground: @foreground;\n    alternate-active-background: @transparent;\n    alternate-active-foreground: @active-foreground;\n    alternate-urgent-background: @transparent;\n    alternate-urgent-foreground: @urgent-foreground;\n\n    border-color:                @background;\n    separatorcolor:              @foreground;\n    background-color:            @transparent;\n    font:  \"Hurmit Nerd Font Mono 30\";\n}\n\n\n#window {\n    background-color: @background;\n    width: 100%;\n    height: 100%;\n    children: [ horibox ];\n    padding: @spacing;\n}\n\n#horibox {\n    children: [ listview ];\n}\n\n#listview {\n    layout: horizontal;\n    spacing: 1%;\n}\n\n#element {\n    padding: 2%;\n    background-color: @background-light;\n    text-color: @foreground;\n    border-radius: 6px;\n}\n\n#element.selected {\n    background-color: @accent;\n    text-color: @background;\n}\n"
  },
  {
    "path": ".config/searcher",
    "content": "CPPREFERENCE|https://en.cppreference.com/mwiki/index.php?title=Special%3ASearch&search=\nAMAZON|https://www.amazon.it/s/ref=nb_sb_noss?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&url=search-alias%3Daps&field-keywords=\n"
  },
  {
    "path": ".config/slop/blur1.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform sampler2D desktop;\nuniform vec2 screenSize;\n\nvarying vec2 uvCoord;\n\n// Stolen from https://github.com/Jam3/glsl-fast-gaussian-blur kinda\nvoid main()\n{\n    float radius = 1;\n    vec2 upsideDownUV = vec2( uvCoord.x, -uvCoord.y );\n    vec4 color = vec4(0.0);\n    vec2 off1 = vec2(1.411764705882353) * vec2( radius, 0 );\n    vec2 off2 = vec2(3.2941176470588234) * vec2( radius, 0 );\n    vec2 off3 = vec2(5.176470588235294) * vec2( radius, 0 );\n    color += texture2D(desktop, upsideDownUV) * 0.1964825501511404;\n    color += texture2D(desktop, upsideDownUV + (off1 / screenSize)) * 0.2969069646728344;\n    color += texture2D(desktop, upsideDownUV - (off1 / screenSize)) * 0.2969069646728344;\n    color += texture2D(desktop, upsideDownUV + (off2 / screenSize)) * 0.09447039785044732;\n    color += texture2D(desktop, upsideDownUV - (off2 / screenSize)) * 0.09447039785044732;\n    color += texture2D(desktop, upsideDownUV + (off3 / screenSize)) * 0.010381362401148057;\n    color += texture2D(desktop, upsideDownUV - (off3 / screenSize)) * 0.010381362401148057;\n    vec4 tcolor = vec4(0.0);\n    tcolor += texture2D(texture, uvCoord) * 0.1964825501511404;\n    tcolor += texture2D(texture, uvCoord + (off1 / screenSize)) * 0.2969069646728344;\n    tcolor += texture2D(texture, uvCoord - (off1 / screenSize)) * 0.2969069646728344;\n    tcolor += texture2D(texture, uvCoord + (off2 / screenSize)) * 0.09447039785044732;\n    tcolor += texture2D(texture, uvCoord - (off2 / screenSize)) * 0.09447039785044732;\n    tcolor += texture2D(texture, uvCoord + (off3 / screenSize)) * 0.010381362401148057;\n    tcolor += texture2D(texture, uvCoord - (off3 / screenSize)) * 0.010381362401148057;\n    gl_FragColor = (tcolor * color);\n}\n"
  },
  {
    "path": ".config/slop/blur1.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/blur2.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform vec2 screenSize;\n\nvarying vec2 uvCoord;\n\n// Stolen from https://github.com/Jam3/glsl-fast-gaussian-blur kinda\nvoid main()\n{\n    float radius = 1;\n    vec4 color = vec4(0.0);\n    vec2 off1 = vec2(1.411764705882353) * vec2( 0, radius );\n    vec2 off2 = vec2(3.2941176470588234) * vec2( 0, radius );\n    vec2 off3 = vec2(5.176470588235294) * vec2( 0, radius );\n    color += texture2D(texture, uvCoord) * 0.1964825501511404;\n    color += texture2D(texture, uvCoord + (off1 / screenSize)) * 0.2969069646728344;\n    color += texture2D(texture, uvCoord - (off1 / screenSize)) * 0.2969069646728344;\n    color += texture2D(texture, uvCoord + (off2 / screenSize)) * 0.09447039785044732;\n    color += texture2D(texture, uvCoord - (off2 / screenSize)) * 0.09447039785044732;\n    color += texture2D(texture, uvCoord + (off3 / screenSize)) * 0.010381362401148057;\n    color += texture2D(texture, uvCoord - (off3 / screenSize)) * 0.010381362401148057;\n    gl_FragColor = color;\n}\n"
  },
  {
    "path": ".config/slop/blur2.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/boxzoom.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform sampler2D desktop;\nuniform vec2 screenSize;\nuniform vec2 mouse;\n\nvarying vec2 uvCoord;\nint heigh=900;\nint width=1600;\n\nvoid main()\n{\n    // Adjustable parameters -------\n    vec2 boxOffset = vec2(-(width/2),-(heigh/2));\n    vec2 boxSize = vec2(width,heigh);\n    float magstrength = 4;\n    vec2 borderSize = vec2(6,6);\n    vec4 borderColor = vec4(0,0,0,1);\n    bool crosshair = false;\n    //------------------------------\n\n    // actual code (don't touch unless you're brave)\n\n    // convert to UV space\n    boxOffset = boxOffset/screenSize;\n    boxSize = boxSize/screenSize;\n    borderSize = borderSize/screenSize;\n    // get mouse position in UV space\n    vec2 mpos = vec2(mouse.x, -mouse.y)/screenSize + vec2(0,1);\n    vec4 color;\n\n    // Check if our current UV is inside our box.\n    if ( uvCoord.x < mpos.x+boxOffset.x+boxSize.x &&\n         uvCoord.x > mpos.x+boxOffset.x &&\n         uvCoord.y > mpos.y+boxOffset.y &&\n         uvCoord.y < mpos.y+boxOffset.y+boxSize.y ) {\n      // Check if we're actually inside the crosshair area.\n      if ( (distance(uvCoord.x, mpos.x+boxOffset.x+boxSize.x/2) <= borderSize.x ||\n            distance(uvCoord.y, mpos.y+boxOffset.y+boxSize.y/2) <= borderSize.y) && crosshair ) {\n        color = borderColor;\n      } else {\n        // Calculate where the UV should be.\n        vec2 zoomedUV = ((uvCoord-mpos)-(boxOffset+boxSize/2))/magstrength+mpos;\n        // The desktop texture is upside-down due to X11\n        vec2 zoomedUVFlipped = vec2( zoomedUV.x, -zoomedUV.y );\n        // Then change the color to the desktop color to draw, then add on our rectangle on top.\n        vec4 rectColor = texture2D( texture, zoomedUV );\n        color = mix( texture2D( desktop, zoomedUVFlipped ), rectColor, rectColor.a );\n      }\n    // Then check if we're in our border size.\n    } else if( uvCoord.x <= mpos.x+boxOffset.x+boxSize.x+borderSize.x &&\n         uvCoord.x >= mpos.x+boxOffset.x-borderSize.x &&\n         uvCoord.y >= mpos.y+boxOffset.y-borderSize.y &&\n         uvCoord.y <= mpos.y+boxOffset.y+boxSize.y+borderSize.y ) {\n      color = borderColor;\n    } else {\n      color = texture2D( texture, uvCoord );\n    }\n\n    gl_FragColor = color;\n}\n"
  },
  {
    "path": ".config/slop/boxzoom.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/crosshair.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform sampler2D desktop;\nuniform vec2 screenSize;\nuniform vec2 mouse;\n\nvarying vec2 uvCoord;\nint sz=512;\n\nvoid main()\n{\n    // adjustable parameters\n    float circleSize = sz;\n    float borderSize = 6;\n    // The smaller this value is, the more intense the magnification!\n    float magnifyNerf = 1.1;\n    vec4 borderColor = vec4(0,0,0,1);\n    bool crosshair = false;\n\n    // actual code\n    vec2 mUV = vec2(mouse.x, -mouse.y)/screenSize + vec2(0,1);\n    float du = distance(mUV,uvCoord);\n    float dr = distance(mUV*screenSize,uvCoord*screenSize);\n    vec4 color = vec4(0);\n    if ( dr > circleSize+borderSize ) {\n        color = texture2D( texture, uvCoord );\n    } else if ( dr < circleSize ) {\n        if ( crosshair && (distance(mUV.x, uvCoord.x)<1/screenSize.x || distance(mUV.y,uvCoord.y)<1/screenSize.y) ) {\n            color = borderColor;\n        } else {\n            float t = 1-du;\n            vec2 b = uvCoord;\n            vec2 c = (mUV-uvCoord);\n            vec2 upsideDown = c/magnifyNerf*t*t+b;\n\n            vec4 textureColor = texture2D( texture, upsideDown );\n            color = mix( texture2D( desktop, vec2(upsideDown.x, -upsideDown.y) ), textureColor, textureColor.a );\n        }\n    } else if ( dr < circleSize+borderSize ) {\n        color = borderColor;\n    }\n    gl_FragColor = color;\n}\n"
  },
  {
    "path": ".config/slop/crosshair.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/hippie.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform vec2 screenSize;\nuniform float time;\n\nvarying vec2 uvCoord;\n\nconst float pi = 3.14159265f;\n\nvec3 color(float x) {\n    return max(min(sin(vec3(x,x+pi*2.0/3.0,x+pi*4.0/3.0))+0.5,1.0),0.0);\n}\n\nvoid main() {\n    vec2 pos = (( gl_FragCoord.xy / screenSize.xy )-0.5)*screenSize.xy/screenSize.x*4.0;\n    pos+=normalize(pos);\n    pos.xy+=sin(pos.yx*10.0)*0.1;\n    float r=(2.0/(dot(pos,pos)*10.0+1.0));\n    vec2 rr=vec2(cos(r),sin(r));\n    pos=pos.xy*rr.xx+pos.yx*rr.yy*vec2(-1.0,1.0);\n    float f=(length(pos)*10.0)+time;\n    //f=acos((pos.x/length(pos)*0.5+0.5)*pi);\n    f+=sin(atan(pos.y,pos.x)*7.0)*5.0;\n    vec4 rect = texture2D(texture,uvCoord);\n    gl_FragColor = vec4(color(f),1.f)*rect;\n}\n"
  },
  {
    "path": ".config/slop/hippie.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/invert.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform sampler2D desktop;\n\nvarying vec2 uvCoord;\n\nvoid main() {\n    vec2 uv = vec2(uvCoord.x, -uvCoord.y);\n    vec4 color = texture2D(desktop,uv);\n    vec4 rect = texture2D(texture,uvCoord);\n    gl_FragColor = vec4( 1.0 - color.rgb, color.a )*rect;\n}\n"
  },
  {
    "path": ".config/slop/invert.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/refract.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform sampler2D desktop;\nuniform vec2 screenSize;\nuniform float time;\n\nvarying vec2 uvCoord;\n\nvec2 getDesktopUV( vec2 uv ) {\n    // Desktop image is upside-down, blame X11 lmao\n    uv.y = -uv.y;\n    return uv;\n}\n\nconst float pi = 3.14159265f;\n\nvoid main() {\n    float sigma = 5;\n    float numBlurPixelsPerSide = 2.0f;\n    float blurMultiplier = 2.0f;\n\n    vec2 tc = uvCoord.xy;\n    vec2 p = -1.0 + 2.0 * tc;\n    float len = length(p);\n    vec2 offset = (p/len)*cos(len*12.0-time*4.0)*0.005;\n\n    // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889)\n    float blurSize = 1.f/screenSize.x*blurMultiplier;\n    vec2 blurMultiplyVec      = vec2(0.0f, 1.0f);\n    vec3 incrementalGaussian;\n    incrementalGaussian.x = 1.0f / (sqrt(2.0f * pi) * sigma);\n    incrementalGaussian.y = exp(-0.5f / (sigma * sigma));\n    incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y;\n\n    vec4 avgValue = vec4(0.0f, 0.0f, 0.0f, 0.0f);\n    float coefficientSum = 0.0f;\n\n    // Take the central sample first...\n    vec4 color = texture2D( desktop, getDesktopUV( uvCoord.xy ) + offset );\n    avgValue += color * incrementalGaussian.x;\n    coefficientSum += incrementalGaussian.x;\n    incrementalGaussian.xy *= incrementalGaussian.yz;\n\n    // Go through the remaining 8 vertical samples (4 on each side of the center)\n    for (float i = 1.0f; i <= numBlurPixelsPerSide; i++) {\n        vec2 uv = (uvCoord.xy - i * blurSize * blurMultiplyVec);\n        color = texture2D( desktop, getDesktopUV( uv ) + offset );\n        avgValue += color * incrementalGaussian.x;\n        uv = (uvCoord.xy + i * blurSize * blurMultiplyVec);\n        color = texture2D( desktop, getDesktopUV( uv ) + offset );\n        avgValue += color * incrementalGaussian.x;\n        coefficientSum += 2 * incrementalGaussian.x;\n        incrementalGaussian.xy *= incrementalGaussian.yz;\n    }\n\n    //Reset\n    blurSize = 1.f/screenSize.x*blurMultiplier;\n    blurMultiplyVec      = vec2(1.0f, 0.0f);\n    incrementalGaussian.x = 1.0f / (sqrt(2.0f * pi) * sigma);\n    incrementalGaussian.y = exp(-0.5f / (sigma * sigma));\n    incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y;\n\n    // Go through the remaining 8 horizontal samples (4 on each side of the center)\n    for (float i = 1.0f; i <= numBlurPixelsPerSide; i++) {\n        vec2 uv = (uvCoord.xy - i * blurSize * blurMultiplyVec);\n        vec4 color = texture2D( desktop, getDesktopUV( uv ) + offset );\n        avgValue += color * incrementalGaussian.x;\n        uv = (uvCoord.xy + i * blurSize * blurMultiplyVec);\n        color = texture2D( desktop, getDesktopUV( uv ) + offset );\n        avgValue += color * incrementalGaussian.x;\n        coefficientSum += 2 * incrementalGaussian.x;\n        incrementalGaussian.xy *= incrementalGaussian.yz;\n    }\n\n    vec4 rect = texture2D(texture,uvCoord);\n    gl_FragColor = (avgValue / coefficientSum)*rect;\n}\n"
  },
  {
    "path": ".config/slop/refract.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/slop/wiggle.frag",
    "content": "#version 120\n\nuniform sampler2D texture;\nuniform vec2 screenSize;\nuniform float time;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n    // Higher strength means bigger wobble\n    float strength = 10;\n    float flatness = 4;\n    // Higher speed means faster wobble\n    float speed = 2;\n    float variation = cos(time);\n\n    float x = uvCoord.x + (sin( time*speed + uvCoord.y/flatness * screenSize.y/strength ) + 0.5)/screenSize.x*strength;\n    float y = uvCoord.y + variation*(cos( time*speed + uvCoord.x/flatness * screenSize.x/strength ) + 0.5)/screenSize.y*strength;\n    gl_FragColor = texture2D( texture, vec2( x, y ) );\n}\n"
  },
  {
    "path": ".config/slop/wiggle.vert",
    "content": "#version 120\n\nattribute vec2 position;\nattribute vec2 uv;\n\nvarying vec2 uvCoord;\n\nvoid main()\n{\n\tuvCoord = uv;\n\tgl_Position = vec4(position,0,1);\n}\n"
  },
  {
    "path": ".config/sxhkd/sxhkdrc",
    "content": "alt + space\n    bash ~/.config/rofi/menu/USER\nsuper + alt + {Escape,Delete,Insert}\n    bash ~/.config/rofi/menu/{power,CONFIG,screenshot}\nsuper + space\n    bash ~/.config/rofi/menu/BROWSE\nmode_switch + space\n    bash ~/.config/rofi/menu/ROOT\nsuper + alt + space; {c,Return}\n    {code,kitty --class=til tmux}\n\n{super,alt} + Escape\n    bspc node -{c,k}\n{super,alt} + Delete\n    pkill -USR1 -x sxhkd && ~/.startup -r\n\n{_,super} + dead_circumflex\n    termop {kitty, cool-retro-term} MAIN 2500 1050\n#    tmass -l /home/bresilla/.config/tmux load MAIN; tdrop -m -w 66% -h 50% -x 17% -y 25% -n MAIN -f \"-e tmux attach -t MAIN\" {kitty, cool-retro-term}\n{_,super} + dead_acute\n    termop {kitty, cool-retro-term} NOTE 3500 1900\n#    tmass -l /home/bresilla/.config/tmux load NOTE; tdrop -m -w 80% -h 80% -x 10% -y 10% -n NOTE -f \"-e tmux attach -t NOTE\" {kitty, cool-retro-term}\nmode_switch + Return\n    kitty --class=LAUNCHER zsh -c 'LAUNCHER=true $(print -rl -- $commands | sort -u | fzy)'\n\nctrl + Escape\n    /home/bresilla/.cargo/bin/xcursorlocate\n\nXF86Search\n    pkill boomer; boomer\n{super,alt} + XF86Search\n    /home/bresilla/.config/rofi/menu/monitors\n{super,alt} + Tab\n    bspc desktop -f last\n\nsuper + alt + {Left,Right}\n    bspc desktop -f {prev,next}.local\nsuper + alt + {Down,Up}\n    bspc monitor -f {prev,next}\n{super,alt} + {Left,Down,Up,Right}\n    /home/bresilla/.config/bspwm/scripts/{focus,move} {west,south,north,east}\n\n{super,alt} + @button{6,5,4,7}\n    /home/bresilla/.config/bspwm/scripts/{focus,move} {west,south,north,east}\n{_, ctrl} + {super+alt} + @button{6,5,4,7}\n    /home/bresilla/.config/bspwm/scripts/resize {b,s} {Left,Down,Up,Right}\n\n{super+alt} + shift + {Left,Right}\n    bspc node -d {prev,next} --follow\n{super+alt} + shift + {Down,Up}\n    bspc node -m {prev,next} --follow\n\n{super,alt,alt+super} + ~Return\n    bspc node -t {tiled,fullscreen,floating}\n{super,alt,alt+super} + ~BackSpace\n    bspc node -g {locked,private,sticky}\n\nmod3 + {Left,Right}\n    {echo \"seek -10\" > /home/bresilla/.config/mpv/control, echo \"seek 10\" > /home/bresilla/.config/mpv/control}\nmod3 + {Up,Down,space}\n    echo \"cycle pause\" > /home/bresilla/.config/mpv/control\n\nmod3 + XF86Audio{Prev,Next}\n    mpc seekthrough {-10,+10}\nXF86Audio{Prev,Next,Play}\n    playerctl {previous,next,play-pause} & mpc -q {prev,next,toggle}\nXF86Audio{Raise,Lower}Volume\n    pulsemixer --change-volume {+,-}5\nXF86AudioMute\n    pulsemixer --toggle-mute\nXF86MonBrightness{Up,Down}\n    light -{A,U} 2\nalt + super + XF86MonBrightness{Up,Down}\n    lighter {up,down}\n\n\n"
  },
  {
    "path": ".config/tmux/COOL.yml",
    "content": "name: \"COOL\"\nwindows:\n- name: cool\n  layout: 62d2,305x65,0,0,13\n  panes:\n  - commands:\n    - clear\n    focus: true\n    root: /home/bresilla\n"
  },
  {
    "path": ".config/tmux/MAIN.yml",
    "content": "name: MAIN\nwindows:\n- name: main\n  layout: ad64,215x40,0,0,7\n  panes:\n  - commands:\n    - clear\n    focus: true\n    root: /home/bresilla\n"
  },
  {
    "path": ".config/tmux/NOTE.yml",
    "content": "name: NOTE\nwindows:\n# - name: music\n  # layout: 8e51,280x57,0,0[280x43,0,0,89,280x13,0,44,118]\n  # panes:\n  # - commands:\n    # - spt\n    # root: /home/bresilla\n  # - commands:\n    # - ncpamixer\n    # focus: true\n    # root: /home/bresilla\n- name: gotop\n  layout: 6585,280x57,0,0,92\n  panes:\n  - commands:\n    - gotop -b\n    focus: true\n    root: /home/bresilla\n"
  },
  {
    "path": ".config/tmux/PRO.yml",
    "content": "name: \"PRO\"\nwindows:\n- name: grv\n  layout: e092,304x64,0,0,23\n  panes:\n  - commands:\n    - grv\n    focus: true\n    root: /home/bresilla\n- name: nvim\n  layout: e094,304x64,0,0,25\n  panes:\n  - commands:\n    - nvim\n    focus: true\n    root: /home/bresilla\n"
  },
  {
    "path": ".config/tmux/PROT.yml",
    "content": "name: \"website\"\nwindows:\n- name: grv\n  layout: e092,304x64,0,0,23\n  panes:\n  - commands:\n    - grv\n    focus: true\n    root:  /home/bresilla/data/code/PROJECTS/bresilla/website \n- name: nvim\n  layout: e094,304x64,0,0,25\n  panes:\n  - commands:\n    - nvim\n    focus: true\n    root:  /home/bresilla/data/code/PROJECTS/bresilla/website \n"
  },
  {
    "path": ".config/tmux/VOLT.yml",
    "content": "name: VOLT\nwindows:\n- name: asm\n  layout: 74fd,261x67,0,0[261x30,0,0{98x30,0,0,43,162x30,99,0,60},261x11,0,31,53,261x24,0,43,50]\n  panes:\n  - commands:\n    - voltron view reg\n    root: /home/bresilla\n  - commands:\n    - voltron view disasm\n    root: /home/bresilla\n  - commands:\n    - echo \"Default CMD\"\n    focus: true\n    root: /home/bresilla\n  - commands:\n    - voltron view stack\n    root: /home/bresilla\n"
  },
  {
    "path": ".config/tmux/modules/STATUS",
    "content": "#!/usr/bin/env sh\n\ncpu=$(/home/bresilla/.config/tmux/modules/cpu-stat)\nnetspeed=$(/home/bresilla/.config/tmux/modules/netwidth)\nmem=$(free | grep Mem | awk '{print (100 - ($4/($3+$4) * 100.0));}')\nbat=$(acpi | awk '{print $4}' | tr -d '%,')\nchrg=$(acpi | awk '{print $3}' | tr -d '%,')\ntmu=$(date | awk '{print $5}' | cut -d: -f1,2)\nupt=$(uptime | awk -F, '{sub(\".*up \",x,$1);print $1}')\nwat=$(echo - | awk \"{printf \\\"%.1f\\\", $(($(cat /sys/class/power_supply/BAT0/current_now) * \\\n  $(cat /sys/class/power_supply/BAT0/voltage_now))) / 1000000000000 }\")\n\ncpu=${cpu%.*}\nmem=${mem%.*}\n\nforeground=\"#[fg=colour15]\"\nblackTX=\"#[fg=colour0]\"\nblackBG=\"#[bg=colour0]\"\naccentTX=\"#[fg=colour1]\"\naccentBG=\"#[bg=colour1]\"\norangeBG=\"#[bg=colour208]\"\norangeTX=\"#[fg=colour208]\"\nredBG=\"#[bg=colour124]\"\nredTX=\"#[fg=colour124]\"\ngreenBG=\"#[bg=colour40]\"\ngreenTX=\"#[fg=colour40]\"\ngrayBG=\"#[bg=colour7]\"\ngrayTX=\"#[fg=colour7]\"\nsealTX=\"#[fg=colour59]\"\ndefaBG=\"#[bg=default]\"\ndefaTX=\"#[fg=default]\"\nBLD=\"#[bold]\"\nNLD=\"#[nobold]\"\n\n[[ $bat -le 10 ]] && grayBG=$redBG grayTX=$redTX accentBG=$redBG accentTX=$redTX foreground=$blackTX\n\nif [ $(cat /proc/acpi/bbswitch | awk 'NF>1{print $NF}') == ON ]; then\n    power=\"$sealTX $redTX$BLD$wat W $NLD\"\nelse\n    power=\"$sealTX $wat W \"\nfi\n\nbattery=\"$redTX  $blackTX$bat% $grayTX$defaBG\"\n[[ \"$chrg\" != \"Discharging\" ]] && battery=\"$blackTX  $blackTX$bat% $grayTX$defaBG\"\n\nmemo=\"$greyTX$greyBG $blackTX$mem% \"\nspacer=\"$blackTX$blackBG\"\n\nif (( cpu > 80 )); then\n    proc=\"$redTX$blackTX$redBG $BLD$cpu% \"\nelif (( cpu > 50 )); then\n    proc=\"$orangeTX$blackTX$orangeBG $BLD$cpu% \"\nelse\n    proc=\"$grayTX$grayBG $blackTX$cpu% \"\nfi\nnetwork=\"$accentTX$accentBG $foreground$netspeed$accentBG \"\n\nRIGHT_STATUS=\"$power$proc$memo$spacer$network\"\n\nmain=\"$accentBG$foreground $BLD$tmu$NLD $accentTX$grayBG\"\n\ncdr=\"$sealTX\"\nLEFT_STATUS=\"$main$battery$cdr\"\n\nif [ \"$1\" == \"RIGHT\" ] ;then\n    echo $RIGHT_STATUS\nelif [ \"$1\" == \"LEFT\" ] ;then\n    echo $LEFT_STATUS\nfi\n"
  },
  {
    "path": ".config/tmux/modules/battery",
    "content": "#!/bin/bash\n\nusage() {\ncat <<EOF\nbattery usage:\n  general:\n    -h, --help    print this message\n    -t            output tmux status bar format\n    -z            output zsh prompt format\n    -e            don't output the emoji\n    -a            output ascii instead of spark\n    -b            battery path            default: /sys/class/power_supply/BAT0\n    -p            use pmset (more accurate)\n  colors:                                                 tmux     zsh\n    -g <color>    good battery level      default: 1;32 | green  | 64\n    -m <color>    middle battery level    default: 1;33 | yellow | 136\n    -w <color>    warn battery level      default: 0;31 | red    | 160\nEOF\n}\n\nif [[ $1 == '-h' || $1 == '--help' || $1 == '-?' ]]; then\n    usage\n    exit 0\nfi\n\n# For default behavior\nsetDefaults() {\n    pmset_on=0\n    output_tmux=0\n    output_zsh=0\n    ascii=0\n    ascii_bar='=========='\n    emoji=1\n    good_color=\"1;32\"\n    middle_color=\"1;33\"\n    warn_color=\"0;31\"\n    connected=0\n    battery_path=/sys/class/power_supply/BAT0\n}\n\nsetDefaults\n\n# Determine battery charge state\nbattery_charge() {\n    case $(uname -s) in\n        \"Darwin\")\n            if ((pmset_on)) && command -v pmset &>/dev/null; then\n                if [ \"$(pmset -g batt | grep -o 'AC Power')\" ]; then\n                    BATT_CONNECTED=1\n                else\n                    BATT_CONNECTED=0\n                fi\n                BATT_PCT=$(pmset -g batt | grep -o '[0-9]*%' | tr -d %)\n            else\n                while read key value; do\n                    case $key in\n                        \"MaxCapacity\")\n                            maxcap=$value\n                            ;;\n                        \"CurrentCapacity\")\n                            curcap=$value\n                            ;;\n                        \"ExternalConnected\")\n                            if [ $value == \"No\" ]; then\n                                BATT_CONNECTED=0\n                            else\n                                BATT_CONNECTED=1\n                            fi\n                            ;;\n                    esac\n                    if [[ -n \"$maxcap\" && -n $curcap ]]; then\n                        BATT_PCT=$(( 100 * curcap / maxcap))\n                    fi\n                done < <(ioreg -n AppleSmartBattery -r | grep -o '\"[^\"]*\" = [^ ]*' | sed -e 's/= //g' -e 's/\"//g' | sort)\n            fi\n            ;;\n        \"Linux\")\n            case $(cat /etc/*-release) in\n                *\"Arch Linux\"*|*\"Ubuntu\"*|*\"openSUSE\"*)\n                    battery_state=$(cat $battery_path/energy_now)\n                    battery_full=$battery_path/energy_full\n                    battery_current=$battery_path/energy_now\n                    ;;\n                *)\n                    battery_state=$(cat $battery_path/status)\n                    battery_full=$battery_path/charge_full\n                    battery_current=$battery_path/charge_now\n                    ;;\n            esac\n            if [ $battery_state == 'Discharging' ]; then\n                BATT_CONNECTED=0\n            else\n                BATT_CONNECTED=1\n            fi\n                now=$(cat $battery_current)\n                full=$(cat $battery_full)\n                BATT_PCT=$((100 * $now / $full))\n            ;;\n    esac\n}\n\n# Apply the correct color to the battery status prompt\napply_colors() {\n    # Green\n    if [[ $BATT_PCT -ge 75 ]]; then\n        if ((output_tmux)); then\n            COLOR=\"#[fg=$good_color]\"\n        elif ((output_zsh)); then\n            COLOR=\"%F{$good_color}\"\n        else\n            COLOR=$good_color\n        fi\n\n    # Yellow\n    elif [[ $BATT_PCT -ge 25 ]] && [[ $BATT_PCT -lt 75 ]]; then\n        if ((output_tmux)); then\n            COLOR=\"#[fg=$middle_color]\"\n        elif ((output_zsh)); then\n            COLOR=\"%F{$middle_color}\"\n        else\n            COLOR=$middle_color\n        fi\n\n    # Red\n    elif [[ $BATT_PCT -lt 25 ]]; then\n        if ((output_tmux)); then\n            COLOR=\"#[fg=$warn_color]\"\n        elif ((output_zsh)); then\n            COLOR=\"%F{$warn_color}\"\n        else\n            COLOR=$warn_color\n        fi\n    fi\n}\n\n# Print the battery status\nprint_status() {\n    if ((emoji)) && ((BATT_CONNECTED)); then\n        GRAPH=\"⚡\"\n    else\n        if command -v spark &>/dev/null; then\n            sparks=$(spark 0 ${BATT_PCT} 100)\n            GRAPH=${sparks:1:1}\n        else\n            ascii=1\n        fi\n    fi\n\n    if ((ascii)); then\n        barlength=${#ascii_bar}\n\n        # Battery percentage rounded to the lenght of ascii_bar\n        rounded_n=$(( $barlength * $BATT_PCT / 100 + 1))\n\n        # Creates the bar\n        GRAPH=$(printf \"[%-${barlength}s]\" \"${ascii_bar:0:rounded_n}\")\n    fi\n\n    if ((output_tmux)); then\n        printf \"%s%s %s%s\" \"$COLOR\" \"[$BATT_PCT%]\" \"#[default]\"\n    elif ((output_zsh)); then\n        printf \"%%B%s%s %s\" \"$COLOR\" \"[$BATT_PCT%%]\" \"$GRAPH\"\n    else\n        printf \"\\e[0;%sm%s %s \\e[m\\n\"  \"$COLOR\" \"[$BATT_PCT%]\"  \"$GRAPH\"\n    fi\n}\n\n# Read args\nwhile getopts \":g:m:w:tzeab:p\" opt; do\n    case $opt in\n        g)\n            good_color=$OPTARG\n            ;;\n        m)\n            middle_color=$OPTARG\n            ;;\n        w)\n            warn_color=$OPTARG\n            ;;\n        t)\n            output_tmux=1\n            good_color=\"green\"\n            middle_color=\"yellow\"\n            warn_color=\"red\"\n            ;;\n        z)\n            output_zsh=1\n            good_color=\"64\"\n            middle_color=\"136\"\n            warn_color=\"160\"\n            ;;\n        e)\n            emoji=0\n            ;;\n        a)\n            ascii=1\n            ;;\n        p)\n            pmset_on=1\n            ;;\n        b)\n            if [ -d $OPTARG ]; then\n                battery_path=$OPTARG\n            else\n                >&2 echo \"Battery not found, trying to use default path...\"\n                if [ ! -d $battery_path ]; then\n                    >&2 echo \"Default battery path is also unreachable\"\n                    exit 1\n                fi\n            fi\n            ;;\n        \\?)\n            echo \"Invalid option: -$OPTARG\"\n            exit 1\n            ;;\n        :)\n            echo \"Option -$OPTARG requires an argument\"\n            exit 1\n            ;;\n    esac\ndone\n\nbattery_charge\napply_colors\nprint_status\n\n"
  },
  {
    "path": ".config/tmux/modules/borderland",
    "content": "#!/bin/bash\n\n# color variables\nINACTIVE_BORDER_COLOR='#444444'\nACTIVE_BORDER_COLOR='#00afff'\nRED='#d70000'\nYELLOW='#ffff00'\nGREEN='#5fff00'\n\n# read args\nfor i in \"$@\"\ndo\ncase $i in\n    --pane-current-path=*)\n    PANE_CURRENT_PATH=\"${i#*=}\"\n    shift # past argument=value\n    ;;\n    --pane-active=*)\n    PANE_ACTIVE=\"${i#*=}\"\n    shift # past argument=value\n    ;;\n    *) # unknown option\n    ;;\nesac\ndone\n\n# replace full path to home directory with ~\nPRETTY_PATH=$(sed \"s:^$HOME:~:\" <<< $PANE_CURRENT_PATH)\n\n# calculate reset color\nRESET_BORDER_COLOR=$([ $PANE_ACTIVE -eq 1 ] && echo $ACTIVE_BORDER_COLOR || echo $INACTIVE_BORDER_COLOR)\n\ncolor () {\n  INTENT=$1\n  echo $([ $PANE_ACTIVE -eq 1 ] && echo $INTENT || echo $INACTIVE_BORDER_COLOR)\n}\n\n# git functions adapted from the bureau zsh theme\n# https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/bureau.zsh-theme\n\nZSH_THEME_GIT_PROMPT_PREFIX=\"[\"\nZSH_THEME_GIT_PROMPT_SUFFIX=\"] \"\nZSH_THEME_GIT_PROMPT_CLEAN=\"#[fg=$(color $GREEN)]✓#[fg=$RESET_BORDER_COLOR]\"\nZSH_THEME_GIT_PROMPT_AHEAD=\"↑\"\nZSH_THEME_GIT_PROMPT_BEHIND=\"↓\"\nZSH_THEME_GIT_PROMPT_STAGED=\"#[fg=$(color $GREEN)]●#[fg=$RESET_BORDER_COLOR]\"\nZSH_THEME_GIT_PROMPT_UNSTAGED=\"#[fg=$(color $YELLOW)]●#[fg=$RESET_BORDER_COLOR]\"\nZSH_THEME_GIT_PROMPT_UNTRACKED=\"#[fg=$(color $RED)]●#[fg=$RESET_BORDER_COLOR]\"\n\ngit_branch () {\n  ref=$(command git symbolic-ref HEAD 2> /dev/null) || \\\n  ref=$(command git rev-parse --short HEAD 2> /dev/null) || return\n  echo \"${ref#refs/heads/}\"\n}\n\ngit_status () {\n  _STATUS=\"\"\n\n  # check status of files\n  _INDEX=$(command git status --porcelain 2> /dev/null)\n  if [[ -n \"$_INDEX\" ]]; then\n    if $(echo \"$_INDEX\" | command grep -q '^[AMRD]. '); then\n      _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_STAGED\"\n    fi\n    if $(echo \"$_INDEX\" | command grep -q '^.[MTD] '); then\n      _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED\"\n    fi\n    if $(echo \"$_INDEX\" | command grep -q -E '^\\?\\? '); then\n      _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED\"\n    fi\n    if $(echo \"$_INDEX\" | command grep -q '^UU '); then\n      _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED\"\n    fi\n  else\n    _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_CLEAN\"\n  fi\n\n  # check status of local repository\n  _INDEX=$(command git status --porcelain -b 2> /dev/null)\n  if $(echo \"$_INDEX\" | command grep -q '^## .*ahead'); then\n    _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_AHEAD\"\n  fi\n  if $(echo \"$_INDEX\" | command grep -q '^## .*behind'); then\n    _STATUS=\"$_STATUS$ZSH_THEME_GIT_PROMPT_BEHIND\"\n  fi\n\n  echo $_STATUS\n}\n\ngit_prompt () {\n  local _branch=$(git_branch)\n  local _status=$(git_status)\n  local _result=\"\"\n  if [[ \"${_branch}x\" != \"x\" ]]; then\n    _result=\"$ZSH_THEME_GIT_PROMPT_PREFIX$_branch\"\n    if [[ \"${_status}x\" != \"x\" ]]; then\n      _result=\"$_result $_status\"\n    fi\n    _result=\"$_result$ZSH_THEME_GIT_PROMPT_SUFFIX\"\n  fi\n  echo $_result\n}\n\n# final output\necho \" $PRETTY_PATH $(cd $PANE_CURRENT_PATH && git_prompt)\"\n"
  },
  {
    "path": ".config/tmux/modules/directory",
    "content": "dir=$(echo \"$1\" | rev | cut -d'/' -f-$2 | rev)\n\nif [[ $2 == \"1\" ]]; then\n    if [[ $dir == \"\" ]]; then echo \"/\"; else echo $dir; fi\nelse\n    if [[ $dir =~ ^/ ]]; then echo $dir; else echo /$dir; fi\nfi\n"
  },
  {
    "path": ".config/tmux/modules/netwidth",
    "content": "[[ -z $INLABEL ]] && INLABEL=\"▼\"\n[[ -z $OUTLABEL ]] && OUTLABEL=\"▲\"\n\niface=$(ip route | awk '/^default/ { print $5 ; exit }')\nRXB=$(</sys/class/net/\"$iface\"/statistics/rx_bytes)\nTXB=$(</sys/class/net/\"$iface\"/statistics/tx_bytes)\nsleep 1\nRXBN=$(</sys/class/net/\"$iface\"/statistics/rx_bytes)\nTXBN=$(</sys/class/net/\"$iface\"/statistics/tx_bytes)\n\nrx_rate=$(echo $((RXBN - RXB)) )\ntx_rate=$(echo $((TXBN - TXB)) )\n\n# incoming\necho -n \"$INLABEL\"\nrx_kib=$(( $rx_rate >> 10 ))\nif [[ \"$rx_rate\" -gt 1048576 ]]; then\n  printf '%sM' \"`echo \"scale=1; $rx_kib / 1024\" | bc`\"\nelse\n  echo -n \"${rx_kib}K\"\nfi\n\necho -n \" \"\n\n# outgoing\necho -n \"$OUTLABEL\"\ntx_kib=$(( $tx_rate >> 10 ))\nif [[ \"$tx_rate\" -gt 1048576 ]]; then\n  printf '%sM' \"`echo \"scale=1; $tx_kib / 1024\" | bc`\"\nelse\n  echo -n \"${tx_kib}K\"\nfi\n\n"
  },
  {
    "path": ".config/tmux/modules/powerdraw",
    "content": "#!/usr/bin/env sh\nwatt=$(echo - | awk \"{printf \\\"%.1f\\\", $(($(cat /sys/class/power_supply/BAT0/current_now) * $(cat /sys/class/power_supply/BAT0/voltage_now))) / 1000000000000 }\")\n\nif [ $(cat /proc/acpi/bbswitch | awk 'NF>1{print $NF}') == ON ]; then\n  echo \"#[fg=colour9,bold]$watt W#[fg=colour59,nobold]\"\nelse\n  echo $watt \"W\"\nfi\n\n"
  },
  {
    "path": ".config/vim/theme/jellybeans.vim",
    "content": "\" Color palette\nlet s:gui00 = \"#151515\"\nlet s:gui01 = \"#1E1E29\"\nlet s:gui02 = \"#4f5b66\"\nlet s:gui03 = \"#65737e\"\nlet s:gui04 = \"#a7adba\"\nlet s:gui05 = \"#c0c5ce\"\nlet s:gui06 = \"#cdd3de\"\nlet s:gui07 = \"#d8dee9\"\nlet s:gui08 = \"#870000\"\nlet s:gui09 = \"#f99157\"\nlet s:gui0A = \"#fac863\"\nlet s:gui0B = \"#437019\"\nlet s:gui0C = \"#5fb3b3\"\nlet s:gui0D = \"#0d61ac\"\nlet s:gui0E = \"#c594c5\"\nlet s:gui0F = \"#ab7967\"\n\nlet s:cterm00 = \"0\"\nlet s:cterm01 = \"1\"\nlet s:cterm02 = \"2\"\nlet s:cterm03 = \"3\"\nlet s:cterm04 = \"4\"\nlet s:cterm05 = \"5\"\nlet s:cterm06 = \"6\"\nlet s:cterm07 = \"7\"\nlet s:cterm08 = \"8\"\nlet s:cterm09 = \"9\"\nlet s:cterm0A = \"10\"\nlet s:cterm0B = \"11\"\nlet s:cterm0C = \"12\"\nlet s:cterm0D = \"13\"\nlet s:cterm0E = \"14\"\nlet s:cterm0F = \"15\"\n\nlet s:guiWhite = \"#ffffff\"\nlet s:guiGray = \"#666666\"\nlet s:ctermWhite = \"15\"\nlet s:ctermGray = \"7\"\n\nlet g:airline#themes#jellybeans#palette = {}\nlet s:modified = { 'airline_c': [ '#ffb964', '', 215, '', '' ] }\n\n\" Normal mode\nlet s:N1 = [ s:gui07 , s:gui0D , s:cterm07 , s:cterm09  ]\nlet s:N2 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01  ]\nlet s:N3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00  ]\nlet g:airline#themes#jellybeans#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)\nlet g:airline#themes#jellybeans#palette.normal_modified = s:modified\n\n\" Insert mode\nlet s:I1 = [ s:guiWhite , s:gui0B , s:ctermWhite , s:cterm08  ]\nlet s:I2 = s:N2\nlet s:I3 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm00  ]\nlet g:airline#themes#jellybeans#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)\nlet g:airline#themes#jellybeans#palette.insert_modified = s:modified\n\n\" Visual mode\nlet s:V1 = [ s:guiWhite , s:gui08 , s:ctermWhite , s:cterm0B ]\nlet s:V2 = s:N2\nlet s:V3 = s:I3\nlet g:airline#themes#jellybeans#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)\nlet g:airline#themes#jellybeans#palette.visual_modified = s:modified\n\n\" Replace mode\nlet s:R1 = [ s:gui08 , s:gui01 , s:cterm08, s:cterm00 ]\nlet s:R2 = s:N2\nlet s:R3 = s:I3\nlet g:airline#themes#jellybeans#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)\nlet g:airline#themes#jellybeans#palette.replace_modified = s:modified\n\n\" Inactive mode\nlet s:IN1 = [ s:guiGray , s:gui01 , s:ctermGray , s:cterm01 ]\nlet s:IN2 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ]\nlet s:IN3 = [ s:gui02 , s:gui00 , s:cterm02 , s:cterm00 ]\nlet g:airline#themes#jellybeans#palette.inactive = airline#themes#generate_color_map(s:IN1, s:IN2, s:IN3)\nlet g:airline#themes#jellybeans#palette.inactive_modified = s:modified\n\n\" CtrlP\nif !get(g:, 'loaded_ctrlp', 0)\n  finish\nendif\n\nlet s:CP1 = [ s:guiWhite , s:gui01 , s:ctermWhite , s:cterm01  ]\nlet s:CP2 = [ s:guiWhite , s:gui03 , s:ctermWhite , s:cterm01  ]\nlet s:CP3 = [ s:guiWhite , s:gui0D , s:ctermWhite , s:cterm0D  ]\n\nlet g:airline#themes#jellybeans#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(s:CP1, s:CP2, s:CP3)\n"
  },
  {
    "path": ".config/wal/templates/colors-dunst",
    "content": "[global]\nfont = Iosevka Term SS01 16\n\n# Allow a small subset of html markup:\n#   <b>bold</b>\n#   <i>italic</i>\n#   <s>strikethrough</s>\n#   <u>underline</u>\n#\n# For a complete reference see\n# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.\n# If markup is not allowed, those tags will be stripped out of the\n# message.\nmarkup = yes\nplain_text = no\n\n# The format of the message.  Possible variables are:\n#   %a  appname\n#   %s  summary\n#   %b  body\n#   %i  iconname (including its path)\n#   %I  iconname (without its path)\n#   %p  progress value if set ([  0%] to [100%]) or nothing\n# Markup is allowed\nformat = \"<b>%s</b>\\n%b\"\n\n# Sort messages by urgency.\nsort = no\n\n# Show how many messages are currently hidden (because of geometry).\nindicate_hidden = yes\n\n# Alignment of message text.\n# Possible values are \"left\", \"center\" and \"right\".\nalignment = center\n\n# The frequency with wich text that is longer than the notification\n# window allows bounces back and forth.\n# This option conflicts with \"word_wrap\".\n# Set to 0 to disable.\nbounce_freq = 0\n\n# Show age of message if message is older than show_age_threshold\n# seconds.\n# Set to -1 to disable.\nshow_age_threshold = -1\n\n# Split notifications into multiple lines if they don't fit into\n# geometry.\nword_wrap = yes\n\n# Ignore newlines '\\n' in notifications.\nignore_newline = no\n\n# Hide duplicate's count and stack them\nstack_duplicates = yes\nhide_duplicates_count = yes\n\n\n# The geometry of the window:\n#   [widthxheight[+/-x+/-y]\n# The geometry of the message window.\n# The height is measured in number of notifications everything else\n# in pixels.  If the width is omitted but the height is given\n# (\"-geometry x2\"), the message window expands over the whole screen\n# (dmenu-like).  If width is 0, the window expands to the longest\n# message displayed.  A positive x is measured from the left, a\n# negative from the right side of the screen.  Y is measured from\n# the top and down respectevly.\n# The width can be negative.  In this case the actual width is the\n# screen width minus the width defined in within the geometry option.\n#geometry = \"250x50-40+40\"\ngeometry = \"1600x110-1120+10\"\n\n# Shrink window if it's smaller than the width.  Will be ignored if\n# width is 0.\nshrink = no\n\n# The transparency of the window.  Range: [0; 100].\n# This option will only work if a compositing windowmanager is\n# present (e.g. xcompmgr, compiz, etc.).\ntransparency = 0\n\n# Don't remove messages, if the user is idle (no mouse or keyboard input)\n# for longer than idle_threshold seconds.\n# Set to 0 to disable.\nidle_threshold = 1\n\n# Which monitor should the notifications be displayed on.\nmonitor = 0\n\n# Display notification on focused monitor.  Possible modes are:\n#   mouse: follow mouse pointer\n#   keyboard: follow window with keyboard focus\n#   none: don't follow anything\n#\n# \"keyboard\" needs a windowmanager that exports the\n# _NET_ACTIVE_WINDOW property.\n# This should be the case for almost all modern windowmanagers.\n#\n# If this option is set to mouse or keyboard, the monitor option\n# will be ignored.\nfollow = none\n\n# Should a notification popped up from history be sticky or timeout\n# as if it would normally do.\nsticky_history = yes\n\n# Maximum amount of notifications kept in history\nhistory_length = 15\n\n# Display indicators for URLs (U) and actions (A).\nshow_indicators = no\n\n# The height of a single line.  If the height is smaller than the\n# font height, it will get raised to the font height.\n# This adds empty space above and under the text.\nline_height = 3\n\n# Draw a line of \"separatpr_height\" pixel height between two\n# notifications.\n# Set to 0 to disable.\nseparator_height = 2\n\n# Padding between text and separator.\npadding = 6\n\n# Horizontal padding.\nhorizontal_padding = 6\n\n# Define a color for the separator.\n# possible values are:\n#  * auto: dunst tries to find a color fitting to the background;\n#  * foreground: use the same color as the foreground;\n#  * frame: use the same color as the frame;\n#  * anything else will be interpreted as a X color.\nseparator_color = frame\n\n# Print a notification on startup.\n# This is mainly for error detection, since dbus (re-)starts dunst\n# automatically after a crash.\nstartup_notification = false\n\n# dmenu path.\ndmenu = /usr/bin/dmenu -p dunst:\n\n# Browser for opening urls in context menu.\nbrowser = /usr/bin/firefox -new-tab\n\n# Align icons left/right/off\nicon_position = off\nmax_icon_size = 80\n\n# Paths to default icons.\nicon_path = /usr/share/icons/Paper/16x16/mimetypes/:/usr/share/icons/Paper/48x48/status/:/usr/share/icons/Paper/16x16/devices/:/usr/share/icons/Paper/48x48/notifications/:/usr/share/icons/Paper/48x48/emblems/\n\nframe_width = 3\nframe_color = \"#8EC07C\"\n\n[shortcuts]\n\n# Shortcuts are specified as [modifier+][modifier+]...key\n# Available modifiers are \"ctrl\", \"mod1\" (the alt-key), \"mod2\",\n# \"mod3\" and \"mod4\" (windows-key).\n# Xev might be helpful to find names for keys.\n\n# Close notification.\nclose = ctrl+space\n\n# Close all notifications.\nclose_all = ctrl+shift+space\n\n# Redisplay last message(s).\n# On the US keyboard layout \"grave\" is normally above TAB and left\n# of \"1\".\nhistory = ctrl+grave\n\n# Context menu.\ncontext = ctrl+shift+period\n\n[urgency_low]\n# IMPORTANT: colors have to be defined in quotation marks.\n# Otherwise the \"#\" and following would be interpreted as a comment.\nframe_color = \"#3B7C87\"\nbackground = \"#3B7C87\"\nforeground = \"#000000\"\ntimeout = 2\n\n[urgency_normal]\nframe_color = \"{background}\"\nbackground = \"{background}\"\nforeground = \"{color6}\"\ntimeout = 6\n\n[urgency_critical]\nframe_color = \"{color6}\"\nbackground = \"{color6}\"\nforeground = \"{background}\"\ntimeout = 30\n\n# Every section that isn't one of the above is interpreted as a rules to\n# override settings for certain messages.\n# Messages can be matched by \"appname\", \"summary\", \"body\", \"icon\", \"category\",\n# \"msg_urgency\" and you can override the \"timeout\", \"urgency\", \"foreground\",\n# \"background\", \"new_icon\" and \"format\".\n# Shell-like globbing will get expanded.\n#\n# SCRIPTING\n# You can specify a script that gets run when the rule matches by\n# setting the \"script\" option.\n# The script will be called as follows:\n#   script appname summary body icon urgency\n# where urgency can be \"LOW\", \"NORMAL\" or \"CRITICAL\".\n#\n# NOTE: if you don't want a notification to be displayed, set the format\n# to \"\".\n# NOTE: It might be helpful to run dunst -print in a terminal in order\n# to find fitting options for rules.\n[pomo]\n   appname = Pomo\n   summary = \"*pomo*\"\n   script = beep\n\n#[espeak]\n#    summary = \"*\"\n#    script = dunst_espeak.sh\n\n#[script-test]\n#    summary = \"*script*\"\n#    script = dunst_test.sh\n\n#[ignore]\n#    # This notification will not be displayed\n#    summary = \"foobar\"\n#    format = \"\"\n\n#[signed_on]\n#    appname = Pidgin\n#    summary = \"*signed on*\"\n#    urgency = low\n#\n#[signed_off]\n#    appname = Pidgin\n#    summary = *signed off*\n#    urgency = low\n#\n#[says]\n#    appname = Pidgin\n#    summary = *says*\n#    urgency = critical\n#\n#[twitter]\n#    appname = Pidgin\n#    summary = *twitter.com*\n#    urgency = normal\n#\n# vim: ft=cfg\n"
  },
  {
    "path": ".config/xfce4/desktop/icons.screen0-1175x884.rc",
    "content": "[xfdesktop-version-4.10.3+-rcfile_format]\n4.10.3+=true\n\n[/home/bresilla/WORK]\nrow=3\ncol=1\n\n[/home/bresilla/MOUNT]\nrow=5\ncol=0\n\n[/home/bresilla/DATA]\nrow=4\ncol=0\n\n[/home/bresilla/temp]\nrow=2\ncol=1\n\n[/home/bresilla/Sets]\nrow=0\ncol=1\n\n[/home/bresilla/Downloads]\nrow=7\ncol=0\n\n[/home/bresilla/VIRTUAL]\nrow=1\ncol=1\n\n[/home/bresilla/Dots]\nrow=6\ncol=0\n\n[/home/bresilla/REMOTE]\nrow=3\ncol=0\n\n[Trash]\nrow=0\ncol=0\n\n[/]\nrow=1\ncol=0\n\n[/home/bresilla]\nrow=2\ncol=0\n\n"
  },
  {
    "path": ".config/xfce4/desktop/icons.screen0-1224x884.rc",
    "content": "[xfdesktop-version-4.10.3+-rcfile_format]\n4.10.3+=true\n\n[Trash]\nrow=0\ncol=0\n\n[/]\nrow=1\ncol=0\n\n[/home/bresilla]\nrow=2\ncol=0\n\n"
  },
  {
    "path": ".config/xfce4/desktop/icons.screen0-3735x2100.rc",
    "content": "[xfdesktop-version-4.10.3+-rcfile_format]\n4.10.3+=true\n\n[/home/bresilla/WORK]\nrow=3\ncol=1\n\n[/home/bresilla/MOUNT]\nrow=5\ncol=0\n\n[/home/bresilla/DATA]\nrow=4\ncol=0\n\n[/home/bresilla/temp]\nrow=2\ncol=1\n\n[/home/bresilla/Sets]\nrow=0\ncol=1\n\n[/home/bresilla/Downloads]\nrow=7\ncol=0\n\n[/home/bresilla/VIRTUAL]\nrow=1\ncol=1\n\n[/home/bresilla/Dots]\nrow=6\ncol=0\n\n[/home/bresilla/REMOTE]\nrow=3\ncol=0\n\n[Trash]\nrow=0\ncol=0\n\n[/]\nrow=1\ncol=0\n\n[/home/bresilla]\nrow=2\ncol=0\n\n"
  },
  {
    "path": ".config/xfce4/desktop/icons.screen0-3752x2100.rc",
    "content": "[xfdesktop-version-4.10.3+-rcfile_format]\n4.10.3+=true\n\n[Trash]\nrow=0\ncol=0\n\n[/]\nrow=1\ncol=0\n\n[/home/bresilla]\nrow=2\ncol=0\n\n"
  },
  {
    "path": ".config/xfce4/desktop/icons.screen0-3784x2020.rc",
    "content": "[xfdesktop-version-4.10.3+-rcfile_format]\n4.10.3+=true\n\n[Trash]\nrow=0\ncol=0\n\n[/]\nrow=1\ncol=0\n\n[/home/bresilla]\nrow=2\ncol=0\n\n"
  },
  {
    "path": ".config/xfce4/desktop/icons.screen0-3784x2100.rc",
    "content": "[xfdesktop-version-4.10.3+-rcfile_format]\n4.10.3+=true\n\n[Trash]\nrow=0\ncol=0\n\n[/]\nrow=1\ncol=0\n\n[/home/bresilla]\nrow=2\ncol=0\n\n"
  },
  {
    "path": ".config/xfce4/panel/whiskermenu-7.rc",
    "content": "favorites=exo-terminal-emulator.desktop,exo-file-manager.desktop,exo-mail-reader.desktop,exo-web-browser.desktop,xfce4-terminal.desktop\nrecent=exo-file-manager.desktop,inkscape.desktop,exo-terminal-emulator.desktop,libreoffice-writer.desktop,xfce4-terminal.desktop,libreoffice-calc.desktop,firefox.desktop\nbutton-title=Applications\nbutton-icon=start-here\nbutton-single-row=false\nshow-button-title=false\nshow-button-icon=true\nlauncher-show-name=true\nlauncher-show-description=true\nlauncher-show-tooltip=true\nitem-icon-size=2\nhover-switch-category=false\ncategory-show-name=true\ncategory-icon-size=1\nload-hierarchy=false\nrecent-items-max=10\nfavorites-in-recent=true\ndisplay-recent-default=false\nposition-search-alternate=false\nposition-commands-alternate=false\nposition-categories-alternate=false\nmenu-width=702\nmenu-height=668\nmenu-opacity=100\ncommand-settings=xfce4-settings-manager\nshow-command-settings=true\ncommand-lockscreen=xflock4\nshow-command-lockscreen=true\ncommand-switchuser=dm-tool switch-to-greeter\nshow-command-switchuser=true\ncommand-logout=xfce4-session-logout\nshow-command-logout=true\ncommand-menueditor=menulibre\nshow-command-menueditor=true\ncommand-profile=mugshot\nshow-command-profile=true\nsearch-actions=5\n\n[action0]\nname=Man Pages\npattern=#\ncommand=exo-open --launch TerminalEmulator man %s\nregex=false\n\n[action1]\nname=Web Search\npattern=?\ncommand=exo-open --launch WebBrowser https://duckduckgo.com/?q=%u\nregex=false\n\n[action2]\nname=Wikipedia\npattern=!w\ncommand=exo-open --launch WebBrowser https://en.wikipedia.org/wiki/%u\nregex=false\n\n[action3]\nname=Run in Terminal\npattern=!\ncommand=exo-open --launch TerminalEmulator %s\nregex=false\n\n[action4]\nname=Open URI\npattern=^(file|http|https):\\\\/\\\\/(.*)$\ncommand=exo-open \\\\0\nregex=true\n\n"
  },
  {
    "path": ".config/xfce4/terminal/accels.scm",
    "content": "; xfce4-terminal GtkAccelMap rc-file         -*- scheme -*-\n; this file is an automated accelerator map dump\n;\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-1\" \"<Alt>1\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-3\" \"<Alt>3\")\n; (gtk_accel_path \"<Actions>/terminal-window/file-menu\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/close-other-tabs\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/search\" \"<Primary><Shift>f\")\n; (gtk_accel_path \"<Actions>/terminal-window/next-tab\" \"<Primary>Page_Down\")\n; (gtk_accel_path \"<Actions>/terminal-window/copy-html\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/show-menubar\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/zoom-reset\" \"<Primary>0\")\n; (gtk_accel_path \"<Actions>/terminal-window/close-window\" \"<Primary><Shift>q\")\n; (gtk_accel_path \"<Actions>/terminal-window/save-contents\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/close-tab\" \"<Primary><Shift>w\")\n; (gtk_accel_path \"<Actions>/terminal-window/view-menu\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/new-tab\" \"<Primary><Shift>t\")\n; (gtk_accel_path \"<Actions>/terminal-window/show-toolbar\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/copy-input\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/paste\" \"<Primary><Shift>v\")\n; (gtk_accel_path \"<Actions>/terminal-window/copy\" \"<Primary><Shift>c\")\n; (gtk_accel_path \"<Actions>/terminal-window/edit-menu\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/fullscreen\" \"F11\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-6\" \"<Alt>6\")\n; (gtk_accel_path \"<Actions>/terminal-window/read-only\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/detach-tab\" \"<Primary><Shift>d\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-8\" \"<Alt>8\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-2\" \"<Alt>2\")\n; (gtk_accel_path \"<Actions>/terminal-window/scroll-on-output\" \"\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-5\" \"<Alt>5\")\n; (gtk_accel_path \"<Actions>/terminal-window/prev-tab\" \"<Primary>Page_Up\")\n; (gtk_accel_path \"<Actions>/terminal-window/move-tab-left\" \"<Primary><Shift>Page_Up\")\n; (gtk_accel_path \"<Actions>/terminal-window/zoom-in\" \"<Primary>plus\")\n; (gtk_accel_path \"<Actions>/terminal-window/search-prev\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/reset-and-clear\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/about\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/search-next\" \"\")\n(gtk_accel_path \"<Actions>/terminal-window/toggle-menubar\" \"F10\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-7\" \"<Alt>7\")\n; (gtk_accel_path \"<Actions>/terminal-window/select-all\" \"<Primary><Shift>a\")\n; (gtk_accel_path \"<Actions>/terminal-window/help-menu\" \"\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-9\" \"<Alt>9\")\n; (gtk_accel_path \"<Actions>/terminal-window/show-borders\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/new-window\" \"<Primary><Shift>n\")\n(gtk_accel_path \"<Actions>/terminal-window/goto-tab-4\" \"<Alt>4\")\n; (gtk_accel_path \"<Actions>/terminal-window/contents\" \"F1\")\n; (gtk_accel_path \"<Actions>/terminal-window/preferences\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/move-tab-right\" \"<Primary><Shift>Page_Down\")\n; (gtk_accel_path \"<Actions>/terminal-window/zoom-out\" \"<Primary>minus\")\n; (gtk_accel_path \"<Actions>/terminal-window/set-title\" \"<Primary><Shift>s\")\n; (gtk_accel_path \"<Actions>/terminal-window/paste-selection\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/undo-close-tab\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/tabs-menu\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/zoom-menu\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/reset\" \"\")\n; (gtk_accel_path \"<Actions>/terminal-window/terminal-menu\" \"\")\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"keyboards\" version=\"1.0\">\n  <property name=\"Default\" type=\"empty\">\n    <property name=\"Numlock\" type=\"bool\" value=\"false\"/>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/ristretto.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"ristretto\" version=\"1.0\">\n  <property name=\"window\" type=\"empty\">\n    <property name=\"navigationbar\" type=\"empty\">\n      <property name=\"position\" type=\"string\" value=\"left\"/>\n    </property>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"thunar\" version=\"1.0\">\n  <property name=\"last-view\" type=\"string\" value=\"ThunarIconView\"/>\n  <property name=\"last-icon-view-zoom-level\" type=\"string\" value=\"THUNAR_ZOOM_LEVEL_LARGEST\"/>\n  <property name=\"last-window-width\" type=\"int\" value=\"1861\"/>\n  <property name=\"last-window-height\" type=\"int\" value=\"1313\"/>\n  <property name=\"last-window-maximized\" type=\"bool\" value=\"false\"/>\n  <property name=\"last-separator-position\" type=\"int\" value=\"183\"/>\n  <property name=\"last-show-hidden\" type=\"bool\" value=\"true\"/>\n  <property name=\"last-location-bar\" type=\"string\" value=\"ThunarLocationEntry\"/>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xfce4-desktop\" version=\"1.0\">\n  <property name=\"backdrop\" type=\"empty\">\n    <property name=\"screen0\" type=\"empty\">\n      <property name=\"monitor0\" type=\"empty\">\n        <property name=\"workspace0\" type=\"empty\">\n          <property name=\"color-style\" type=\"int\" value=\"0\"/>\n          <property name=\"image-style\" type=\"int\" value=\"5\"/>\n          <property name=\"last-image\" type=\"string\" value=\"/home/bresilla/.config/xfce4/walls/315.jpg\"/>\n          <property name=\"backdrop-cycle-enable\" type=\"bool\" value=\"true\"/>\n          <property name=\"backdrop-cycle-timer\" type=\"uint\" value=\"1\"/>\n        </property>\n        <property name=\"workspace1\" type=\"empty\">\n          <property name=\"color-style\" type=\"int\" value=\"0\"/>\n          <property name=\"image-style\" type=\"int\" value=\"5\"/>\n          <property name=\"last-image\" type=\"string\" value=\"/usr/share/backgrounds/xfce/xfce-teal.jpg\"/>\n        </property>\n        <property name=\"workspace2\" type=\"empty\">\n          <property name=\"color-style\" type=\"int\" value=\"0\"/>\n          <property name=\"image-style\" type=\"int\" value=\"5\"/>\n          <property name=\"last-image\" type=\"string\" value=\"/usr/share/backgrounds/xfce/xfce-teal.jpg\"/>\n        </property>\n        <property name=\"workspace3\" type=\"empty\">\n          <property name=\"color-style\" type=\"int\" value=\"0\"/>\n          <property name=\"image-style\" type=\"int\" value=\"5\"/>\n          <property name=\"last-image\" type=\"string\" value=\"/usr/share/backgrounds/xfce/xfce-teal.jpg\"/>\n        </property>\n      </property>\n    </property>\n  </property>\n  <property name=\"desktop-icons\" type=\"empty\">\n    <property name=\"file-icons\" type=\"empty\">\n      <property name=\"show-home\" type=\"bool\" value=\"false\"/>\n      <property name=\"show-filesystem\" type=\"bool\" value=\"false\"/>\n      <property name=\"show-trash\" type=\"bool\" value=\"false\"/>\n      <property name=\"show-removable\" type=\"bool\" value=\"false\"/>\n    </property>\n    <property name=\"style\" type=\"int\" value=\"0\"/>\n  </property>\n  <property name=\"last\" type=\"empty\">\n    <property name=\"window-width\" type=\"int\" value=\"685\"/>\n    <property name=\"window-height\" type=\"int\" value=\"587\"/>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xfce4-keyboard-shortcuts\" version=\"1.0\">\n  <property name=\"commands\" type=\"empty\">\n    <property name=\"default\" type=\"empty\">\n      <property name=\"&lt;Alt&gt;F1\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F2\" type=\"empty\">\n        <property name=\"startup-notify\" type=\"empty\"/>\n      </property>\n      <property name=\"&lt;Alt&gt;F3\" type=\"empty\">\n        <property name=\"startup-notify\" type=\"empty\"/>\n      </property>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Delete\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;l\" type=\"empty\"/>\n      <property name=\"XF86Display\" type=\"empty\"/>\n      <property name=\"&lt;Super&gt;p\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;Escape\" type=\"empty\"/>\n      <property name=\"XF86WWW\" type=\"empty\"/>\n      <property name=\"XF86Mail\" type=\"empty\"/>\n    </property>\n    <property name=\"custom\" type=\"empty\">\n      <property name=\"&lt;Alt&gt;F3\" type=\"string\" value=\"xfce4-appfinder\">\n        <property name=\"startup-notify\" type=\"bool\" value=\"true\"/>\n      </property>\n      <property name=\"&lt;Alt&gt;F1\" type=\"string\" value=\"xfce4-popup-applicationsmenu\"/>\n      <property name=\"&lt;Alt&gt;F2\" type=\"string\" value=\"xfce4-appfinder --collapsed\">\n        <property name=\"startup-notify\" type=\"bool\" value=\"true\"/>\n      </property>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Delete\" type=\"string\" value=\"xflock4\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;l\" type=\"string\" value=\"xflock4\"/>\n      <property name=\"XF86Mail\" type=\"string\" value=\"exo-open --launch MailReader\"/>\n      <property name=\"XF86Display\" type=\"string\" value=\"xfce4-display-settings --minimal\"/>\n      <property name=\"XF86WWW\" type=\"string\" value=\"exo-open --launch WebBrowser\"/>\n      <property name=\"&lt;Super&gt;p\" type=\"string\" value=\"xfce4-display-settings --minimal\"/>\n      <property name=\"&lt;Primary&gt;Escape\" type=\"string\" value=\"xfdesktop --menu\"/>\n      <property name=\"override\" type=\"bool\" value=\"true\"/>\n    </property>\n  </property>\n  <property name=\"xfwm4\" type=\"empty\">\n    <property name=\"default\" type=\"empty\">\n      <property name=\"&lt;Alt&gt;Insert\" type=\"empty\"/>\n      <property name=\"Escape\" type=\"empty\"/>\n      <property name=\"Left\" type=\"empty\"/>\n      <property name=\"Right\" type=\"empty\"/>\n      <property name=\"Up\" type=\"empty\"/>\n      <property name=\"Down\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;Tab\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;&lt;Shift&gt;Tab\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;Delete\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Down\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Left\" type=\"empty\"/>\n      <property name=\"&lt;Shift&gt;&lt;Alt&gt;Page_Down\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F4\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F6\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F7\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F8\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F9\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F10\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F11\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;F12\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Left\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;End\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Home\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Right\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Up\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_1\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_2\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_3\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_4\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_5\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_6\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_7\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_8\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_9\" type=\"empty\"/>\n      <property name=\"&lt;Alt&gt;space\" type=\"empty\"/>\n      <property name=\"&lt;Shift&gt;&lt;Alt&gt;Page_Up\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Right\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;d\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Up\" type=\"empty\"/>\n      <property name=\"&lt;Super&gt;Tab\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F1\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F2\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F3\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F4\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F5\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F6\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F7\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F8\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F9\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F10\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F11\" type=\"empty\"/>\n      <property name=\"&lt;Primary&gt;F12\" type=\"empty\"/>\n    </property>\n    <property name=\"custom\" type=\"empty\">\n      <property name=\"Up\" type=\"string\" value=\"up_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_9\" type=\"string\" value=\"move_window_workspace_9_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_8\" type=\"string\" value=\"move_window_workspace_8_key\"/>\n      <property name=\"Left\" type=\"string\" value=\"left_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_6\" type=\"string\" value=\"move_window_workspace_6_key\"/>\n      <property name=\"&lt;Alt&gt;Insert\" type=\"string\" value=\"add_workspace_key\"/>\n      <property name=\"&lt;Alt&gt;Tab\" type=\"string\" value=\"cycle_windows_key\"/>\n      <property name=\"&lt;Alt&gt;&lt;Shift&gt;Tab\" type=\"string\" value=\"cycle_reverse_windows_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_7\" type=\"string\" value=\"move_window_workspace_7_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Right\" type=\"string\" value=\"right_workspace_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Right\" type=\"string\" value=\"move_window_right_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;d\" type=\"string\" value=\"show_desktop_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Up\" type=\"string\" value=\"up_workspace_key\"/>\n      <property name=\"&lt;Primary&gt;F7\" type=\"string\" value=\"workspace_7_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Home\" type=\"string\" value=\"move_window_prev_workspace_key\"/>\n      <property name=\"&lt;Alt&gt;F4\" type=\"string\" value=\"close_window_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Left\" type=\"string\" value=\"move_window_left_key\"/>\n      <property name=\"&lt;Alt&gt;F6\" type=\"string\" value=\"stick_window_key\"/>\n      <property name=\"&lt;Alt&gt;F10\" type=\"string\" value=\"maximize_window_key\"/>\n      <property name=\"&lt;Alt&gt;F12\" type=\"string\" value=\"above_key\"/>\n      <property name=\"&lt;Alt&gt;F9\" type=\"string\" value=\"hide_window_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Down\" type=\"string\" value=\"down_workspace_key\"/>\n      <property name=\"&lt;Alt&gt;F8\" type=\"string\" value=\"resize_window_key\"/>\n      <property name=\"&lt;Super&gt;Tab\" type=\"string\" value=\"switch_window_key\"/>\n      <property name=\"Escape\" type=\"string\" value=\"cancel_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;End\" type=\"string\" value=\"move_window_next_workspace_key\"/>\n      <property name=\"&lt;Primary&gt;F10\" type=\"string\" value=\"workspace_10_key\"/>\n      <property name=\"&lt;Primary&gt;F11\" type=\"string\" value=\"workspace_11_key\"/>\n      <property name=\"&lt;Alt&gt;F11\" type=\"string\" value=\"fullscreen_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Up\" type=\"string\" value=\"move_window_up_key\"/>\n      <property name=\"Right\" type=\"string\" value=\"right_key\"/>\n      <property name=\"Down\" type=\"string\" value=\"down_key\"/>\n      <property name=\"&lt;Alt&gt;F7\" type=\"string\" value=\"move_window_key\"/>\n      <property name=\"&lt;Shift&gt;&lt;Alt&gt;Page_Down\" type=\"string\" value=\"lower_window_key\"/>\n      <property name=\"&lt;Primary&gt;F12\" type=\"string\" value=\"workspace_12_key\"/>\n      <property name=\"&lt;Primary&gt;F1\" type=\"string\" value=\"workspace_1_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;Left\" type=\"string\" value=\"left_workspace_key\"/>\n      <property name=\"&lt;Primary&gt;F2\" type=\"string\" value=\"workspace_2_key\"/>\n      <property name=\"&lt;Primary&gt;F4\" type=\"string\" value=\"workspace_4_key\"/>\n      <property name=\"&lt;Primary&gt;F5\" type=\"string\" value=\"workspace_5_key\"/>\n      <property name=\"&lt;Primary&gt;F6\" type=\"string\" value=\"workspace_6_key\"/>\n      <property name=\"&lt;Alt&gt;space\" type=\"string\" value=\"popup_menu_key\"/>\n      <property name=\"&lt;Primary&gt;F8\" type=\"string\" value=\"workspace_8_key\"/>\n      <property name=\"&lt;Primary&gt;F9\" type=\"string\" value=\"workspace_9_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_1\" type=\"string\" value=\"move_window_workspace_1_key\"/>\n      <property name=\"&lt;Alt&gt;Delete\" type=\"string\" value=\"del_workspace_key\"/>\n      <property name=\"&lt;Shift&gt;&lt;Alt&gt;Page_Up\" type=\"string\" value=\"raise_window_key\"/>\n      <property name=\"&lt;Primary&gt;F3\" type=\"string\" value=\"workspace_3_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_2\" type=\"string\" value=\"move_window_workspace_2_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_3\" type=\"string\" value=\"move_window_workspace_3_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_4\" type=\"string\" value=\"move_window_workspace_4_key\"/>\n      <property name=\"&lt;Primary&gt;&lt;Alt&gt;KP_5\" type=\"string\" value=\"move_window_workspace_5_key\"/>\n      <property name=\"override\" type=\"bool\" value=\"true\"/>\n    </property>\n  </property>\n  <property name=\"providers\" type=\"array\">\n    <value type=\"string\" value=\"commands\"/>\n    <value type=\"string\" value=\"xfwm4\"/>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xfce4-panel\" version=\"1.0\">\n  <property name=\"configver\" type=\"int\" value=\"2\"/>\n  <property name=\"panels\" type=\"array\">\n    <value type=\"int\" value=\"1\"/>\n    <property name=\"panel-1\" type=\"empty\">\n      <property name=\"position\" type=\"string\" value=\"p=6;x=0;y=0\"/>\n      <property name=\"length\" type=\"uint\" value=\"100\"/>\n      <property name=\"position-locked\" type=\"bool\" value=\"true\"/>\n      <property name=\"size\" type=\"uint\" value=\"48\"/>\n      <property name=\"plugin-ids\" type=\"array\">\n        <value type=\"int\" value=\"7\"/>\n        <value type=\"int\" value=\"8\"/>\n        <value type=\"int\" value=\"3\"/>\n        <value type=\"int\" value=\"15\"/>\n        <value type=\"int\" value=\"4\"/>\n        <value type=\"int\" value=\"5\"/>\n        <value type=\"int\" value=\"6\"/>\n        <value type=\"int\" value=\"2\"/>\n      </property>\n      <property name=\"mode\" type=\"uint\" value=\"1\"/>\n    </property>\n  </property>\n  <property name=\"plugins\" type=\"empty\">\n    <property name=\"plugin-2\" type=\"string\" value=\"actions\"/>\n    <property name=\"plugin-3\" type=\"string\" value=\"tasklist\">\n      <property name=\"show-labels\" type=\"bool\" value=\"false\"/>\n    </property>\n    <property name=\"plugin-15\" type=\"string\" value=\"separator\">\n      <property name=\"expand\" type=\"bool\" value=\"true\"/>\n      <property name=\"style\" type=\"uint\" value=\"0\"/>\n    </property>\n    <property name=\"plugin-4\" type=\"string\" value=\"pager\"/>\n    <property name=\"plugin-5\" type=\"string\" value=\"clock\">\n      <property name=\"mode\" type=\"uint\" value=\"2\"/>\n    </property>\n    <property name=\"plugin-6\" type=\"string\" value=\"systray\"/>\n    <property name=\"plugin-7\" type=\"string\" value=\"whiskermenu\"/>\n    <property name=\"plugin-8\" type=\"string\" value=\"separator\">\n      <property name=\"expand\" type=\"bool\" value=\"true\"/>\n      <property name=\"style\" type=\"uint\" value=\"1\"/>\n    </property>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xfce4-session\" version=\"1.0\">\n  <property name=\"general\" type=\"empty\">\n    <property name=\"FailsafeSessionName\" type=\"empty\"/>\n    <property name=\"SessionName\" type=\"string\" value=\"Default\"/>\n    <property name=\"SaveOnExit\" type=\"bool\" value=\"true\"/>\n  </property>\n  <property name=\"sessions\" type=\"empty\">\n    <property name=\"Failsafe\" type=\"empty\">\n      <property name=\"IsFailsafe\" type=\"empty\"/>\n      <property name=\"Count\" type=\"empty\"/>\n      <property name=\"Client0_Command\" type=\"empty\"/>\n      <property name=\"Client0_PerScreen\" type=\"empty\"/>\n      <property name=\"Client1_Command\" type=\"empty\"/>\n      <property name=\"Client1_PerScreen\" type=\"empty\"/>\n      <property name=\"Client2_Command\" type=\"empty\"/>\n      <property name=\"Client2_PerScreen\" type=\"empty\"/>\n      <property name=\"Client3_Command\" type=\"empty\"/>\n      <property name=\"Client3_PerScreen\" type=\"empty\"/>\n      <property name=\"Client4_Command\" type=\"empty\"/>\n      <property name=\"Client4_PerScreen\" type=\"empty\"/>\n    </property>\n  </property>\n  <property name=\"splash\" type=\"empty\">\n    <property name=\"Engine\" type=\"empty\"/>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-manager.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xfce4-settings-manager\" version=\"1.0\">\n  <property name=\"last\" type=\"empty\">\n    <property name=\"window-width\" type=\"int\" value=\"1018\"/>\n    <property name=\"window-height\" type=\"int\" value=\"919\"/>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xfwm4\" version=\"1.0\">\n  <property name=\"general\" type=\"empty\">\n    <property name=\"activate_action\" type=\"string\" value=\"bring\"/>\n    <property name=\"borderless_maximize\" type=\"bool\" value=\"true\"/>\n    <property name=\"box_move\" type=\"bool\" value=\"false\"/>\n    <property name=\"box_resize\" type=\"bool\" value=\"false\"/>\n    <property name=\"button_layout\" type=\"string\" value=\"O|SHMC\"/>\n    <property name=\"button_offset\" type=\"int\" value=\"0\"/>\n    <property name=\"button_spacing\" type=\"int\" value=\"0\"/>\n    <property name=\"click_to_focus\" type=\"bool\" value=\"true\"/>\n    <property name=\"cycle_apps_only\" type=\"bool\" value=\"false\"/>\n    <property name=\"cycle_draw_frame\" type=\"bool\" value=\"true\"/>\n    <property name=\"cycle_hidden\" type=\"bool\" value=\"true\"/>\n    <property name=\"cycle_minimum\" type=\"bool\" value=\"true\"/>\n    <property name=\"cycle_preview\" type=\"bool\" value=\"true\"/>\n    <property name=\"cycle_tabwin_mode\" type=\"int\" value=\"0\"/>\n    <property name=\"cycle_workspaces\" type=\"bool\" value=\"false\"/>\n    <property name=\"double_click_action\" type=\"string\" value=\"maximize\"/>\n    <property name=\"double_click_distance\" type=\"int\" value=\"5\"/>\n    <property name=\"double_click_time\" type=\"int\" value=\"250\"/>\n    <property name=\"easy_click\" type=\"string\" value=\"Alt\"/>\n    <property name=\"focus_delay\" type=\"int\" value=\"250\"/>\n    <property name=\"focus_hint\" type=\"bool\" value=\"true\"/>\n    <property name=\"focus_new\" type=\"bool\" value=\"true\"/>\n    <property name=\"frame_opacity\" type=\"int\" value=\"100\"/>\n    <property name=\"full_width_title\" type=\"bool\" value=\"true\"/>\n    <property name=\"horiz_scroll_opacity\" type=\"bool\" value=\"false\"/>\n    <property name=\"inactive_opacity\" type=\"int\" value=\"100\"/>\n    <property name=\"maximized_offset\" type=\"int\" value=\"0\"/>\n    <property name=\"mousewheel_rollup\" type=\"bool\" value=\"true\"/>\n    <property name=\"move_opacity\" type=\"int\" value=\"100\"/>\n    <property name=\"placement_mode\" type=\"string\" value=\"center\"/>\n    <property name=\"placement_ratio\" type=\"int\" value=\"20\"/>\n    <property name=\"popup_opacity\" type=\"int\" value=\"100\"/>\n    <property name=\"prevent_focus_stealing\" type=\"bool\" value=\"false\"/>\n    <property name=\"raise_delay\" type=\"int\" value=\"250\"/>\n    <property name=\"raise_on_click\" type=\"bool\" value=\"true\"/>\n    <property name=\"raise_on_focus\" type=\"bool\" value=\"false\"/>\n    <property name=\"raise_with_any_button\" type=\"bool\" value=\"true\"/>\n    <property name=\"repeat_urgent_blink\" type=\"bool\" value=\"false\"/>\n    <property name=\"resize_opacity\" type=\"int\" value=\"100\"/>\n    <property name=\"scroll_workspaces\" type=\"bool\" value=\"true\"/>\n    <property name=\"shadow_delta_height\" type=\"int\" value=\"0\"/>\n    <property name=\"shadow_delta_width\" type=\"int\" value=\"0\"/>\n    <property name=\"shadow_delta_x\" type=\"int\" value=\"0\"/>\n    <property name=\"shadow_delta_y\" type=\"int\" value=\"-3\"/>\n    <property name=\"shadow_opacity\" type=\"int\" value=\"50\"/>\n    <property name=\"show_app_icon\" type=\"bool\" value=\"false\"/>\n    <property name=\"show_dock_shadow\" type=\"bool\" value=\"true\"/>\n    <property name=\"show_frame_shadow\" type=\"bool\" value=\"true\"/>\n    <property name=\"show_popup_shadow\" type=\"bool\" value=\"false\"/>\n    <property name=\"snap_resist\" type=\"bool\" value=\"false\"/>\n    <property name=\"snap_to_border\" type=\"bool\" value=\"true\"/>\n    <property name=\"snap_to_windows\" type=\"bool\" value=\"false\"/>\n    <property name=\"snap_width\" type=\"int\" value=\"10\"/>\n    <property name=\"sync_to_vblank\" type=\"bool\" value=\"false\"/>\n    <property name=\"theme\" type=\"string\" value=\"Materia\"/>\n    <property name=\"tile_on_move\" type=\"bool\" value=\"true\"/>\n    <property name=\"title_alignment\" type=\"string\" value=\"center\"/>\n    <property name=\"title_font\" type=\"string\" value=\"Sans Bold 9\"/>\n    <property name=\"title_horizontal_offset\" type=\"int\" value=\"0\"/>\n    <property name=\"titleless_maximize\" type=\"bool\" value=\"false\"/>\n    <property name=\"title_shadow_active\" type=\"string\" value=\"false\"/>\n    <property name=\"title_shadow_inactive\" type=\"string\" value=\"false\"/>\n    <property name=\"title_vertical_offset_active\" type=\"int\" value=\"0\"/>\n    <property name=\"title_vertical_offset_inactive\" type=\"int\" value=\"0\"/>\n    <property name=\"toggle_workspaces\" type=\"bool\" value=\"false\"/>\n    <property name=\"unredirect_overlays\" type=\"bool\" value=\"true\"/>\n    <property name=\"urgent_blink\" type=\"bool\" value=\"false\"/>\n    <property name=\"use_compositing\" type=\"bool\" value=\"true\"/>\n    <property name=\"workspace_count\" type=\"int\" value=\"4\"/>\n    <property name=\"wrap_cycle\" type=\"bool\" value=\"true\"/>\n    <property name=\"wrap_layout\" type=\"bool\" value=\"true\"/>\n    <property name=\"wrap_resistance\" type=\"int\" value=\"10\"/>\n    <property name=\"wrap_windows\" type=\"bool\" value=\"true\"/>\n    <property name=\"wrap_workspaces\" type=\"bool\" value=\"false\"/>\n    <property name=\"zoom_desktop\" type=\"bool\" value=\"true\"/>\n    <property name=\"workspace_names\" type=\"array\">\n      <value type=\"string\" value=\"Workspace 1\"/>\n      <value type=\"string\" value=\"Workspace 2\"/>\n      <value type=\"string\" value=\"Workspace 3\"/>\n      <value type=\"string\" value=\"Workspace 4\"/>\n    </property>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<channel name=\"xsettings\" version=\"1.0\">\n  <property name=\"Net\" type=\"empty\">\n    <property name=\"ThemeName\" type=\"string\" value=\"Materia-dark\"/>\n    <property name=\"IconThemeName\" type=\"string\" value=\"eSuru++\"/>\n    <property name=\"DoubleClickTime\" type=\"empty\"/>\n    <property name=\"DoubleClickDistance\" type=\"empty\"/>\n    <property name=\"DndDragThreshold\" type=\"empty\"/>\n    <property name=\"CursorBlink\" type=\"empty\"/>\n    <property name=\"CursorBlinkTime\" type=\"empty\"/>\n    <property name=\"SoundThemeName\" type=\"empty\"/>\n    <property name=\"EnableEventSounds\" type=\"empty\"/>\n    <property name=\"EnableInputFeedbackSounds\" type=\"empty\"/>\n  </property>\n  <property name=\"Xft\" type=\"empty\">\n    <property name=\"DPI\" type=\"empty\"/>\n    <property name=\"Antialias\" type=\"empty\"/>\n    <property name=\"Hinting\" type=\"empty\"/>\n    <property name=\"HintStyle\" type=\"empty\"/>\n    <property name=\"RGBA\" type=\"empty\"/>\n  </property>\n  <property name=\"Gtk\" type=\"empty\">\n    <property name=\"CanChangeAccels\" type=\"empty\"/>\n    <property name=\"ColorPalette\" type=\"empty\"/>\n    <property name=\"FontName\" type=\"empty\"/>\n    <property name=\"MonospaceFontName\" type=\"empty\"/>\n    <property name=\"IconSizes\" type=\"empty\"/>\n    <property name=\"KeyThemeName\" type=\"empty\"/>\n    <property name=\"ToolbarStyle\" type=\"empty\"/>\n    <property name=\"ToolbarIconSize\" type=\"empty\"/>\n    <property name=\"MenuImages\" type=\"empty\"/>\n    <property name=\"ButtonImages\" type=\"empty\"/>\n    <property name=\"MenuBarAccel\" type=\"empty\"/>\n    <property name=\"CursorThemeName\" type=\"empty\"/>\n    <property name=\"CursorThemeSize\" type=\"empty\"/>\n    <property name=\"DecorationLayout\" type=\"empty\"/>\n  </property>\n</channel>\n"
  },
  {
    "path": ".config/zathura/genzathrc",
    "content": "#!/bin/sh\n\n# Generates zathura configuration file\n\n. $HOME/.cache/wal/colors.sh\n\ncat <<CONF\nset recolor \"true\"\n\nset completion-bg \"$background\"\nset completion-fg \"$foreground\"\nset completion-group-bg \"$background\"\nset completion-group-fg \"$color2\"\nset completion-highlight-bg \"$foreground\"\nset completion-highlight-fg \"$background\"\n\nset recolor-lightcolor \"$background\"\nset recolor-darkcolor \"$foreground\"\nset default-bg \"$background\"\n\nset inputbar-bg \"$background\"\nset inputbar-fg \"$foreground\"\nset notification-bg \"$background\"\nset notification-fg \"$foreground\"\nset notification-error-bg \"$color1\"\nset notification-error-fg \"$foreground\"\nset notification-warning-bg \"$color1\"\nset notification-warning-fg \"$foreground\"\nset statusbar-bg \"$background\"\nset statusbar-fg \"$foreground\"\nset index-bg \"$background\"\nset index-fg \"$foreground\"\nset index-active-bg \"$foreground\"\nset index-active-fg \"$background\"\nset render-loading-bg \"$background\"\nset render-loading-fg \"$foreground\"\n\nset window-title-home-tilde true\nset statusbar-basename true\nset selection-clipboard clipboard\nset statusbar-h-padding 0\nset statusbar-v-padding 0\nset page-padding 10\nCONF\n"
  },
  {
    "path": ".config/zathura/zathurarc",
    "content": "set recolor \"true\"\n\nset completion-bg \"#171418\"\nset completion-fg \"#c5c4c5\"\nset completion-group-bg \"#171418\"\nset completion-group-fg \"#8d001a\"\nset completion-highlight-bg \"#c5c4c5\"\nset completion-highlight-fg \"#171418\"\n\nset recolor-lightcolor \"#171418\"\nset recolor-darkcolor \"#c5c4c5\"\nset default-bg \"#171418\"\n\nset inputbar-bg \"#171418\"\nset inputbar-fg \"#c5c4c5\"\nset notification-bg \"#171418\"\nset notification-fg \"#c5c4c5\"\nset notification-error-bg \"#59005d\"\nset notification-error-fg \"#c5c4c5\"\nset notification-warning-bg \"#59005d\"\nset notification-warning-fg \"#c5c4c5\"\nset statusbar-bg \"#171418\"\nset statusbar-fg \"#c5c4c5\"\nset index-bg \"#171418\"\nset index-fg \"#c5c4c5\"\nset index-active-bg \"#c5c4c5\"\nset index-active-fg \"#171418\"\nset render-loading-bg \"#171418\"\nset render-loading-fg \"#c5c4c5\"\n\nset window-title-home-tilde true\nset statusbar-basename true\nset selection-clipboard clipboard\nset statusbar-h-padding 0\nset statusbar-v-padding 0\nset page-padding 10\n"
  },
  {
    "path": ".config/zsh/almostontop/_almostontop",
    "content": "#compdef almostontop\n\n_almostontop_cmds() {\n  local commands; commands=(\n    'on:Enables almostontop plugin'\n    'off:Disables almostontop plugin'\n    'toggle:Toggles almostontop plugin'\n  )\n  _describe -t commands 'almostontop command' commands \"$@\"\n}\n\n_almostontop() {\n  _arguments -C '1: :_almostontop_cmds'\n}\n\n_almostontop \"$@\"\n"
  },
  {
    "path": ".config/zsh/almostontop/almostontop.plugin.zsh",
    "content": "if [ \"x$ALMOSONTOP\" = \"xfalse\" ]; then\n  # doing nothing here\nelse\n  ALMOSONTOP=true\nfi\n\nif [ \"$ALMOSTONTOP_COLOR\" = \"\" ]; then\n  ALMOSTONTOP_COLOR=\"green\"\nfi\n\nfunction almostontop_preexec\n{\n  if [ \"x$ALMOSONTOP\" = \"xtrue\" ]; then\n    clear -x\n    # print PROMPT and command itself on the top\n    print -P \"$prompt$fg[$ALMOSTONTOP_COLOR]${(z)1}$reset_color\"\n  fi\n}\n\nautoload -U add-zsh-hook\nadd-zsh-hook preexec almostontop_preexec\n\nfunction almostontop\n{\n  # Help message if there no args\n  if [ $# -eq 0 ]; then\n    almostontop_usage\n  fi\n\n  local arg=$1\n  if [ \"x$arg\" = \"xon\" ]; then\n    ALMOSONTOP=true\n  fi\n\n  if [ \"x$arg\" = \"xoff\" ]; then\n    ALMOSONTOP=false\n  fi\n\n  if [ \"x$arg\" = \"xtoggle\" ]; then\n    almostontop_toggle\n  fi\n}\n\nfunction almostontop_toggle\n{\n  if [ \"x$ALMOSONTOP\" = \"xtrue\" ]; then\n    almostontop off\n  else\n    almostontop on\n  fi\n}\n\n# Create widget so it could be bound with keys\nzle -N almostontop_toggle almostontop_toggle\n\n# \"ctrl-X ctrl-L\" to toggle almostontop, alike \"ctrl-L\" to clear screen\nbindkey \"^X^L\" almostontop_toggle\n\nfunction almostontop_usage\n{\n  cat <<-EOF\nUsage: almostontop <command>\n\nCommands:\n  on     Enables almostontop plugin\n  off    Disables almostontop plugin\n  toggle Toggles almostontop plugin\n\nDescription:\n  almostontop clears previous command output every time before new command\n  executed in shell. Insipred by 'alwaysontop' plugin for bash:\n  https://github.com/swirepe/alwaysontop\n\nVersion: $ALMOSTONTOP_VERSION\nEOF\n}\n"
  },
  {
    "path": ".config/zsh/async",
    "content": "#!/usr/bin/env zsh\n\ntypeset -g ASYNC_VERSION=1.6.2\n# Produce debug output from zsh-async when set to 1.\ntypeset -g ASYNC_DEBUG=${ASYNC_DEBUG:-0}\n\n# Wrapper for jobs executed by the async worker, gives output in parseable format with execution time\n_async_job() {\n\t# Disable xtrace as it would mangle the output.\n\tsetopt localoptions noxtrace\n\n\t# Store start time for job.\n\tfloat -F duration=$EPOCHREALTIME\n\n\t# Run the command and capture both stdout (`eval`) and stderr (`cat`) in\n\t# separate subshells. When the command is complete, we grab write lock\n\t# (mutex token) and output everything except stderr inside the command\n\t# block, after the command block has completed, the stdin for `cat` is\n\t# closed, causing stderr to be appended with a $'\\0' at the end to mark the\n\t# end of output from this job.\n\tlocal stdout stderr ret tok\n\t{\n\t\tstdout=$(eval \"$@\")\n\t\tret=$?\n\t\tduration=$(( EPOCHREALTIME - duration ))  # Calculate duration.\n\n\t\t# Grab mutex lock, stalls until token is available.\n\t\tread -r -k 1 -p tok || exit 1\n\n\t\t# Return output (<job_name> <return_code> <stdout> <duration> <stderr>).\n\t\tprint -r -n - $'\\0'${(q)1} $ret ${(q)stdout} $duration\n\t} 2> >(stderr=$(cat) && print -r -n - \" \"${(q)stderr}$'\\0')\n\n\t# Unlock mutex by inserting a token.\n\tprint -n -p $tok\n}\n\n# The background worker manages all tasks and runs them without interfering with other processes\n_async_worker() {\n\t# Reset all options to defaults inside async worker.\n\temulate -R zsh\n\n\t# Make sure monitor is unset to avoid printing the\n\t# pids of child processes.\n\tunsetopt monitor\n\n\t# Redirect stderr to `/dev/null` in case unforseen errors produced by the\n\t# worker. For example: `fork failed: resource temporarily unavailable`.\n\t# Some older versions of zsh might also print malloc errors (know to happen\n\t# on at least zsh 5.0.2 and 5.0.8) likely due to kill signals.\n\texec 2>/dev/null\n\n\t# When a zpty is deleted (using -d) all the zpty instances created before\n\t# the one being deleted receive a SIGHUP, unless we catch it, the async\n\t# worker would simply exit (stop working) even though visible in the list\n\t# of zpty's (zpty -L).\n\tTRAPHUP() {\n\t\treturn 0  # Return 0, indicating signal was handled.\n\t}\n\n\tlocal -A storage\n\tlocal unique=0\n\tlocal notify_parent=0\n\tlocal parent_pid=0\n\tlocal coproc_pid=0\n\tlocal processing=0\n\n\tlocal -a zsh_hooks zsh_hook_functions\n\tzsh_hooks=(chpwd periodic precmd preexec zshexit zshaddhistory)\n\tzsh_hook_functions=(${^zsh_hooks}_functions)\n\tunfunction $zsh_hooks &>/dev/null   # Deactivate all zsh hooks inside the worker.\n\tunset $zsh_hook_functions           # And hooks with registered functions.\n\tunset zsh_hooks zsh_hook_functions  # Cleanup.\n\n\tchild_exit() {\n\t\tlocal -a pids\n\t\tpids=(${${(v)jobstates##*:*:}%\\=*})\n\n\t\t# If coproc (cat) is the only child running, we close it to avoid\n\t\t# leaving it running indefinitely and cluttering the process tree.\n\t\tif  (( ! processing )) && [[ $#pids = 1 ]] && [[ $coproc_pid = $pids[1] ]]; then\n\t\t\tcoproc :\n\t\t\tcoproc_pid=0\n\t\tfi\n\n\t\t# On older version of zsh (pre 5.2) we notify the parent through a\n\t\t# SIGWINCH signal because `zpty` did not return a file descriptor (fd)\n\t\t# prior to that.\n\t\tif (( notify_parent )); then\n\t\t\t# We use SIGWINCH for compatibility with older versions of zsh\n\t\t\t# (pre 5.1.1) where other signals (INFO, ALRM, USR1, etc.) could\n\t\t\t# cause a deadlock in the shell under certain circumstances.\n\t\t\tkill -WINCH $parent_pid\n\t\tfi\n\t}\n\n\t# Register a SIGCHLD trap to handle the completion of child processes.\n\ttrap child_exit CHLD\n\n\t# Process option parameters passed to worker\n\twhile getopts \"np:u\" opt; do\n\t\tcase $opt in\n\t\t\tn) notify_parent=1;;\n\t\t\tp) parent_pid=$OPTARG;;\n\t\t\tu) unique=1;;\n\t\tesac\n\tdone\n\n\tkilljobs() {\n\t\tlocal tok\n\t\tlocal -a pids\n\t\tpids=(${${(v)jobstates##*:*:}%\\=*})\n\n\t\t# No need to send SIGHUP if no jobs are running.\n\t\t(( $#pids == 0 )) && continue\n\t\t(( $#pids == 1 )) && [[ $coproc_pid = $pids[1] ]] && continue\n\n\t\t# Grab lock to prevent half-written output in case a child\n\t\t# process is in the middle of writing to stdin during kill.\n\t\t(( coproc_pid )) && read -r -k 1 -p tok\n\n\t\tkill -HUP -$$  # Send to entire process group.\n\t\tcoproc :       # Quit coproc.\n\t\tcoproc_pid=0   # Reset pid.\n\t}\n\n\tlocal request\n\tlocal -a cmd\n\twhile :; do\n\t\t# Wait for jobs sent by async_job.\n\t\tread -r -d $'\\0' request || {\n\t\t\t# Since we handle SIGHUP above (and thus do not know when `zpty -d`)\n\t\t\t# occurs, a failure to read probably indicates that stdin has\n\t\t\t# closed. This is why we propagate the signal to all children and\n\t\t\t# exit manually.\n\t\t\tkill -HUP -$$  # Send SIGHUP to all jobs.\n\t\t\texit 0\n\t\t}\n\n\t\t# Check for non-job commands sent to worker\n\t\tcase $request in\n\t\t\t_unset_trap) notify_parent=0; continue;;\n\t\t\t_killjobs)   killjobs; continue;;\n\t\tesac\n\n\t\t# Parse the request using shell parsing (z) to allow commands\n\t\t# to be parsed from single strings and multi-args alike.\n\t\tcmd=(\"${(z)request}\")\n\n\t\t# Name of the job (first argument).\n\t\tlocal job=$cmd[1]\n\n\t\t# If worker should perform unique jobs\n\t\tif (( unique )); then\n\t\t\t# Check if a previous job is still running, if yes, let it finnish\n\t\t\tfor pid in ${${(v)jobstates##*:*:}%\\=*}; do\n\t\t\t\tif [[ ${storage[$job]} == $pid ]]; then\n\t\t\t\t\tcontinue 2\n\t\t\t\tfi\n\t\t\tdone\n\t\tfi\n\n\t\t# Guard against closing coproc from trap before command has started.\n\t\tprocessing=1\n\n\t\t# Because we close the coproc after the last job has completed, we must\n\t\t# recreate it when there are no other jobs running.\n\t\tif (( ! coproc_pid )); then\n\t\t\t# Use coproc as a mutex for synchronized output between children.\n\t\t\tcoproc cat\n\t\t\tcoproc_pid=\"$!\"\n\t\t\t# Insert token into coproc\n\t\t\tprint -n -p \"t\"\n\t\tfi\n\n\t\t# Run job in background, completed jobs are printed to stdout.\n\t\t_async_job $cmd &\n\t\t# Store pid because zsh job manager is extremely unflexible (show jobname as non-unique '$job')...\n\t\tstorage[$job]=\"$!\"\n\n\t\tprocessing=0  # Disable guard.\n\tdone\n}\n\n#\n#  Get results from finnished jobs and pass it to the to callback function. This is the only way to reliably return the\n#  job name, return code, output and execution time and with minimal effort.\n#\n# usage:\n# \tasync_process_results <worker_name> <callback_function>\n#\n# callback_function is called with the following parameters:\n# \t$1 = job name, e.g. the function passed to async_job\n# \t$2 = return code\n# \t$3 = resulting stdout from execution\n# \t$4 = execution time, floating point e.g. 2.05 seconds\n# \t$5 = resulting stderr from execution\n#\t$6 = has next result in buffer (0 = buffer empty, 1 = yes)\n#\nasync_process_results() {\n\tsetopt localoptions unset noshwordsplit noksharrays noposixidentifiers noposixstrings\n\n\tlocal worker=$1\n\tlocal callback=$2\n\tlocal caller=$3\n\tlocal -a items\n\tlocal null=$'\\0' data\n\tinteger -l len pos num_processed has_next\n\n\ttypeset -gA ASYNC_PROCESS_BUFFER\n\n\t# Read output from zpty and parse it if available.\n\twhile zpty -r -t $worker data 2>/dev/null; do\n\t\tASYNC_PROCESS_BUFFER[$worker]+=$data\n\t\tlen=${#ASYNC_PROCESS_BUFFER[$worker]}\n\t\tpos=${ASYNC_PROCESS_BUFFER[$worker][(i)$null]}  # Get index of NULL-character (delimiter).\n\n\t\t# Keep going until we find a NULL-character.\n\t\tif (( ! len )) || (( pos > len )); then\n\t\t\tcontinue\n\t\tfi\n\n\t\twhile (( pos <= len )); do\n\t\t\t# Take the content from the beginning, until the NULL-character and\n\t\t\t# perform shell parsing (z) and unquoting (Q) as an array (@).\n\t\t\titems=(\"${(@Q)${(z)ASYNC_PROCESS_BUFFER[$worker][1,$pos-1]}}\")\n\n\t\t\t# Remove the extracted items from the buffer.\n\t\t\tASYNC_PROCESS_BUFFER[$worker]=${ASYNC_PROCESS_BUFFER[$worker][$pos+1,$len]}\n\n\t\t\tlen=${#ASYNC_PROCESS_BUFFER[$worker]}\n\t\t\tif (( len > 1 )); then\n\t\t\t\tpos=${ASYNC_PROCESS_BUFFER[$worker][(i)$null]}  # Get index of NULL-character (delimiter).\n\t\t\tfi\n\n\t\t\thas_next=$(( len != 0 ))\n\t\t\tif (( $#items == 5 )); then\n\t\t\t\titems+=($has_next)\n\t\t\t\t$callback \"${(@)items}\"  # Send all parsed items to the callback.\n\t\t\t\t(( num_processed++ ))\n\t\t\telif [[ -z $items ]]; then\n\t\t\t\t# Empty items occur between results due to double-null ($'\\0\\0')\n\t\t\t\t# caused by commands being both pre and suffixed with null.\n\t\t\telse\n\t\t\t\t# In case of corrupt data, invoke callback with *async* as job\n\t\t\t\t# name, non-zero exit status and an error message on stderr.\n\t\t\t\t$callback \"async\" 1 \"\" 0 \"$0:$LINENO: error: bad format, got ${#items} items (${(q)items})\" $has_next\n\t\t\tfi\n\t\tdone\n\tdone\n\n\t(( num_processed )) && return 0\n\n\t# Avoid printing exit value when `setopt printexitvalue` is active.`\n\t[[ $caller = trap || $caller = watcher ]] && return 0\n\n\t# No results were processed\n\treturn 1\n}\n\n# Watch worker for output\n_async_zle_watcher() {\n\tsetopt localoptions noshwordsplit\n\ttypeset -gA ASYNC_PTYS ASYNC_CALLBACKS\n\tlocal worker=$ASYNC_PTYS[$1]\n\tlocal callback=$ASYNC_CALLBACKS[$worker]\n\n\tif [[ -n $callback ]]; then\n\t\tasync_process_results $worker $callback watcher\n\tfi\n}\n\n#\n# Start a new asynchronous job on specified worker, assumes the worker is running.\n#\n# usage:\n# \tasync_job <worker_name> <my_function> [<function_params>]\n#\nasync_job() {\n\tsetopt localoptions noshwordsplit noksharrays noposixidentifiers noposixstrings\n\n\tlocal worker=$1; shift\n\n\tlocal -a cmd\n\tcmd=(\"$@\")\n\tif (( $#cmd > 1 )); then\n\t\tcmd=(${(q)cmd})  # Quote special characters in multi argument commands.\n\tfi\n\n\t# Quote the cmd in case RC_EXPAND_PARAM is set.\n\tzpty -w $worker \"$cmd\"$'\\0'\n}\n\n# This function traps notification signals and calls all registered callbacks\n_async_notify_trap() {\n\tsetopt localoptions noshwordsplit\n\n\tlocal k\n\tfor k in ${(k)ASYNC_CALLBACKS}; do\n\t\tasync_process_results $k ${ASYNC_CALLBACKS[$k]} trap\n\tdone\n}\n\n#\n# Register a callback for completed jobs. As soon as a job is finnished, async_process_results will be called with the\n# specified callback function. This requires that a worker is initialized with the -n (notify) option.\n#\n# usage:\n# \tasync_register_callback <worker_name> <callback_function>\n#\nasync_register_callback() {\n\tsetopt localoptions noshwordsplit nolocaltraps\n\n\ttypeset -gA ASYNC_CALLBACKS\n\tlocal worker=$1; shift\n\n\tASYNC_CALLBACKS[$worker]=\"$*\"\n\n\t# Enable trap when the ZLE watcher is unavailable, allows\n\t# workers to notify (via -n) when a job is done.\n\tif [[ ! -o interactive ]] || [[ ! -o zle ]]; then\n\t\ttrap '_async_notify_trap' WINCH\n\tfi\n}\n\n#\n# Unregister the callback for a specific worker.\n#\n# usage:\n# \tasync_unregister_callback <worker_name>\n#\nasync_unregister_callback() {\n\ttypeset -gA ASYNC_CALLBACKS\n\n\tunset \"ASYNC_CALLBACKS[$1]\"\n}\n\n#\n# Flush all current jobs running on a worker. This will terminate any and all running processes under the worker, use\n# with caution.\n#\n# usage:\n# \tasync_flush_jobs <worker_name>\n#\nasync_flush_jobs() {\n\tsetopt localoptions noshwordsplit\n\n\tlocal worker=$1; shift\n\n\t# Check if the worker exists\n\tzpty -t $worker &>/dev/null || return 1\n\n\t# Send kill command to worker\n\tasync_job $worker \"_killjobs\"\n\n\t# Clear the zpty buffer.\n\tlocal junk\n\tif zpty -r -t $worker junk '*'; then\n\t\t(( ASYNC_DEBUG )) && print -n \"async_flush_jobs $worker: ${(V)junk}\"\n\t\twhile zpty -r -t $worker junk '*'; do\n\t\t\t(( ASYNC_DEBUG )) && print -n \"${(V)junk}\"\n\t\tdone\n\t\t(( ASYNC_DEBUG )) && print\n\tfi\n\n\t# Finally, clear the process buffer in case of partially parsed responses.\n\ttypeset -gA ASYNC_PROCESS_BUFFER\n\tunset \"ASYNC_PROCESS_BUFFER[$worker]\"\n}\n\n#\n# Start a new async worker with optional parameters, a worker can be told to only run unique tasks and to notify a\n# process when tasks are complete.\n#\n# usage:\n# \tasync_start_worker <worker_name> [-u] [-n] [-p <pid>]\n#\n# opts:\n# \t-u unique (only unique job names can run)\n# \t-n notify through SIGWINCH signal\n# \t-p pid to notify (defaults to current pid)\n#\nasync_start_worker() {\n\tsetopt localoptions noshwordsplit\n\n\tlocal worker=$1; shift\n\tzpty -t $worker &>/dev/null && return\n\n\ttypeset -gA ASYNC_PTYS\n\ttypeset -h REPLY\n\ttypeset has_xtrace=0\n\n\t# Make sure async worker is started without xtrace\n\t# (the trace output interferes with the worker).\n\t[[ -o xtrace ]] && {\n\t\thas_xtrace=1\n\t\tunsetopt xtrace\n\t}\n\n\tif (( ! ASYNC_ZPTY_RETURNS_FD )) && [[ -o interactive ]] && [[ -o zle ]]; then\n\t\t# When zpty doesn't return a file descriptor (on older versions of zsh)\n\t\t# we try to guess it anyway.\n\t\tinteger -l zptyfd\n\t\texec {zptyfd}>&1  # Open a new file descriptor (above 10).\n\t\texec {zptyfd}>&-  # Close it so it's free to be used by zpty.\n\tfi\n\n\tzpty -b $worker _async_worker -p $$ $@ || {\n\t\tasync_stop_worker $worker\n\t\treturn 1\n\t}\n\n\t# Re-enable it if it was enabled, for debugging.\n\t(( has_xtrace )) && setopt xtrace\n\n\tif [[ $ZSH_VERSION < 5.0.8 ]]; then\n\t\t# For ZSH versions older than 5.0.8 we delay a bit to give\n\t\t# time for the worker to start before issuing commands,\n\t\t# otherwise it will not be ready to receive them.\n\t\tsleep 0.001\n\tfi\n\n\tif [[ -o interactive ]] && [[ -o zle ]]; then\n\t\tif (( ! ASYNC_ZPTY_RETURNS_FD )); then\n\t\t\tREPLY=$zptyfd  # Use the guessed value for the file desciptor.\n\t\tfi\n\n\t\tASYNC_PTYS[$REPLY]=$worker        # Map the file desciptor to the worker.\n\t\tzle -F $REPLY _async_zle_watcher  # Register the ZLE handler.\n\n\t\t# Disable trap in favor of ZLE handler when notify is enabled (-n).\n\t\tasync_job $worker _unset_trap\n\tfi\n}\n\n#\n# Stop one or multiple workers that are running, all unfetched and incomplete work will be lost.\n#\n# usage:\n# \tasync_stop_worker <worker_name_1> [<worker_name_2>]\n#\nasync_stop_worker() {\n\tsetopt localoptions noshwordsplit\n\n\tlocal ret=0 worker k v\n\tfor worker in $@; do\n\t\t# Find and unregister the zle handler for the worker\n\t\tfor k v in ${(@kv)ASYNC_PTYS}; do\n\t\t\tif [[ $v == $worker ]]; then\n\t\t\t\tzle -F $k\n\t\t\t\tunset \"ASYNC_PTYS[$k]\"\n\t\t\tfi\n\t\tdone\n\t\tasync_unregister_callback $worker\n\t\tzpty -d $worker 2>/dev/null || ret=$?\n\n\t\t# Clear any partial buffers.\n\t\ttypeset -gA ASYNC_PROCESS_BUFFER\n\t\tunset \"ASYNC_PROCESS_BUFFER[$worker]\"\n\tdone\n\n\treturn $ret\n}\n\n#\n# Initialize the required modules for zsh-async. To be called before using the zsh-async library.\n#\n# usage:\n# \tasync_init\n#\nasync_init() {\n\t(( ASYNC_INIT_DONE )) && return\n\ttypeset -g ASYNC_INIT_DONE=1\n\n\tzmodload zsh/zpty\n\tzmodload zsh/datetime\n\n\t# Check if zsh/zpty returns a file descriptor or not,\n\t# shell must also be interactive with zle enabled.\n\ttypeset -g ASYNC_ZPTY_RETURNS_FD=0\n\t[[ -o interactive ]] && [[ -o zle ]] && {\n\t\ttypeset -h REPLY\n\t\tzpty _async_test :\n\t\t(( REPLY )) && ASYNC_ZPTY_RETURNS_FD=1\n\t\tzpty -d _async_test\n\t}\n}\n\nasync() {\n\tasync_init\n}\n\nasync \"$@\"\n\n"
  },
  {
    "path": ".config/zsh/autopair/autopair.zh",
    "content": "#!/usr/bin/env zsh\n\nAUTOPAIR_INHIBIT_INIT=${AUTOPAIR_INHIBIT_INIT:-}\nAUTOPAIR_BETWEEN_WHITESPACE=${AUTOPAIR_BETWEEN_WHITESPACE:-}\nAUTOPAIR_SPC_WIDGET=${AUTOPAIR_SPC_WIDGET:-\"$(bindkey \" \" | cut -c5-)\"}\nAUTOPAIR_BKSPC_WIDGET=${AUTOPAIR_BKSPC_WIDGET:-\"$(bindkey \"^?\" | cut -c6-)\"}\n\ntypeset -gA AUTOPAIR_PAIRS\nAUTOPAIR_PAIRS=('`' '`' \"'\" \"'\" '\"' '\"' '{' '}' '[' ']' '(' ')' ' ' ' ')\n\ntypeset -gA AUTOPAIR_LBOUNDS\nAUTOPAIR_LBOUNDS=(all '[.:/\\!]')\nAUTOPAIR_LBOUNDS+=(quotes '[]})a-zA-Z0-9]')\nAUTOPAIR_LBOUNDS+=(spaces '[^{([]')\nAUTOPAIR_LBOUNDS+=(braces '')\nAUTOPAIR_LBOUNDS+=('`' '`')\nAUTOPAIR_LBOUNDS+=('\"' '\"')\nAUTOPAIR_LBOUNDS+=(\"'\" \"'\")\n\ntypeset -gA AUTOPAIR_RBOUNDS\nAUTOPAIR_RBOUNDS=(all '[[{(<,.:?/%$!a-zA-Z0-9]')\nAUTOPAIR_RBOUNDS+=(quotes '[a-zA-Z0-9]')\nAUTOPAIR_RBOUNDS+=(spaces '[^]})]')\nAUTOPAIR_RBOUNDS+=(braces '')\n\n\n### Helpers ############################\n\n# Returns the other pair for $1 (a char), blank otherwise\n_ap-get-pair() {\n    if [[ -n $1 ]]; then\n        echo $AUTOPAIR_PAIRS[$1]\n    elif [[ -n $2 ]]; then\n        local i\n        for i in ${(@k)AUTOPAIR_PAIRS}; do\n            [[ $2 == $AUTOPAIR_PAIRS[$i] ]] && echo $i && break\n        done\n    fi\n}\n\n# Return 0 if cursor's surroundings match either regexp: $1 (left) or $2 (right)\n_ap-boundary-p() {\n    [[ -n $1 && $LBUFFER =~ \"$1$\" ]] || [[ -n $2 && $RBUFFER =~ \"^$2\" ]]\n}\n\n# Return 0 if the surrounding text matches any of the AUTOPAIR_*BOUNDS regexps\n_ap-next-to-boundary-p() {\n    local -a groups\n    groups=(all)\n    case $1 in\n        \\'|\\\"|\\`)    groups+=quotes ;;\n        \\{|\\[|\\(|\\<) groups+=braces ;;\n        \" \")         groups+=spaces ;;\n    esac\n    groups+=$1\n    local group\n    for group in $groups; do\n        _ap-boundary-p $AUTOPAIR_LBOUNDS[$group] $AUTOPAIR_RBOUNDS[$group] && return 0\n    done\n    return 1\n}\n\n# Return 0 if there are the same number of $1 as there are $2 (chars; a\n# delimiter pair) in the buffer.\n_ap-balanced-p() {\n    local lbuf=\"${LBUFFER//\\\\$1}\"\n    local rbuf=\"${RBUFFER//\\\\$2}\"\n    local llen=\"${#lbuf//[^$1]}\"\n    local rlen=\"${#rbuf//[^$2]}\"\n    if (( rlen == 0 && llen == 0 )); then\n        return 0\n    elif [[ $1 == $2 ]]; then\n        if [[ $1 == \" \" ]]; then\n            # Silence WARN_CREATE_GLOBAL errors\n            local match=\n            local mbegin=\n            local mend=\n            # Balancing spaces is unnecessary. If there is at least one space on\n            # either side of the cursor, it is considered balanced.\n            [[ $LBUFFER =~ \"[^'\\\"]([ \t]+)$\" && $RBUFFER =~ \"^${match[1]}\" ]] && return 0\n            return 1\n        elif (( llen == rlen || (llen + rlen) % 2 == 0 )); then\n            return 0\n        fi\n    else\n        local l2len=\"${#lbuf//[^$2]}\"\n        local r2len=\"${#rbuf//[^$1]}\"\n        local ltotal=$((llen - l2len))\n        local rtotal=$((rlen - r2len))\n\n        (( ltotal < 0 )) && ltotal=0\n        (( ltotal < rtotal )) && return 1\n        return 0\n    fi\n    return 1\n}\n\n# Return 0 if the last keypress can be auto-paired.\n_ap-can-pair-p() {\n    local rchar=\"$(_ap-get-pair $KEYS)\"\n\n    [[ -n $rchar ]] || return 1\n\n    if [[ $rchar != \" \" ]]; then\n        # Force pair if surrounded by space/[BE]OL, regardless of\n        # boundaries/balance\n        [[ -n $AUTOPAIR_BETWEEN_WHITESPACE && \\\n            $LBUFFER =~ \"(^|[ \t])$\" && \\\n            $RBUFFER =~ \"^($|[ \t])\" ]] && return 0\n\n        # Don't pair quotes if the delimiters are unbalanced\n        ! _ap-balanced-p $KEYS $rchar && return 1\n    elif [[ $RBUFFER =~ \"^[ \t]*$\" ]]; then\n        # Don't pair spaces surrounded by whitespace\n        return 1\n    fi\n\n    # Don't pair when in front of characters that likely signify the start of a\n    # string, path or undesirable boundary.\n    _ap-next-to-boundary-p $KEYS $rchar && return 1\n\n    return 0\n}\n\n# Return 0 if the adjacent character (on the right) can be safely skipped over.\n_ap-can-skip-p() {\n    if [[ -z $LBUFFER ]]; then\n        return 1\n    elif [[ $1 == $2 ]]; then\n        if [[ $1 == \" \" ]]; then\n            return 1\n        elif ! _ap-balanced-p $1 $2; then\n            return 1\n        fi\n    fi\n    if ! [[ -n $2 && $RBUFFER[1] == $2 && $LBUFFER[-1] != '\\' ]]; then\n        return 1\n    fi\n    return 0\n}\n\n# Return 0 if the adjacent character (on the right) can be safely deleted.\n_ap-can-delete-p() {\n    local lchar=\"$LBUFFER[-1]\"\n    local rchar=\"$(_ap-get-pair $lchar)\"\n    ! [[ -n $rchar && $RBUFFER[1] == $rchar ]] && return 1\n    [[ $lchar == $rchar ]] && ! _ap-balanced-p $lchar $rchar && return 1\n    return 0\n}\n\n# Insert $1 and add $2 after the cursor\n_ap-self-insert() {\n    LBUFFER+=$1\n    RBUFFER=\"$2$RBUFFER\"\n}\n\n\n### Widgets ############################\n\nautopair-insert() {\n    local rchar=\"$(_ap-get-pair $KEYS)\"\n    if [[ $KEYS == (\\'|\\\"|\\`| ) ]] && _ap-can-skip-p $KEYS $rchar; then\n        zle forward-char\n    elif _ap-can-pair-p; then\n        _ap-self-insert $KEYS $rchar\n    elif [[ $rchar == \" \" ]]; then\n        zle ${AUTOPAIR_SPC_WIDGET:-self-insert}\n    else\n        zle self-insert\n    fi\n}\n\nautopair-close() {\n    if _ap-can-skip-p \"$(_ap-get-pair \"\" $KEYS)\" $KEYS; then\n        zle forward-char\n    else\n        zle self-insert\n    fi\n}\n\nautopair-delete() {\n    _ap-can-delete-p && RBUFFER=${RBUFFER:1}\n    zle ${AUTOPAIR_BKSPC_WIDGET:-backward-delete-char}\n}\n\n\n### Initialization #####################\n\nautopair-init() {\n    zle -N autopair-insert\n    zle -N autopair-close\n    zle -N autopair-delete\n\n    local p\n    for p in ${(@k)AUTOPAIR_PAIRS}; do\n        bindkey \"$p\" autopair-insert\n        bindkey -M isearch \"$p\" self-insert\n\n        local rchar=\"$(_ap-get-pair $p)\"\n        if [[ $p != $rchar ]]; then\n            bindkey \"$rchar\" autopair-close\n            bindkey -M isearch \"$rchar\" self-insert\n        fi\n    done\n\n    bindkey \"^?\" autopair-delete\n    bindkey \"^h\" autopair-delete\n    bindkey -M isearch \"^?\" backward-delete-char\n    bindkey -M isearch \"^h\" backward-delete-char\n}\n[[ -n $AUTOPAIR_INHIBIT_INIT ]] || autopair-init\n\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/async.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Async                                                              #\n#--------------------------------------------------------------------#\n\n# Zpty process is spawned running this function\n_zsh_autosuggest_async_server() {\n\temulate -R zsh\n\n\t# There is a bug in zpty module (fixed in zsh/master) by which a\n\t# zpty that exits will kill all zpty processes that were forked\n\t# before it. Here we set up a zsh exit hook to SIGKILL the zpty\n\t# process immediately, before it has a chance to kill any other\n\t# zpty processes.\n\tzshexit() {\n\t\tkill -KILL $$\n\t\tsleep 1 # Block for long enough for the signal to come through\n\t}\n\n\t# Output only newlines (not carriage return + newline)\n\tstty -onlcr\n\n\t# Silence any error messages\n\texec 2>/dev/null\n\n\tlocal strategy=$1\n\tlocal last_pid\n\n\twhile IFS='' read -r -d $'\\0' query; do\n\t\t# Kill last bg process\n\t\tkill -KILL $last_pid &>/dev/null\n\n\t\t# Run suggestion search in the background\n\t\t(\n\t\t\tlocal suggestion\n\t\t\t_zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY \"$query\"\n\t\t\techo -n -E \"$suggestion\"$'\\0'\n\t\t) &\n\n\t\tlast_pid=$!\n\tdone\n}\n\n_zsh_autosuggest_async_request() {\n\t# Write the query to the zpty process to fetch a suggestion\n\tzpty -w -n $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME \"${1}\"$'\\0'\n}\n\n# Called when new data is ready to be read from the pty\n# First arg will be fd ready for reading\n# Second arg will be passed in case of error\n_zsh_autosuggest_async_response() {\n\tsetopt LOCAL_OPTIONS EXTENDED_GLOB\n\n\tlocal suggestion\n\n\tzpty -rt $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME suggestion '*'$'\\0' 2>/dev/null\n\tzle autosuggest-suggest -- \"${suggestion%%$'\\0'##}\"\n}\n\n_zsh_autosuggest_async_pty_create() {\n\t# With newer versions of zsh, REPLY stores the fd to read from\n\ttypeset -h REPLY\n\n\t# If we won't get a fd back from zpty, try to guess it\n\tif (( ! $_ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD )); then\n\t\tinteger -l zptyfd\n\t\texec {zptyfd}>&1  # Open a new file descriptor (above 10).\n\t\texec {zptyfd}>&-  # Close it so it's free to be used by zpty.\n\tfi\n\n\t# Fork a zpty process running the server function\n\tzpty -b $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME \"_zsh_autosuggest_async_server _zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY\"\n\n\t# Store the fd so we can remove the handler later\n\tif (( REPLY )); then\n\t\t_ZSH_AUTOSUGGEST_PTY_FD=$REPLY\n\telse\n\t\t_ZSH_AUTOSUGGEST_PTY_FD=$zptyfd\n\tfi\n\n\t# Set up input handler from the zpty\n\tzle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_response\n}\n\n_zsh_autosuggest_async_pty_destroy() {\n\tif zpty -t $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME &>/dev/null; then\n\t\t# Remove the input handler\n\t\tzle -F $_ZSH_AUTOSUGGEST_PTY_FD &>/dev/null\n\n\t\t# Destroy the zpty\n\t\tzpty -d $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME &>/dev/null\n\tfi\n}\n\n_zsh_autosuggest_async_pty_recreate() {\n\t_zsh_autosuggest_async_pty_destroy\n\t_zsh_autosuggest_async_pty_create\n}\n\n_zsh_autosuggest_async_start() {\n\ttypeset -g _ZSH_AUTOSUGGEST_PTY_FD\n\n\t_zsh_autosuggest_feature_detect_zpty_returns_fd\n\t_zsh_autosuggest_async_pty_recreate\n\n\t# We recreate the pty to get a fresh list of history events\n\tadd-zsh-hook precmd _zsh_autosuggest_async_pty_recreate\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/bind.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Widget Helpers                                                     #\n#--------------------------------------------------------------------#\n\n_zsh_autosuggest_incr_bind_count() {\n\tif ((${+_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]})); then\n\t\t((_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]++))\n\telse\n\t\t_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]=1\n\tfi\n\n\ttypeset -gi bind_count=$_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]\n}\n\n_zsh_autosuggest_get_bind_count() {\n\tif ((${+_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]})); then\n\t\ttypeset -gi bind_count=$_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]\n\telse\n\t\ttypeset -gi bind_count=0\n\tfi\n}\n\n# Bind a single widget to an autosuggest widget, saving a reference to the original widget\n_zsh_autosuggest_bind_widget() {\n\ttypeset -gA _ZSH_AUTOSUGGEST_BIND_COUNTS\n\n\tlocal widget=$1\n\tlocal autosuggest_action=$2\n\tlocal prefix=$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX\n\n\tlocal -i bind_count\n\n\t# Save a reference to the original widget\n\tcase $widgets[$widget] in\n\t\t# Already bound\n\t\tuser:_zsh_autosuggest_(bound|orig)_*);;\n\n\t\t# User-defined widget\n\t\tuser:*)\n\t\t\t_zsh_autosuggest_incr_bind_count $widget\n\t\t\tzle -N $prefix${bind_count}-$widget ${widgets[$widget]#*:}\n\t\t\t;;\n\n\t\t# Built-in widget\n\t\tbuiltin)\n\t\t\t_zsh_autosuggest_incr_bind_count $widget\n\t\t\teval \"_zsh_autosuggest_orig_${(q)widget}() { zle .${(q)widget} }\"\n\t\t\tzle -N $prefix${bind_count}-$widget _zsh_autosuggest_orig_$widget\n\t\t\t;;\n\n\t\t# Completion widget\n\t\tcompletion:*)\n\t\t\t_zsh_autosuggest_incr_bind_count $widget\n\t\t\teval \"zle -C $prefix${bind_count}-${(q)widget} ${${(s.:.)widgets[$widget]}[2,3]}\"\n\t\t\t;;\n\tesac\n\n\t_zsh_autosuggest_get_bind_count $widget\n\n\t# Pass the original widget's name explicitly into the autosuggest\n\t# function. Use this passed in widget name to call the original\n\t# widget instead of relying on the $WIDGET variable being set\n\t# correctly. $WIDGET cannot be trusted because other plugins call\n\t# zle without the `-w` flag (e.g. `zle self-insert` instead of\n\t# `zle self-insert -w`).\n\teval \"_zsh_autosuggest_bound_${bind_count}_${(q)widget}() {\n\t\t_zsh_autosuggest_widget_$autosuggest_action $prefix$bind_count-${(q)widget} \\$@\n\t}\"\n\n\t# Create the bound widget\n\tzle -N $widget _zsh_autosuggest_bound_${bind_count}_$widget\n}\n\n# Map all configured widgets to the right autosuggest widgets\n_zsh_autosuggest_bind_widgets() {\n\tlocal widget\n\tlocal ignore_widgets\n\n\tignore_widgets=(\n\t\t.\\*\n\t\t_\\*\n\t\tzle-\\*\n\t\tautosuggest-\\*\n\t\t$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX\\*\n\t\t$ZSH_AUTOSUGGEST_IGNORE_WIDGETS\n\t)\n\n\t# Find every widget we might want to bind and bind it appropriately\n\tfor widget in ${${(f)\"$(builtin zle -la)\"}:#${(j:|:)~ignore_widgets}}; do\n\t\tif [[ -n ${ZSH_AUTOSUGGEST_CLEAR_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget clear\n\t\telif [[ -n ${ZSH_AUTOSUGGEST_ACCEPT_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget accept\n\t\telif [[ -n ${ZSH_AUTOSUGGEST_EXECUTE_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget execute\n\t\telif [[ -n ${ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget partial_accept\n\t\telse\n\t\t\t# Assume any unspecified widget might modify the buffer\n\t\t\t_zsh_autosuggest_bind_widget $widget modify\n\t\tfi\n\tdone\n}\n\n# Given the name of an original widget and args, invoke it, if it exists\n_zsh_autosuggest_invoke_original_widget() {\n\t# Do nothing unless called with at least one arg\n\t(( $# )) || return\n\n\tlocal original_widget_name=\"$1\"\n\n\tshift\n\n\tif (( ${+widgets[$original_widget_name]} )); then\n\t\tzle $original_widget_name -- $@\n\tfi\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/config.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Global Configuration Variables                                     #\n#--------------------------------------------------------------------#\n\n# Color to use when highlighting suggestion\n# Uses format of `region_highlight`\n# More info: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Widgets\nZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'\n\n# Prefix to use when saving original versions of bound widgets\nZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX=autosuggest-orig-\n\nZSH_AUTOSUGGEST_STRATEGY=default\n\n# Widgets that clear the suggestion\nZSH_AUTOSUGGEST_CLEAR_WIDGETS=(\n\thistory-search-forward\n\thistory-search-backward\n\thistory-beginning-search-forward\n\thistory-beginning-search-backward\n\thistory-substring-search-up\n\thistory-substring-search-down\n\tup-line-or-history\n\tdown-line-or-history\n\taccept-line\n)\n\n# Widgets that accept the entire suggestion\nZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(\n\tforward-char\n\tend-of-line\n\tvi-forward-char\n\tvi-end-of-line\n\tvi-add-eol\n)\n\n# Widgets that accept the entire suggestion and execute it\nZSH_AUTOSUGGEST_EXECUTE_WIDGETS=(\n)\n\n# Widgets that accept the suggestion as far as the cursor moves\nZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=(\n\tforward-word\n\temacs-forward-word\n\tvi-forward-word\n\tvi-forward-word-end\n\tvi-forward-blank-word\n\tvi-forward-blank-word-end\n)\n\n# Widgets that should be ignored (globbing supported but must be escaped)\nZSH_AUTOSUGGEST_IGNORE_WIDGETS=(\n\torig-\\*\n\tbeep\n\trun-help\n\tset-local-history\n\twhich-command\n\tyank\n)\n\n# Max size of buffer to trigger autosuggestion. Leave undefined for no upper bound.\nZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=\n\n# Pty name for calculating autosuggestions asynchronously\nZSH_AUTOSUGGEST_ASYNC_PTY_NAME=zsh_autosuggest_pty\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/features.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Feature Detection                                                  #\n#--------------------------------------------------------------------#\n\n_zsh_autosuggest_feature_detect_zpty_returns_fd() {\n\ttypeset -g _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD\n\ttypeset -h REPLY\n\n\tzpty zsh_autosuggest_feature_detect '{ zshexit() { kill -KILL $$; sleep 1 } }'\n\n\tif (( REPLY )); then\n\t\t_ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=1\n\telse\n\t\t_ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=0\n\tfi\n\n\tzpty -d zsh_autosuggest_feature_detect\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/highlight.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Highlighting                                                       #\n#--------------------------------------------------------------------#\n\n# If there was a highlight, remove it\n_zsh_autosuggest_highlight_reset() {\n\ttypeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\n\tif [[ -n \"$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\" ]]; then\n\t\tregion_highlight=(\"${(@)region_highlight:#$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT}\")\n\t\tunset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\tfi\n}\n\n# If there's a suggestion, highlight it\n_zsh_autosuggest_highlight_apply() {\n\ttypeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\n\tif (( $#POSTDISPLAY )); then\n\t\ttypeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT=\"$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE\"\n\t\tregion_highlight+=(\"$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\")\n\telse\n\t\tunset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\tfi\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/setup.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Setup                                                              #\n#--------------------------------------------------------------------#\n\n# Precmd hooks for initializing the library and starting pty's\nautoload -Uz add-zsh-hook\n\n# Asynchronous suggestions are generated in a pty\nzmodload zsh/zpty\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/start.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Start                                                              #\n#--------------------------------------------------------------------#\n\n# Start the autosuggestion widgets\n_zsh_autosuggest_start() {\n\tadd-zsh-hook -d precmd _zsh_autosuggest_start\n\n\t_zsh_autosuggest_bind_widgets\n\n\t# Re-bind widgets on every precmd to ensure we wrap other wrappers.\n\t# Specifically, highlighting breaks if our widgets are wrapped by\n\t# zsh-syntax-highlighting widgets. This also allows modifications\n\t# to the widget list variables to take effect on the next precmd.\n\tadd-zsh-hook precmd _zsh_autosuggest_bind_widgets\n\n\tif [[ -n \"${ZSH_AUTOSUGGEST_USE_ASYNC+x}\" ]]; then\n\t\t_zsh_autosuggest_async_start\n\tfi\n}\n\n# Start the autosuggestion widgets on the next precmd\nadd-zsh-hook precmd _zsh_autosuggest_start\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/strategies/default.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Default Suggestion Strategy                                        #\n#--------------------------------------------------------------------#\n# Suggests the most recent history item that matches the given\n# prefix.\n#\n\n_zsh_autosuggest_strategy_default() {\n\t# Reset options to defaults and enable LOCAL_OPTIONS\n\temulate -L zsh\n\n\t# Enable globbing flags so that we can use (#m)\n\tsetopt EXTENDED_GLOB\n\n\t# Escape backslashes and all of the glob operators so we can use\n\t# this string as a pattern to search the $history associative array.\n\t# - (#m) globbing flag enables setting references for match data\n\t# TODO: Use (b) flag when we can drop support for zsh older than v5.0.8\n\tlocal prefix=\"${1//(#m)[\\\\*?[\\]<>()|^~#]/\\\\$MATCH}\"\n\n\t# Get the history items that match\n\t# - (r) subscript flag makes the pattern match on values\n\ttypeset -g suggestion=\"${history[(r)${prefix}*]}\"\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/strategies/match_prev_cmd.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Match Previous Command Suggestion Strategy                         #\n#--------------------------------------------------------------------#\n# Suggests the most recent history item that matches the given\n# prefix and whose preceding history item also matches the most\n# recently executed command.\n#\n# For example, suppose your history has the following entries:\n#   - pwd\n#   - ls foo\n#   - ls bar\n#   - pwd\n#\n# Given the history list above, when you type 'ls', the suggestion\n# will be 'ls foo' rather than 'ls bar' because your most recently\n# executed command (pwd) was previously followed by 'ls foo'.\n#\n# Note that this strategy won't work as expected with ZSH options that don't\n# preserve the history order such as `HIST_IGNORE_ALL_DUPS` or\n# `HIST_EXPIRE_DUPS_FIRST`.\n\n_zsh_autosuggest_strategy_match_prev_cmd() {\n\t# Reset options to defaults and enable LOCAL_OPTIONS\n\temulate -L zsh\n\n\t# Enable globbing flags so that we can use (#m)\n\tsetopt EXTENDED_GLOB\n\n\t# TODO: Use (b) flag when we can drop support for zsh older than v5.0.8\n\tlocal prefix=\"${1//(#m)[\\\\*?[\\]<>()|^~#]/\\\\$MATCH}\"\n\n\t# Get all history event numbers that correspond to history\n\t# entries that match pattern $prefix*\n\tlocal history_match_keys\n\thistory_match_keys=(${(k)history[(R)$prefix*]})\n\n\t# By default we use the first history number (most recent history entry)\n\tlocal histkey=\"${history_match_keys[1]}\"\n\n\t# Get the previously executed command\n\tlocal prev_cmd=\"$(_zsh_autosuggest_escape_command \"${history[$((HISTCMD-1))]}\")\"\n\n\t# Iterate up to the first 200 history event numbers that match $prefix\n\tfor key in \"${(@)history_match_keys[1,200]}\"; do\n\t\t# Stop if we ran out of history\n\t\t[[ $key -gt 1 ]] || break\n\n\t\t# See if the history entry preceding the suggestion matches the\n\t\t# previous command, and use it if it does\n\t\tif [[ \"${history[$((key - 1))]}\" == \"$prev_cmd\" ]]; then\n\t\t\thistkey=\"$key\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\t# Give back the matched history entry\n\ttypeset -g suggestion=\"$history[$histkey]\"\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/util.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Utility Functions                                                  #\n#--------------------------------------------------------------------#\n\n_zsh_autosuggest_escape_command() {\n\tsetopt localoptions EXTENDED_GLOB\n\n\t# Escape special chars in the string (requires EXTENDED_GLOB)\n\techo -E \"${1//(#m)[\\\"\\'\\\\()\\[\\]|*?~]/\\\\$MATCH}\"\n}\n"
  },
  {
    "path": ".config/zsh/autosuggestions/src/widgets.zsh",
    "content": "\n#--------------------------------------------------------------------#\n# Autosuggest Widget Implementations                                 #\n#--------------------------------------------------------------------#\n\n# Disable suggestions\n_zsh_autosuggest_disable() {\n\ttypeset -g _ZSH_AUTOSUGGEST_DISABLED\n\t_zsh_autosuggest_clear\n}\n\n# Enable suggestions\n_zsh_autosuggest_enable() {\n\tunset _ZSH_AUTOSUGGEST_DISABLED\n\n\tif (( $#BUFFER )); then\n\t\t_zsh_autosuggest_fetch\n\tfi\n}\n\n# Toggle suggestions (enable/disable)\n_zsh_autosuggest_toggle() {\n\tif [[ -n \"${_ZSH_AUTOSUGGEST_DISABLED+x}\" ]]; then\n\t\t_zsh_autosuggest_enable\n\telse\n\t\t_zsh_autosuggest_disable\n\tfi\n}\n\n# Clear the suggestion\n_zsh_autosuggest_clear() {\n\t# Remove the suggestion\n\tunset POSTDISPLAY\n\n\t_zsh_autosuggest_invoke_original_widget $@\n}\n\n# Modify the buffer and get a new suggestion\n_zsh_autosuggest_modify() {\n\tlocal -i retval\n\n\t# Only available in zsh >= 5.4\n\tlocal -i KEYS_QUEUED_COUNT\n\n\t# Save the contents of the buffer/postdisplay\n\tlocal orig_buffer=\"$BUFFER\"\n\tlocal orig_postdisplay=\"$POSTDISPLAY\"\n\n\t# Clear suggestion while waiting for next one\n\tunset POSTDISPLAY\n\n\t# Original widget may modify the buffer\n\t_zsh_autosuggest_invoke_original_widget $@\n\tretval=$?\n\n\t# Don't fetch a new suggestion if there's more input to be read immediately\n\tif (( $PENDING > 0 )) || (( $KEYS_QUEUED_COUNT > 0 )); then\n\t\treturn $retval\n\tfi\n\n\t# Optimize if manually typing in the suggestion\n\tif (( $#BUFFER > $#orig_buffer )); then\n\t\tlocal added=${BUFFER#$orig_buffer}\n\n\t\t# If the string added matches the beginning of the postdisplay\n\t\tif [[ \"$added\" = \"${orig_postdisplay:0:$#added}\" ]]; then\n\t\t\tPOSTDISPLAY=\"${orig_postdisplay:$#added}\"\n\t\t\treturn $retval\n\t\tfi\n\tfi\n\n\t# Don't fetch a new suggestion if the buffer hasn't changed\n\tif [[ \"$BUFFER\" = \"$orig_buffer\" ]]; then\n\t\tPOSTDISPLAY=\"$orig_postdisplay\"\n\t\treturn $retval\n\tfi\n\n\t# Bail out if suggestions are disabled\n\tif [[ -n \"${_ZSH_AUTOSUGGEST_DISABLED+x}\" ]]; then\n\t\treturn $?\n\tfi\n\n\t# Get a new suggestion if the buffer is not empty after modification\n\tif (( $#BUFFER > 0 )); then\n\t\tif [[ -z \"$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE\" ]] || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then\n\t\t\t_zsh_autosuggest_fetch\n\t\tfi\n\tfi\n\n\treturn $retval\n}\n\n# Fetch a new suggestion based on what's currently in the buffer\n_zsh_autosuggest_fetch() {\n\tif zpty -t \"$ZSH_AUTOSUGGEST_ASYNC_PTY_NAME\" &>/dev/null; then\n\t\t_zsh_autosuggest_async_request \"$BUFFER\"\n\telse\n\t\tlocal suggestion\n\t\t_zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY \"$BUFFER\"\n\t\t_zsh_autosuggest_suggest \"$suggestion\"\n\tfi\n}\n\n# Offer a suggestion\n_zsh_autosuggest_suggest() {\n\tlocal suggestion=\"$1\"\n\n\tif [[ -n \"$suggestion\" ]] && (( $#BUFFER )); then\n\t\tPOSTDISPLAY=\"${suggestion#$BUFFER}\"\n\telse\n\t\tunset POSTDISPLAY\n\tfi\n}\n\n# Accept the entire suggestion\n_zsh_autosuggest_accept() {\n\tlocal -i max_cursor_pos=$#BUFFER\n\n\t# When vicmd keymap is active, the cursor can't move all the way\n\t# to the end of the buffer\n\tif [[ \"$KEYMAP\" = \"vicmd\" ]]; then\n\t\tmax_cursor_pos=$((max_cursor_pos - 1))\n\tfi\n\n\t# Only accept if the cursor is at the end of the buffer\n\tif [[ $CURSOR = $max_cursor_pos ]]; then\n\t\t# Add the suggestion to the buffer\n\t\tBUFFER=\"$BUFFER$POSTDISPLAY\"\n\n\t\t# Remove the suggestion\n\t\tunset POSTDISPLAY\n\n\t\t# Move the cursor to the end of the buffer\n\t\tCURSOR=${#BUFFER}\n\tfi\n\n\t_zsh_autosuggest_invoke_original_widget $@\n}\n\n# Accept the entire suggestion and execute it\n_zsh_autosuggest_execute() {\n\t# Add the suggestion to the buffer\n\tBUFFER=\"$BUFFER$POSTDISPLAY\"\n\n\t# Remove the suggestion\n\tunset POSTDISPLAY\n\n\t# Call the original `accept-line` to handle syntax highlighting or\n\t# other potential custom behavior\n\t_zsh_autosuggest_invoke_original_widget \"accept-line\"\n}\n\n# Partially accept the suggestion\n_zsh_autosuggest_partial_accept() {\n\tlocal -i retval\n\n\t# Save the contents of the buffer so we can restore later if needed\n\tlocal original_buffer=\"$BUFFER\"\n\n\t# Temporarily accept the suggestion.\n\tBUFFER=\"$BUFFER$POSTDISPLAY\"\n\n\t# Original widget moves the cursor\n\t_zsh_autosuggest_invoke_original_widget $@\n\tretval=$?\n\n\t# If we've moved past the end of the original buffer\n\tif (( $CURSOR > $#original_buffer )); then\n\t\t# Set POSTDISPLAY to text right of the cursor\n\t\tPOSTDISPLAY=\"$RBUFFER\"\n\n\t\t# Clip the buffer at the cursor\n\t\tBUFFER=\"$LBUFFER\"\n\telse\n\t\t# Restore the original buffer\n\t\tBUFFER=\"$original_buffer\"\n\tfi\n\n\treturn $retval\n}\n\nfor action in clear modify fetch suggest accept partial_accept execute enable disable toggle; do\n\teval \"_zsh_autosuggest_widget_$action() {\n\t\tlocal -i retval\n\n\t\t_zsh_autosuggest_highlight_reset\n\n\t\t_zsh_autosuggest_$action \\$@\n\t\tretval=\\$?\n\n\t\t_zsh_autosuggest_highlight_apply\n\n\t\tzle -R\n\n\t\treturn \\$retval\n\t}\"\ndone\n\nzle -N autosuggest-fetch _zsh_autosuggest_widget_fetch\nzle -N autosuggest-suggest _zsh_autosuggest_widget_suggest\nzle -N autosuggest-accept _zsh_autosuggest_widget_accept\nzle -N autosuggest-clear _zsh_autosuggest_widget_clear\nzle -N autosuggest-execute _zsh_autosuggest_widget_execute\nzle -N autosuggest-enable _zsh_autosuggest_widget_enable\nzle -N autosuggest-disable _zsh_autosuggest_widget_disable\nzle -N autosuggest-toggle _zsh_autosuggest_widget_toggle\n"
  },
  {
    "path": ".config/zsh/autosuggestions/zsh-autosuggestions.zsh",
    "content": "# Fish-like fast/unobtrusive autosuggestions for zsh.\n# https://github.com/zsh-users/zsh-autosuggestions\n# v0.4.2\n# Copyright (c) 2013 Thiago de Arruda\n# Copyright (c) 2016-2017 Eric Freese\n# \n# Permission is hereby granted, free of charge, to any person\n# obtaining a copy of this software and associated documentation\n# files (the \"Software\"), to deal in the Software without\n# restriction, including without limitation the rights to use,\n# copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the\n# Software is furnished to do so, subject to the following\n# conditions:\n# \n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n\n#--------------------------------------------------------------------#\n# Setup                                                              #\n#--------------------------------------------------------------------#\n\n# Precmd hooks for initializing the library and starting pty's\nautoload -Uz add-zsh-hook\n\n# Asynchronous suggestions are generated in a pty\nzmodload zsh/zpty\n\n#--------------------------------------------------------------------#\n# Global Configuration Variables                                     #\n#--------------------------------------------------------------------#\n\n# Color to use when highlighting suggestion\n# Uses format of `region_highlight`\n# More info: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Widgets\nZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'\n\n# Prefix to use when saving original versions of bound widgets\nZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX=autosuggest-orig-\n\nZSH_AUTOSUGGEST_STRATEGY=default\n\n# Widgets that clear the suggestion\nZSH_AUTOSUGGEST_CLEAR_WIDGETS=(\n\thistory-search-forward\n\thistory-search-backward\n\thistory-beginning-search-forward\n\thistory-beginning-search-backward\n\thistory-substring-search-up\n\thistory-substring-search-down\n\tup-line-or-history\n\tdown-line-or-history\n\taccept-line\n)\n\n# Widgets that accept the entire suggestion\nZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(\n\tforward-char\n\tend-of-line\n\tvi-forward-char\n\tvi-end-of-line\n\tvi-add-eol\n)\n\n# Widgets that accept the entire suggestion and execute it\nZSH_AUTOSUGGEST_EXECUTE_WIDGETS=(\n)\n\n# Widgets that accept the suggestion as far as the cursor moves\nZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=(\n\tforward-word\n\temacs-forward-word\n\tvi-forward-word\n\tvi-forward-word-end\n\tvi-forward-blank-word\n\tvi-forward-blank-word-end\n)\n\n# Widgets that should be ignored (globbing supported but must be escaped)\nZSH_AUTOSUGGEST_IGNORE_WIDGETS=(\n\torig-\\*\n\tbeep\n\trun-help\n\tset-local-history\n\twhich-command\n\tyank\n)\n\n# Max size of buffer to trigger autosuggestion. Leave undefined for no upper bound.\nZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=\n\n# Pty name for calculating autosuggestions asynchronously\nZSH_AUTOSUGGEST_ASYNC_PTY_NAME=zsh_autosuggest_pty\n\n#--------------------------------------------------------------------#\n# Utility Functions                                                  #\n#--------------------------------------------------------------------#\n\n_zsh_autosuggest_escape_command() {\n\tsetopt localoptions EXTENDED_GLOB\n\n\t# Escape special chars in the string (requires EXTENDED_GLOB)\n\techo -E \"${1//(#m)[\\\"\\'\\\\()\\[\\]|*?~]/\\\\$MATCH}\"\n}\n\n#--------------------------------------------------------------------#\n# Feature Detection                                                  #\n#--------------------------------------------------------------------#\n\n_zsh_autosuggest_feature_detect_zpty_returns_fd() {\n\ttypeset -g _ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD\n\ttypeset -h REPLY\n\n\tzpty zsh_autosuggest_feature_detect '{ zshexit() { kill -KILL $$; sleep 1 } }'\n\n\tif (( REPLY )); then\n\t\t_ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=1\n\telse\n\t\t_ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD=0\n\tfi\n\n\tzpty -d zsh_autosuggest_feature_detect\n}\n\n#--------------------------------------------------------------------#\n# Widget Helpers                                                     #\n#--------------------------------------------------------------------#\n\n_zsh_autosuggest_incr_bind_count() {\n\tif ((${+_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]})); then\n\t\t((_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]++))\n\telse\n\t\t_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]=1\n\tfi\n\n\ttypeset -gi bind_count=$_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]\n}\n\n_zsh_autosuggest_get_bind_count() {\n\tif ((${+_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]})); then\n\t\ttypeset -gi bind_count=$_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]\n\telse\n\t\ttypeset -gi bind_count=0\n\tfi\n}\n\n# Bind a single widget to an autosuggest widget, saving a reference to the original widget\n_zsh_autosuggest_bind_widget() {\n\ttypeset -gA _ZSH_AUTOSUGGEST_BIND_COUNTS\n\n\tlocal widget=$1\n\tlocal autosuggest_action=$2\n\tlocal prefix=$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX\n\n\tlocal -i bind_count\n\n\t# Save a reference to the original widget\n\tcase $widgets[$widget] in\n\t\t# Already bound\n\t\tuser:_zsh_autosuggest_(bound|orig)_*);;\n\n\t\t# User-defined widget\n\t\tuser:*)\n\t\t\t_zsh_autosuggest_incr_bind_count $widget\n\t\t\tzle -N $prefix${bind_count}-$widget ${widgets[$widget]#*:}\n\t\t\t;;\n\n\t\t# Built-in widget\n\t\tbuiltin)\n\t\t\t_zsh_autosuggest_incr_bind_count $widget\n\t\t\teval \"_zsh_autosuggest_orig_${(q)widget}() { zle .${(q)widget} }\"\n\t\t\tzle -N $prefix${bind_count}-$widget _zsh_autosuggest_orig_$widget\n\t\t\t;;\n\n\t\t# Completion widget\n\t\tcompletion:*)\n\t\t\t_zsh_autosuggest_incr_bind_count $widget\n\t\t\teval \"zle -C $prefix${bind_count}-${(q)widget} ${${(s.:.)widgets[$widget]}[2,3]}\"\n\t\t\t;;\n\tesac\n\n\t_zsh_autosuggest_get_bind_count $widget\n\n\t# Pass the original widget's name explicitly into the autosuggest\n\t# function. Use this passed in widget name to call the original\n\t# widget instead of relying on the $WIDGET variable being set\n\t# correctly. $WIDGET cannot be trusted because other plugins call\n\t# zle without the `-w` flag (e.g. `zle self-insert` instead of\n\t# `zle self-insert -w`).\n\teval \"_zsh_autosuggest_bound_${bind_count}_${(q)widget}() {\n\t\t_zsh_autosuggest_widget_$autosuggest_action $prefix$bind_count-${(q)widget} \\$@\n\t}\"\n\n\t# Create the bound widget\n\tzle -N $widget _zsh_autosuggest_bound_${bind_count}_$widget\n}\n\n# Map all configured widgets to the right autosuggest widgets\n_zsh_autosuggest_bind_widgets() {\n\tlocal widget\n\tlocal ignore_widgets\n\n\tignore_widgets=(\n\t\t.\\*\n\t\t_\\*\n\t\tzle-\\*\n\t\tautosuggest-\\*\n\t\t$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX\\*\n\t\t$ZSH_AUTOSUGGEST_IGNORE_WIDGETS\n\t)\n\n\t# Find every widget we might want to bind and bind it appropriately\n\tfor widget in ${${(f)\"$(builtin zle -la)\"}:#${(j:|:)~ignore_widgets}}; do\n\t\tif [[ -n ${ZSH_AUTOSUGGEST_CLEAR_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget clear\n\t\telif [[ -n ${ZSH_AUTOSUGGEST_ACCEPT_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget accept\n\t\telif [[ -n ${ZSH_AUTOSUGGEST_EXECUTE_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget execute\n\t\telif [[ -n ${ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS[(r)$widget]} ]]; then\n\t\t\t_zsh_autosuggest_bind_widget $widget partial_accept\n\t\telse\n\t\t\t# Assume any unspecified widget might modify the buffer\n\t\t\t_zsh_autosuggest_bind_widget $widget modify\n\t\tfi\n\tdone\n}\n\n# Given the name of an original widget and args, invoke it, if it exists\n_zsh_autosuggest_invoke_original_widget() {\n\t# Do nothing unless called with at least one arg\n\t(( $# )) || return\n\n\tlocal original_widget_name=\"$1\"\n\n\tshift\n\n\tif (( ${+widgets[$original_widget_name]} )); then\n\t\tzle $original_widget_name -- $@\n\tfi\n}\n\n#--------------------------------------------------------------------#\n# Highlighting                                                       #\n#--------------------------------------------------------------------#\n\n# If there was a highlight, remove it\n_zsh_autosuggest_highlight_reset() {\n\ttypeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\n\tif [[ -n \"$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\" ]]; then\n\t\tregion_highlight=(\"${(@)region_highlight:#$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT}\")\n\t\tunset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\tfi\n}\n\n# If there's a suggestion, highlight it\n_zsh_autosuggest_highlight_apply() {\n\ttypeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\n\tif (( $#POSTDISPLAY )); then\n\t\ttypeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT=\"$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE\"\n\t\tregion_highlight+=(\"$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\")\n\telse\n\t\tunset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT\n\tfi\n}\n\n#--------------------------------------------------------------------#\n# Autosuggest Widget Implementations                                 #\n#--------------------------------------------------------------------#\n\n# Disable suggestions\n_zsh_autosuggest_disable() {\n\ttypeset -g _ZSH_AUTOSUGGEST_DISABLED\n\t_zsh_autosuggest_clear\n}\n\n# Enable suggestions\n_zsh_autosuggest_enable() {\n\tunset _ZSH_AUTOSUGGEST_DISABLED\n\n\tif (( $#BUFFER )); then\n\t\t_zsh_autosuggest_fetch\n\tfi\n}\n\n# Toggle suggestions (enable/disable)\n_zsh_autosuggest_toggle() {\n\tif [[ -n \"${_ZSH_AUTOSUGGEST_DISABLED+x}\" ]]; then\n\t\t_zsh_autosuggest_enable\n\telse\n\t\t_zsh_autosuggest_disable\n\tfi\n}\n\n# Clear the suggestion\n_zsh_autosuggest_clear() {\n\t# Remove the suggestion\n\tunset POSTDISPLAY\n\n\t_zsh_autosuggest_invoke_original_widget $@\n}\n\n# Modify the buffer and get a new suggestion\n_zsh_autosuggest_modify() {\n\tlocal -i retval\n\n\t# Only available in zsh >= 5.4\n\tlocal -i KEYS_QUEUED_COUNT\n\n\t# Save the contents of the buffer/postdisplay\n\tlocal orig_buffer=\"$BUFFER\"\n\tlocal orig_postdisplay=\"$POSTDISPLAY\"\n\n\t# Clear suggestion while waiting for next one\n\tunset POSTDISPLAY\n\n\t# Original widget may modify the buffer\n\t_zsh_autosuggest_invoke_original_widget $@\n\tretval=$?\n\n\t# Don't fetch a new suggestion if there's more input to be read immediately\n\tif (( $PENDING > 0 )) || (( $KEYS_QUEUED_COUNT > 0 )); then\n\t\treturn $retval\n\tfi\n\n\t# Optimize if manually typing in the suggestion\n\tif (( $#BUFFER > $#orig_buffer )); then\n\t\tlocal added=${BUFFER#$orig_buffer}\n\n\t\t# If the string added matches the beginning of the postdisplay\n\t\tif [[ \"$added\" = \"${orig_postdisplay:0:$#added}\" ]]; then\n\t\t\tPOSTDISPLAY=\"${orig_postdisplay:$#added}\"\n\t\t\treturn $retval\n\t\tfi\n\tfi\n\n\t# Don't fetch a new suggestion if the buffer hasn't changed\n\tif [[ \"$BUFFER\" = \"$orig_buffer\" ]]; then\n\t\tPOSTDISPLAY=\"$orig_postdisplay\"\n\t\treturn $retval\n\tfi\n\n\t# Bail out if suggestions are disabled\n\tif [[ -n \"${_ZSH_AUTOSUGGEST_DISABLED+x}\" ]]; then\n\t\treturn $?\n\tfi\n\n\t# Get a new suggestion if the buffer is not empty after modification\n\tif (( $#BUFFER > 0 )); then\n\t\tif [[ -z \"$ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE\" ]] || (( $#BUFFER <= $ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE )); then\n\t\t\t_zsh_autosuggest_fetch\n\t\tfi\n\tfi\n\n\treturn $retval\n}\n\n# Fetch a new suggestion based on what's currently in the buffer\n_zsh_autosuggest_fetch() {\n\tif zpty -t \"$ZSH_AUTOSUGGEST_ASYNC_PTY_NAME\" &>/dev/null; then\n\t\t_zsh_autosuggest_async_request \"$BUFFER\"\n\telse\n\t\tlocal suggestion\n\t\t_zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY \"$BUFFER\"\n\t\t_zsh_autosuggest_suggest \"$suggestion\"\n\tfi\n}\n\n# Offer a suggestion\n_zsh_autosuggest_suggest() {\n\tlocal suggestion=\"$1\"\n\n\tif [[ -n \"$suggestion\" ]] && (( $#BUFFER )); then\n\t\tPOSTDISPLAY=\"${suggestion#$BUFFER}\"\n\telse\n\t\tunset POSTDISPLAY\n\tfi\n}\n\n# Accept the entire suggestion\n_zsh_autosuggest_accept() {\n\tlocal -i max_cursor_pos=$#BUFFER\n\n\t# When vicmd keymap is active, the cursor can't move all the way\n\t# to the end of the buffer\n\tif [[ \"$KEYMAP\" = \"vicmd\" ]]; then\n\t\tmax_cursor_pos=$((max_cursor_pos - 1))\n\tfi\n\n\t# Only accept if the cursor is at the end of the buffer\n\tif [[ $CURSOR = $max_cursor_pos ]]; then\n\t\t# Add the suggestion to the buffer\n\t\tBUFFER=\"$BUFFER$POSTDISPLAY\"\n\n\t\t# Remove the suggestion\n\t\tunset POSTDISPLAY\n\n\t\t# Move the cursor to the end of the buffer\n\t\tCURSOR=${#BUFFER}\n\tfi\n\n\t_zsh_autosuggest_invoke_original_widget $@\n}\n\n# Accept the entire suggestion and execute it\n_zsh_autosuggest_execute() {\n\t# Add the suggestion to the buffer\n\tBUFFER=\"$BUFFER$POSTDISPLAY\"\n\n\t# Remove the suggestion\n\tunset POSTDISPLAY\n\n\t# Call the original `accept-line` to handle syntax highlighting or\n\t# other potential custom behavior\n\t_zsh_autosuggest_invoke_original_widget \"accept-line\"\n}\n\n# Partially accept the suggestion\n_zsh_autosuggest_partial_accept() {\n\tlocal -i retval\n\n\t# Save the contents of the buffer so we can restore later if needed\n\tlocal original_buffer=\"$BUFFER\"\n\n\t# Temporarily accept the suggestion.\n\tBUFFER=\"$BUFFER$POSTDISPLAY\"\n\n\t# Original widget moves the cursor\n\t_zsh_autosuggest_invoke_original_widget $@\n\tretval=$?\n\n\t# If we've moved past the end of the original buffer\n\tif (( $CURSOR > $#original_buffer )); then\n\t\t# Set POSTDISPLAY to text right of the cursor\n\t\tPOSTDISPLAY=\"$RBUFFER\"\n\n\t\t# Clip the buffer at the cursor\n\t\tBUFFER=\"$LBUFFER\"\n\telse\n\t\t# Restore the original buffer\n\t\tBUFFER=\"$original_buffer\"\n\tfi\n\n\treturn $retval\n}\n\nfor action in clear modify fetch suggest accept partial_accept execute enable disable toggle; do\n\teval \"_zsh_autosuggest_widget_$action() {\n\t\tlocal -i retval\n\n\t\t_zsh_autosuggest_highlight_reset\n\n\t\t_zsh_autosuggest_$action \\$@\n\t\tretval=\\$?\n\n\t\t_zsh_autosuggest_highlight_apply\n\n\t\tzle -R\n\n\t\treturn \\$retval\n\t}\"\ndone\n\nzle -N autosuggest-fetch _zsh_autosuggest_widget_fetch\nzle -N autosuggest-suggest _zsh_autosuggest_widget_suggest\nzle -N autosuggest-accept _zsh_autosuggest_widget_accept\nzle -N autosuggest-clear _zsh_autosuggest_widget_clear\nzle -N autosuggest-execute _zsh_autosuggest_widget_execute\nzle -N autosuggest-enable _zsh_autosuggest_widget_enable\nzle -N autosuggest-disable _zsh_autosuggest_widget_disable\nzle -N autosuggest-toggle _zsh_autosuggest_widget_toggle\n\n#--------------------------------------------------------------------#\n# Default Suggestion Strategy                                        #\n#--------------------------------------------------------------------#\n# Suggests the most recent history item that matches the given\n# prefix.\n#\n\n_zsh_autosuggest_strategy_default() {\n\t# Reset options to defaults and enable LOCAL_OPTIONS\n\temulate -L zsh\n\n\t# Enable globbing flags so that we can use (#m)\n\tsetopt EXTENDED_GLOB\n\n\t# Escape backslashes and all of the glob operators so we can use\n\t# this string as a pattern to search the $history associative array.\n\t# - (#m) globbing flag enables setting references for match data\n\t# TODO: Use (b) flag when we can drop support for zsh older than v5.0.8\n\tlocal prefix=\"${1//(#m)[\\\\*?[\\]<>()|^~#]/\\\\$MATCH}\"\n\n\t# Get the history items that match\n\t# - (r) subscript flag makes the pattern match on values\n\ttypeset -g suggestion=\"${history[(r)${prefix}*]}\"\n}\n\n#--------------------------------------------------------------------#\n# Match Previous Command Suggestion Strategy                         #\n#--------------------------------------------------------------------#\n# Suggests the most recent history item that matches the given\n# prefix and whose preceding history item also matches the most\n# recently executed command.\n#\n# For example, suppose your history has the following entries:\n#   - pwd\n#   - ls foo\n#   - ls bar\n#   - pwd\n#\n# Given the history list above, when you type 'ls', the suggestion\n# will be 'ls foo' rather than 'ls bar' because your most recently\n# executed command (pwd) was previously followed by 'ls foo'.\n#\n# Note that this strategy won't work as expected with ZSH options that don't\n# preserve the history order such as `HIST_IGNORE_ALL_DUPS` or\n# `HIST_EXPIRE_DUPS_FIRST`.\n\n_zsh_autosuggest_strategy_match_prev_cmd() {\n\t# Reset options to defaults and enable LOCAL_OPTIONS\n\temulate -L zsh\n\n\t# Enable globbing flags so that we can use (#m)\n\tsetopt EXTENDED_GLOB\n\n\t# TODO: Use (b) flag when we can drop support for zsh older than v5.0.8\n\tlocal prefix=\"${1//(#m)[\\\\*?[\\]<>()|^~#]/\\\\$MATCH}\"\n\n\t# Get all history event numbers that correspond to history\n\t# entries that match pattern $prefix*\n\tlocal history_match_keys\n\thistory_match_keys=(${(k)history[(R)$prefix*]})\n\n\t# By default we use the first history number (most recent history entry)\n\tlocal histkey=\"${history_match_keys[1]}\"\n\n\t# Get the previously executed command\n\tlocal prev_cmd=\"$(_zsh_autosuggest_escape_command \"${history[$((HISTCMD-1))]}\")\"\n\n\t# Iterate up to the first 200 history event numbers that match $prefix\n\tfor key in \"${(@)history_match_keys[1,200]}\"; do\n\t\t# Stop if we ran out of history\n\t\t[[ $key -gt 1 ]] || break\n\n\t\t# See if the history entry preceding the suggestion matches the\n\t\t# previous command, and use it if it does\n\t\tif [[ \"${history[$((key - 1))]}\" == \"$prev_cmd\" ]]; then\n\t\t\thistkey=\"$key\"\n\t\t\tbreak\n\t\tfi\n\tdone\n\n\t# Give back the matched history entry\n\ttypeset -g suggestion=\"$history[$histkey]\"\n}\n\n#--------------------------------------------------------------------#\n# Async                                                              #\n#--------------------------------------------------------------------#\n\n# Zpty process is spawned running this function\n_zsh_autosuggest_async_server() {\n\temulate -R zsh\n\n\t# There is a bug in zpty module (fixed in zsh/master) by which a\n\t# zpty that exits will kill all zpty processes that were forked\n\t# before it. Here we set up a zsh exit hook to SIGKILL the zpty\n\t# process immediately, before it has a chance to kill any other\n\t# zpty processes.\n\tzshexit() {\n\t\tkill -KILL $$\n\t\tsleep 1 # Block for long enough for the signal to come through\n\t}\n\n\t# Output only newlines (not carriage return + newline)\n\tstty -onlcr\n\n\t# Silence any error messages\n\texec 2>/dev/null\n\n\tlocal strategy=$1\n\tlocal last_pid\n\n\twhile IFS='' read -r -d $'\\0' query; do\n\t\t# Kill last bg process\n\t\tkill -KILL $last_pid &>/dev/null\n\n\t\t# Run suggestion search in the background\n\t\t(\n\t\t\tlocal suggestion\n\t\t\t_zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY \"$query\"\n\t\t\techo -n -E \"$suggestion\"$'\\0'\n\t\t) &\n\n\t\tlast_pid=$!\n\tdone\n}\n\n_zsh_autosuggest_async_request() {\n\t# Write the query to the zpty process to fetch a suggestion\n\tzpty -w -n $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME \"${1}\"$'\\0'\n}\n\n# Called when new data is ready to be read from the pty\n# First arg will be fd ready for reading\n# Second arg will be passed in case of error\n_zsh_autosuggest_async_response() {\n\tsetopt LOCAL_OPTIONS EXTENDED_GLOB\n\n\tlocal suggestion\n\n\tzpty -rt $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME suggestion '*'$'\\0' 2>/dev/null\n\tzle autosuggest-suggest -- \"${suggestion%%$'\\0'##}\"\n}\n\n_zsh_autosuggest_async_pty_create() {\n\t# With newer versions of zsh, REPLY stores the fd to read from\n\ttypeset -h REPLY\n\n\t# If we won't get a fd back from zpty, try to guess it\n\tif (( ! $_ZSH_AUTOSUGGEST_ZPTY_RETURNS_FD )); then\n\t\tinteger -l zptyfd\n\t\texec {zptyfd}>&1  # Open a new file descriptor (above 10).\n\t\texec {zptyfd}>&-  # Close it so it's free to be used by zpty.\n\tfi\n\n\t# Fork a zpty process running the server function\n\tzpty -b $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME \"_zsh_autosuggest_async_server _zsh_autosuggest_strategy_$ZSH_AUTOSUGGEST_STRATEGY\"\n\n\t# Store the fd so we can remove the handler later\n\tif (( REPLY )); then\n\t\t_ZSH_AUTOSUGGEST_PTY_FD=$REPLY\n\telse\n\t\t_ZSH_AUTOSUGGEST_PTY_FD=$zptyfd\n\tfi\n\n\t# Set up input handler from the zpty\n\tzle -F $_ZSH_AUTOSUGGEST_PTY_FD _zsh_autosuggest_async_response\n}\n\n_zsh_autosuggest_async_pty_destroy() {\n\tif zpty -t $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME &>/dev/null; then\n\t\t# Remove the input handler\n\t\tzle -F $_ZSH_AUTOSUGGEST_PTY_FD &>/dev/null\n\n\t\t# Destroy the zpty\n\t\tzpty -d $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME &>/dev/null\n\tfi\n}\n\n_zsh_autosuggest_async_pty_recreate() {\n\t_zsh_autosuggest_async_pty_destroy\n\t_zsh_autosuggest_async_pty_create\n}\n\n_zsh_autosuggest_async_start() {\n\ttypeset -g _ZSH_AUTOSUGGEST_PTY_FD\n\n\t_zsh_autosuggest_feature_detect_zpty_returns_fd\n\t_zsh_autosuggest_async_pty_recreate\n\n\t# We recreate the pty to get a fresh list of history events\n\tadd-zsh-hook precmd _zsh_autosuggest_async_pty_recreate\n}\n\n#--------------------------------------------------------------------#\n# Start                                                              #\n#--------------------------------------------------------------------#\n\n# Start the autosuggestion widgets\n_zsh_autosuggest_start() {\n\tadd-zsh-hook -d precmd _zsh_autosuggest_start\n\n\t_zsh_autosuggest_bind_widgets\n\n\t# Re-bind widgets on every precmd to ensure we wrap other wrappers.\n\t# Specifically, highlighting breaks if our widgets are wrapped by\n\t# zsh-syntax-highlighting widgets. This also allows modifications\n\t# to the widget list variables to take effect on the next precmd.\n\tadd-zsh-hook precmd _zsh_autosuggest_bind_widgets\n\n\tif [[ -n \"${ZSH_AUTOSUGGEST_USE_ASYNC+x}\" ]]; then\n\t\t_zsh_autosuggest_async_start\n\tfi\n}\n\n# Start the autosuggestion widgets on the next precmd\nadd-zsh-hook precmd _zsh_autosuggest_start\n"
  },
  {
    "path": ".config/zsh/cmdtime/zsh-command-time.zsh",
    "content": "function preexec() {\n  timer=${timer:-$SECONDS}\n}\n\nfunction precmd() {\n  if [ $timer ]; then\n    export timer_show=$(($SECONDS - $timer))\n    unset timer\n  fi\n}\n"
  },
  {
    "path": ".config/zsh/completions/src/_ack",
    "content": "#compdef ack ack2 ack-grep ack-standalone\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ack 1.96 and 2.14 (http://betterthangrep.com).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com> (version 1.94)\n#  * Zhao Cai <caizhaoff@gmail.com> (version 2.04)\n#\n# ------------------------------------------------------------------------------\n\n_ack_version() {\n    local version\n    version=(${(f)\"$(_call_program version $words[1] --version)\"})\n    version=${${(z)${version[1]}}[2]}\n    echo $version\n}\n\n_ack() {\n  local context curcontext=\"$curcontext\" state line cmds update_policy ret=1\n  integer NORMARG\n  typeset -A opt_args\n\n  # Don't complete if command doesn't exist\n  [[ ${+commands[${words[1]}]} -eq 0 ]] && return 0\n\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  [[ -z \"$update_policy\" ]] && zstyle \":completion:${curcontext}:\" cache-policy _ack_types_caching_policy\n\n  unset _ack_raw_types\n  if ( [[ ${+_ack_raw_types} -eq 0 ]] || _cache_invalid \"ack-grep\" ) && ! _retrieve_cache \"ack-grep\"; then\n    _ack_raw_types=(${(S)${(S)${(f)${${\"$(_call_program types $words[1] --help=types)\"}#*--\\[no\\]}}%; first line matches \\/*\\/}#*no\\]})\n    [[ $#_ack_raw_types -gt 0 ]] && _store_cache \"ack-grep\" _ack_raw_types\n  fi\n\n  ack_20_options=(\n    '--ackrc[specify an ackrc file to use]:files:_files'\n    '(- 1 *)--bar[consult Admiral Ackbar]'\n    '(--nobreak --break)'{--nobreak,--break}'[print a break between results from different files, default on]'\n    '(- 1 *)--cathy[chocolate chocolate chocolate]'\n    '(- 1 *)--create-ackrc[create custom ackrc files based on the default settings loaded by ackrc]'\n    '(- 1 *)--dump[writes the list of options loaded and where they came from to standard output]'\n    '(--files-from -x)--files-from=[read the list of files to search from FILE]:files:_files'\n    '(--filter --nofilter)--filter[force ack to treat input as pipe]'\n    '(--filter --nofilter)--nofilter[force ack to treat input as tty]'\n    '(--noheading --heading)'{--noheading,--heading}'[print a filename heading above results, default on]'\n    '(- 1 *)--help-types[display all known types]'\n    '--ignore-ack-defaults[ignore default definitions included with ack]'\n    '*--ignore-file=[ignore file]:ignore file filter: _describe \"ignore file filter\" ignore_filter_opts'\n    '(-k --known-types)'{-k,--known-types}'[include only files of types that ack recognizes]'\n    '--lines=[only print line(s) NUM of each file]:number'\n    '--nopager[do not send output through a pager, overrides ackrc, ACK_PAGER & ACK_PAGER_COLOR]'\n    '-s[suppress error messages about nonexistent or unreadable files]'\n    '(- 1 *)--thpppt[bill the cat]'\n    '*--type-del[remove all filters associated with TYPE]' \\\n    '(-x --files-from)-x[read the list of files to search from STDIN]'\n  )\n\n  ack_19_options=(\n    '(-a --all -u --unrestricted)'{-a,--all}'[operate on all files, regardless of type (but still skip directories like blib, CVS, etc.)]'\n    '-G+[only paths matching the given regex are included in the search]:regex'\n    '--invert-file-match[print/search handle files that do not match -g/-G]'\n    '--line=[only print given line of each file]:number' \\\n    '(-u --unrestricted -a --all)'{-u,--unrestricted}'[all files and directories (including blib/, core.*, ...) are searched, nothing is skipped]'\n  )\n\n  if (( $(_ack_version) > 2.0 )); then\n    ack_version_options=(${ack_20_options})\n  else\n    ack_version_options=(${ack_19_options})\n  fi\n\n  _arguments -C -s -S -n \\\n    '(- 1 *)--version[display version and copyright information]' \\\n    '(- 1 *)--help[print a short help statement]' \\\n    '(- 1 *)--man[print the manual page]' \\\n    $ack_version_options \\\n    '(-A --after-context -C --context)'{-A+,--after-context=}'[print N lines of trailing context after matching lines]:number' \\\n    '(-B --before-context -C --context)'{-B+,--before-context=}'[print N lines of leading context before matching lines]:number' \\\n    '(-C --context -A --after-context -B --before-context)'{-C-,--context=}'[print N lines (default 2) of context around matching lines]:number' \\\n    '(-c --count)'{-c,--count}'[suppress normal output; instead print a count of matching lines for each input file]' \\\n    '(--nocolor)--color[highlight the matching text]' \\\n    '(--color --color-filename --color-match --color-lineno)--nocolor[suppress the color]' \\\n    '(--nocolor --color)--color-filename[sets the color to be used for filenames]:color:->colors' \\\n    '(--nocolor --color)--color-match[sets the color to be used for matches]:color:->colors' \\\n    '(--nocolor --color)--color-lineno[sets the color to be used for line numbers]:color:->colors' \\\n    '--column[show the column number of the first match]' \\\n    '(--noenv)--env[enable environment processing]' \\\n    '(--env)--noenv[disable all environment processing, no .ackrc is read and all environment variables are ignored]' \\\n    '--flush[flush output immediately]' \\\n    '-f[only print the files that would be searched, without actually doing any searching]' \\\n    '(--nofollow)--follow[follow symlinks]' \\\n    '(--follow)--nofollow[don'\\''t follow symlinks]' \\\n    '-g+[print files where the relative path + filename matches the given regex]:regex' \\\n    '(--nogroup)--group[group matches by file name]' \\\n    '(--group)--nogroup[do not group matches by file name]' \\\n    '(-H --with-filename -h --no-filename)'{-H,--with-filename}'[print the filename for each match]' \\\n    '(-h --no-filename -H --with-filename)'{-h,--no-filename}'[suppress the prefixing of filenames on output when multiple files are searched]' \\\n    '(-i --ignore-case)'{-i,--ignore-case}'[ignore case in the search strings]' \\\n    '*--ignore-dir=[ignore directory]:directory:_files' \\\n    '*--noignore-dir=[ignore directory]:directory:_files' \\\n    '(-l --files-with-matches -L --files-without-matches)'{-l,--files-with-matches}'[only print the filenames of matching files, instead of the matching text]' \\\n    '(-L --files-without-matches -l --files-with-matches)'{-L,--files-without-matches}'[only print the filenames of files that do NOT match]' \\\n    '--match=[specify the regular expression explicitly]:regex' \\\n    '(-m --max-count)'{-m+,--max-count=}'[stop reading a file after N matches]:number' \\\n    '(-r -R --recurse -n --no-recurse)'{-r,-R,--recurse}'[recurse into sub-directories]' \\\n    '(-n --no-recurse -r -R --recurse)'{-n,--no-recurse}'[no descending into subdirectories]' \\\n    '-o[show only the part of each line matching PATTERN (turns off text highlighting)]:pattern' \\\n    '--output=[output the evaluation of expr for each line (turns off text highlighting)]:expression' \\\n    '--pager=[direct ack'\\''s output through program]:pager program:_command_names' \\\n    '--passthru[prints all lines, whether or not they match the expression]' \\\n    '--print0[the filenames are output separated with a null byte instead of the usual newline]' \\\n    '(-Q --literal)'{-Q,--literal}'[quote all metacharacters in the pattern, it is treated as a literal]' \\\n    '(--no-smart-case)--smart-case[ignore case in the search strings if pattern contains no uppercase characters]' \\\n    '(--smart-case)--no-smart-case[disable --smart-case option]' \\\n    '--sort-files[sorts the found files lexically]' \\\n    '--show-types[outputs the filetypes that ack associates with each file]' \\\n    '--thpppt[display the all-important Bill The Cat logo]' \\\n    '*--type=[specify the types of files to include or exclude from a search]:type:->types' \\\n    '*--type-add[files with the given extensions are recognized as being of the given type]:type-def:->type-defs' \\\n    '*--type-set[files with the given extensions are recognized as being of the given type]:type-def:->type-defs' \\\n    '(-v --invert-match)'{-v,--invert-match}'[invert match: select non-matching lines]' \\\n    '(-w --word-regexp)'{-w,--word-regexp}'[force the given pattern to match only whole words]' \\\n    '-1[stops after reporting first match of any kind]' \\\n    {'--','--no'}${_ack_raw_types/ ##/\\[}']' \\\n    '*: :->args' \\\n  && ret=0\n\n  case $state in\n    args)\n      if [[ CURRENT -eq NORMARG && ${+opt_args[--match]} -eq 0 ]]; then\n        # If the current argument is the first non-option argument\n        # and --match isn't present then a pattern is expected\n        _message -e patterns 'pattern' && ret=0\n      else\n        _files\n      fi\n      ;;\n    colors)\n      local colors; colors=(\n        'black'      'on_black'\n        'red'        'on_red'\n        'green'      'on_green'\n        'yellow'     'on_yellow'\n        'blue'       'on_blue'\n        'magenta'    'on_magenta'\n        'cyan'       'on_cyan'\n        'white'      'on_white'\n        'clear'\n        'reset'\n        'dark'\n        'bold'\n        'underline'\n        'underscore'\n        'blink'\n        'reverse'\n        'concealed'\n      )\n      _describe -t 'colors' 'color' colors && ret=0\n      ;;\n    type-defs)\n      if compset -P '*='; then\n        local extensions; extensions=(*.*(:e))\n        _values -s ',' 'file extension' '.'$extensions && ret=0\n      else\n        _message -e type-name 'type name' && ret=0\n      fi\n      ;;\n    types)\n      local types; types=({'','no'}${_ack_raw_types/ ##/:})\n      _describe -t 'types' 'type' types\n      ;;\n  esac\n\n  return ret\n}\n\nignore_filter_opts=(\n  'is\\::FILENAME'\n  'ext\\::[EXTENSION,EXTENSION2,...]'\n  'match\\::PATTERN'\n  'firstlinematch\\::PATTERN'\n)\n\n_ack_types_caching_policy() {\n\n  # Rebuild if ackrc more recent than cache.\n  [[ -f ${ACKRC:-$HOME/.ackrc} && ${ACKRC:-$HOME/.ackrc} -nt \"$1\" ]] && return 0\n\n  # Rebuild if cache is older than one week.\n  local -a oldp\n  oldp=( \"$1\"(Nmw+1) )\n  (( $#oldp )) && return 0\n\n  return 1\n}\n\n_ack \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_afew",
    "content": "#compdef afew\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for afew an initial tagging script for notmuch mail. (https://github.com/teythoon/afew)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n_arguments \\\n  '(- 1 *)-h[display usage information]' \\\n  \"(-c --classify -l --learn= -t --tag -u --update -U --update-reference -m --move-mails)\"{-w,--watch}\"[continuously monitor the mailbox for new messages matching the given query]\" \\\n  \"(-c --classify -l --learn= -u --update -U --update-reference -m --move-mails -w --watch)\"{-t,--tag}\"[run the tag filters]\" \\\n  \"(-c --classify -t --tag -u --update -U --update-reference -m --move-mails -w --watch)\"{-l,--learn=}\"[train category with the messages matching query]\" \\\n  \"(-c --classify -l --learn= -t --tag -U --update-reference -m --move-mails -w --watch)\"{-u,--update}\"[update the categories (requires no query)]\" \\\n  \"(-c --classify -l --learn= -t --tag -u --update -m --move-mails -w --watch)\"{-U,--update-reference}\"[update the reference category (takes quite some time) (requires no query)]\" \\\n  \"(-l --learn= -t --tag -u --update -U --update-reference -m --move-mails -w --watch)\"{-c,--classify}\"[classify each message matching the iven query]\" \\\n  \"(-c --classify -l --learn= -t --tag -u --update -U --update-reference -w --watch)\"{-m,--move-mails}\"[move mail files between maildir folders]\" \\\n  \"(-n --all)\"{-a,--all}\"[operate on all email]\" \\\n  \"(-a --new)\"{-n,--new}\"[operate on all new email]\" \\\n  {-C,--notmuch-config=}\"[specify path to notmuch configuration file]:files:_files\" \\\n  {-e,--enable-filters=}\"[specify filter classes to use]:filter\" \\\n  {-d,--dry-run}\"[don't change the DB]\" \\\n  {-R,--reference-set-size=}\"[specify size of the reference set]:size [1000]\" \\\n  {-T,--reference-set-timeframe-days=}\"[don't use emails older than specified age]:age (days) [30]\" \\\n  {--verbose,-v}\"[be more verbose]\" \\\n  '*: :_guard \"^-*\" query'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_android",
    "content": "#compdef android\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for the android command (Revision 12)\n#  (http://developer.android.com/guide/developing/tools/android.html).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_android() {\n  typeset -A opt_args\n  local context state line curcontext=\"$curcontext\"\n\n  local ret=1\n  \n  _arguments -C -A \"-*\" \\\n    '(- : *)'{-h,--help}'[get help on a specific command]:command:_android_cmds' \\\n    '(-s --silent -v --verbose)'{-v,--verbose}'[verbose mode: errors, warnings and informational messages are printed]' \\\n    '(-v --verbose -s --silent)'{-s,--silent}'[silent mode: only errors are printed out]' \\\n    '1: :_android_cmds' \\\n    '*::arg:->args' \\\n  && ret=0\n\n  case \"$state\" in\n    (args)\n      curcontext=\"${curcontext%:*:*}:android-cmd-$words[1]:\"\n      case $words[1] in\n        (list)\n          _arguments -C \\\n            '1: :_android_list_entities' \\\n            '*::list-arg:->list-args' \\\n          && ret=0\n          case \"$state\" in\n            (list-args)\n              case $words[1] in\n                (avd|target)\n                  _arguments \\\n                    '(-0 --null)'{-0,--null}'[terminate lines with \\0 instead of \\n (e.g. for xargs -0)]' \\\n                    '(-c --compact)'{-c,--compact}'[compact output (suitable for scripts)]' \\\n                  && ret=0\n                ;;\n                (sdk)\n                  _arguments \\\n                    '(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \\\n                    '--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \\\n                    '--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \\\n                    '(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \\\n                    '(-u --no-ui)'{-u,--no-ui}'[display list result on console (no GUI)]' \\\n                  && ret=0\n                ;;\n              esac\n            ;;\n          esac\n        ;;\n        (create)\n          _arguments -C \\\n            '1: :_android_create_entities' \\\n            '*::create-arg:->create-args' \\\n          && ret=0\n          case \"$state\" in\n            (create-args)\n              case $words[1] in\n                (avd)\n                  _arguments \\\n                    '(-c --sdcard)'{-c,--sdcard}'[path to a shared SD card image, or size of a new sdcard for the new AVD]:SD card image or size:_files -g \"*.img\"' \\\n                    '(-n --name)'{-n,--name}'[name of the new AVD]:name' \\\n                    '(-a --snapshot)'{-a,--snapshot}'[place a snapshots file in the AVD, to enable persistence]' \\\n                    '(-p --path)'{-p,--path}'[directory where the new AVD will be created]: :_files -/' \\\n                    '(-f --force)'{-f,--force}'[forces creation (overwrites an existing AVD)]' \\\n                    '(-s --skin)'{-s,--skin}'[skin for the new AVD]:skin' \\\n                    '(-t --target)'{-t,--target}'[target ID of the new AVD]: :_android_targets' \\\n                  && ret=0\n                ;;\n                (project)\n                  _arguments \\\n                    '(-n --name)'{-n,--name}'[project name]:project name' \\\n                    '(-p --path)'{-p,--path}'[the new project'\\''s directory]: :_files -/' \\\n                    '(-k --package)'{-k,--package}'[Android package name for the application]:package name' \\\n                    '(-a --activity)'{-a,--activity}'[name of the default Activity that is created]:activity name' \\\n                    '(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \\\n                  && ret=0\n                ;;\n                (test-project)\n                  _arguments \\\n                    '(-n --name)'{-n,--name}'[project name]:project name' \\\n                    '(-p --path)'{-p,--path}'[the new project'\\''s directory]: :_files -/' \\\n                    '(-m --main)'{-m,--main}'[path to directory of the app under test, relative to the test project directory]:path' \\\n                  && ret=0\n                ;;\n                (lib-project)\n                  _arguments \\\n                    '(-n --name)'{-n,--name}'[project name]:project name' \\\n                    '(-p --path)'{-p,--path}'[the new project'\\''s directory]: :_files -/' \\\n                    '(-k --package)'{-k,--package}'[Android package name for the application]:package name' \\\n                    '(-t --target)'{-t,--target}'[target ID of the new project]: :_android_targets' \\\n                  && ret=0\n                ;;\n              esac\n            ;;\n          esac\n        ;;\n        (update)\n          _arguments -C \\\n            '1: :_android_update_entities' \\\n            '*::update-arg:->update-args' \\\n          && ret=0\n          case \"$state\" in\n            (update-args)\n              case $words[1] in\n                (avd)\n                  _arguments \\\n                    '(-n --name)'{-n,--name}'[name of the AVD to update]: :_android_avd_names' \\\n                  && ret=0\n                ;;\n                (project)\n                  _arguments \\\n                    '(-l --library)'{-l,--library}'[directory of an Android library to add, relative to this project'\\''s directory]: :_files -/' \\\n                    '(-p --path)'{-p,--path}'[the project'\\''s directory]: :_files -/' \\\n                    '(-n --name)'{-n,--name}'[project name]:name' \\\n                    '(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \\\n                    '(-s --subprojects)'{-s,--subprojects}'[also updates any projects in sub-folders, such as test projects]' \\\n                  && ret=0\n                ;;\n                (test-project)\n                  _arguments \\\n                    '(-p --path)'{-p,--path}'[the project'\\''s directory]: :_files -/' \\\n                    '(-m --main)'{-m,--main}'[directory of the app under test, relative to the test project directory]:path' \\\n                  && ret=0\n                ;;\n                (lib-project)\n                  _arguments \\\n                    '(-p --path)'{-p,--path}'[the project'\\''s directory]: :_files -/' \\\n                    '(-t --target)'{-t,--target}'[target ID to set for the project]: :_android_targets' \\\n                  && ret=0\n                ;;\n                (sdk)\n                  _arguments \\\n                    '(-o --obsolete)'{-o,--obsolete}'[install obsolete packages]' \\\n                    '--proxy-host[HTTP/HTTPS proxy host (overrides settings if defined)]:proxy host:_hosts' \\\n                    '--proxy-port[HTTP/HTTPS proxy port (overrides settings if defined)]:proxy port number' \\\n                    '(-s --no-https)'{-s,--no-https}'[use HTTP instead of HTTPS (the default) for downloads]' \\\n                    '(-u --no-ui)'{-u,--no-ui}'[update from command-line (no GUI)]' \\\n                    '(-f --force)'{-f,--force}'[force replacement of a package or its parts, even if something has been modified]' \\\n                    '(-t --filter)'{-t,--filter}'[a filter that limits the update to the specified types of packages]: :_android_sdk_update_filters -s ,' \\\n                    '(-n --dry-mode)'{-n,--dry-mode}'[simulate the update but does not download or install anything]' \\\n                  && ret=0\n                ;;\n              esac\n            ;;\n          esac\n        ;;\n        (move)\n          _arguments -C \\\n            '1: :_android_move_entities' \\\n            '*::move-arg:->move-args' \\\n          && ret=0\n          case \"$state\" in\n            (move-args)\n              case $words[1] in\n                (avd)\n                  _arguments \\\n                    '(-n --name)'{-n,--name}'[name of the AVD to move or rename]: :_android_avd_names' \\\n                    '(-p --path)'{-p,--path}'[path to the AVD'\\''s new directory]: :_files -/' \\\n                    '(-r --rename)'{-r,--rename}'[new name of the AVD]:name' \\\n                  && ret=0\n                ;;\n              esac\n            ;;\n          esac\n        ;;\n        (delete)\n          _arguments -C \\\n            '1: :_android_delete_entities' \\\n            '*::delete-arg:->delete-args' \\\n          && ret=0\n          case \"$state\" in\n            (delete-args)\n              case $words[1] in\n                (avd)\n                  _arguments \\\n                    '(-n --name)'{-n,--name}'[name of the AVD to delete]: :_android_avd_names' \\\n                  && ret=0\n                ;;\n              esac\n            ;;\n          esac\n        ;;\n        (display)\n          _arguments \\\n            '1: :_android_display_entities' \\\n          && ret=0\n        ;;\n      esac\n    ;;\n  esac\n\n  return ret\n}\n\n(( $+functions[_android_cmds] )) ||\n_android_cmds() {\n  local commands; commands=(\n    'list:list existing targets or virtual devices'\n    'create:create new virtual devices or projects'\n    'update:update a virtual device, project, SDK or adb'\n    'move:move a virtual device'\n    'delete:delete a virtual device'\n    'avd:displays the AVD Manager window'\n    'sdk:displays the SDK Manager window'\n    'display:display manager windows'\n  )\n  _describe -t commands 'command' commands \"$@\"\n}\n\n(( $+functions[_android_list_entities] )) ||\n_android_list_entities() {\n  local entities; entities=(\n    'avd:list existing Android Virtual Devices'\n    'target:list existing targets'\n    'sdk:list remote SDK repository'\n  )\n  _describe -t entities 'entity' entities \"$@\"\n}\n\n(( $+functions[_android_create_entities] )) ||\n_android_create_entities() {\n  local entities; entities=(\n    'avd:create a new Android Virtual Device'\n    'project:create a new Android project'\n    'test-project:create a new Android project for a test package'\n    'lib-project:create a new Android library project'\n  )\n  _describe -t entities 'entity' entities \"$@\"\n}\n\n(( $+functions[_android_update_entities] )) ||\n_android_update_entities() {\n  local entities; entities=(\n    'avd:update an Android Virtual Device to match the folders of a new SDK'\n    'project:update an Android project'\n    'test-project:update the Android project for a test package'\n    'lib-project:update an Android library project'\n    'adb:update adb to support the USB devices declared in the SDK add-ons'\n    'sdk:update the SDK by suggesting new platforms to install if available'\n  )\n  _describe -t entities 'entity' entities \"$@\"\n}\n\n(( $+functions[_android_move_entities] )) ||\n_android_move_entities() {\n  local entities; entities=(\n    'avd:move or rename an Android Virtual Device'\n  )\n  _describe -t entities 'entity' commands \"$@\"\n}\n\n(( $+functions[_android_delete_entities] )) ||\n_android_delete_entities() {\n  local entities; entities=(\n    'avd:delete an Android Virtual Device'\n  )\n  _describe -t entities 'entity' entities \"$@\"\n}\n\n(( $+functions[_android_display_entities] )) ||\n_android_display_entities() {\n  local entities; entities=(\n    'sdk:display the SDK Manager window'\n    'avd:display the AVD Manager window'\n  )\n  _describe -t entities 'entity' entities \"$@\"\n}\n\n(( $+functions[_android_targets] )) ||\n_android_targets() {\n  local targets; targets=(${(f)\"$(_call_program targets $service list target --compact)\"//:/\\\\:})\n  _describe -t targets 'target' targets \"$@\"\n}\n\n(( $+functions[_android_avd_names] )) ||\n_android_avd_names() {\n  local avd_names; avd_names=(${(f)\"$(_call_program targets $service list avd --compact)\"//:/\\\\:})\n  _describe -t avd-names 'AVD name' avd_names \"$@\"\n}\n\n(( $+functions[_android_sdk_update_filters] )) ||\n_android_sdk_update_filters() {\n  local filters; filters=(platform tool platform-tool doc sample extra)\n  _values $@ 'filter' \"${filters[@]}\"\n}\n\n_android \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ansible",
    "content": "#compdef ansible\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ansible v2.0.0.2 (http://ansible.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Romain Bossart (https://github.com/bosr)\n#  * Adam Stevko (https://github.com/xen0l)\n#\n# ------------------------------------------------------------------------------\n#\n# Needs either ANSIBLE_HOSTS or /etc/ansible/hosts on linux\n# (or /usr/local/etc/ansible/hosts on macOS)\n#\n# Note 1: the following gist (https://gist.github.com/15ed54a438a36d67fd99.git)\n# has some files to help improve the hostfile shell parsing\n#\n# Note 2: I tried to use `_arguments --`, but the output of `ansible --help`\n# is not parsed entirely correctly, and anyway no modules or host would available.\n#\n\n\n# ansible zsh completion\n#\n\n__host_file_location () {\n  # find the location of the host file:\n  # 1. check $ANSIBLE_HOSTS\n  # 2. else check /etc/ansible/hosts or /usr/local/etc/...\n  #    (depending on platform)\n  #\n  [[ \"$OSTYPE\" == darwin* ]] && FALLBACK=\"/usr/local/etc/ansible/hosts\"\n  [[ \"$OSTYPE\" == linux* ]] && FALLBACK=\"/etc/ansible/hosts\"\n  HOST_FILE=${ANSIBLE_HOSTS:=${FALLBACK}}\n  [[ -f ${HOST_FILE} ]] || HOST_FILE=\"$PWD/ansible/inventory/hosts\"\n  [[ -f ${HOST_FILE} ]] || HOST_FILE=/dev/null\n\n  echo ${HOST_FILE}\n}\n\n__ll_group_list () {\n  # parses the ini hostfile for groups only: [...]\n  HOST_FILE=$(__host_file_location)\n\n  local -a group_list\n  group_list=$(command \\\n      cat ${HOST_FILE} \\\n      | awk '$1 ~ /^\\[.*\\]$/ && !/=/ && !/:vars/ \\\n        { gsub(/[\\[\\]]/, \"\", $1); gsub(/:children/, \"\", $1) ; print $1 }' \\\n      | uniq )\n\n  echo ${group_list}\n}\n\n\n__host_list ()\n{\n  # parses the ini hostfile for hosts only\n  # but then has to remove all group occurrences\n  HOST_FILE=$(__host_file_location)\n\n  # this will also contain groups if they are referenced in other groups\n  local -a mixed_host_list\n  mixed_host_list=$(command \\\n    cat ${HOST_FILE} \\\n    | awk 'NF && $1 !~ /^[[:space:]]*#|[\\[:=]/ { print $1 }' \\\n    | sort | uniq)\n\n  # compute set difference h1 - h2\n  local -a h1 h2 host_list\n  h1=${mixed_host_list}\n  h2=$(__ll_group_list)\n  host_list=($(command \\\n    sort <(echo $h1) <(echo $h2) <(echo $h2) \\\n    | uniq -u \\\n    | paste -s -d ' ' - )\n  )\n\n  _wanted application expl 'hosts' compadd ${host_list}\n\n  # method that delegates to ansible (slow)\n  # _wanted application expl 'hosts' compadd $(command ansible \\\n  #                                             all --list-hosts\\\n  #                                             2>/dev/null)\n}\n\n__group_list ()\n{\n  gl=($(command echo $(__ll_group_list) | paste -s -d ' ' - )) # 'a\\nb\\nc' -> (a b c)\n  _wanted application2 expl 'groups' compadd $gl\n}\n\n\n_modules=(\n'a10_server:Manage A10 Networks AX/SoftAX/Thunder/vThunder devices'\n'a10_service_group:Manage A10 Networks devices’ service groups'\n'a10_virtual_server:Manage A10 Networks devices’ virtual servers'\n'accelerate:Enable accelerated mode on remote node'\n'acl:Sets and retrieves file ACL information.'\n'add_host:add a host (and alternatively a group) to the ansible-playbook in-memory inventory'\n'airbrake_deployment:Notify airbrake about app deployments'\n'alternatives:Manages alternative programs for common commands'\n'apache2_module:enables/disables a module of the Apache2 webserver'\n'apk:Manages apk packages'\n'apt:Manages apt-packages'\n'apt_key:Add or remove an apt key'\n'apt_repository:Add and remove APT repositories'\n'apt_rpm:apt_rpm package manager'\n'assemble:Assembles a configuration file from fragments'\n'assert:Fail with custom message'\n'async_status:Obtain status of asynchronous task'\n'at:Schedule the execution of a command or script file via the at command.'\n'authorized_key:Adds or removes an SSH authorized key'\n'azure:create or terminate a virtual machine in azure'\n'bigip_facts:Collect facts from F5 BIG-IP devices'\n'bigip_gtm_wide_ip:Manages F5 BIG-IP GTM wide ip'\n'bigip_monitor_http:Manages F5 BIG-IP LTM http monitors'\n'bigip_monitor_tcp:Manages F5 BIG-IP LTM tcp monitors'\n'bigip_node:Manages F5 BIG-IP LTM nodes'\n'bigip_pool:Manages F5 BIG-IP LTM pools'\n'bigip_pool_member:Manages F5 BIG-IP LTM pool members'\n'bigip_virtual_server:Manages F5 BIG-IP LTM virtual servers'\n'bigpanda:Notify BigPanda about deployments'\n'blockinfile:Insert/update/remove a text block surrounded by marker lines.'\n'boundary_meter:Manage boundary meters'\n'bower:Manage bower packages with bower'\n'bundler:Manage Ruby Gem dependencies with Bundler'\n'bzr:Deploy software (or files) from bzr branches'\n'campfire:Send a message to Campfire'\n'capabilities:Manage Linux capabilities'\n'circonus_annotation:create an annotation in circonus'\n'cl_bond:Configures a bond port on Cumulus Linux'\n'cl_bridge:Configures a bridge port on Cumulus Linux'\n'cl_img_install:Install a different Cumulus Linux version.'\n'cl_interface:Configures a front panel port, loopback or management port on Cumulus Linux.'\n'cl_interface_policy:Configure interface enforcement policy on Cumulus Linux'\n'cl_license:Install Cumulus Linux license'\n'cl_ports:Configure Cumulus Switch port attributes (ports.conf)'\n'clc_aa_policy:Create or Delete Anti Affinity Policies at CenturyLink Cloud.'\n'clc_alert_policy:Create or Delete Alert Policies at CenturyLink Cloud.'\n'clc_blueprint_package:deploys a blue print package on a set of servers in CenturyLink Cloud.'\n'clc_firewall_policy:Create/delete/update firewall policies'\n'clc_group:Create/delete Server Groups at Centurylink Cloud'\n'clc_loadbalancer:Create, Delete shared loadbalancers in CenturyLink Cloud.'\n'clc_modify_server:modify servers in CenturyLink Cloud.'\n'clc_publicip:Add and Delete public ips on servers in CenturyLink Cloud.'\n'clc_server:Create, Delete, Start and Stop servers in CenturyLink Cloud.'\n'clc_server_snapshot:Create, Delete and Restore server snapshots in CenturyLink Cloud.'\n'cloudflare_dns:manage Cloudflare DNS records'\n'cloudformation:Create or delete an AWS CloudFormation stack'\n'cloudtrail:manage CloudTrail creation and deletion'\n'command:Executes a command on a remote node'\n'composer:Dependency Manager for PHP'\n'consul:Add, modify & delete services within a consul cluster.'\n'consul_acl:manipulate consul acl keys and rules'\n'consul_kv:Manipulate entries in the key/value store of a consul cluster.'\n'consul_session:manipulate consul sessions'\n'copy:Copies files to remote locations.'\n'cpanm:Manages Perl library dependencies.'\n'cron:Manage cron.d and crontab entries.'\n'cronvar:Manage variables in crontabs'\n'crypttab:Encrypted Linux block devices'\n'cs_account:Manages accounts on Apache CloudStack based clouds.'\n'cs_affinitygroup:Manages affinity groups on Apache CloudStack based clouds.'\n'cs_cluster:Manages host clusters on Apache CloudStack based clouds.'\n'cs_configuration:Manages configuration on Apache CloudStack based clouds.'\n'cs_domain:Manages domains on Apache CloudStack based clouds.'\n'cs_facts:Gather facts on instances of Apache CloudStack based clouds.'\n'cs_firewall:Manages firewall rules on Apache CloudStack based clouds.'\n'cs_instance:Manages instances and virtual machines on Apache CloudStack based clouds.'\n'cs_instance_facts:Gathering facts from the API of instances from Apache CloudStack based clouds.'\n'cs_instancegroup:Manages instance groups on Apache CloudStack based clouds.'\n'cs_ip_address:Manages public IP address associations on Apache CloudStack based clouds.'\n'cs_iso:Manages ISO images on Apache CloudStack based clouds.'\n'cs_loadbalancer_rule:Manages load balancer rules on Apache CloudStack based clouds.'\n'cs_loadbalancer_rule_member:Manages load balancer rule members on Apache CloudStack based clouds.'\n'cs_network:Manages networks on Apache CloudStack based clouds.'\n'cs_pod:Manages pods on Apache CloudStack based clouds.'\n'cs_portforward:Manages port forwarding rules on Apache CloudStack based clouds.'\n'cs_project:Manages projects on Apache CloudStack based clouds.'\n'cs_resourcelimit:Manages resource limits on Apache CloudStack based clouds.'\n'cs_securitygroup:Manages security groups on Apache CloudStack based clouds.'\n'cs_securitygroup_rule:Manages security group rules on Apache CloudStack based clouds.'\n'cs_sshkeypair:Manages SSH keys on Apache CloudStack based clouds.'\n'cs_staticnat:Manages static NATs on Apache CloudStack based clouds.'\n'cs_template:Manages templates on Apache CloudStack based clouds.'\n'cs_user:Manages users on Apache CloudStack based clouds.'\n'cs_vmsnapshot:Manages VM snapshots on Apache CloudStack based clouds.'\n'cs_volume:Manages volumes on Apache CloudStack based clouds.'\n'cs_zone:Manages zones on Apache CloudStack based clouds.'\n'cs_zone_facts:Gathering facts of zones from Apache CloudStack based clouds.'\n'datadog_event:Posts events to DataDog service'\n'datadog_monitor:Manages Datadog monitors'\n'debconf:Configure a .deb package'\n'debug:Print statements during execution'\n'deploy_helper:Manages some of the steps common in deploying projects.'\n'digital_ocean:Create/delete a droplet/SSH_key in DigitalOcean'\n'digital_ocean_domain:Create/delete a DNS record in DigitalOcean'\n'digital_ocean_sshkey:Create/delete an SSH key in DigitalOcean'\n'django_manage:Manages a Django application.'\n'dnf:Manages packages with the *dnf* package manager'\n'dnsimple:Interface with dnsimple.com (a DNS hosting service).'\n'dnsmadeeasy:Interface with dnsmadeeasy.com (a DNS hosting service).'\n'docker:manage docker containers'\n'docker_image:manage docker images'\n'docker_login:Manage Docker registry logins'\n'dpkg_selections:Dpkg package selection selections'\n'dynamodb_table:Create, update or delete AWS Dynamo DB tables.'\n'easy_install:Installs Python libraries'\n'ec2:create, terminate, start or stop an instance in ec2'\n'ec2_ami:create or destroy an image in ec2'\n'ec2_ami_copy:copies AMI between AWS regions, return new image id'\n'ec2_ami_find:Searches for AMIs to obtain the AMI ID and other information'\n'ec2_ami_search(D):Retrieve AWS AMI information for a given operating system.'\n'ec2_asg:Create or delete AWS Autoscaling Groups'\n'ec2_eip:associate an EC2 elastic IP with an instance.'\n'ec2_elb:De-registers or registers instances from EC2 ELBs'\n'ec2_elb_facts:Gather facts about EC2 Elastic Load Balancers in AWS'\n'ec2_elb_lb:Creates or destroys Amazon ELB.'\n'ec2_eni:Create and optionally attach an Elastic Network Interface (ENI) to an instance'\n'ec2_eni_facts:Gather facts about ec2 ENI interfaces in AWS'\n'ec2_facts:Gathers facts about remote hosts within ec2 (aws)'\n'ec2_group:maintain an ec2 VPC security group.'\n'ec2_key:maintain an ec2 key pair.'\n'ec2_lc:Create or delete AWS Autoscaling Launch Configurations'\n'ec2_metric_alarm:Create/update or delete AWS Cloudwatch ‘metric alarms’'\n'ec2_remote_facts:Gather facts about ec2 instances in AWS'\n'ec2_scaling_policy:Create or delete AWS scaling policies for Autoscaling groups'\n'ec2_snapshot:creates a snapshot from an existing volume'\n'ec2_tag:create and remove tag(s) to ec2 resources.'\n'ec2_vol:create and attach a volume, return volume id and device map'\n'ec2_vol_facts:Gather facts about ec2 volumes in AWS'\n'ec2_vpc:configure AWS virtual private clouds'\n'ec2_vpc_dhcp_options:Manages DHCP Options, and can ensure the DHCP options for the given VPC match what’s requested'\n'ec2_vpc_igw:Manage an AWS VPC Internet gateway'\n'ec2_vpc_net:Configure AWS virtual private clouds'\n'ec2_vpc_net_facts:Gather facts about ec2 VPCs in AWS'\n'ec2_vpc_route_table:Manage route tables for AWS virtual private clouds'\n'ec2_vpc_route_table_facts:Gather facts about ec2 VPC route tables in AWS'\n'ec2_vpc_subnet:Manage subnets in AWS virtual private clouds'\n'ec2_vpc_subnet_facts:Gather facts about ec2 VPC subnets in AWS'\n'ec2_win_password:gets the default administrator password for ec2 windows instances'\n'ecs_cluster:create or terminate ecs clusters'\n'ecs_service:create, terminate, start or stop a service in ecs'\n'ecs_service_facts:list or describe services in ecs'\n'ecs_task:run, start or stop a task in ecs'\n'ecs_taskdefinition:register a task definition in ecs'\n'ejabberd_user:Manages users for ejabberd servers'\n'elasticache:Manage cache clusters in Amazon Elasticache.'\n'elasticache_subnet_group:manage Elasticache subnet groups'\n'elasticsearch_plugin:Manage Elasticsearch plugins'\n'eos_command:Run arbitrary command on EOS device'\n'eos_config:Manage Arista EOS configuration sections'\n'eos_eapi:Manage and configure EAPI. Requires EOS v4.12 or greater.'\n'eos_template:Manage Arista EOS device configurations'\n'expect:Executes a command and responds to prompts'\n'facter:Runs the discovery program *facter* on the remote system'\n'fail:Fail with custom message'\n'fetch:Fetches a file from remote nodes'\n'file:Sets attributes of files'\n'filesystem:Makes file system on block device'\n'find:return a list of files based on specific criteria'\n'fireball(D):Enable fireball mode on remote node'\n'firewalld:Manage arbitrary ports/services with firewalld'\n'flowdock:Send a message to a flowdock'\n'gc_storage:This module manages objects/buckets in Google Cloud Storage.'\n'gce:create or terminate GCE instances'\n'gce_img:utilize GCE image resources'\n'gce_lb:create/destroy GCE load-balancer resources'\n'gce_net:create/destroy GCE networks and firewall rules'\n'gce_pd:utilize GCE persistent disk resources'\n'gce_tag:add or remove tag(s) to/from GCE instance'\n'gem:Manage Ruby gems'\n'get_url:Downloads files from HTTP, HTTPS, or FTP to node'\n'getent:a wrapper to the unix getent utility'\n'git:Deploy software (or files) from git checkouts'\n'github_hooks:Manages github service hooks.'\n'glance_image(D):Add/Delete images from glance'\n'gluster_volume:Manage GlusterFS volumes'\n'group:Add or remove groups'\n'group_by:Create Ansible groups based on facts'\n'grove:Sends a notification to a grove.io channel'\n'hall:Send notification to Hall'\n'haproxy:Enable, disable, and set weights for HAProxy backend servers using socket commands.'\n'hg:Manages Mercurial (hg) repositories.'\n'hipchat:Send a message to hipchat.'\n'homebrew:Package manager for Homebrew'\n'homebrew_cask:Install/uninstall homebrew casks.'\n'homebrew_tap:Tap a Homebrew repository.'\n'hostname:Manage hostname'\n'htpasswd:manage user files for basic authentication'\n'iam:Manage IAM users, groups, roles and keys'\n'iam_cert:Manage server certificates for use on ELBs and CloudFront'\n'iam_policy:Manage IAM policies for users, groups, and roles'\n'include_vars:Load variables from files, dynamically within a task.'\n'ini_file:Tweak settings in INI files'\n'ios_command:Run arbitrary commands on ios devices.'\n'ios_config:Manage Cisco IOS configuration sections'\n'ios_template:Manage Cisco IOS device configurations over SSH'\n'iosxr_command:Run arbitrary commands on ios devices.'\n'iosxr_config:Manage Cisco IOS XR configuration sections'\n'iosxr_template:Manage Cisco IOS device configurations over SSH'\n'ipify_facts:Retrieve the public IP of your internet gateway.'\n'iptables:Modify the systems iptables'\n'irc:Send a message to an IRC channel'\n'jabber:Send a message to jabber user or chat room'\n'jboss:deploy applications to JBoss'\n'jira:create and modify issues in a JIRA instance'\n'junos_command:Execute arbitrary commands on Juniper JUNOS devices'\n'junos_config:Manage Juniper JUNOS configuration sections'\n'junos_template:Manage Juniper JUNOS device configurations'\n'kernel_blacklist:Blacklist kernel modules'\n'keystone_user(D):Manage OpenStack Identity (keystone) users, tenants and roles'\n'known_hosts:Add or remove a host from the ``known_hosts`` file'\n'layman:Manage Gentoo overlays'\n'librato_annotation:create an annotation in librato'\n'lineinfile:Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.'\n'linode:create / delete / stop / restart an instance in Linode Public Cloud'\n'lldp:get details reported by lldp'\n'locale_gen:Creates or removes locales.'\n'logentries:Module for tracking logs via logentries.com'\n'lvg:Configure LVM volume groups'\n'lvol:Configure LVM logical volumes'\n'lxc_container:Manage LXC Containers'\n'macports:Package manager for MacPorts'\n'mail:Send an email'\n'maven_artifact:Downloads an Artifact from a Maven Repository'\n'modprobe:Add or remove kernel modules'\n'mongodb_user:Adds or removes a user from a MongoDB database.'\n'monit:Manage the state of a program monitored via Monit'\n'mount:Control active and configured mount points'\n'mqtt:Publish a message on an MQTT topic for the IoT'\n'mysql_db:Add or remove MySQL databases from a remote host.'\n'mysql_replication:Manage MySQL replication'\n'mysql_user:Adds or removes a user from a MySQL database.'\n'mysql_variables:Manage MySQL global variables'\n'nagios:Perform common tasks in Nagios related to downtime and notifications.'\n'netscaler:Manages Citrix NetScaler entities'\n'newrelic_deployment:Notify newrelic about app deployments'\n'nexmo:Send a SMS via nexmo'\n'nmcli:Manage Networking'\n'nova_compute(D):Create/Delete VMs from OpenStack'\n'nova_keypair(D):Add/Delete key pair from nova'\n'npm:Manage node.js packages with npm'\n'nxos_command:Run arbitrary command on Cisco NXOS devices'\n'nxos_config:Manage Cisco NXOS configuration sections'\n'nxos_nxapi:Manage NXAPI configuration on an NXOS device.'\n'nxos_template:Manage Cisco NXOS device configurations'\n'ohai:Returns inventory data from *Ohai*'\n'open_iscsi:Manage iscsi targets with open-iscsi'\n'openbsd_pkg:Manage packages on OpenBSD.'\n'openvswitch_bridge:Manage Open vSwitch bridges'\n'openvswitch_db:Configure open vswitch database.'\n'openvswitch_port:Manage Open vSwitch ports'\n'opkg:Package manager for OpenWrt'\n'ops_command:Run arbitrary commands on OpenSwitch devices.'\n'ops_config:Manage OpenSwitch configuration using CLI'\n'ops_template:Push configuration to OpenSwitch'\n'os_auth:Retrieve an auth token'\n'os_client_config:Get OpenStack Client config'\n'os_flavor_facts:Retrieve facts about one or more flavors'\n'os_floating_ip:Add/Remove floating IP from an instance'\n'os_group:Manage OpenStack Identity Groups'\n'os_image:Add/Delete images from OpenStack Cloud'\n'os_image_facts:Retrieve facts about an image within OpenStack.'\n'os_ironic:Create/Delete Bare Metal Resources from OpenStack'\n'os_ironic_node:Activate/Deactivate Bare Metal Resources from OpenStack'\n'os_keypair:Add/Delete a keypair from OpenStack'\n'os_keystone_domain:Manage OpenStack Identity Domains'\n'os_keystone_role:Manage OpenStack Identity Roles'\n'os_network:Creates/removes networks from OpenStack'\n'os_networks_facts:Retrieve facts about one or more OpenStack networks.'\n'os_nova_flavor:Manage OpenStack compute flavors'\n'os_object:Create or Delete objects and containers from OpenStack'\n'os_port:Add/Update/Delete ports from an OpenStack cloud.'\n'os_project:Manage OpenStack Projects'\n'os_router:Create or delete routers from OpenStack'\n'os_security_group:Add/Delete security groups from an OpenStack cloud.'\n'os_security_group_rule:Add/Delete rule from an existing security group'\n'os_server:Create/Delete Compute Instances from OpenStack'\n'os_server_actions:Perform actions on Compute Instances from OpenStack'\n'os_server_facts:Retrieve facts about one or more compute instances'\n'os_server_volume:Attach/Detach Volumes from OpenStack VM’s'\n'os_subnet:Add/Remove subnet to an OpenStack network'\n'os_subnets_facts:Retrieve facts about one or more OpenStack subnets.'\n'os_user:Manage OpenStack Identity Users'\n'os_user_group:Associate OpenStack Identity users and groups'\n'os_volume:Create/Delete Cinder Volumes'\n'osx_defaults:osx_defaults allows users to read, write, and delete macOS user defaults from Ansible'\n'osx_say:Makes a macOS computer speak.'\n'ovirt:oVirt/RHEV platform management'\n'package:Generic OS package manager'\n'pacman:Manage packages with *pacman*'\n'pagerduty:Create PagerDuty maintenance windows'\n'pagerduty_alert:Trigger, acknowledge or resolve PagerDuty incidents'\n'pam_limits:Modify Linux PAM limits'\n'patch:Apply patch files using the GNU patch tool.'\n'pause:Pause playbook execution'\n'pear:Manage pear/pecl packages'\n'ping:Try to connect to host, verify a usable python and return ``pong`` on success.'\n'pingdom:Pause/unpause Pingdom alerts'\n'pip:Manages Python library dependencies.'\n'pkg5:Manages packages with the Solaris 11 Image Packaging System'\n'pkg5_publisher:Manages Solaris 11 Image Packaging System publishers'\n'pkgin:Package manager for SmartOS, NetBSD, et al.'\n'pkgng:Package manager for FreeBSD >= 9.0'\n'pkgutil:Manage CSW-Packages on Solaris'\n'portage:Package manager for Gentoo'\n'portinstall:Installing packages from FreeBSD’s ports system'\n'postgresql_db:Add or remove PostgreSQL databases from a remote host.'\n'postgresql_ext:Add or remove PostgreSQL extensions from a database.'\n'postgresql_lang:Adds, removes or changes procedural languages with a PostgreSQL database.'\n'postgresql_privs:Grant or revoke privileges on PostgreSQL database objects.'\n'postgresql_user:Adds or removes a users (roles) from a PostgreSQL database.'\n'profitbricks:Create, destroy, start, stop, and reboot a ProfitBricks virtual machine.'\n'profitbricks_datacenter:Create or destroy a ProfitBricks Virtual Datacenter.'\n'profitbricks_nic:Create or Remove a NIC.'\n'profitbricks_volume:Create or destroy a volume.'\n'profitbricks_volume_attachments:Attach or detach a volume.'\n'proxmox:management of instances in Proxmox VE cluster'\n'proxmox_template:management of OS templates in Proxmox VE cluster'\n'puppet:Runs puppet'\n'pushbullet:Sends notifications to Pushbullet'\n'pushover:Send notifications via https'\n'quantum_floating_ip(D):Add/Remove floating IP from an instance'\n'quantum_floating_ip_associate(D):Associate or disassociate a particular floating IP with an instance'\n'quantum_network(D):Creates/Removes networks from OpenStack'\n'quantum_router(D):Create or Remove router from openstack'\n'quantum_router_gateway(D):set/unset a gateway interface for the router with the specified external network'\n'quantum_router_interface(D):Attach/Dettach a subnet’s interface to a router'\n'quantum_subnet(D):Add/remove subnet from a network'\n'rabbitmq_binding:This module manages rabbitMQ bindings'\n'rabbitmq_exchange:This module manages rabbitMQ exchanges'\n'rabbitmq_parameter:Adds or removes parameters to RabbitMQ'\n'rabbitmq_plugin:Adds or removes plugins to RabbitMQ'\n'rabbitmq_policy:Manage the state of policies in RabbitMQ.'\n'rabbitmq_queue:This module manages rabbitMQ queues'\n'rabbitmq_user:Adds or removes users to RabbitMQ'\n'rabbitmq_vhost:Manage the state of a virtual host in RabbitMQ'\n'raw:Executes a low-down and dirty SSH command'\n'rax:create / delete an instance in Rackspace Public Cloud'\n'rax_cbs:Manipulate Rackspace Cloud Block Storage Volumes'\n'rax_cbs_attachments:Manipulate Rackspace Cloud Block Storage Volume Attachments'\n'rax_cdb:create/delete or resize a Rackspace Cloud Databases instance'\n'rax_cdb_database:create / delete a database in the Cloud Databases'\n'rax_cdb_user:create / delete a Rackspace Cloud Database'\n'rax_clb:create / delete a load balancer in Rackspace Public Cloud'\n'rax_clb_nodes:add, modify and remove nodes from a Rackspace Cloud Load Balancer'\n'rax_clb_ssl:Manage SSL termination for a Rackspace Cloud Load Balancer.'\n'rax_dns:Manage domains on Rackspace Cloud DNS'\n'rax_dns_record:Manage DNS records on Rackspace Cloud DNS'\n'rax_facts:Gather facts for Rackspace Cloud Servers'\n'rax_files:Manipulate Rackspace Cloud Files Containers'\n'rax_files_objects:Upload, download, and delete objects in Rackspace Cloud Files'\n'rax_identity:Load Rackspace Cloud Identity'\n'rax_keypair:Create a keypair for use with Rackspace Cloud Servers'\n'rax_meta:Manipulate metadata for Rackspace Cloud Servers'\n'rax_mon_alarm:Create or delete a Rackspace Cloud Monitoring alarm.'\n'rax_mon_check:Create or delete a Rackspace Cloud Monitoring check for an existing entity.'\n'rax_mon_entity:Create or delete a Rackspace Cloud Monitoring entity'\n'rax_mon_notification:Create or delete a Rackspace Cloud Monitoring notification.'\n'rax_mon_notification_plan:Create or delete a Rackspace Cloud Monitoring notification plan.'\n'rax_network:create / delete an isolated network in Rackspace Public Cloud'\n'rax_queue:create / delete a queue in Rackspace Public Cloud'\n'rax_scaling_group:Manipulate Rackspace Cloud Autoscale Groups'\n'rax_scaling_policy:Manipulate Rackspace Cloud Autoscale Scaling Policy'\n'rds:create, delete, or modify an Amazon rds instance'\n'rds_param_group:manage RDS parameter groups'\n'rds_subnet_group:manage RDS database subnet groups'\n'redhat_subscription:Manage Red Hat Network registration and subscriptions using the ``subscription-manager`` command'\n'redis:Various redis commands, slave and flush'\n'replace:Replace all instances of a particular string in a file using a back-referenced regular expression.'\n'rhn_channel:Adds or removes Red Hat software channels'\n'rhn_register:Manage Red Hat Network registration using the ``rhnreg_ks`` command'\n'riak:This module handles some common Riak operations'\n'rollbar_deployment:Notify Rollbar about app deployments'\n'route53:add or delete entries in Amazons Route53 DNS service'\n'route53_facts:Retrieves route53 details using AWS methods'\n'route53_health_check:add or delete health-checks in Amazons Route53 DNS service'\n'route53_zone:add or delete Route53 zones'\n'rpm_key:Adds or removes a gpg key from the rpm db'\n's3:manage objects in S3.'\n's3_bucket:Manage s3 buckets in AWS'\n's3_lifecycle:Manage s3 bucket lifecycle rules in AWS'\n's3_logging:Manage logging facility of an s3 bucket in AWS'\n'script:Runs a local script on a remote node after transferring it'\n'seboolean:Toggles SELinux booleans.'\n'selinux:Change policy and state of SELinux'\n'selinux_permissive:Change permissive domain in SELinux policy'\n'sendgrid:Sends an email with the SendGrid API'\n'sensu_check:Manage Sensu checks'\n'seport:Manages SELinux network port type definitions'\n'service:Manage services.'\n'set_fact:Set host facts from a task'\n'setup:Gathers facts about remote hosts'\n'shell:Execute commands in nodes.'\n'slack:Send Slack notifications'\n'slackpkg:Package manager for Slackware >= 12.2'\n'slurp:Slurps a file from remote nodes'\n'snmp_facts:Retrieve facts for a device using SNMP.'\n'sns:Send Amazon Simple Notification Service (SNS) messages'\n'sns_topic:Manages AWS SNS topics and subscriptions'\n'solaris_zone:Manage Solaris zones'\n'sqs_queue:Creates or deletes AWS SQS queues.'\n'stackdriver:Send code deploy and annotation events to stackdriver'\n'stat:retrieve file or file system status'\n'sts_assume_role:Assume a role using AWS Security Token Service and obtain temporary credentials'\n'subversion:Deploys a subversion repository.'\n'supervisorctl:Manage the state of a program or group of programs running via supervisord'\n'svc:Manage daemontools services.'\n'svr4pkg:Manage Solaris SVR4 packages'\n'swdepot:Manage packages with swdepot package manager (HP-UX)'\n'synchronize:Uses rsync to make synchronizing file paths in your playbooks quick and easy.'\n'sysctl:Manage entries in sysctl.conf.'\n'taiga_issue:Creates/deletes an issue in a Taiga Project Management Platform'\n'template:Templates a file out to a remote server.'\n'twilio:Sends a text message to a mobile phone through Twilio.'\n'typetalk:Send a message to typetalk'\n'ufw:Manage firewall with UFW'\n'unarchive:Unpacks an archive after (optionally) copying it from the local machine.'\n'uptimerobot:Pause and start Uptime Robot monitoring'\n'uri:Interacts with webservices'\n'urpmi:Urpmi manager'\n'user:Manage user accounts'\n'vca_fw:add remove firewall rules in a gateway in a vca'\n'vca_nat:add remove nat rules in a gateway in a vca'\n'vca_vapp:Manages vCloud Air vApp instances.'\n'vertica_configuration:Updates Vertica configuration parameters.'\n'vertica_facts:Gathers Vertica database facts.'\n'vertica_role:Adds or removes Vertica database roles and assigns roles to them.'\n'vertica_schema:Adds or removes Vertica database schema and roles.'\n'vertica_user:Adds or removes Vertica database users and assigns roles.'\n'virt:Manages virtual machines supported by libvirt'\n'virt_net:Manage libvirt network configuration'\n'virt_pool:Manage libvirt storage pools'\n'vmware_cluster:Create VMware vSphere Cluster'\n'vmware_datacenter:Manage VMware vSphere Datacenters'\n'vmware_dns_config:Manage VMware ESXi DNS Configuration'\n'vmware_dvs_host:Add or remove a host from distributed virtual switch'\n'vmware_dvs_portgroup:Create or remove a Distributed vSwitch portgroup'\n'vmware_dvswitch:Create or remove a distributed vSwitch'\n'vmware_host:Add/remove ESXi host to/from vCenter'\n'vmware_migrate_vmk:Migrate a VMK interface from VSS to VDS'\n'vmware_portgroup:Create a VMware portgroup'\n'vmware_target_canonical_facts:Return canonical (NAA) from an ESXi host'\n'vmware_vm_facts:Return basic facts pertaining to a vSphere virtual machine guest'\n'vmware_vm_shell:Execute a process in VM'\n'vmware_vm_vss_dvs_migrate:Migrates a virtual machine from a standard vswitch to distributed'\n'vmware_vmkernel:Create a VMware VMkernel Interface'\n'vmware_vmkernel_ip_config:Configure the VMkernel IP Address'\n'vmware_vsan_cluster:Configure VSAN clustering on an ESXi host'\n'vmware_vswitch:Add a VMware Standard Switch to an ESXi host'\n'vsphere_copy:Copy a file to a vCenter datastore'\n'vsphere_guest:Create/delete/manage a guest VM through VMware vSphere.'\n'wait_for:Waits for a condition before continuing.'\n'webfaction_app:Add or remove applications on a Webfaction host'\n'webfaction_db:Add or remove a database on Webfaction'\n'webfaction_domain:Add or remove domains and subdomains on Webfaction'\n'webfaction_mailbox:Add or remove mailboxes on Webfaction'\n'webfaction_site:Add or remove a website on a Webfaction host'\n'win_acl:Set file/directory permissions for a system user or group.'\n'win_chocolatey:Installs packages using chocolatey'\n'win_copy:Copies files to remote locations on windows hosts.'\n'win_dotnet_ngen:Runs ngen to recompile DLLs after .NET updates'\n'win_environment:Modifies environment variables on windows hosts.'\n'win_feature:Installs and uninstalls Windows Features'\n'win_file:Creates, touches or removes files or directories.'\n'win_file_version:Get DLL or EXE file build version'\n'win_firewall_rule:Windows firewall automation'\n'win_get_url:Fetches a file from a given URL'\n'win_group:Add and remove local groups'\n'win_iis_virtualdirectory:Configures a virtual directory in IIS.'\n'win_iis_webapplication:Configures a IIS Web application.'\n'win_iis_webapppool:Configures a IIS Web Application Pool.'\n'win_iis_webbinding:Configures a IIS Web site.'\n'win_iis_website:Configures a IIS Web site.'\n'win_lineinfile:Ensure a particular line is in a file, or replace an existing line using a back-referenced regular expression.'\n'win_msi:Installs and uninstalls Windows MSI files'\n'win_nssm:NSSM '\n'win_package:Installs/Uninstalls a installable package, either from local file system or url'\n'win_ping:A windows version of the classic ping module.'\n'win_regedit:Add, Edit, or Remove Registry Keys and Values'\n'win_regmerge:Merges the contents of a registry file into the windows registry'\n'win_scheduled_task:Manage scheduled tasks'\n'win_service:Manages Windows services'\n'win_share:Manage Windows shares'\n'win_stat:returns information about a Windows file'\n'win_template:Templates a file out to a remote server.'\n'win_timezone:Sets Windows machine timezone'\n'win_unzip:Unzips compressed files and archives on the Windows node'\n'win_updates:Download and install Windows updates'\n'win_uri:Interacts with webservices.'\n'win_user:Manages local Windows user accounts'\n'win_webpicmd:Installs packages using Web Platform Installer command-line'\n'xattr:set/retrieve extended attributes'\n'xenserver_facts:get facts reported on xenserver'\n'yum:Manages packages with the *yum* package manager'\n'yum_repository:Add and remove YUM repositories'\n'zabbix_group:Zabbix host groups creates/deletes'\n'zabbix_host:Zabbix host creates/updates/deletes'\n'zabbix_hostmacro:Zabbix host macro creates/updates/deletes'\n'zabbix_maintenance:Create Zabbix maintenance windows'\n'zabbix_screen:Zabbix screen creates/updates/deletes'\n'zfs:Manage zfs'\n'znode:Create, delete, retrieve, and update znodes using ZooKeeper.'\n'zypper:Manage packages on SUSE and openSUSE'\n'zypper_repository:Add and remove Zypper repositories'\n)\n\n\n_ansible ()\n{\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  _arguments -C -W \\\n    '1:pattern:->pattern'\\\n    \"(-a --args)\"{-a,--args}\"[ARGS module arguments]:arguments:(ARG)\"\\\n    '--ask-become-pass[ask for privilege escalation password]'\\\n    \"(-k --ask-pass)\"{-k,--ask-pass}\"[ask for connection password]\"\\\n    '--ask-su-pass[ask for su password (deprecated, use become)]'\\\n    \"(-K --ask-sudo-pass)\"{-K,--ask-sudo-pass}\"[ask for sudo password (deprecated, use become)]\"\\\n    '--ask-vault-pass[ask for vault password]'\\\n    \"(-B --background)\"{-B,--background}\"[DURATION run asynchronously for DURATION (s)]:duration:(DURATION)\"\\\n    \"(-b --become)\"{-b,--become}\"[run operations with become (nopasswd implied)]\"\\\n    '--become-method[privilege escalation method to use (default=sudo)]:method:(sudo su pbrun pfexec runas doas)'\\\n    '--become-user[run operations as this user (default=root)]:user:(USER)'\\\n    \"(-C --check)\"{-C,--check}\"[don't make any changes]\"\\\n    \"(-c --connection)\"{-c,--connection}\"[CONNECTION connection type to use (default=smart)]:connection type:(smart ssh local chroot)\"\\\n    \"(-D --diff)\"{-D,--diff}\"[show differences when changing (small) files and templates]\"\\\n    \"(-e --extra-vars)\"{-e,--extra-vars}\"[set additional variables as key=value or YAML/JSON]\"\\\n    \"(-f --forks)\"{-f,--forks}\"[FORKS number of parallel processes to use (default=5)]:forks:(5)\"\\\n    \"(-h --help)\"{-h,--help}\"[help message]\"\\\n    \"(-i --inventory-file)\"{-i,--inventory-file}\"[INVENTORY specify inventory host file]:inventory file:_files\"\\\n    \"(-l --limit)\"{-l,--limit}\"[SUBSET further limit selected hosts to an additional pattern]:subset pattern:->pattern\"\\\n    '--list-hosts[outputs a list of matching hosts. Does not execute anything else]'\\\n    \"(-m --module-name)\"{-m,--module-name}\"[MODULE_NAME module name (default=command)]:module name:->module\"\\\n    \"(-M --module-path)\"{-M,--module-path}\"[MODULE_PATH specify path to module library (default=None)]:module path:_files -/\"\\\n    '--new-vault-password-file[new vault password file for rekey]:new vault password file:_files'\\\n    \"(-o --one-line)\"{-o,--one-line}\"[condense output]\"\\\n    '--output[output file name for encrypt or decrypt; use - for stdout]:output file:_files'\\\n    \"(-P --poll)\"{-P,--poll}\"[POLL_INTERVAL set the poll interval (s) if using -B (default=15)]:poll interval:(15)\"\\\n    '--private-key[PRIVATE_KEY_FILE use this file to authenticate the connection]:private key file:_files'\\\n    '--scp-extra-args[specify extra arguments to pass to scp only]'\\\n    '--sftp-extra-args[specify extra arguments to pass to sftp only]'\\\n    '--ssh-common-args[specify common arguments to pass to sftp/scp/ssh]'\\\n    '--ssh-extra-args[specify extra arguments to pass to ssh only]'\\\n    \"(-S --su)\"{-S,--su}\"[run operations with su (deprecated, use become)]\"\\\n    \"(-R --su-user)\"{-R,--su-user}\"[SU_USER run operations with su as this user (default=root) (deprecated, use become)]:su user:(root)\"\\\n    \"(-s --sudo)\"{-s,--sudo}\"[run operations with sudo (nopasswd) (deprecated, use become)]\"\\\n    \"(-U --sudo-user)\"{-U,--sudo-user}\"[SUDO_USER desired sudo user (default=root) (deprecated, use become)]:su user:(root)\"\\\n    '--syntax-check[perform a syntax check on the playbook, but do not execute it]'\\\n    \"(-T --timeout)\"{-T,--timeout}\"[TIMEOUT override the SSH timeout (s) (default=10)]:ssh timeout:(10)\"\\\n    \"(-t --tree)\"{-t,--tree}\"[OUTPUT_DIRECTORY log output to this directory]:output directory:_files -/\"\\\n    \"(-u --user)\"{-u,--user}\"[REMOTE_USER connect as this user (default=${USER})]:connect as user:(${USER})\"\\\n    \"--vault-password-file[VAULT_PASSWORD_FILE vault password file]:vault password file:_files\"\\\n    \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\"\\\n    \"--version[show program's version number and exit]\"\\\n\n  case $state in\n    pattern)\n      _arguments '*:feature:__host_list'\n      _arguments '*:feature:__group_list'\n      ;;\n    module)\n      _describe -t commands \"modules\" _modules\n      ;;\n  esac\n}\n\n_ansible \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ansible-galaxy",
    "content": "#compdef ansible-galaxy\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ansible-galaxy v2.0.0.2 (http://ansible.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Romain Bossart (https://github.com/bosr)\n#  * Adam Stevko (https://github.com/xen0l)\n#\n# ------------------------------------------------------------------------------\n#\n# Note: I tried to use `_arguments --`, but the output of `ansible --help`\n# is not parsed entirely correctly, and anyway no modules or host would available.\n#\n\n# ansible-galaxy zsh completion\n#\n_ansible-galaxy ()\n{\n  local context curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  _arguments -C \\\n    \"1:command:(delete import info init install list login remove search setup)\" \\\n    \"*::option:->option\"\n\n  case $state in\n    option)\n      case $line[1] in\n        delete)\n         _arguments \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":github_user:(GITHUB_USER)\" \\\n            \":github_repo:(GITHUB_REPO)\"\n          ;;\n        import)\n         _arguments \\\n            \"--branch[REFERENCE The name of a branch to import.]:reference:(master)\" \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"--no-wait[Don't wait for import results.]\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"--status[Check the status of the most recent import request forgiven github_user/github_repo.]\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":github_user:(GITHUB_USER)\" \\\n            \":github_repo:(GITHUB_REPO)\"\n          ;;\n        info)\n          _arguments \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"(-p --roles-path)\"{-p,--roles-path}\"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":role name:(ROLE,version)\"\n          ;;\n        init)\n          _arguments \\\n            \"(-f --force)\"{-f,--force}\"[ Force overwriting an existing role]\" \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"(-p --init-path)\"{-p,--init-path}\"[INIT_PATH path in which the skeleton role will be created (default=./)]:init path:(./)\" \\\n            \"(--offline)--offline[Don't query the galaxy API when creating roles]\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":role name:(ROLE)\"\n          ;;\n        install)\n          _arguments \\\n            \"(-f --force)\"{-f,--force}\"[Force overwriting an existing role]\" \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"(-i --ignore-errors)\"{-i,--ignore-errors}\"[Ignore errors and continue with the next specified role]\" \\\n            \"(-n --no-deps)\"{-n,--no-deps}\"[Don't download roles listed as dependencies]\" \\\n            \"(-r --role-file)\"{-r,--role-file}\"[ROLE_FILE A file containing a list of roles to be imported]:role file:_files\" \\\n            \"(-p --roles-path)\"{-p,--roles-path}\"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":role name:(ROLE)\"\n          ;;\n        list)\n          _arguments \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-p --roles-path)\"{-p,--roles-path}\"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":role name:(ROLE)\"\n          ;;\n        login)\n          _arguments \\\n            \"--github_token[TOKEN Identify with github token rather than username and password.]:token:(TOKEN)\" \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\"\n          ;;\n        remove)\n          _arguments \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-p --roles-path)\"{-p,--roles-path}\"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \"*:role name:(ROLE)\"\n          ;;\n        search)\n          _arguments \\\n            \"--author[AUTHOR GitHub username]:author:(AUTHOR)\" \\\n            \"--galaxy-tags[TAGS list of galaxy tags to filter by]:tags:(TAGS)\" \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"--platforms[PLATFORMS list of OS platforms to filter by\" \\\n            \"(-p --roles-path)\"{-p,--roles-path}\"[ROLES_PATH The path to the directory containing your roles (default: from ansible.cfg)]:roles path:_files -/\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\"\n          ;;\n        setup)\n          _arguments \\\n            \"(-h --help)\"{-h,--help}\"[help message]\" \\\n            \"(-c --ignore-certs)\"{-c,--ignore-certs}\"[Ignore SSL certificate validation errors.]\" \\\n            \"--list[List all of your integrations.]\" \\\n            \"--remove[REMOVE_ID Remove the integration matching the provided ID value.]:id:(REMOVE_ID)\" \\\n            \"(-s --server)\"{-s,--server}\"[API_SERVER The API server destination]:api server:(http://apiserver)\" \\\n            \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\" \\\n            \"--version[show program's version number and exit]\" \\\n            \":source:(travis)\" \\\n            \":github_user:(GITHUB_USER)\" \\\n            \":github_repo:(GITHUB_REPO)\" \\\n            \":secret:(SECRET)\"\n          ;;\n      esac\n      ;;\n  esac\n}\n\n_ansible-galaxy \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ansible-playbook",
    "content": "#compdef ansible-playbook\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ansible-playbook v2.0.0.2 (http://ansible.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Romain Bossart (https://github.com/bosr)\n#  * Adam Stevko (https://github.com/xen0l)\n#\n# ------------------------------------------------------------------------------\n#\n# Needs either ANSIBLE_HOSTS or /etc/ansible/hosts on linux\n# (or /usr/local/etc/ansible/hosts on macOS)\n#\n# Note 1: the following gist (https://gist.github.com/15ed54a438a36d67fd99.git)\n# has some files to help improve the hostfile shell parsing\n#\n# Note 2: I tried to use `_arguments --`, but the output of `ansible --help`\n# is not parsed entirely correctly, and anyway no modules or host would available.\n#\n\n# ansible-playbook zsh completion\n#\n__host_file_location () {\n  # find the location of the host file:\n  # 1. check $ANSIBLE_HOSTS\n  # 2. else check /etc/ansible/hosts or /usr/local/etc/...\n  #    (depending on platform)\n  #\n\n  [[ \"$OSTYPE\" == darwin* ]] && FALLBACK=\"/usr/local/etc/ansible/hosts\"\n  [[ \"$OSTYPE\" == linux* ]] && FALLBACK=\"/etc/ansible/hosts\"\n  HOST_FILE=${ANSIBLE_HOSTS:=${FALLBACK}}\n  [[ -f ${HOST_FILE} ]] || HOST_FILE=\"$PWD/ansible/inventory/hosts\"\n  [[ -f ${HOST_FILE} ]] || HOST_FILE=/dev/null\n\n  echo ${HOST_FILE}\n}\n\n__ll_group_list () {\n  # parses the ini hostfile for groups only: [...]\n  HOST_FILE=$(__host_file_location)\n\n  local -a group_list\n  group_list=$(command \\\n      cat ${HOST_FILE} \\\n      | awk '$1 ~ /^\\[.*\\]$/ && !/=/ && !/:vars/ \\\n        { gsub(/[\\[\\]]/, \"\", $1); gsub(/:children/, \"\", $1) ; print $1 }' \\\n      | uniq )\n\n  echo ${group_list}\n}\n\n\n__host_list ()\n{\n  # parses the ini hostfile for hosts only\n  # but then has to remove all group occurrences\n  HOST_FILE=$(__host_file_location)\n\n  # this will also contain groups if they are referenced in other groups\n  local -a mixed_host_list\n  mixed_host_list=$(command \\\n    cat ${HOST_FILE} \\\n    | awk 'NF && $1 !~ /[\\[:=]/ { print $1 }' \\\n    | sort | uniq)\n\n  # compute set difference h1 - h2\n  local -a h1 h2 host_list\n  h1=${mixed_host_list}\n  h2=$(__ll_group_list)\n  host_list=($(command \\\n    sort <(echo $h1) <(echo $h2) <(echo $h2) \\\n    | uniq -u \\\n    | paste -s -d ' ' - )\n  )\n\n  _wanted application expl 'hosts' compadd ${host_list}\n\n  # method that delegates to ansible (slow)\n  # _wanted application expl 'hosts' compadd $(command ansible \\\n  #                                             all --list-hosts\\\n  #                                             2>/dev/null)\n}\n\n__group_list ()\n{\n  gl=($(command echo $(__ll_group_list) | paste -s -d ' ' - )) # 'a\\nb\\nc' -> (a b c)\n  _wanted application2 expl 'groups' compadd $gl\n}\n\n\n\n_ansible-playbook ()\n{\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  _arguments -C -W \\\n    \"1:playbook yml file:_files -g '*.yml|*.yaml'\"\\\n    '--ask-become-pass[ask for privilege escalation password]'\\\n    \"(-k --ask-pass)\"{-k,--ask-pass}\"[ask for connection password]\"\\\n    '--ask-su-pass[ask for su password (deprecated, use become)]'\\\n    \"(-K --ask-sudo-pass)\"{-K,--ask-sudo-pass}\"[ask for sudo password (deprecated, use become)]\"\\\n    '--ask-vault-pass[ask for vault password]'\\\n    \"(-b --become)\"{-b,--become}\"[run operations with become (nopasswd implied)]\"\\\n    '--become-method[privilege escalation method to use (default=sudo)]:method:(sudo su pbrun pfexec runas doas)'\\\n    '--become-user[run operations as this user (default=root)]:user:(USER)'\\\n    \"(-C --check)\"{-C,--check}\"[don't make any changes]\"\\\n    \"(-c --connection)\"{-c,--connection}\"[CONNECTION connection type to use (default=smart)]:connection type:(smart ssh local chroot)\"\\\n    \"(-D --diff)\"{-D,--diff}\"[when changing (small files and templates, show the diff in those. Works great with --check)]\"\\\n    \"(-e --extra-vars)\"{-e,--extra-vars}\"[EXTRA_VARS set additional variables as key=value or YAML/JSON]:extra vars:(EXTRA_VARS)\"\\\n    '--flush-cache[clear the fact cache]'\\\n    '--force-handlers[run handlers even if a task fails]'\\\n    \"(-f --forks)\"{-f,--forks}\"[FORKS number of parallel processes to use (default=5)]:forks:(5)\"\\\n    \"(-h --help)\"{-h,--help}\"[help message]\"\\\n    \"(-i --inventory-file)\"{-i,--inventory-file}\"[INVENTORY specify inventory host file]:inventory file:_files\"\\\n    \"(-l --limit)\"{-l,--limit}\"[SUBSET further limit selected hosts to an additional pattern]:subset pattern:->pattern\"\\\n    '--list-hosts[outputs a list of matching hosts. Does not execute anything else]'\\\n    '--list-tags[list all available tags]'\\\n    '--list-tasks[list all tasks that would be executed]'\\\n    \"(-M --module-path)\"{-M,--module-path}\"[MODULE_PATH specify path to module library (default=None)]:module path:_files -/\"\\\n    '--new-vault-password-file[new vault password file for rekey]:new vault password file:_files'\\\n    '--output[output file name for encrypt or decrypt; use - for stdout]:output file:_files'\\\n    '--private-key[PRIVATE_KEY_FILE use this file to authenticate the connection]:private key file:_files'\\\n    '--scp-extra-args[specify extra arguments to pass to scp only]'\\\n    '--sftp-extra-args[specify extra arguments to pass to sftp only]'\\\n    \"--skip-tags[SKIP_TAGS only run plays and tasks whose tags do not match these values]:skip tags:(SKIP_TAGS)\"\\\n    '--ssh-common-args[specify common arguments to pass to sftp/scp/ssh]'\\\n    '--ssh-extra-args[specify extra arguments to pass to ssh only]'\\\n    \"--start-at-task[START_AT start the playbook at the task matching this name]:name:(TASK_NAME)\"\\\n    '--step[one-step-at-a-time: confirm each task before running]'\\\n    \"(-S --su)\"{-S,--su}\"[run operations with su (deprecated, use become)]\"\\\n    \"(-R --su-user)\"{-R,--su-user}\"[SU_USER run operations with su as this user (default=root) (deprecated, use become)]:su user:(root)\"\\\n    \"(-s --sudo)\"{-s,--sudo}\"[run operations with sudo (nopasswd) (deprecated, use become)]\"\\\n    \"(-U --sudo-user)\"{-U,--sudo-user}\"[SUDO_USER desired sudo user (default=root) (deprecated, use become)]:su user:(root)\"\\\n    '--syntax-check[perform a syntax check on the playbook, but do not execute it]'\\\n    \"(-t --tags)\"{-t,--tags}\"[TAGS only run plays and tasks gagged with these values]:task tags:(TAGS)\"\\\n    \"(-T --timeout)\"{-T,--timeout}\"[TIMEOUT override the SSH timeout (s) (default=10)]:ssh timeout:(10)\"\\\n    \"(-u --user)\"{-u,--user}\"[REMOTE_USER connect as this user (default=${USER})]:connect as user:(${USER})\"\\\n    \"--vault-password-file[VAULT_PASSWORD_FILE vault password file]:vault password file:_files\"\\\n    \"(-v --verbose)\"{-v,--verbose}\"[verbose mode (-vvv for more, -vvvv to enable connection debugging)]\"\\\n    \"--version[show program's version number and exit]\"\\\n\n  case $state in\n    pattern)\n      _arguments '*:feature:__host_list'\n      _arguments '*:feature:__group_list'\n      ;;\n  esac\n}\n\n_ansible-playbook \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ansible-vault",
    "content": "#compdef ansible-vault\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ansible v1.9.2 (http://ansible.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Rick van Hattem (https://github.com/wolph)\n#\n# ------------------------------------------------------------------------------\n#\n\n_ansible-vault-commands() {\n  local -a commands\n  \n  commands=(\n    'create:Create new encrypted file'\n    'decrypt:Decrypt encrypted file'\n    'edit:Edit encrypted file'\n    'encrypt:Encrypt unencrypted file'\n    'rekey:Change password for encrypted file'\n    'view:View encrypted file'\n  )\n  \n  _arguments -s : $nul_args && ret=0\n  _describe -t commands 'ansible-vault command' commands && ret=0\n}\n\n_ansible-vault-command(){\n  args=(\n    '--debug[enable debugging]' \\\n    '--vault-password-file[vault password file]:password_file:_files'\n    $nul_args\n    \"1::file_name:_files\"\n  )\n  _arguments -s : $args && ret=0\n}\n\n_ansible-vault() {\n  local -a nul_args\n  nul_args=(\n    '(-h --help)'{-h,--help}'[show help message and exit.]'\n  )\n  \n  local curcontext=$curcontext ret=1\n  \n  if ((CURRENT == 2)); then\n    _ansible-vault-commands\n  else\n    shift words\n    (( CURRENT -- ))\n    curcontext=\"${curcontext%:*:*}:ansible-vault-$words[1]:\"\n    _call_function ret _ansible-vault-command\n  fi\n}\n\n_ansible-vault \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_archlinux-java",
    "content": "#compdef archlinux-java\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for archlinux-java a tool for selecting default Java runtime (https://wiki.archlinux.org/index.php/java).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_archlinux-java_command_arguments() {\n  case $words[1] in\n    (set)\n      local java_versions=(\"${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}\")\n      _describe -t output 'Downloads to delete' java_versions\n    ;;\n  esac\n}\n\n_archlinux-java() {\n  local -a commands\n\n  commands=(\n    \"status:List installed Java environments and enabled one\"\n    \"get:Return the short name of the Java environment set as default\"\n    \"set:Force <JAVA_ENV> as default\"\n    \"unset:Unset current default Java environment\"\n    \"fix:Fix an invalid/broken default Java environment configuration\"\n    \"help:Show help\"\n  )\n\n  _arguments -C \\\n    '1:cmd:->cmds' \\\n    '*:: :->args' \\\n\n  case \"$state\" in\n    (cmds)\n      _describe -t commands 'commands' commands\n      ;;\n    (*)\n      _archlinux-java_command_arguments\n      ;;\n  esac\n}\n\n_archlinux-java\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_artisan",
    "content": "#compdef artisan\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for artisan (http://laravel.com/docs/artisan).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * loranger (https://github.com/loranger)\n#  * Yohan Tambè (https://github.com/Cronos87)\n#\n# ------------------------------------------------------------------------------\n\n\n_artisan_get_command_list () {\n    IFS=\" \"\n    php artisan --no-ansi | \\\n        sed \"1,/Available commands/d\" | \\\n        awk '/ [a-z]+/ { print $1 }' | \\\n        sed -E 's/^[ ]+//g' | \\\n        sed -E 's/[:]+/\\\\:/g' | \\\n        sed -E 's/[ ]{2,}/\\:/g'\n}\n\n_artisan () {\n    if [ -f artisan ]; then\n        local -a commands\n        IFS=$'\\n'\n        commands=(`_artisan_get_command_list`)\n        _describe 'commands' commands\n    fi\n}\n\ncompdef _artisan php artisan\ncompdef _artisan artisan\n"
  },
  {
    "path": ".config/zsh/completions/src/_atach",
    "content": "#compdef atach\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for atach (https://github.com/sorin-ionescu/atach).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Sorin Ionescu <sorin.ionescu@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal state mode_values existing_sessions ret=1\n\nmode_values=(\n  \"none:disable redrawing\"\n  \"ctrl_l:use ctrl + l to redraw\"\n  \"winch:use sigwinch to redraw\"\n)\n\nexisting_sessions=($(_call_program session atach))\n\n_arguments -C -s -S \\\n  '(--list -l)'{--list,-l}'[list sessions]' \\\n  '(--sockets -L)'{--sockets,-L}'[list sockets]' \\\n  '(--session -s)'{--session=,-s+}'[set the session name]:session' \\\n  '(--char -c)'{--char=,-c+}'[set the detach character (default: ^\\\\)]:char' \\\n  '(--redraw -r)'{--redraw=,-r+}'[set the redraw method (none, ctrl_l, or winch)]:mode:->mode' \\\n  '(--detached -d)'{--detached,-d}'[start the session detached]' \\\n  '(--no-detach -D)'{--no-detach,-D}'[disable detaching]' \\\n  '(--no-suspend -Z)'{--no-suspend,-Z}'[disable suspending]' \\\n  '(--version -v)'{--version,-v}'[display version and copyright]' \\\n  '(--help -h)'{--help,-h}'[display help]' \\\n  '(-)::args:->session-or-command' && ret=0\n\ncase \"$state\" in\n  (mode)\n    _describe -t mode 'redraw mode' mode_values && ret=0\n  ;;\n  (session-or-command)\n    _describe -t 'session' 'sessions' existing_sessions && ret=0\n    _path_commands && ret=0\n  ;;\nesac\n\nreturn $ret\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_bitcoin-cli",
    "content": "#compdef bitcoin-cli\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for bitcoin-cli (https://bitcoin.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Ian Ker-Seymer (https://github.com/ianks)\n#\n# ------------------------------------------------------------------------------\n\n_bitcoin-cli() {\n  local context state line curcontext=\"$curcontext\"\n\n  _arguments -C \\\n    -?'[This help message]' \\\n    -conf='[Specify configuration file (default: bitcoin.conf)]:PATH:_files' \\\n    -datadir='[Specify data directory]:PATH:_directories' \\\n    -testnet'[Use the test chain]' \\\n    -regtest'[Enter  regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.]' \\\n    -named'[Pass named instead of positional arguments (default: false)]' \\\n    -stdin'[Read  extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases)]' \\\n    -rpcport='[Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)]: :_guard \"[[\\:digit\\:]]#\" \"PORT\"' \\\n    -rpcwait'[Wait for RPC server to start]' \\\n    -rpcuser='[Username for JSON-RPC connections]:RPCUSER:()' \\\n    -rpcpassword='[Password for JSON-RPC connections]:RPCPASSWORD:()' \\\n    -rpcconnect='[Send commands to node running on <ip> (default: 127.0.0.1)]:RPCCONNECT:_hosts' \\\n    -rpcclienttimeout='[Timeout during HTTP requests (default: 900)]: :_guard \"[[\\:digit\\:]]#\" \"RPCCLIENTTIMEOUT\"' \\\n    ':subcommand:->subcommand' && ret=0\n\n  case $state in\n    subcommand)\n    subcommands=(\n      'getbestblockhash'\n      'getblock'\n      'getblockchaininfo'\n      'getblockcount'\n      'getblockhash'\n      'getblockheader'\n      'getchaintips'\n      'getdifficulty'\n      'getmempoolancestors'\n      'getmempooldescendants'\n      'getmempoolentry'\n      'getmempoolinfo'\n      'getrawmempool'\n      'gettxout'\n      'gettxoutproof'\n      'gettxoutsetinfo'\n      'preciousblock'\n      'pruneblockchain'\n      'verifychain'\n      'verifytxoutproof'\n      'getinfo'\n      'getmemoryinfo'\n      'help'\n      'stop'\n      'generate'\n      'generatetoaddress'\n      'getblocktemplate'\n      'getmininginfo'\n      'getnetworkhashps'\n      'prioritisetransaction'\n      'submitblock'\n      'addnode'\n      'clearbanned'\n      'disconnectnode'\n      'getaddednodeinfo'\n      'getconnectioncount'\n      'getnettotals'\n      'getnetworkinfo'\n      'getpeerinfo'\n      'listbanned'\n      'ping'\n      'setban'\n      'setnetworkactive'\n      'createrawtransaction'\n      'decoderawtransaction'\n      'decodescript'\n      'fundrawtransaction'\n      'getrawtransaction'\n      'sendrawtransaction'\n      'signrawtransaction'\n      'createmultisig'\n      'estimatefee'\n      'estimatepriority'\n      'estimatesmartfee'\n      'estimatesmartpriority'\n      'signmessagewithprivkey'\n      'validateaddress'\n      'verifymessage'\n      'abandontransaction'\n      'addmultisigaddress'\n      'addwitnessaddress'\n      'backupwallet'\n      'bumpfee'\n      'dumpprivkey'\n      'dumpwallet'\n      'getaccount'\n      'getaccountaddress'\n      'getaddressesbyaccount'\n      'getbalance'\n      'getnewaddress'\n      'getrawchangeaddress'\n      'getreceivedbyaccount'\n      'getreceivedbyaddress'\n      'gettransaction'\n      'getunconfirmedbalance'\n      'getwalletinfo'\n      'importaddress'\n      'importmulti'\n      'importprivkey'\n      'importprunedfunds'\n      'importpubkey'\n      'importwallet'\n      'keypoolrefill'\n      'listaccounts'\n      'listaddressgroupings'\n      'listlockunspent'\n      'listreceivedbyaccount'\n      'listreceivedbyaddress'\n      'listsinceblock'\n      'listtransactions'\n      'listunspent'\n      'lockunspent'\n      'move'\n      'removeprunedfunds'\n      'sendfrom'\n      'sendmany'\n      'sendtoaddress'\n      'setaccount'\n      'settxfee'\n      'signmessage'\n      'walletlock'\n      'walletpassphrase'\n      'walletpassphrasechange'\n    )\n\n    _describe -t subcommands 'bitcoin-cli subcommands' subcommands && ret=0\n  esac\n\n  return ret\n}\n\n_bitcoin-cli \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_bower",
    "content": "#compdef bower\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Bower (http://bower.io).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Joe Lencioni (https://github.com/lencioni)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal curcontext=\"$curcontext\" state line _opts ret=1\n\n_arguments -C \\\n  '(- 1 *)'{-v,--version}'[display version information]' \\\n  '1: :->cmds' \\\n  '*:: :->args' && ret=0\n\ncase $state in\n  cmds)\n    _values \"bower command\" \\\n      \"cache[manage bower cache]\" \\\n      \"help[display help information about Bower]\" \\\n      \"home[opens a package homepage into your favorite browser]\" \\\n      \"info[info of a particular package]\" \\\n      \"init[interactively create a bower.json file]\" \\\n      \"install[install a package locally]\" \\\n      \"link[symlink a package folder]\" \\\n      \"list[list local packages - and possible updates]\" \\\n      \"login[authenticate with GitHub and store credentials]\" \\\n      \"lookup[look up a package URL by name]\" \\\n      \"prune[removes local extraneous packages]\" \\\n      \"register[register a package]\" \\\n      \"search[search for a package by name]\" \\\n      \"update[update a local package]\" \\\n      \"uninstall[remove a local package]\" \\\n      \"unregister[remove a package from the registry]\" \\\n      \"version[bump a package version]\" && ret=0\n    _arguments \\\n      '(--force)--force[make various commands more forceful]' \\\n      '(--json)--json[output consumable JSON]' \\\n      '(--log-level)--log-level[what level of logs to report]' \\\n      \"(--offline)--offline[don't hit the network]\" \\\n      '(--quiet)--quiet[only output important information]' \\\n      \"(--silent)--silent[don't output anything, besides errors]\" \\\n      '(--verbose)--verbose[make output more verbose]' \\\n      '(--allow-root)--allow-root[allow running commands as root]' \\\n      '(--version)--version[output Bower version]' \\\n      '(--no-color)--no-color[disable colors]' && ret=0\n    ;;\n  args)\n    case $line[1] in\n      help)\n        _values 'commands' \\\n          'cache' \\\n          'home' \\\n          'info' \\\n          'init' \\\n          'install' \\\n          'link' \\\n          'list' \\\n          'login' \\\n          'lookup' \\\n          'prune' \\\n          'register' \\\n          'search' \\\n          'update' \\\n          'uninstall' \\\n          'unregister' \\\n          'version' && ret=0\n        ;;\n      (home|info|init|link|lookup|prune|register|search|unregister)\n        _arguments \\\n          '(--help)--help[show help message]' && ret=0\n        ;;\n      install)\n        _arguments \\\n          '(--force-latest)--force-latest[force latest version on conflict]' \\\n          '(--help)--help[show help message]' \\\n          \"(--production)--production[don't install project devDependencies]\" \\\n          \"(--save)--save[save installed packages into the project's bower.json dependencies]\" \\\n          \"(--save-dev)--save-dev[save installed packages into the project's bower.json devDependencies]\" && ret=0\n        ;;\n      list)\n        _arguments \\\n          '(--help)--help[show help message]' \\\n          '(--paths)--paths[generate a simple JSON source mapping]' \\\n          '(--relative)--relative[make paths relative to the directory config property, which defaults to bower_components]' && ret=0\n        ;;\n      login)\n        _arguments \\\n          '(--help)--help[show help message]' \\\n          '(-t --token)'{-t,--token}'[Pass GitHub auth token (will not prompt for username/password)]' && ret=0\n        ;;\n      uninstall)\n        _arguments \\\n          '(--help)--help[show help message]' \\\n          \"(--save)--save[save installed packages into the project's bower.json dependencies]\" \\\n          \"(--save-dev)--save-dev[save installed packages into the project's bower.json devDependencies]\" && ret=0\n        ;;\n      update)\n        _arguments \\\n          '(--force-latest)--force-latest[force latest version on conflict]' \\\n          '(--help)--help[show help message]' \\\n          \"(--production)--production[don't install project devDependencies]\" && ret=0\n        ;;\n      version)\n        _arguments \\\n          '(--message)--message[custom git commit and tag message]' && ret=0\n        ;;\n      exec)\n        _normal && ret=0\n        ;;\n      *)\n        _opts=(  $(bower help $line[1] | sed -e '/^  \\[-/!d; s/^  \\[\\(-[^=]*\\)=.*/\\1/') )\n        _opts+=( $(bower help $line[1] | sed -e '/^  -/!d; s/^  \\(-.\\), \\[\\(-[^=]*\\)=.*/\\1 \\2/') )\n        if [[ $_opts != \"\" ]]; then\n          _values 'option' $_opts && ret=0\n        fi\n        ;;\n    esac\n    ;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_bundle",
    "content": "#compdef bundle\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Bundler (http://gembundler.com).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Bruno Michel (https://github.com/nono)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal curcontext=\"$curcontext\" state line _gems _opts ret=1\n\n_arguments -C -A \"-v\" -A \"--version\" \\\n\t'(- 1 *)'{-v,--version}'[display version information]' \\\n\t'1: :->cmds' \\\n\t'*:: :->args' && ret=0\n\ncase $state in\n\tcmds)\n\t\t_values \"bundle command\" \\\n\t\t\t\"install[Install the gems specified by the Gemfile or Gemfile.lock]\" \\\n\t\t\t\"update[Update dependencies to their latest versions]\" \\\n\t\t\t\"package[Package the .gem files required by your application]\" \\\n\t\t\t\"exec[Execute a script in the context of the current bundle]\" \\\n\t\t\t\"config[Specify and read configuration options for bundler]\" \\\n\t\t\t\"check[Determine whether the requirements for your application are installed]\" \\\n\t\t\t\"list[Show all of the gems in the current bundle]\" \\\n\t\t\t\"show[Show the source location of a particular gem in the bundle]\" \\\n\t\t\t\"console[Start an IRB session in the context of the current bundle]\" \\\n\t\t\t\"open[Open an installed gem in the editor]\" \\\n\t\t\t\"viz[Generate a visual representation of your dependencies]\" \\\n\t\t\t\"init[Generate a simple Gemfile, placed in the current directory]\" \\\n\t\t\t\"gem[Create a simple gem, suitable for development with bundler]\" \\\n\t\t\t\"help[Describe available tasks or one specific task]\" \\\n\t\t\t\"platform[Displays platform compatibility information]\" \\\n\t\t\t\"outdated[Show all of the outdated gems in the current bundle]\"\n\t\tret=0\n\t\t;;\n\targs)\n\t\tcase $line[1] in\n\t\t\thelp)\n\t\t\t\t_values 'commands' 'install' 'update' 'package' 'exec' 'config' 'check' 'list' 'show' 'console' 'open' 'viz' 'init' 'gem' 'help' 'platform' 'outdated' && ret=0\n\t\t\t\t;;\n\t\t\tinstall)\n\t\t\t\t_policies=('HighSecurity' 'MediumSecurity' 'LowSecurity' 'AlmostNoSecurity' 'NoSecurity')\n\t\t\t\t_arguments \\\n\t\t\t\t\t'(--no-color)--no-color[disable colorization in output]' \\\n\t\t\t\t\t'(--local)--local[do not attempt to connect to rubygems.org]' \\\n\t\t\t\t\t'(--quiet)--quiet[only output warnings and errors]' \\\n\t\t\t\t\t'(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \\\n\t\t\t\t\t'(--system)--system[install to the system location]' \\\n\t\t\t\t\t'(--deployment)--deployment[install using defaults tuned for deployment environments]' \\\n\t\t\t\t\t'(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \\\n\t\t\t\t\t'(--path)--path=-[specify a different path than the system default]:path:_files' \\\n\t\t\t\t\t'(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \\\n\t\t\t\t\t'(--without)--without=-[exclude gems that are part of the specified named group]:groups' \\\n\t\t\t\t\t'(--with)--with=-[include gems that are part of the specified named group]:groups' \\\n\t\t\t\t\t'(--clean)--clean[remove any gems not present in the current Gemfile]' \\\n\t\t\t\t\t'(--full-index)--full-index[download and cache the index file of all gems]' \\\n\t\t\t\t\t'(--jobs)--jobs=-[install gems parallely]:number' \\\n\t\t\t\t\t'(--force)--force[force download every gem]' \\\n\t\t\t\t\t'(--no-cache)--no-cache[do not update the cache in vendor/cache with newly installed gems]' \\\n\t\t\t\t\t'(--no-prune)--no-prune[do not remove stale gem from cache after installation]' \\\n\t\t\t\t\t'(--retry)--retry=-[number of times to retry failed network or git requests]:number' \\\n\t\t\t\t\t'(--sheband)--shebang=-[specify ruby executable to execute scripts]:ruby' \\\n\t\t\t\t\t'(--standalone)--standalone=-[create standalone bundles]:groups' \\\n\t\t\t\t\t\"(--trust-policy)--trust-policy=-[apply the Rubygems security policy]:arg:($_policies)\"\n\t\t\t\tret=0\n\t\t\t\t;;\n\t\t\texec)\n\t\t\t\t_normal && ret=0\n\t\t\t\t;;\n\t\t\t(open|show)\n\t\t\t\t_gems=( $(bundle show 2> /dev/null | sed -e '/^  \\*/!d; s/^  \\* \\([^ ]*\\) .*/\\1/') )\n\t\t\t\tif [[ $_gems != \"\" ]]; then\n\t\t\t\t\t_values 'gems' $_gems && ret=0\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\t_opts=(  $(bundle help $line[1] | sed -e '/^  \\[-/!d; s/^  \\[\\(-[^=]*\\)=.*/\\1/') )\n\t\t\t\t_opts+=( $(bundle help $line[1] | sed -e '/^  -/!d; s/^  \\(-.\\), \\[\\(-[^=]*\\)=.*/\\1 \\2/') )\n\t\t\t\tif [[ $_opts != \"\" ]]; then\n\t\t\t\t\t_values 'options' $_opts && ret=0\n\t\t\t\tfi\n\t\t\t\t;;\n\t\tesac\n\t\t;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_caffeinate",
    "content": "#compdef caffeinate\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for the macOS 'caffeinate' tool (man 8 caffeinate).\n#\n# -------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Nicolas Despres <nicolas.despres@gmail.com> (initial version)\n#\n# -------------------------------------------------------------------------\n\n_arguments -s \\\n  '-d[prevent the display from sleeping]' \\\n  '-i[prevent the system from idle sleeping]' \\\n  '-m[prevent the disk from idle sleeping]' \\\n  '-s[prevent the system from sleeping but only when running on AC power]' \\\n  '-u[declare that user is active]' \\\n  '-t+[assertion timeout value]:delay in seconds' \\\n  '-w+[waits for process to exit]:pid:_pids' \\\n  '(-):command: _command_names -e' \\\n  '*::args: _normal'\n"
  },
  {
    "path": ".config/zsh/completions/src/_cap",
    "content": "#compdef cap\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Capistrano (http://capify.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Bruno Michel (https://github.com/nono)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal curcontext=\"$curcontext\" state line cmds ret=1\n\n_arguments -C \\\n\t{-d,--debug}'[Prompts before each remote command execution]' \\\n    {-e,--explain}'[Displays help (if available) for the task]:task' \\\n    {-F,--default-config}'[Always use default config, even with -f]' \\\n    {-f,--file}'[A recipe file to load. May be given more than once]:file:_files' \\\n    {-H,--long-help}'[Explain these options and environment variables]' \\\n    {-h,--help}'[Display this help message]' \\\n    {-l,--logger}'[Choose logger method. STDERR used by default]:file:_files' \\\n    {-n,--dry-run}'[Prints out commands without running them]' \\\n    {-p,--password}'[Immediately prompt for the password]' \\\n    {-q,--quiet}'[Make the output as quiet as possible]' \\\n    {-r,--preserve-roles}'[Preserve task roles]' \\\n    {-S,--set-before}'[Set a variable before the recipes are loaded]:variable' \\\n    {-s,--set}'[Set a variable after the recipes are loaded]:variable' \\\n    {-T,--tasks}'[List all tasks (matching optional PATTERN) in the loaded recipe files]:pattern' \\\n    {-t,--tool}'[Abbreviates the output of -T for tool integration]' \\\n    {-V,--version}'[Display the Capistrano version, and exit]' \\\n    {-v,--verbose}'[Be more verbose. May be given more than once]' \\\n    {-X,--skip-system-config}'[Do not load the system config file (capistrano.conf)]' \\\n    {-x,--skip-user-config}'[Do not load the user config file (.caprc)]' \\\n\t'*: :->cmds' && ret=0\n\ncase $state in\n\tcmds)\n\t\tcmds=( ${(f)\"$(_call_program commands cap -T 2> /dev/null | sed -e '/ # /!d; s/:/\\\\:/g; s/cap \\([A-Za-z0-9\\\\:_-]*\\) .*# /\\1:/')\"} )\n\t\t_describe -t commands 'cap command' cmds && ret=0\n\t\t;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_cask",
    "content": "#compdef cask\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY DIRECT, INDIRECT,\n# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n# Completion script for cask (http://cask.readthedocs.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n# * ptrv <mail@petervasil.net>\n# * Johan Andersson <johan.rejeep@gmail.com>\n# * Sebastien Duthil <duthils@free.fr>\n#\n# ------------------------------------------------------------------------------\n\nfunction _cask() {\n  local ret=1 state\n  _arguments \\\n    ':subcommand:->subcommand' \\\n    '*:: :->subcmds' && ret=0\n\n  case $state in\n    subcommand)\n      subcommands=(\n        \"build:build all Elisp files in the files directive\"\n        \"clean-elc:remove all byte compiled Elisp files in the files directive\"\n        \"exec:execute command with correct 'exec-path' and 'load-path'\"\n        \"exec-path:print 'exec-path' for all packages and dependencies\"\n        \"files:print list of files specified in the files directive\"\n        \"help:display usage information or documentation for specified command\"\n        \"info:show info about the current package\"\n        \"init:initialize the current directory with a Cask-file\"\n        \"install:install all packages specified in the Cask-file\"\n        \"link:manage links\"\n        \"list:list dependencies\"\n        \"load-path:print 'load-path' for all packages and dependencies\"\n        \"outdated:print list of outdated packages\"\n        \"package:build package and put in specified directory (default: dist)\"\n        \"package-directory:print current package installation directory\"\n        \"path:print 'exec-path' for all packages and dependencies\"\n        \"pkg-file:write a 'define-package' file\"\n        \"update:update package version\"\n        \"upgrade-cask:upgrade Cask itself and its dependencies\"\n        \"upgrade:upgrade Cask itself and its dependencies\"\n        \"version:print program version\"\n      )\n      _describe -t subcommands 'cask subcommands' subcommands && ret=0\n  esac\n\n  case \"$words[1]\" in\n    init)\n      _arguments \\\n        '(--dev)--dev[Run in dev mode]' && ret=0 ;;\n    exec)\n      _generic\n      ;;\n  esac\n\n  return ret\n}\n\n_cask \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_cf",
    "content": "#compdef cf\n# ------------------------------------------------------------------------------\n#\n# Copyright 2015 Ferran Rodenas & Danny Rosen\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# ------------------------------------------------------------------------------\n#\n# Description\n# -----------\n#\n#  Completion script for Cloud Foundry CLI (https://github.com/cloudfoundry/cli#downloads)\n#\n# ------------------------------------------------------------------------------\n#\n# Authors\n# -------\n#\n#  * Ferran Rodenas (https://github.com/frodenas)\n#  * Danny Rosen (https://github.com/dannyzen)\n#\n# ------------------------------------------------------------------------------\n\n# ----------------------\n# ----- Helper functions\n# ----------------------\n\n# Output a selectable list of organizations\n__cf_orgs() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf orgs | awk 'NR>3{print $1}'))\n    if [[ 'X$cont_cmd' != 'X' ]]\n        _describe 'ORG' cont_cmd\n}\n\n# Output a selectable list of spaces\n__cf_spaces() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf spaces | awk 'NR>3{print $1}'))\n    if [[ 'X$cont_cmd' != 'X' ]]\n        _describe 'SPACE' cont_cmd\n}\n\n# Output a selectable list of applications\n__cf_apps() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf apps | awk 'NR>4{print $1}'))\n    if [[ 'X$cont_cmd' != 'X' ]]\n        _describe 'APP' cont_cmd\n}\n\n# Output a selectable list of stacks\n__cf_stacks() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf stacks | awk 'NR>4{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'STACK' cont_cmd\n}\n\n# Output a selectable list of services\n__cf_marketplace_services() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf marketplace | awk 'NR>4{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'SERVICE' cont_cmd\n}\n\n# Output a selectable list of services\n__cf_services() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf services | awk 'NR>4{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'SERVICE' cont_cmd\n}\n\n# Output a selectable list of domains\n__cf_domains() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v shared | awk 'NR>2{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'DOMAIN' cont_cmd\n}\n\n# Output a selectable list of shared domains\n__cf_shared_domains() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf domains | grep -v owned | awk 'NR>2{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'SHARED-DOMAIN' cont_cmd\n}\n\n# Output a selectable list of hostnames\n__cf_hostnames() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf routes | awk 'NR>3{print $2}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'ROUTE' cont_cmd\n}\n\n# Output a selectable list of buildpacks\n__cf_buildpacks() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf buildpacks | awk 'NR>3{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'BUILDPACK' cont_cmd\n}\n\n# Output a selectable list of feature flags\n__cf_feature_flags() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf feature-flags | awk 'NR>4{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'FEATURE-FLAG' cont_cmd\n}\n\n# Output a selectable list of plugin repos\n__cf_repo_plugins() {\n    declare -a cont_cmd\n    cont_cmd=($(CF_COLOR=false CF_TRACE=false cf list-plugin-repos | awk 'NR>3{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'REPO-PLUGIN' cont_cmd\n}\n\n# Output a selectable list of plugins\n__cf_plugins() {\n    declare -a cont_cmd\n    cont_cmd=($(cf plugins | awk 'NR>4{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'PLUGIN' cont_cmd\n}\n\n# Output a selectable list of targets (requires cf-targets plugin)\n__cf_targets() {\n    declare -a cont_cmd\n    cont_cmd=($(cf targets | awk '{print $1}'))\n    if [[  'X$cont_cmd' != 'X' ]]\n        _describe 'TARGET' cont_cmd\n}\n\n\n# --------------------------\n# ----- end Helper functions\n# --------------------------\n\n# --------------\n# ----- Commands\n# --------------\n\n__login() {\n  _arguments \\\n    '-a=[API endpoint (e.g. https://api.example.com)]:api endpoint:' \\\n    '-u=[Username]:username:' \\\n    '-p=[Password]:password:' \\\n    '-o=[Organization]:organization name:__cf_orgs' \\\n    '-s=[Space]:space name:__cf_spaces' \\\n    '--sso[Use a one-time password to login]' \\\n    '--skip-ssl-validation[Skip SSL validation]'\n}\n\n__logout() {\n    # no arguments\n}\n\n__passwd() {\n  _arguments \\\n    '1:password:'\n}\n\n__target() {\n  _arguments \\\n    '-o=[Organization]:organization name:__cf_orgs' \\\n    '-s=[Space]:space name:__cf_spaces'\n}\n\n__api() {\n  _arguments \\\n    '1:API url:' \\\n    '--unset[Remove all api endpoint targeting]' \\\n    '--skip-ssl-validation[Skip SSL validation]'\n}\n\n__auth() {\n  # no arguments\n}\n\n__apps() {\n  # no arguments\n}\n\n__app() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '--guid[Retrieve and display the given app guid. All other health and status output for the app is suppressed]'\n}\n\n__push() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '-b=[Custom buildpack by name (e.g. my-buildpack) or GIT URL or GIT BRANCH URL]:buildpack name:__cf_buildpacks' \\\n    '-c=[Startup command, set to null to reset to default start command]:startup command:' \\\n    '-d=[Domain (e.g. example.com)]:domain (e.g. example.com):__cf_domains' \\\n    '-f=[Path to manifest]:file:_files:' \\\n    '-i=[Number of instances]:number of instances:' \\\n    '-k=[Disk limit (e.g. 256M, 1024M, 1G)]:disk limit (e.g. 256M, 1024M, 1G):' \\\n    '-m=[Memory limit (e.g. 256M, 1024M, 1G)]:memory limit (e.g. 256M, 1024M, 1G):' \\\n    '-n=[Hostname (e.g. my-subdomain)]:hostname (e.g. my-subdomain):' \\\n    '-p=[Path to app directory or to a zip file of the contents of the app directory]:file:_files' \\\n    '-s=[Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)]:stack name:__cf_stacks:' \\\n    '-t=[Maximum time (in seconds) for CLI to wait for application start, other server side timeouts may apply]:maximum time (in seconds):' \\\n    '--no-hostname[Map the root domain to this app]' \\\n    '--no-manifest[Ignore manifest file]' \\\n    '--no-route[Do not map a route to this app and remove routes from previous pushes of this app]' \\\n    '--no-start[Do not start an app after pushing]' \\\n    '--random-route[Create a random route for this app]'\n}\n\n__scale() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '-i=[Number of instances]:number of instances:' \\\n    '-k=[Disk limit (e.g. 256M, 1024M, 1G)]:disk limit (e.g. 256M, 1024M, 1G):' \\\n    '-m=[Memory limit (e.g. 256M, 1024M, 1G)]:memory limit (e.g. 256M, 1024M, 1G):' \\\n    '-f[Force restart of app without prompt]'\n}\n\n__delete() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '--f[Force deletion without confirmation]' \\\n    '--r[Also delete any mapped routes]'\n}\n\n__rename() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:application name:'\n}\n\n__start() {\n  _arguments \\\n    '1:application name:__cf_apps'\n}\n\n__stop() {\n  _arguments \\\n    '1:application name:__cf_apps'\n}\n\n__restart() {\n  _arguments \\\n    '1:application name:__cf_apps'\n}\n\n__restage() {\n  _arguments \\\n    '1:application name:__cf_apps'\n}\n\n__restart-app-instance() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:application index:'\n}\n\n__events() {\n  _arguments \\\n    '1:application name:__cf_apps'\n}\n\n__files() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2::path:' \\\n    '-i=[instance]'\n}\n\n__logs() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '--recent[Dump recent logs instead of tailing]'\n}\n\n__env() {\n  _arguments \\\n    '1:application name:__cf_apps'\n}\n\n__set-env() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:env var name:' \\\n    '3:env var value:'\n}\n\n__unset-env() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:env var name:'\n}\n\n__stacks() {\n  # no arguments\n}\n\n__stack() {\n  _arguments \\\n    '1:stack name:__cf_stacks' \\\n    '--guid[Retrieve and display the given stack guid. All other output for the stack is suppressed]'\n}\n\n__copy-source() {\n  _arguments \\\n    '1:source application name:__cf_apps' \\\n    '2:target application name:' \\\n    '-o=[Org that contains the target application]:organization name:__cf_orgs' \\\n    '-s=[Space that contains the target application]:space name:__cf_spaces' \\\n    '--no-restart[Override restart of the application in target environment after copy-source completes]'\n}\n\n__create-app-manifest() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '-p=[Specify a path for file creation. If path not specified, manifest file is created in current working directory]:path:_files'\n}\n\n__marketplace() {\n  _arguments \\\n    '-s=[Show plan details for a particular service offering]'\n}\n\n__services() {\n  # no arguments\n}\n\n__service() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '--guid[Retrieve and display the given service guid. All other output for the service is suppressed]'\n}\n\n__create-service() {\n  _arguments \\\n    '1:service:__cf_marketplace_services' \\\n    '2:plan:' \\\n    '3:service name:' \\\n    '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' \\\n    '-t=[User provided tags]'\n}\n\n__update-service() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '-p=[Change service plan for a service instance]' \\\n    '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]' \\\n    '-t=[User provided tags]'\n}\n\n__rename-service() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '2:service name:'\n}\n\n__delete-service() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__create-service-key() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '2:service key:' \\\n    '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]'\n}\n\n__service-keys() {\n  _arguments \\\n    '1:service name:__cf_services'\n}\n\n__service-key() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '2:service key:'\n}\n\n__delete-service-key() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '2:service key:' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__bind-service() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:service name:__cf_services' \\\n    '-c=[Valid JSON object containing service-specific configuration parameters, provided either in-line or in a file]'\n}\n\n__unbind-service() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:service name:__cf_services'\n}\n\n__create-user-provided-service() {\n  _arguments \\\n    '1:service name:' \\\n    '-p=[Credentials]' \\\n    '-l=[Syslog Drain Url]'\n}\n\n__update-user-provided-service() {\n  _arguments \\\n    '1:service name:__cf_services' \\\n    '-p=[Credentials]' \\\n    '-l=[Syslog Drain Url]'\n}\n\n__orgs() {\n  # no arguments\n}\n\n__org() {\n  _arguments \\\n    '1:organization name:__cf_orgs' \\\n    '--guid[Retrieve and display the given org guid. All other output for the org is suppressed]'\n}\n\n__create-org() {\n  _arguments \\\n    '1:organization name:' \\\n    '-q=[Quota to assign to the newly created org (excluding this option results in assignment of default quota)]'\n}\n\n__delete-org() {\n  _arguments \\\n    '1:organization name:__cf_orgs' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__spaces() {\n    # no arguments\n}\n\n__space() {\n  _arguments \\\n    '1:space name:__cf_spaces' \\\n    '--guid[Retrieve and display the given space guid. All other output for the space is suppressed]' \\\n    '--security-group-rules[Retrive the rules for all the security groups associated with the space]'\n}\n\n__create-space() {\n  _arguments \\\n    '1:space name:' \\\n    '-o=[Org that contains the target application]:organization name:__cf_orgs' \\\n    '-q=[Quota to assign to the newly created space (excluding this option results in assignment of default quota)]'\n}\n\n__delete-space() {\n  _arguments \\\n    '1:space name:__cf_spaces' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__domains() {\n  # no arguments\n}\n\n__create-domain() {\n  _arguments \\\n    '1:organization name:__cf_orgs' \\\n    '2:domain:'\n}\n\n__delete-domain() {\n  _arguments \\\n    '1:domain:__cf_domains' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__create-shared-domain() {\n  _arguments \\\n    '1:domain:'\n}\n\n__delete-shared-domain() {\n  _arguments \\\n    '1:domain:__cf_shared_domains' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__routes() {\n  _arguments \\\n    '--orglevel[List all the routes for all spaces of current organization]'\n}\n\n__create-route() {\n  _arguments \\\n    '1:space name:__cf_spaces' \\\n    '2:domain:__cf_domains' \\\n    '-n=[Hostname]'\n}\n\n__check-route() {\n  _arguments \\\n    '1:hostname:__cf_hostnames' \\\n    '2:domain:__cf_domains'\n}\n\n__map-route() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:domain:__cf_domains' \\\n    '-n=[Hostname]:hostname:__cf_hostnames:'\n}\n\n__unmap-route() {\n  _arguments \\\n    '1:application name:__cf_apps' \\\n    '2:domain:__cf_domains' \\\n    '-n=[Hostname]:hostname:__cf_hostnames:'\n}\n\n__delete-route() {\n  _arguments \\\n    '1:domain:__cf_domains' \\\n    '-n=[Hostname]:hostname:__cf_hostnames:' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__delete-orphaned-routes() {\n  _arguments \\\n    '-f[Force deletion without confirmation]'\n}\n\n__buildpacks() {\n  # no arguments\n}\n\n__create-buildpack() {\n  _arguments \\\n    '1:buildpack name:' \\\n    '2:path:_files' \\\n    '3:position:' \\\n    '--enable[Enable the buildpack to be used for staging]' \\\n    '--disable[Disable the buildpack from being used for staging]'\n}\n\n__update-buildpack() {\n  _arguments \\\n    '1:buildpack name:__cf_buildpacks' \\\n    '-p=[Path to directory or zip file]:file:_files' \\\n    '-i=[The order in which the buildpacks are checked during buildpack auto-detection]' \\\n    '--enable[Enable the buildpack to be used for staging]' \\\n    '--disable[Disable the buildpack from being used for staging]' \\\n    '--lock[Lock the buildpack to prevent updates]' \\\n    '--unlock[Unlock the buildpack to enable updates]'\n}\n\n__rename-buildpack() {\n  _arguments \\\n    '1:buildpack name:__cf_buildpacks' \\\n    '2:new buildpack name:'\n}\n\n__delete-buildpack() {\n  _arguments \\\n    '1:buildpack name:__cf_buildpacks' \\\n    '-f[Force deletion without confirmation]'\n}\n\n__running-environment-variable-group() {\n  # no arguments\n}\n\n__staging-environment-variable-group() {\n  # no arguments\n}\n\n__set-staging-environment-variable-group() {\n  # no arguments\n}\n\n__set-running-environment-variable-group() {\n  # no arguments\n}\n\n__feature-flags() {\n  # no arguments\n}\n\n__feature-flag() {\n  _arguments \\\n    '1:feature name:__cf_feature_flags'\n}\n\n__enable-feature-flag() {\n  _arguments \\\n    '1:feature name:__cf_feature_flags'\n}\n\n__disable-feature-flag() {\n  _arguments \\\n    '1:feature name:__cf_feature_flags'\n}\n\n__curl() {\n  _arguments \\\n    '1:path:' \\\n    '-i[Include response headers in the output]' \\\n    '-v[Enable CF_TRACE output for all requests and responses]' \\\n    '-X=[HTTP method]:http method:(GET POST PUT DELETE)' \\\n    '-h=[Custom headers to include in the request, flag can be specified multiple times]' \\\n    '-d=[HTTP data to include in the request body]' \\\n    '--output[Write curl body to FILE instead of stdout]'\n}\n\n__config() {\n  _arguments \\\n    '--async-timeout=[Timeout for async HTTP requests]' \\\n    '--trace=[Trace HTTP requests]:trace:(true false)' \\\n    '--color=[Enable or disable color]:color:(true false)' \\\n    '--locale=[Set default locale. If LOCALE is CLEAR, previous locale is deleted]'\n}\n\n__oauth-token() {\n  # no arguments\n}\n\n__add-plugin-repo() {\n  _arguments \\\n    '1:repo name:' \\\n    '2:url:'\n}\n\n__remove-plugin-repo() {\n  _arguments \\\n    '1:repo name:__cf_repo_plugins' \\\n    '2:url:'\n}\n\n__list-plugin-repos() {\n  # no arguments\n}\n\n__repo-plugins() {\n  _arguments \\\n    '-r=[Repo Name]:repo name:__cf_repo_plugins'\n}\n\n__plugins() {\n  _arguments \\\n    '-checksum[Compute and show the sha1 value of the plugin binary file]'\n}\n\n__install-plugin() {\n  _arguments \\\n    '1:plugin URL or path:_files' \\\n    '-r=[repo name where the plugin binary is located]:repo name:__cf_repo_plugins'\n}\n\n__uninstall-plugin() {\n  _arguments \\\n    '1:plugin name:__cf_plugins'\n}\n\n__save-target() {\n  _arguments \\\n    '1:target-name:' \\\n    '-f[Force save even if current target is already saved under another name]'\n}\n\n__set-target() {\n  _arguments \\\n    '1:target-name:__cf_targets' \\\n    '-f[Force target change even if current target is unsaved]'\n}\n\n__delete-target() {\n  _arguments \\\n    '1:target-name:__cf_targets'\n}\n\n# ------------------\n# ----- end Commands\n# ------------------\n\n# -------------------\n# ----- 1st Arguments\n# -------------------\n\nlocal -a _1st_arguments\n_1st_arguments=(\n  \"login\":\"Log user in\"\n  \"logout\":\"Log user out\"\n  \"passwd\":\"Change user password\"\n  \"target\":\"Set or view the targeted org or space\"\n  \"api\":\"Set or view target api url\"\n  \"auth\":\"Authenticate user non-interactively\"\n  \"apps\":\"List all apps in the target space\"\n  \"app\":\"Display health and status for app\"\n  \"push\":\"Push a new app or sync changes to an existing app\"\n  \"scale\":\"Change or view the instance count, disk space limit, and memory limit for an app\"\n  \"delete\":\"Delete an app\"\n  \"rename\":\"Rename an app\"\n  \"start\":\"Start an app\"\n  \"stop\":\"Stop an app\"\n  \"restart\":\"Restart an app\"\n  \"restage\":\"Restage an app\"\n  \"restart-app-instance\":\"Terminate the running application Instance at the given index and instantiate a new instance of the application with the same index\"\n  \"events\":\"Show recent app events\"\n  \"files\":\"Print out a list of files in a directory or the contents of a specific file\"\n  \"logs\":\"Tail or show recent logs for an app\"\n  \"env\":\"Show all env variables for an app\"\n  \"set-env\":\"Set an env variable for an app\"\n  \"unset-env\":\"Remove an env variable\"\n  \"stacks\":\"List all stacks\"\n  \"stack\":\"Show information for a stack\"\n  \"copy-source\":\"Make a copy of app source code from one application to another.  Unless overridden, the copy-source command will restart the application\"\n  \"create-app-manifest\":\"Create an app manifest for an app that has been pushed successfully\"\n  \"marketplace\":\"List available offerings in the marketplace\"\n  \"services\":\"List all service instances in the target space\"\n  \"service\":\"Show service instance info\"\n  \"create-service\":\"Create a service instance\"\n  \"update-service\":\"Update a service instance\"\n  \"delete-service\":\"Delete a service instance\"\n  \"rename-service\":\"Rename a service instance\"\n  \"create-service-key\":\"Create key for a service instance\"\n  \"service-keys\":\"List keys for a service instance\"\n  \"service-key\":\"Show service key info\"\n  \"delete-service-key\":\"Delete a service key\"\n  \"bind-service\":\"Bind a service instance to an app\"\n  \"unbind-service\":\"Unbind a service instance from an app\"\n  \"create-user-provided-service\":\"Make a user-provided service instance available to cf apps\"\n  \"update-user-provided-service\":\"Update user-provided service instance name value pairs\"\n  \"orgs\":\"List all orgs\"\n  \"org\":\"Show org info\"\n  \"create-org\":\"Create an org\"\n  \"delete-org\":\"Delete an org\"\n  \"rename-org\":\"Rename an org\"\n  \"spaces\":\"List all spaces in an org\"\n  \"space\":\"Show space info\"\n  \"create-space\":\"Create a space\"\n  \"delete-space\":\"Delete a space\"\n  \"rename-space\":\"Rename a space\"\n  \"domains\":\"List domains in the target org\"\n  \"create-domain\":\"Create a domain in an org for later use\"\n  \"delete-domain\":\"Delete a domain\"\n  \"create-shared-domain\":\"Create a domain that can be used by all orgs (admin-only)\"\n  \"delete-shared-domain\":\"Delete a shared domain\"\n  \"routes\":\"List all routes in the current space or the current organization\"\n  \"create-route\":\"Create a url route in a space for later use\"\n  \"check-route\":\"Perform a simple check to determine whether a route currently exists or not\"\n  \"map-route\":\"Add a url route to an app\"\n  \"unmap-route\":\"Remove a url route from an app\"\n  \"delete-route\":\"Delete a route\"\n  \"delete-orphaned-routes\":\"Delete all orphaned routes (e.g.: those that are not mapped to an app)\"\n  \"buildpacks\":\"List all buildpacks\"\n  \"create-buildpack\":\"Create a buildpack\"\n  \"update-buildpack\":\"Update a buildpack\"\n  \"rename-buildpack\":\"Rename a buildpack\"\n  \"delete-buildpack\":\"Delete a buildpack\"\n  \"running-environment-variable-group\":\"Retrieve the contents of the running environment variable group\"\n  \"staging-environment-variable-group\":\"Retrieve the contents of the staging environment variable group\"\n  \"set-staging-environment-variable-group\":\"Pass parameters as JSON to create a staging environment variable group\"\n  \"set-running-environment-variable-group\":\"Pass parameters as JSON to create a running environment variable group\"\n  \"feature-flags\":\"Retrieve list of feature flags with status of each flag-able feature\"\n  \"feature-flag\":\"Retrieve an individual feature flag with status\"\n  \"enable-feature-flag\":\"Enable the use of a feature so that users have access to and can use the feature\"\n  \"disable-feature-flag\":\"Disable the use of a feature so that users have access to and can use the feature\"\n  \"curl\":\"Executes a raw request, content-type set to application/json by default\"\n  \"config\":\"write default values to the config\"\n  \"oauth-token\":\"Retrieve and display the OAuth token for the current session\"\n  \"add-plugin-repo\":\"Add a new plugin repository\"\n  \"remove-plugin-repo\":\"Remove a plugin repository\"\n  \"list-plugin-repos\":\"list all the added plugin repository\"\n  \"repo-plugins\":\"List all available plugins in all added repositories\"\n  \"plugins\":\"list all available plugin commands\"\n  \"install-plugin\":\"Install the plugin defined in command argument\"\n  \"uninstall-plugin\":\"Uninstall the plugin defined in command argument\"\n  \"targets\":\"List all saved targets (requires cf-targets plugin)\"\n  \"save-target\":\"Save the current target under a given name (requires cf-targets plugin)\"\n  \"set-target\":\"Restore a previously saved target (requires cf-targets plugin)\"\n  \"delete-target\":\"Delete a saved target (requires cf-targets plugin)\" \n)\n\n# -----------------------\n# ----- end 1st Arguments\n# -----------------------\n\n# ----------\n# ----- Main\n# ----------\n\n_arguments '*:: :->command'\n\nif (( CURRENT == 1 )); then\n  _describe -t commands \"cf command\" _1st_arguments\n  return\nfi\n\nlocal -a _command_args\ncase \"$words[1]\" in\n  login)\n    __login ;;\n  logout)\n    __logout ;;\n  passwd)\n    __passwd ;;\n  target)\n    __target ;;\n  api)\n    __api ;;\n  auth)\n    __auth ;;\n  apps)\n    __apps ;;\n  app)\n    __app ;;\n  push)\n    __push ;;\n  scale)\n    __scale ;;\n  delete)\n    __delete ;;\n  rename)\n    __rename ;;\n  start)\n    __start ;;\n  stop)\n    __stop ;;\n  restart)\n    __restart ;;\n  restage)\n    __restage ;;\n  restart-app-instance)\n    __restart-app-instance ;;\n  events)\n    __events ;;\n  files)\n    __files ;;\n  logs)\n    __logs ;;\n  env)\n    __env ;;\n  set-env)\n    __set-env ;;\n  unset-env)\n    __unset-env ;;\n  stacks)\n    __stacks ;;\n  stack)\n    __stack ;;\n  copy-source)\n    __copy-source ;;\n  create-app-manifest)\n    __create-app-manifest ;;\n  marketplace)\n    __marketplace ;;\n  services)\n    __services ;;\n  service)\n    __service ;;\n  create-service)\n    __create-service ;;\n  update-service)\n    __update-service ;;\n  rename-service)\n    __rename-service ;;\n  delete-service)\n    __delete-service ;;\n  create-service-key)\n    __create-service-key ;;\n  service-keys)\n    __service-keys ;;\n  service-key)\n    __service-key ;;\n  delete-service-key)\n    __delete-service-key ;;\n  bind-service)\n    __bind-service ;;\n  unbind-service)\n    __unbind-service ;;\n  create-user-provided-service)\n    __create-user-provided-service ;;\n  update-user-provided-service)\n    __update-user-provided-service ;;\n  orgs)\n    __orgs ;;\n  org)\n    __org ;;\n  create-org)\n    __create-org ;;\n  delete-org)\n    __delete-org ;;\n  spaces)\n    __spaces ;;\n  space)\n    __space ;;\n  create-space)\n    __create-space ;;\n  delete-space)\n    __delete-space ;;\n  domains)\n    __domains ;;\n  create-domain)\n    __create-domain ;;\n  delete-domain)\n    __delete-domain ;;\n  create-shared-domain)\n    __create-shared-domain ;;\n  delete-shared-domain)\n    __delete-shared-domain ;;\n  routes)\n    __routes ;;\n  create-route)\n    __create-route ;;\n  check-route)\n    __check-route ;;\n  map-route)\n    __map-route ;;\n  unmap-route)\n    __unmap-route ;;\n  delete-route)\n    __delete-route ;;\n  delete-orphaned-routes)\n    __delete-orphaned-routes ;;\n  buildpacks)\n    __buildpacks ;;\n  create-buildpack)\n    __create-buildpack ;;\n  update-buildpack)\n    __update-buildpack ;;\n  rename-buildpack)\n    __rename-buildpack ;;\n  delete-buildpack)\n    __delete-buildpack ;;\n  running-environment-variable-group)\n    __running-environment-variable-group ;;\n  staging-environment-variable-group)\n    __staging-environment-variable-group ;;\n  set-staging-environment-variable-group)\n    __set-staging-environment-variable-group ;;\n  set-running-environment-variable-group)\n    __set-running-environment-variable-group ;;\n  feature-flags)\n    __feature-flags ;;\n  feature-flag)\n    __feature-flag ;;\n  enable-feature-flag)\n    __enable-feature-flag ;;\n  disable-feature-flag)\n    __disable-feature-flag ;;\n  curl)\n    __curl ;;\n  config)\n    __config ;;\n  oauth-token)\n    __oauth-token ;;\n  add-plugin-repo)\n    __add-plugin-repo ;;\n  remove-plugin-repo)\n    __remove-plugin-repo ;;\n  list-plugin-repos)\n    __list-plugin-repos ;;\n  repo-plugins)\n    __repo-plugins ;;\n  plugins)\n    __plugins ;;\n  install-plugin)\n    __install-plugin ;;\n  uninstall-plugin)\n    __uninstall-plugin ;;\n  save-target)\n    __save-target ;;\n  set-target)\n    __set-target ;;\n  delete-target)\n    __delete-target ;;\nesac\n"
  },
  {
    "path": ".config/zsh/completions/src/_chattr",
    "content": "#compdef chattr\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for chattr a tool to change file attributes on a Linux second extended file system. (http://e2fsprogs.sourceforge.net/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_chattr() {\n\n_arguments -C \\\n   \"-R[Recursively change attributes of directories and their contents.]\" \\\n   \"-V[Be verbose with chattr's output and print the program version.]\" \\\n   \"-f[Suppress most error messages.]\" \\\n   \"-v[Set the file's version/generation number.]:version:\" \\\n   \"(-A)+A[Disable atime updates]\" \\\n   \"(+A)-A[Enable atime updates]\" \\\n   \"(-a)+a[Enable append only - file cannot be overridden]\" \\\n   \"(+a)-a[Disable append only - file can be overridden]\" \\\n   \"(-c)+c[Enable automatic compression]\" \\\n   \"(+c)-c[Disable automatic compression]\" \\\n   \"(-D)+D[Enable synchronous directory updates]\" \\\n   \"(+D)-D[Disable synchronous directory updates]\" \\\n   \"(-d)+d[Forbid backing file up with dump program]\" \\\n   \"(+d)-d[Allow backing file up with dump program]\" \\\n   \"(-i)+i[Mark as immutable]\" \\\n   \"(+i)-i[Unmark as immutable]\" \\\n   \"(-j)+j[Enable ext3 journaling]\" \\\n   \"(+j)-j[Disable ext3 journaling]\" \\\n   \"(-s)+s[Enable secure deletion - zero all blocks on delete]\" \\\n   \"(+s)-s[Disable secure deletion - do not zero all blocks on delete]\" \\\n   \"(-S)+S[Enable synchronous updates]\" \\\n   \"(+S)-S[Disable synchronous updates]\" \\\n   \"(-T)+T[Set top of hierarchy - direct subdirectories are allocated independently]\" \\\n   \"(+T)-T[Unset top of hierarchy]\" \\\n   \"(-t)+t[Disable tail merging]\" \\\n   \"(+t)-t[Enable tail merging]\" \\\n   \"(-u)+u[Mark as undeletable - enable undeletion]\" \\\n   \"(+u)-u[Unmark as undeletable - disable undeletion]\" \\\n   '*:files:_files' \\\n}\n\n_chattr\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_cheat",
    "content": "#compdef cheat\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Cheat an interactive cheatsheets on the command-line. (https://github.com/chrisallenlane/cheat/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\nlocal cheats\n\n_cheat_load_cheats() {\n  cheats=(\"${(f)$(cheat -l | cut -d' ' -f1)}\")\n}\n\n\n_cheat() {\n\n\n  _arguments -C -s -S -n \\\n    '(- 1 *)'{-d,--directories}'[List directories on CHEATPATH]: :->full' \\\n    '(- 1 *)'{-e,--edit}'[Edit cheatsheet]:cheat:->cheats' \\\n    '(- 1 *)'{-l,--list}'[List cheatsheets]: :->full' \\\n    '(- 1 *)'{-s,--search}'[Search cheatsheets for <keyword>]: :->full' \\\n    '(- 1 *)'{-v,--version}'[display version and copyright information]: :->full' \\\n\n    case \"$state\" in\n    (full)\n    ;;\n    (cheats)\n        _cheat_load_cheats\n        _describe -t cheats 'cheats' cheats\n    ;;\n    (*)\n        _cheat_load_cheats\n        _describe -t cheats 'cheats' cheats\n    ;;\n    esac\n}\n\n_cheat\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_choc",
    "content": "#compdef choc\n# ------------------------------------------------------------------------------\n# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for choc (http://chocolatapp.com)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Nicholas Penree (https://github.com/drudge)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line ret=1\ntypeset -A opt_args\n\n_arguments -C \\\n  '(-a --async)'{-a,--async}'[do not wait for the user to close the file in Chocolat]' \\\n  '(-w --wait)'{-w,--wait}'[wait for file to be closed by Chocolat]' \\\n  '(-n --no-reactivation)'{-n,--no-reactivation}'[after editing with -w, do not reactivate the calling app]' \\\n  '(-h --help)'{-h,--help}'[show help information]' \\\n  '(-v --version)'{-v,--version}'[print version information]' \\\n  '*:script or directory:_files' && ret=0\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_cmake",
    "content": "#compdef cmake\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for CMake (http://www.cmake.org).\n#\n# -------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Scott M. Kroll <skroll@gmail.com> (initial version)\n#  * Paul Seyfert <pseyfert@mathphys.fsk.uni-heidelberg.de> (handling of --build)\n#\n# -------------------------------------------------------------------------\n# Notes\n# -----\n#\n#   * By default only C and C++ languages are supported for compiler flag\n#     variables. To define your own list of languages:\n#\n#       cmake_langs=('C'   'C'\n#                    'CXX' 'C++')\n#       zstyle ':completion:*:cmake:*' languages $cmake_langs\n#\n# -------------------------------------------------------------------------\n\nlocal context state line curcontext=\"$curcontext\" cmake_args\n\nlocal cmake_build_options;cmake_build_options=(\n    '-C[Pre-load a script to populate the cache]:script:_files'\n    '*-D-[Create a cmake cache entry]:property:_cmake_define_property'\n    '-U[Remove matching entries from CMake cache]:globbing expression'\n    '-G[Specify a makefile generator]:generator:_cmake_generators'\n    '-T[Specify toolset name if supported by generator]:toolset name'\n    '(-Wno-dev -Wdev)-Wno-dev[Suppress/Enable developer warnings]'\n    '(-Wno-dev -Wdev)-Wdev[Suppress/Enable developer warnings]'\n    '(-Wno-deprecated -Wdeprecated)-Wno-deprecated[Suppress/Enable deprecation warnings]'\n    '(-Wno-deprecated -Wdeprecated)-Wdeprecated[Suppress/Enable deprecation warnings]'\n    '(-Wno-error=dev -Werror=dev)-Wno-error=dev[Make developer warnings (not) errors]'\n    '(-Wno-error=dev -Werror=dev)-Werror=dev[Make developer warnings (not) errors]'\n    '(-Wno-error=deprecated -Werror=deprecated)-Werror=deprecated[Make deprecated macro and function warnings (not) errors]'\n    '(-Wno-error=deprecated -Werror=deprecated)-Wno-error=deprecated[Make deprecated macro and function warnings (not) errors]'\n    '--warn-uninitialized[Warn about uninitialized values.]'\n    '--warn-unused-vars[Warn about unused variables.]'\n    '--no-warn-unused-cli[Dont warn about command line options.]'\n    '-i[Run in wizard mode]'\n    '-L-[List cache variables]::_values \"options\" \"[non-advanced cache variables]\" \"A[advanced cache variables]\" \"H[non-advanced cached variables with help]\" \"AH[advanced cache variables with help]\"'\n    '--trace[Put cmake in trace mode]'\n    '--find-package[Run in pkg-config like mode.]'\n    ':cmake project:_files -/'\n)\n\n# ------------------------\n# _cmake_generator_options\n# ------------------------\n(( $+functions[_cmake_generator_options] )) ||\n_cmake_generator_options() {\n  if [ -f $1/Makefile ]\n  then\n    $_comps[make]\n  elif [ -f $1/build.ninja ]\n  then\n    $_comps[ninja]\n  fi\n}\n\n# --------------\n# _cmake_targets\n# --------------\n(( $+functions[_cmake_targets] )) ||\n_cmake_targets() {\n  local -a targets\n  if [ -f $1/Makefile ]\n  then\n    # `make help` doesn't work for Makefiles in general, but for cmake generated makefiles it does.\n    i=1\n    for target in $(make help | \\grep -e \"\\.\\.\\.\" | sed \"s/\\.\\.\\. //\" | sed \"s/ (the default.*//\") ; do\n      targets[$i]=$target\n      (( i = $i + 1 ))\n    done\n  elif [ -f $1/build.ninja ]\n  then\n    # `ninja help` doesn't seem to be the list of targets we're interested in\n    i=1\n    for target in $(ninja -C $1 -t targets all 2&>/dev/null | awk -F: '{print $1}') ; do\n      targets[$i]=\"$target\"\n      (( i++ ))\n    done\n  fi\n  _describe 'build targets' targets\n}\n\n_cmake_on_build() {\n  local build_extras;build_extras=(\n    '--[Native build tool options]'\n    '--target[specify build target]'\n    '--clean-first[build target clean first]'\n    '--config[For multi-configuration tools]'\n    '--use-stderr')\n  local -a undescribed_build_extras\n  i=1\n  for be in $build_extras ; do\n    undescribed_build_extras[$i]=$(echo $be | sed \"s/\\[.*//\")\n    (( i++ ))\n  done\n  inbuild=false\n  nativemode=false\n  for ((i = (($CURRENT - 1)); i > 1 ; i--)); do\n    if [[ $words[$i] == --build ]] ; then\n      inbuild=true\n      buildat=$i\n      (( difference = $CURRENT - $i ))\n    elif [[ $words[$i] == -- ]] ; then\n      nativemode=true\n    fi\n  done\n  # check if build mode has been left\n  outofbuild=false\n  for ((i = (($CURRENT - 1)); i > (($buildat + 1)); i--)); do\n    # don't check the word after --build (should be a directory)\n    if [[ ${undescribed_build_extras[(r)$words[$i]]} == $words[$i] ]] ; then continue ; fi\n    if [[ $words[(($i - 1))] == --target ]] ; then continue ; fi\n    if [[ $words[(($i - 1))] == --config ]] ; then continue ; fi\n    outofbuild=true\n  done\n  if [ \"$nativemode\" = true ] ; then\n    _cmake_generator_options $words[(($buildat + 1))] && return 0\n  fi\n  if [ \"$inbuild\" = false ] ; then\n    _arguments -C -s \\\n      - build_opts \\\n      \"$cmake_build_options[@]\" \\\n      - build_cmds \\\n      \"$cmake_suggest_build[@]\" && return 0\n  elif [ $difference -eq 1 ] ; then\n    # directly after --build comes the build directory\n    _alternative ':current directory:(.)' 'directory::_directories' && return 0\n  elif [[ $words[(($CURRENT - 1))] == --target ]] ; then\n    # after --build <dir> --target, suggest targets\n    _cmake_targets $words[(($buildat + 1))] && return 0\n  elif [[ $words[(($CURRENT - 1))] == --config ]] ; then\n    # after --build <dir> --config, no idea\n    return 0\n  elif [ \"$outofbuild\" = true ] ; then\n    # after --build <dir> --<not a --build option>, suggest other cmake_build_options (like -Wno-dev)\n    _arguments \"$cmake_build_options[@]\" && return 0\n  else\n    # after --build <dir>, suggest other cmake_build_options (like -Wno-dev) or --build options (like --clean-first)\n    _arguments \"$build_extras[@]\" \"$cmake_build_options[@]\" && return 0\n  fi\n}\n\nlocal cmake_help_actions;cmake_help_actions=(\n    '(- 1)--help-command[Print help for a single command and exit]:command-name:_cmake_command_names'\n    '(- 1)--help-command-list[List available listfile commands and exit]'\n    '(- 1)--help-commands[Print help for all commands and exit]'\n    '(- 1)--help-compatcommands[Print help for compatibility commands]'\n    '(- 1)--help-module[Print help for compatibility commands]:module-name:_cmake_module_names'\n    '(- 1)--help-module-list[Print help for a single module and exit]'\n    '(- 1)--help-modules[Print help for all modules and exit]'\n    '(- 1)--help-property[List available properties and exit]:property-name:_cmake_property_names'\n    '(- 1)--help-property-list[List available properties and exit]'\n    '(- 1)--help-properties[Print help for all properties and exit]'\n    '(- 1)--help-variable[Print help for a single variable and exit]:variable-name:_cmake_variable_names'\n    '(- 1)--help-variable-list[List documented variables and exit]'\n    '(- 1)--help-variables[Print help for all variables and exit]'\n    '(- 1)--copyright[Print the CMake copyright and exit]'\n    '(- 1)'{--help,-help,-usage,-h,-H}'[Print usage information and exit]'\n    '(- 1)--help-full[Print full help and exit]'\n    '(- 1)--help-html[Print full help in HTML format]'\n    '(- 1)--help-man[Print full help as a UNIX man page and exit]'\n    '(- 1)'{--version,-version}'[Print full help as a UNIX man page and exit]'\n)\n_cmake_help() {\n  _arguments -C -s - help \"$cmake_help_actions[@]\"\n}\n\n# -------------------\n# _cmake_command_names\n# -------------------\n(( $+functions[_cmake_command_names] )) ||\n_cmake_command_names() {\n  local command_names; command_names=(${(f)\"$($service --help-command-list 2> /dev/null)\"})\n  _values 'command name' ${command_names[@]:1} && return 0\n}\n\n# -----------------\n# _cmake_list_names\n# -----------------\n(( $+functions[_cmake_list_names] )) ||\n_cmake_list_names() {\n  local command; command=\"$@[1]\"\n  local desc; desc=\"$@[2]\"\n  local list_names; list_names=(${(f)\"$($service $command 2> /dev/null | sed -e 's/\\[/\\\\\\[/' -e 's/\\]/\\\\\\]/')\"})\n\n  _values ${desc} ${list_names[@]:1} && return 0\n}\n\n# ------------------\n# _cmake_module_names\n# ------------------\n(( $+functions[_cmake_module_names] )) ||\n_cmake_module_names() {\n  _cmake_list_names '--help-module-list' 'module name' && return 0\n}\n\n# --------------------\n# _cmake_property_names\n# --------------------\n(( $+functions[_cmake_property_names] )) ||\n_cmake_property_names() {\n  _cmake_list_names '--help-property-list' 'property name' && return 0\n}\n\n# ---------------------\n# _cmake_variable_names\n# ---------------------\n(( $+functions[_cmake_variable_names] )) ||\n_cmake_variable_names() {\n  _cmake_list_names '--help-variable-list' 'variable name' && return 0\n}\n\n# ----------------------\n# _cmake_define_property\n# ----------------------\n(( $+functions[_cmake_define_property] )) ||\n_cmake_define_property() {\n  if compset -P '*='; then\n    _wanted property-values expl 'property value' _cmake_define_property_values ${${IPREFIX%=}#-D} && return 0\n  else\n    _wanted property-names expl 'property name' _cmake_define_property_names -qS= && return 0\n  fi\n}\n\n# ----------------------------\n# _cmake_define_property_names\n# ----------------------------\n(( $+functions[_cmake_define_property_names] )) ||\n_cmake_define_property_names() {\n  local alternatives; alternatives=(\n    'common-property-names:common property name:_cmake_define_common_property_names -qS='\n  )\n  local -A cmake_langs\n  zstyle -a \":completion:${curcontext}:\" languages cmake_langs\n  [[ $#cmake_langs -eq 0 ]] && cmake_langs=('C' 'C' 'CXX' 'C++')\n\n  for cmake_lang in ${(k)cmake_langs}; do\n    cmake_lang_desc=\"${cmake_langs[$cmake_lang]}\"\n    alternatives+=(\"${cmake_lang//:/-}-property-names:${cmake_lang_desc} language property name:_cmake_define_lang_property_names -qS= ${cmake_lang} ${cmake_lang_desc}\")\n  done\n\n  _alternative \"${alternatives[@]}\"\n}\n\n# ---------------------------------\n# _cmake_define_lang_property_names\n# ---------------------------------\n(( $+functions[_cmake_define_lang_property_names] )) ||\n_cmake_define_lang_property_names() {\n  local cmake_lang=\"$@[-2]\" cmake_lang_desc=\"$@[-1]\"\n  local properties; properties=(\n    \"CMAKE_${cmake_lang}_COMPILER:${cmake_lang_desc} compiler\"\n    \"CMAKE_${cmake_lang}_FLAGS:${cmake_lang_desc} compiler flags for all builds\"\n    \"CMAKE_${cmake_lang}_FLAGS_DEBUG:${cmake_lang_desc} compiler flags for all Debug build\"\n    \"CMAKE_${cmake_lang}_FLAGS_RELEASE:${cmake_lang_desc} compiler flags for all Relase build\"\n    \"CMAKE_${cmake_lang}_FLAGS_MINSIZREL:${cmake_lang_desc} compiler flags for all MinSizRel build\"\n    \"CMAKE_${cmake_lang}_FLAGS_RELWITHDEBINFO:${cmake_lang_desc} compiler flags for all RelWithDebInfo build\"\n  )\n\n  _describe -t \"${cmake_lang//:/-}-property-names\" \"${cmake_lang_desc} property name\" properties $@[0,-3] && return 0\n}\n\n# -----------------------------------\n# _cmake_define_common_property_names\n# -----------------------------------\n(( $+functions[_cmake_define_common_property_names] )) ||\n_cmake_define_common_property_names() {\n  local properties; properties=(\n    'CMAKE_MODULE_PATH:Search path for cmake modules'\n    'CMAKE_BUILD_TYPE:Specifies the build type for make based generators'\n    'CMAKE_TOOLCHAIN_FILE:Absolute or relative path to a cmake script which sets up toolchain related variables'\n    'CMAKE_COLOR_MAKEFILE:Enables/disables color output when using the Makefile generator'\n    'CMAKE_INSTALL_PREFIX:Install directory used by install'\n    'CMAKE_EXPORT_COMPILE_COMMANDS:Enable/disable output of compilation database during generation'\n  )\n\n  _describe -t 'common-property-names' 'common property name' properties $@\n}\n\n# ----------------------------\n# _cmake_define_property_values\n# ----------------------------\n(( $+functions[_cmake_define_property_values] )) ||\n_cmake_define_property_values() {\n  local ret=1\n  setopt localoptions extendedglob\n  case $@[-1] in\n    (CMAKE_BUILD_TYPE)     _wanted build-types expl 'build type' _cmake_build_types && ret=0;;\n    (CMAKE_TOOLCHAIN_FILE) _wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0;;\n    (CMAKE_COLOR_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;\n    (CMAKE_INSTALL_PREFIX) _files -/ && ret=0;;\n    (CMAKE_EXPORT_COMPILE_COMMANDS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;;\n    (CMAKE_*_COMPILER)     _wanted compilers expl 'compiler' _cmake_compilers && ret=0;;\n    (CMAKE_*_FLAGS(|_?*))  _message -e compiler-flags 'compiler flags' && ret=0;;\n    (*)                    _files && ret=0;;\n  esac\n\n  return ret\n}\n\n# ------------------\n# _cmake_build_types\n# ------------------\n(( $+functions[_cmake_build_types] )) ||\n_cmake_build_types() {\n  local build_types; build_types=(\n    'Debug'\n    'Release'\n    'RelWithDebInfo'\n    'MinSizeRel'\n  )\n  _values 'build type' ${build_types[@]}\n}\n\n# -----------------\n# _cmake_generators\n# -----------------\n(( $+functions[_cmake_generators] )) ||\n_cmake_generators() {\n  local generators; generators=(\n    'Unix Makefiles'\n    'Ninja'\n    'CodeBlocks - Ninja'\n    'CodeBlocks - Unix Makefiles'\n    'Eclipse CDT4 - Ninja'\n    'Eclipse CDT4 - Unix Makefiles'\n    'KDevelop3'\n    'KDevelop3 - Unix Makefiles'\n    'Sublime Text 2 - Ninja'\n    'Sublime Text 2 - Unix Makefiles'\n  )\n\n  _describe -t generators 'generator' generators\n}\n\n# ----------------------\n# _cmake_toolchain_files\n# ----------------------\n(( $+functions[_cmake_toolchain_files] )) ||\n_cmake_toolchain_files() {\n  _files -g '*\\.cmake*'\n}\n\n# ---------------\n# _cmake_booleans\n# ---------------\n(( $+functions[_cmake_booleans] )) ||\n_cmake_booleans() {\n  local booleans; booleans=(\n    'YES'\n    'NO'\n  )\n  _describe -t booleans 'boolean' booleans\n}\n\n# ---------------\n# _cmake_compilers\n# ---------------\n(( $+functions[_cmake_compilers] )) ||\n_cmake_compilers() {\n  _command_names -e\n}\n\nlocal cmake_command_actions;cmake_command_actions=(\n    '-E[CMake command mode]:*:command'\n)\n_cmake_command() {\n  _arguments -C -s - command \"$cmake_command_actions[@]\"\n}\n\nlocal cmake_suggest_build;cmake_suggest_build=(\n    '--build[build]'\n)\n\nif [ $CURRENT -eq 2 ] ; then\n  _arguments -C -s \\\n    - help \\\n      \"$cmake_help_actions[@]\" \\\n    - command \\\n      \"$cmake_command_actions[@]\" \\\n    - build_opts \\\n      \"$cmake_build_options[@]\" \\\n    - build_cmds \\\n      \"$cmake_suggest_build[@]\" && return 0\nelif [[ $words[2] = --help* ]] ; then\n  _cmake_help\nelif [[ $words[2] != -E ]] ; then\n  _cmake_on_build\nelse\n  _cmake_command\nfi\n"
  },
  {
    "path": ".config/zsh/completions/src/_coffee",
    "content": "#compdef coffee\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Coffee.js v0.6.11 (http://coffeejs.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Mario Fernandez (https://github.com/sirech)\n#  * Dong Weiming (https://github.com/dongweiming)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line ret=1 version opts first second third\ntypeset -A opt_args\nversion=(${(f)\"$(_call_program version $words[1] --version)\"})\nversion=${${(z)${version[1]}}[3]}\nfirst=$(echo $version|cut -d '.' -f 1)\nsecond=$(echo $version|cut -d '.' -f 2)\nthird=$(echo $version|cut -d '.' -f 3)\nif (( $first < 2 )) &&  (( $second < 7 )) && (( $third < 3 ));then\n  opts+=('(-l --lint)'{-l,--lint}'[pipe the compiled JavaScript through JavaScript Lint]'\n         '(-r --require)'{-r,--require}'[require a library before executing your script]:library')\nfi\n\n\n_arguments -C \\\n  '(- *)'{-h,--help}'[display this help message]' \\\n  '(- *)'{-v,--version}'[display the version number]' \\\n  $opts \\\n  '(-b --bare)'{-b,--bare}'[compile without a top-level function wrapper]' \\\n  '(-e --eval)'{-e,--eval}'[pass a string from the command line as input]:Inline Script' \\\n  '(-i --interactive)'{-i,--interactive}'[run an interactive CoffeeScript REPL]' \\\n  '(-j --join)'{-j,--join}'[concatenate the source CoffeeScript before compiling]:Destination JS file:_files -g \"*.js\"' \\\n  '(--nodejs)--nodejs[pass options directly to the \"node\" binary]' \\\n  '(-c --compile)'{-c,--compile}'[compile to JavaScript and save as .js files]' \\\n  '(-o --output)'{-o,--output}'[set the output directory for compiled JavaScript]:Output Directory:_files -/' \\\n  '(-n -t -p)'{-n,--nodes}'[print out the parse tree that the parser produces]' \\\n  '(-n -t -p)'{-p,--print}'[print out the compiled JavaScript]' \\\n  '(-n -t -p)'{-t,--tokens}'[print out the tokens that the lexer/rewriter produce]' \\\n  '(-s --stdio)'{-s,--stdio}'[listen for and compile scripts over stdio]' \\\n  '(-w --watch)'{-w,--watch}'[watch scripts for changes and rerun commands]' \\\n  '*:script or directory:_files' && ret=0\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_column",
    "content": "#compdef column\n#\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for column (from util-linux 2.27.1->)\n#    (https://git.kernel.org/cgit/utils/util-linux/util-linux.git/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Ole Jørgen Brønner <olejorgenb@yahoo.no>\n#\n# ------------------------------------------------------------------------------\n#\n# Note: column has upstream bash completions.\n#\n# Automatically generated with http://github.com/RobSis/zsh-completion-generator\n\nlocal arguments\n\narguments=(\n    '(-c --columns)'{-c,--columns}'[width of output in number of characters]:width:'\n    '(-t --table)'{-t,--table}'[create a table]'\n    '(-s --separator)'{-s,--separator}'[possible table delimiters]:separator:'\n    '(-o --output-separator)'{-o,--output-separator}'[columns separator for table output; default is two spaces]:separator:'\n    '(-x --fillrows)'{-x,--fillrows}'[fill rows before columns]'\n    '(-h --help)'{-h,--help}'[display this help and exit]'\n    '(-V --version)'{-V,--version}'[output version information and exit]'\n    '*:filename:_files'\n)\n\n_arguments -s $arguments\n"
  },
  {
    "path": ".config/zsh/completions/src/_composer",
    "content": "#compdef composer\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for composer (https://getcomposer.org/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Daniel Gomes (me@danielcsgomes.com)\n#  * Valerii Hiora (https://github.com/vhbit)\n#  * loranger (https://github.com/loranger)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=$curcontext state line\ndeclare -A opt_args\n\n_composer_get_command_list () {\n    composer --no-ansi | sed \"1,/Available commands/d\" | awk '/ [a-z]+/ { print $1 }'\n}\n\n_composer_get_required_list () {\n    composer show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \\(dev\\)/{ print $1 }'\n}\n\n\n_composer () {\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n  \n  _arguments \\\n    '1: :->command'\\\n    '*: :->args'\n  if [ -f composer.json ]; then\n    case $state in\n      command)\n        compadd `_composer_get_command_list`\n        ;;\n      *)\n        compadd `_composer_get_required_list`\n        ;;\n    esac\n  else\n   compadd create-project init search selfupdate show\n  fi\n}\n\ncompdef _composer composer"
  },
  {
    "path": ".config/zsh/completions/src/_console",
    "content": "#compdef console\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for symfony console (https://github.com/symfony/Console).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * loranger (https://github.com/loranger)\n#  * Yohan Tambè (https://github.com/Cronos87)\n#\n# ------------------------------------------------------------------------------\n\n_find_console () {\n     echo \"php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)\"\n}\n\n_console_get_command_list () {\n    IFS=\" \"\n    `_find_console` --no-ansi | \\\n        sed \"1,/Available commands/d\" | \\\n        awk '/  [a-z]+/ { print $0 }' | \\\n        sed -E 's/^[ ]+//g' | \\\n        sed -E 's/[:]+/\\\\:/g' | \\\n        sed -E 's/[ ]{2,}/\\:/g'\n}\n\n_console () {\n    local -a commands\n    IFS=$'\\n'\n    commands=(`_console_get_command_list`)\n    _describe 'commands' commands\n}\n\ncompdef _console php console\ncompdef _console console\n"
  },
  {
    "path": ".config/zsh/completions/src/_dad",
    "content": "#compdef dad\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for dad a command line manager of aria2 daemon. (https://github.com/baskerville/diana).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n_dad() {\n    local -a commands\n\n    commands=(\n        \"start:Start aria2c daemon\"\n        \"stop:Stop aria2c daemon\"\n    )\n\n    _arguments -C \\\n      '(- 1 *)'-h\"[Show help and exit]\" \\\n      \"-d[Set download dir]:download_dir:->val\" \\\n      \"-s[Set secret token]:secret_token:->val\" \\\n      \"-u[Set aria2c username]:username:->val\" \\\n      \"-p[Set aria2c password]:password:->val\" \\\n      '1:cmd:->cmds' \\\n      '*: : :->args' \\\n\n    case \"$state\" in\n      (cmds)\n        _describe -t commands 'commands' commands\n      ;;\n      (*)\n      ;;\n    esac\n}\n\n_dad\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_debuild",
    "content": "#compdef debuild\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for debuild 2.10.\n#\n#  Status: incomplete.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n# FIXME --noconf is only allowed in first position\n_arguments \\\n  '(- 1 *)'{-h,--help}'[show help]' \\\n  '(- 1 *)--version[show version and copyright information]' \\\n  {--no-conf,--noconf}'[don'\\''t read devscripts config files]' \\\n  {-r-,--rootcmd=}'[command used to become root if debuild not setuid root (default: fakeroot)]: :_command_names' \\\n  '*'{-e-,--preserve-envvar=}'[preserve environment variable]: :_vars' \\\n  '(-e --preserve-envvar)--preserve-env[preserve all environment vars (except PATH)]' \\\n  '*'{-e-,--set-envvar=}'[preserve environment variable]: :_vars -qS=' \\\n  '--prepend-path=[prepend to the sanitised PATH]: :_files -/' \\\n  '(-D)-d[skip checking of build dependencies]' \\\n  '(-d)-D[force checking of build dependencies]' \\\n  '--check-dirname-level[how much to check directory names]:level:((0\\:never 1\\:only\\ if\\ program\\ changes\\ directory\\ \\(default\\) 2\\:always))' \\\n  '--check-dirname-regex[Perl regex defining matching directory names, the string PACKAGE will be replaced by the package name (default: '\\''PACKAGE(-.+)?'\\'')]:regex'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_dget",
    "content": "#compdef dget\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for dget\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Kris Shannon <k.shannon@amaze.com.au>\n#\n# ------------------------------------------------------------------------------\n\n_dget() {\n    local context state line expl\n    local -A opt_args\n\n    _arguments -A \"-*\" \\\n        '(--no-conf -h --help)'{-h,--help}'[Show help message]' \\\n        '(--no-conf -V --version)'{-v,--version}'[Print license, copyright, and version information and exit]' \\\n        '(--no-conf -b --backup)'{-b,--backup}'[Move files that would be overwritten to ./backup]' \\\n        '(--no-conf -q --quiet)'{-q,--quiet}'[Suppress wget/curl output]' \\\n        '(--no-conf -x --extract -d --download-only --build)'{-d,--download-only}'[Do not extract downloaded source]' \\\n        '(--no-conf -x --extract -d --download-only --build)'{-x,--extract}'[Unpack downloaded source]' \\\n        '(--no-conf -x --extract -d --download-only --build)--build[Build package with dpkg-buildpackage after download]' \\\n        '(--no-conf -u --allow-unauthenticated)'{-u,--allow-unauthenticated}'[Make no attempt to verify source package signature]' \\\n        '(--no-conf)--path[Check this directory in addition to the apt archive]:DIR:_files -/' \\\n        '(--no-conf --insecure)--insecure[Do not check SSL certificates when downloading]' \\\n        '(--no-conf --no-cache)--no-cache[Disable server-side HTTP cache]' \\\n        \"(--no-conf)--no-conf[Don't read devscripts config files]\" \\\n        '(-)*:debian package urls:_urls'\n}\n\n_dget \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_dhcpcd",
    "content": "#compdef dhcpcd\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for dhcpcd 2.3.2.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n    '1:network interface:_net_interfaces' \\\n  - release \\\n    '(-k --release)'{-k,--release}'[causes an existing dhcpcd process running on the interface to release it'\\''s lease, deconfigure the interface and then exit]' \\\n  - exit \\\n    '(-x --exit)'{-x,--exit}'[causes an existing dhcpcd process running on the interface to exit]' \\\n  - main \\\n    '(-d --debug)'{-d,--debug}'[echo debug and informational messages to the console]' \\\n    '(-h --hostname)'{-h,--hostname}'[specify the hostname sent, or an empty string to stop any hostname from being sent]:hostname:_hosts' \\\n    '(-i --classid)'{-i,--classid}'[override the DHCP vendor classid field we send]:classid' \\\n    '(-l --leasetime)'{-l,--leasetime}'[request a specific lease time in seconds]:lease time \\(seconds\\)' \\\n    '(-m --metric)'{-m,--metric}'[added routes will use the metric on systems where this is supported]:metric' \\\n    '(-n --renew)'{-n,--renew}'[notifies an existing dhcpcd process running on the interface to renew it'\\''s lease]' \\\n    '(-p --persistent)'{-p,--persistent}'[don'\\''t deconfigure the interface and configuration at exit]' \\\n    '(-r --request)'{-r,--request}'[skip the broadcast request step and just request an address]:address' \\\n    '(-s --inform)'{-s,--inform}'[behaves exactly like -r, but sends a DHCP inform instead of a request]:address' \\\n    '(-t --timeout)'{-t,--timeout}'[timeout after seconds, instead of the default 20]:timeout \\(seconds\\)' \\\n    '(-u --userclass)'{-u,--userclass}'[tags the DHCP message with the userclass class]:class' \\\n    '*'{-H,--sethostname}'[forces dhcpcd to set the hostname as supplied by the DHCP server]' \\\n    '({-I --clientid)'{-I,--clientid}'[send clientid as a client identifier string]:clientid' \\\n    '*'{-S,--mscsr}'[request Microsoft specific Classless Static Routes (RFC 3442) code as well]' \\\n    '(-A --noarp)'{-A,--noarp}'[don'\\''t request or claim the address by ARP]' \\\n    '(-G --nogateway)'{-G,--nogateway}'[don'\\''t set any default routes]' \\\n    '(-L --noipv4ll)'{-L,--noipv4ll}'[don'\\''t use IPv4LL at all]' \\\n    '(-M --nomtu)'{-M,--nomtu}'[don'\\''t set the MTU of the interface]' \\\n    '(-N --nontp)'{-N,--nontp}'[don'\\''t touch /etc/ntpd.conf or restart the ntp service]' \\\n    '(-R --nodns)'{-R,--nodns}'[don'\\''t send DNS information to resolvconf or touch /etc/resolv.conf]' \\\n    '(-T --test)'{-T,--test}'[on receipt of discover messages, simply print the contents of the DHCP message to the console]' \\\n    '(-Y --nonis)'{-Y,--nonis}'[don'\\''t touch /etc/yp.conf or restart the ypbind service]'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_diana",
    "content": "#compdef diana\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Diana a command line interface to the aria2 daemon. (https://github.com/baskerville/diana).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\nlocal GIDs PGIDs\n\n_diana_load_gids() {\n  GIDs=()\n  local downloads hashArr fileName\n\n  downloads=$(diana list | cut -d' ' -f1)\n\n  if [ ${#downloads} -eq \"0\" ]; then\n    return\n  fi\n\n  hashArr=(\"${(f)$(echo \"$downloads\")}\")\n  for ((i=1; i<=${#hashArr[@]}; i++)); do\n    fileName=$(diana files $hashArr[i] | grep \"[X]\" | rev | cut -d'/' -f1 | rev);\n    GIDs+=(\"$hashArr[i]:$fileName\");\n  done\n}\n\n_diana_load_paused_gids() {\n  PGIDs=()\n  local downloads hashArr fileName\n\n  downloads=$(diana paused | cut -d' ' -f1)\n\n  if [ ${#downloads} -eq \"0\" ]; then\n    return\n  fi\n\n  hashArr=(\"${(f)$(echo \"$downloads\")}\")\n  for ((i=1; i<=${#hashArr[@]}; i++)); do\n    fileName=$(diana files $hashArr[i] | grep \"[X]\" | rev | cut -d'/' -f1 | rev);\n    PGIDs+=(\"$hashArr[i]:$fileName\");\n  done\n}\n\n_diana_command_arguments() {\n  case $words[1] in\n    (remove)\n      _diana_load_gids\n      _describe -t output 'Downloads to delete' GIDs\n    ;;\n    (info)\n      _diana_load_gids\n      _describe -t output 'Downloads to get info' GIDs\n    ;;\n    (files)\n      _diana_load_gids\n      _describe -t output 'Get files for downloads' GIDs\n    ;;\n    (forcerm)\n      _diana_load_gids\n      _describe -t output 'Downloads to delete' GIDs\n    ;;\n    (pause)\n      _diana_load_gids\n      _describe -t output 'Downloads to pause' GIDs\n    ;;\n    (resume)\n      _diana_load_paused_gids\n      _describe -t output 'Downloads to resume' PGIDs\n    ;;\n    (preview)\n      _diana_load_gids\n      _describe -t output 'Downloads to preview' GIDs\n    ;;\n  esac\n\n\n}\n\n_diana() {\n    local -a commands\n\n    commands=(\n        \"list:Output the list of active downloads.\"\n        \"paused:Output the list of paused downloads.\"\n        \"stopped:Output the list of stopped downloads.\"\n        \"info:Output informations regarding the given GIDs.\"\n        \"files:Output the files owned by the downloads corresponding to the given GIDs.\"\n        \"errors:Output the list of errors.\"\n        \"stats:Output download bandwidth statistics.\"\n        \"add:Download the given items (local or remote URLs to torrents, etc.).\"\n        \"remove:Remove the downloads corresponding to the given GIDs.\"\n        \"forcerm:Forcibly remove the downloads corresponding to the given GIDs.\"\n        \"pause:Pause the downloads corresponding to the given GIDs.\"\n        \"resume:Resume the downloads corresponding to the given GIDs.\"\n        \"preview:Preview all the files from all the downloads corresponding to the given GIDs.\"\n        \"sleep:Pause all the active downloads.\"\n        \"wake:Resume all the paused downloads.\"\n        \"purge:Clear the list of stopped downloads and errors.\"\n        \"clean:Stop seeding completed downloads.\"\n    )\n\n_arguments -C \\\n  '1:cmd:->cmds' \\\n  '*:: :->args' \\\n\ncase \"$state\" in\n  (cmds)\n    _describe -t commands 'commands' commands\n  ;;\n  (*)\n    _diana_command_arguments\n  ;;\nesac\n}\n\n_diana\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_docpad",
    "content": "#compdef docpad\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for docpad (https://github.com/bevry/docpad).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Changwoo Park (https://github.com/pismute)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line  ret=1\n\nlocal -a _1st_arguments\n_1st_arguments=(\n  'run: run [options], does everything - skeleton, generate, watch, server'\n  'server: server [options], creates a server for your generated project'\n  'skeleton: skeleton [options], will create a new project in your cwd based off an existing skeleton'\n  'render: render [path], render the file at <path> and output its results to stdout:path:_files'\n  'generate: (re)generates your project'\n  'watch: watches your project for changes, and (re)generates whenever a change is made'\n  'install: ensure everything is installed correctly'\n  'clean: ensure everything is cleaned correctly'\n  'info: display the information about your docpad instance'\n  'help: output the help'\n)\n\n_arguments -C \\\n  '(-h --help)'{-h,--help}'[output usage information]'\\\n  '(-V --version)'{-V,--version}'[output the version number]'\\\n  '(-o --out)'{-o,--out}'[where to output the rendered directory or files]:path:_files'\\\n  '(-c --config)'{-c,--config}'[a custom configuration file to load in]:path:_files'\\\n  '(-e --env)'{-e,--env}'[the environment name to use for this instance, multiple names can be separated with a comma]'\\\n  '(-d --debug)'{-d,--debug}'+[the level of debug messages you would like to display, if specified defaults to 7, otherwise 6]:number'\\\n  '(-f --force)'{-f,--force}'[force a re-install of all modules]'\\\n  '1: :->cmds'\\\n  '*: :_files'&& ret=0\n\ncase $state in\n  cmds)\n    _describe -t commands 'docpad command' _1st_arguments && ret=0\n    ;;\n\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_drush",
    "content": "#compdef drush\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Drush (http://drush.ws).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Vasily Kraev (https://github.com/vasilykraev)\n#\n# ------------------------------------------------------------------------------\n\n_drush() {\n  local curcontext='$curcontext' state line cmds ret=1\n  integer NORMARG\n  typeset -A opt_args\n\n  global_args=('--debug' '--verbose' '--yes' '--no' '--simulate' '--root=' '--uri=')\n\n  _arguments -C \\\n    '(--*)'{--version,--version}'[Show drush version.]' \\\n    '(- *)'{-d,--debug}'[Display even more information, including internal messages.]' \\\n    '(- *)'{-v,--verbose}'[Display extra information about the command.]' \\\n    '(- *)'{-y,--yes}'[Assume \"yes\" as answer to all prompts.]' \\\n    '(- *)'{-n,--no}'[Assume \"no\" as answer to all prompts.]' \\\n    '(- *)'{-s,--simulate}'[Simulate all relevant actions (dont actually change the system).]' \\\n    '(- *)'{-r,--root=}'[Drupal root directory to use (default: current directory).]' \\\n    '(- *)'{-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]' \\\n    '1: :->cmds' \\\n    '*::arg:->args' \\\n  && ret=0\n\ncase $state in\n  cmds)\n    _values 'drush command' \\\n      '(archive-dump)'{archive-dump,ard,arb}'[Backup your code, files, and database into a single file.]' \\\n      '(archive-restore)'{archive-restore,arr}'[Expand a site archive into a Drupal web site.]' \\\n      '(cache-clear)'{cache-clear,cc}'[Clear a specific cache, or all drupal caches.]' \\\n      '(core-status)'{core-status,status,st}'[Provides a birds-eye view of the current Drupal installation, if any.]' \\\n      '(core-cron)'{core-cron,cron}'[Run all cron hooks in all active modules for specified site.]' \\\n      '(core-execute)'{core-execute,exec}'[Execute a shell command. Usually used with a site alias.]' \\\n      '(drupal-directory)'{drupal-directory,dd}'[Return the filesystem path for modules/themes and other key folders.]' \\\n      'help[Print this help message.]' \\\n      'image-flush[Flush all derived images for a given style.]' \\\n      '(site-alias)'{site-alias,sa}'[Print an alias record.]' \\\n      '(site-install)'{site-install,si}'[Install Drupal along with modules/themes/configuration using the specified install profile.]' \\\n      'test-clean[Clean temporary tables and files.]' \\\n      'test-run[Run tests. Note that you must use the --uri option.]' \\\n      '(updatedb)'{updatedb,updb}'[Apply any database updates required (as with running update.php).]' \\\n      '(variable-delete)'{variable-delete,vdel}'[Delete a variable.]' \\\n      '(variable-get)'{variable-get,vget}'[Get a list of some or all site variables and values.]' \\\n      '(variable-set)'{variable-set,vset}'[Set a variable.]' \\\n      '(pm-list)'{pm-list,pml}'[Show a list of available extensions (modules and themes).]' \\\n      '(pm-disable)'{pm-disable,dis}'[Disable one or more extensions (modules or themes). Disable dependant extensions as well.]' \\\n      '(pm-download)'{pm-download,dl}'[Download projects from drupal.org or other sources.]' \\\n      '(pm-enable)'{pm-enable,en}'[Enable one or more extensions (modules or themes). Enable dependant extensions as well.]' \\\n      'pm-uninstall[Uninstall one or more modules.]' \\\n      'pm-update[Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb).]' \\\n      '(sql-cli)'{sql-cli,sqlc}'[Open a SQL command-line interface using Drupals credentials.]' \\\n      'sql-drop[Drop all tables in a given database.]' \\\n      'sql-dump[Exports the Drupal DB as SQL using mysqldump or equivalent.]' \\\n      '(sql-query)'{sql-query,sqlq}'[Execute a query against the site database.]' \\\n      'sql-sync[Copy and import source database to target database. Transfers via rsync.]' \\\n      '(user-login)'{user-login,uli}'[Display a one time login link for the given user account (defaults to uid 1).]' \\\n      '(user-password)'{user-password,upwd}'[(Re)Set the password for the user account with the specified name.]' \\\n      '(devel-reinstall)'{devel-reinstall,dre}'[Disable, Uninstall, and Install a list of projects. (devel)]' \\\n      '(devel-token)'{devel-token,token}'[List available tokens (devel)]' \\\n      '(generate-content)'{generate-content,genc}'[Create content. (devel_generate)]' \\\n      '(generate-menus)'{generate-menus,genm}'[Create menus and menu items. (devel_generate)]' \\\n      '(generate-terms)'{generate-terms,gent}'[Create terms in specified vocabulary. (devel_generate)]' \\\n      '(generate-users)'{generate-users,genu}'[Create users. (devel_generate)]' \\\n      '(generate-vocabs)'{generate-vocabs,genv}'[Create vocabularies. (devel_generate)]' \\\n      '(features-diff)'{features-diff,fd}'[Show the difference between the default and overridden state of a feature.]' \\\n      '(features-export)'{features-export,fe}'[Export a feature from your site into a module.]' \\\n      '(features-list)'{features-list,fl}'[List all the available features for your site.]' \\\n      '(features-revert)'{features-revert,fr}'[Revert a feature module on your site.]' \\\n      '(features-revert-all)'{features-revert-all,fra}'[Revert all enabled feature module on your site.]' \\\n      '(features-update)'{features-update,fu}'[Update a feature module on your site.]' \\\n      '(features-update-all)'{features-update-all,fua}'[Update all feature modules on your site.]' \\\n  && ret=0\n    ;;\n  args)\n    case $line[1] in\n      (archive-dump|ard)\n        _arguments \\\n          '(--description)--description=[Filter out extensions that are provided by drupal core.]' \\\n          '(--destination)--destination=[The full path and filename in which the archive should be stored. If omitted, it will be saved to the drush-backups directory.]' \\\n          '(--no-core)--no-core[Exclude Drupal core, so the backup only contains the site specific stuff.]' \\\n          '(--pipe)--pipe[Only print the destination of the archive. Useful for scripts that dont pass --destination.]' \\\n          '(--tar-options)--tar-options=[Options passed thru to the tar command.]' \\\n        && ret=0\n        compadd -a global_args\n      ;;\n      (archive-restore|arr)\n        _arguments \\\n          '(--db-prefix)--db-prefix[An optional table prefix to use during restore.]' \\\n          '(--db-su)--db-su[Account to use when creating the new database. Optional.]' \\\n          '(--db-su-pw)--db-su-pw[Password for the \"db-su\" account. Optional.]' \\\n          '(--db-url)--db-url=[A Drupal 6 style database URL indicating the target for database restore. If not provided, the archived settings.php is used. ]' \\\n          '(--destination)--destination[Specify where the Drupal site should be expanded, including the docroot. Defaults to the current working directory.]' \\\n          '(--overwrite)--overwrite[Allow drush to overwrite any files in the destination.]' \\\n        && ret=0\n        compadd -a global_args\n      ;;\n      (user-password|upwd)\n        _arguments \\\n          '--password=:Set the password for the username someuser.' \\\n        && ret=0\n      ;;\n      (help)\n        _values 'commands' 'arb' 'archive-dump' 'archive-restore' 'ard' 'arr' 'cache-clear' 'cc' 'core-cron' 'core-execute' 'core-status' 'cron' 'dd' 'devel-reinstall' 'devel-token' 'dis' 'dl' 'dre' 'drupal-directory' 'en' 'exec' 'fd' 'fe' 'features-diff' 'features-export' 'features-list' 'features-revert' 'features-revert-all' 'features-update' 'features-update-all' 'fl' 'fr' 'fra' 'fu' 'fua' 'genc' 'generate-content' 'generate-menus' 'generate-terms' 'generate-users' 'generate-vocabs' 'genm' 'gent' 'genu' 'genv' 'help' 'image-flush' 'pm-disable' 'pm-download' 'pm-enable' 'pm-list' 'pm-uninstall' 'pm-update' 'pml' 'sa' 'si' 'site-alias' 'site-install' 'sql-cli' 'sql-drop' 'sql-dump' 'sql-query' 'sql-sync' 'sqlc' 'sqlq' 'st' 'status' 'test-clean' 'test-run' 'token' 'uli' 'updatedb' 'updb' 'upwd' 'user-login' 'user-password' 'variable-delete' 'variable-get' 'variable-set' 'vdel' 'vget' 'vset'\n      ;;\n      (cc)\n        _values 'options' 'all' 'drush' 'theme-registry' 'menu' 'css-js' 'block'\n      ;;\n      (pm-list|pml)\n        _arguments \\\n          '(--core)--core[Filter out extensions that are not in drupal core.]' \\\n          '(--no-core)--no-core[Filter out extensions that are provided by drupal core.]' \\\n          '(--pipe)--pipe[Returns a whitespace delimited list of the names of the resulting extensions.]' \\\n          '(--status)--status=-[Filter by extension status. Choices: enabled, disabled and/or \"not installed\".]:status:(enabled disabled)' \\\n          '(--type)--type=-[Filter by extensions ension type. Choices: module, theme.]:type:(module theme)' \\\n        && ret=0\n      ;;\n      (pm-disable|dis)\n        _modules=( $(drush pml --status=enabled --pipe) )\n        if [[ $_modules != \"\" ]]; then\n          _values 'enabled modules' $_modules\n        fi\n      ;;\n      (pm-enable|en)\n        _arguments -C \\\n          '--resolve-dependencies[Attempt to download any missing dependencies. At the moment, only works when the module name is the same as the project name.]' \\\n          '--skip[Skip automatic downloading of libraries (c.f. devel).]' && ret=0\n        _modules=( $(drush pml --status=\"disabled,not installed\" --pipe) )\n        if [[ $_modules != \"\" ]]; then\n          _values -s 'not yet enabled modules' $_modules && ret=0\n        fi\n      ;;\n      (*)\n        _values 'Global options' \\\n          {-d,--debug}'[Display even more information, including internal messages.]' \\\n          {-v,--verbose}'[Display extra information about the command.]' \\\n          {-y,--yes}'[Assume \"yes\" as answer to all prompts.]' \\\n          {-n,--no}'[Assume \"no\" as answer to all prompts.]' \\\n          {-s,--simulate}'[Simulate all relevant actions (dont actually change the system).]' \\\n          {-r,--root=}'[Drupal root directory to use (default: current directory).]' \\\n          {-l,--uri=}'[URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).]'\n        ;;\n    esac\n    ;;\nesac\n}\n\n_drush '$@'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_emulator",
    "content": "#compdef emulator\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for emulator (Android Emulator) 12.0\n#  (http://developer.android.com/guide/developing/tools/emulator.html).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\ntypeset -A opt_args\nlocal context state line curcontext=\"$curcontext\"\n\n# TODO All image options are contextual to -sysdir value\n# TODO All skin options are contextual to -skindir value\n# TODO snapshot options are mutually exclusive\n# TODO Use '-snapshot-list' output for snapshot names\n# TODO Complete -avd with avd names ?\n# TODO -logcat: use completer from _adb\n# TODO Complete options with device values\n# TODO Complete -prop\n_arguments \\\n  '(- : *)-version[display emulator version number]' \\\n  '(- : *)-help[display help information]' \\\n  '(- : *)-help-disk-images[about disk images]' \\\n  '(- : *)-help-keys[supported key bindings]' \\\n  '(- : *)-help-debug-tags[debug tags for -debug <tags>]' \\\n  '(- : *)-help-char-devices[character <device> specification]' \\\n  '(- : *)-help-environment[environment variables]' \\\n  '(- : *)-help-keyset-file[key bindings configuration file]' \\\n  '(- : *)-help-virtual-device[virtual device management]' \\\n  '(- : *)-help-sdk-images[about disk images when using the SDK]' \\\n  '(- : *)-help-build-images[about disk images when building Android]' \\\n  '(- : *)-help-all[prints all help content]' \\\n  '(- : *)-help-'{version,sysdir,system,image,datadir,kernel,ramdisk,initdata,data,partition-size,cache,no-cache,nocache,sdcard,snapstorage,no-snapstorage,snapshot,no-snapshot,no-snapshot-save,no-snapshot-load,snapshot-list,no-snapshot-update-time,wipe-data,avd,skindir,skin,noskin,no-skin,memory,netspeed,netdelay,netfast,trace,show-kernel,shell,no-jni,nojni,logcat,noaudio,no-audio,audio,raw-keys,radio,port,ports,onion,onion-alpha,onion-rotation,scale,dpi-device,http-proxy,timezone,dns-server,cpu-delay,no-boot-anim,no-window,report-console,gps,keyset,shell-serial,tcpdump,bootchart,charmap,prop,shared-net-id,nand-limits,memcheck,qemu,verbose}'[print option-specific help]' \\\n  '-sysdir[search for system disk images in the directory]: :_files -/' \\\n  '(-system -image)'{-system,-image}'[read initial system image from the file]: :_files -g \"*.img\"' \\\n  '-datadir[write user data into the directory]: :_files -/' \\\n  '-kernel[use specific emulated kernel]: :_files' \\\n  '-ramdisk[ramdisk image (default <system>/ramdisk.img]: :_files -g \"*.img\"' \\\n  '-initdata[same as '\\''-init-data <file>'\\'']: :_files' \\\n  '-data[data image (default <datadir>/userdata-qemu.img]: :_files -g \"*.img\"' \\\n  '-partition-size[system/data partition size]:size (in MBs)' \\\n  '(-no-cache -nocache)-cache[cache partition image (default is temporary file)]: :_files -g \"*.img\"' \\\n  '(-cache -no-cache -nocache)'{-no-cache,-nocache}'[disable the cache partition]' \\\n  '-sdcard[SD card image (default <system>/sdcard.img]: :_files -g \"*.img\"' \\\n  '(-no-snapstorage)-snapstorage[file that contains all state snapshots (default <datadir>/snapshots.img)]: :_files -g \"*.img\"' \\\n  '(-snapstorage)-no-snapstorage[do not mount a snapshot storage file (this disables all snapshot functionality)]' \\\n  '-snapshot[name of snapshot within storage file for auto-start and auto-save (default '\\''default-boot'\\'')]:snapshot name' \\\n  '-no-snapshot[perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage]' \\\n  '-no-snapshot-save[do not auto-save to snapshot on exit: abandon changed state]' \\\n  '-no-snapshot-load[do not auto-start from snapshot: perform a full boot]' \\\n  '-snapshot-list[show a list of available snapshots]' \\\n  '-no-snapshot-update-time[do not do try to correct snapshot time on restore]' \\\n  '-wipe-data[reset the user data image (copy it from initdata)]' \\\n  '-avd[use a specific android virtual device]:android virtual device name' \\\n  '-skindir[search skins in <dir> (default <system>/skins)]: :_files -/' \\\n  '-skin[select a given skin]' \\\n  '(-noskin -no-skin)'{-noskin,-no-skin}'[don'\\''t use any emulator skin]' \\\n  '-memory[physical RAM size in MBs]:size (in MBs)' \\\n  '-netspeed[maximum network download/upload speeds]:speed' \\\n  '-netdelay[network latency emulation]:delay' \\\n  '-netfast[disable network shaping]' \\\n  '-trace[enable code profiling (F9 to start)]:trace name' \\\n  '-show-kernel[display kernel messages]' \\\n  '-shell[enable root shell on current terminal]' \\\n  {-no-jni,-nojni}'[disable JNI checks in the Dalvik runtime]' \\\n  '-logcat[enable logcat output with given tags]:logcat tags' \\\n  '(-audio -noaudio -no-audio)'{-noaudio,-no-audio}'[disable audio support]' \\\n  '(-noaudio -no-audio)-audio[use specific audio backend]:audio backend' \\\n  '-raw-keys[disable Unicode keyboard reverse-mapping]' \\\n  '-radio[redirect radio modem interface to character device]:device' \\\n  '-port[TCP port that will be used for the console]:port number' \\\n  '-ports[TCP ports used for the console and adb bridge]:console port,adb port' \\\n  '-onion[use overlay PNG image over screen]: :_files -g \"*.(png|PNG)\"' \\\n  '-onion-alpha[specify onion-skin translucency]:percentage' \\\n  '-onion-rotation[specify onion-skin rotation]:rotation:((1 2 3 4))' \\\n  '-scale[scale emulator window]:scale' \\\n  '-dpi-device[specify device'\\''s resolution in dpi (default 165)]:dpi' \\\n  '-http-proxy[make TCP connections through a HTTP/HTTPS proxy]:proxy' \\\n  '-timezone[use this timezone instead of the host'\\''s default]:timezone' \\\n  '-dns-server[use this DNS server(s) in the emulated system]:DNS servers' \\\n  '-cpu-delay[throttle CPU emulation]:CPU delay' \\\n  '-no-boot-anim[disable animation for faster boot]' \\\n  '-no-window[disable graphical window display]' \\\n  '-report-console[report console port to remote socket]: :_socket' \\\n  '-gps[redirect NMEA GPS to character device]:device' \\\n  '-keyset[specify keyset file name]: :_files' \\\n  '-shell-serial[specific character device for root shell]:device' \\\n  '-tcpdump[capture network packets to file]: :_files' \\\n  '-bootchart[enable bootcharting]:timeout' \\\n  '-charmap[use specific key character map]: :_files' \\\n  '*-prop[set system property on boot]:name=value' \\\n  '-shared-net-id[join the shared network, using IP address 10.1.2.<number>]:number' \\\n  '-nand-limits[enforce NAND/Flash read/write thresholds]:limits' \\\n  '-memcheck[enable memory access checking]:flags' \\\n  '-qemu[pass arguments to qemu]:arguments' \\\n  '-verbose[same as '\\''-debug-init'\\'']' \\\n  '*'{-debug,-debug-,-debug-no-}'[enable/disable specific debug messages]:tag'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_envdir",
    "content": "#compdef envdir\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016, Github zsh-users (https://github.com/zsh-users)\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY DIRECT,\n# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for envdir (https://github.com/jezdez/envdir).\n#  It completes its few options and then a directory and command.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Daniel Hahler <https://daniel.hahler.de/>\n#\n# ------------------------------------------------------------------------------\n\nargs=(\n  '(-h --help)'{-h+,--help}'[show this help message and exit]'\n  '(-)'--version'[display version information and exit]'\n  '(-)1:directory: _path_files -/'\n  '(-)2:command: _command_names -e'\n  '*::arguments: _precommand'\n)\n_arguments -S $args\n"
  },
  {
    "path": ".config/zsh/completions/src/_exportfs",
    "content": "#compdef exportfs\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for nfs's exportfs - maintain table of exported NFS file systems.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Timofey Titovets <nefelim4ag@gmail.com>\n#\n# ------------------------------------------------------------------------------\n_exportfs() {\n  _values -w 'option' \\\n    '(-i)-a[Export or unexport all directories]' \\\n    '(-a -r -u)-i[Ignore the /etc/exports file and files under /etc/exports.d directory]' \\\n    '(-i)-r[Reexport  all  directories]' \\\n    '(-i)-u[Unexport one or more directories]' \\\n    '-f[flush everything out of export table]' \\\n    '-o[option1,option2.. Specify a list of export options]' \\\n    '-s[Display the current export list suitable for /etc/exports]' \\\n    '-v[Be verbose]'\n}\n_exportfs \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_fab",
    "content": "#compdef fab\n# ------------------------------------------------------------------------------\n# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Fabric (http://fabfile.org)\n#\n#  Source: https://github.com/vhbit/fabric-zsh-autocomplete\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Valerii Hiora (https://github.com/vhbit)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal curcontext=$curcontext state line\ndeclare -A opt_args\n\ndeclare target_list\ntarget_list=(`fab --shortlist 2>/dev/null`)\n\n_targets() {\n    _describe -t commands \"fabric targets\" target_list\n}\n\noutput_levels=(\n    'status: Status messages, i.e. noting when Fabric is done running, if the user used a keyboard interrupt, or when servers are disconnected from. These messages are almost always relevant and rarely verbose.'\n    'aborts: Abort messages. Like status messages, these should really only be turned off when using Fabric as a library, and possibly not even then. Note that even if this output group is turned off, aborts will still occur – there just won’t be any output about why Fabric aborted!'\n    'warnings: Warning messages. These are often turned off when one expects a given operation to fail, such as when using grep to test existence of text in a file. If paired with setting env.warn_only to True, this can result in fully silent warnings when remote programs fail. As with aborts, this setting does not control actual warning behavior, only whether warning messages are printed or hidden.'\n    'running: Printouts of commands being executed or files transferred, e.g. [myserver] run: ls /var/www. Also controls printing of tasks being run, e.g. [myserver] Executing task ''foo''.'\n    'stdout: Local, or remote, stdout, i.e. non-error output from commands.'\n    'stderr: Local, or remote, stderr, i.e. error-related output from commands.'\n    'user: User-generated output, i.e. local output printed by fabfile code via use of the fastprint or puts functions.'\n)\n\n_arguments -w -S -C \\\n  '(-)'{-h,--help}'[show this help message and exit]: :->noargs' \\\n  '(-)'{-V,--version}'[show program''s version number and exit]: :->noargs' \\\n  '(-)--list[print list of possible commands and exit]: :->noargs' \\\n  '(-)--shortlist[print non-verbose list of possible commands and exit]: :->noargs' \\\n  '(--reject-unknown-hosts)--reject-unknown-hosts[reject unknown hosts]' \\\n  '(--no-pty)--no-pty[do not use pseudo-terminal in run/sudo]' \\\n  \"(-d+ --display=-)\"{-d+,--display=-}\"[print detailed info about a given command]: :_targets\" \\\n  '(-D --disable-known-hosts)'{-D,--disable-known-hosts}'[do not load user known_hosts file]' \\\n  '(-r --reject-unknown-hosts)'{-r,--reject-unknown-hosts}'[reject unknown hosts]' \\\n  '(-u+ --user=-)'{-u+,--user=-}'[username to use when connecting to remote hosts]: :' \\\n  '(-p+ --password=-)'{-p+,--password=-}'[password for use with authentication and/or sudo]: :' \\\n  '(-H+ --hosts=-)'{-H+,--hosts=-}'[comma separated list of hosts to operate on]: :' \\\n  '(-R+ --roles=-)'{-R+,--roles=-}'[comma separated list of roles to operate on]: :' \\\n  '(-a --no-agent)'{-a,--no-agent}'[don''t use the running SSH agent]' \\\n  '(-k --no-keys)'{-k,--no-keys}'[don''t load private key files from ~/.ssh/]' \\\n  '(-w --warn-only)'{-w,--warn-only}'[warn instead of abort, when commands fail]' \\\n  '-i+[path to SSH private key file. May be repeated]: :_files' \\\n  \"(-f+ --fabfile=)\"{-f+,--fabfile=}\"[Python module file to import]: :_files -g *.py\" \\\n  '(-c+ --config=-)'{-c+,--config=-}'[specify location of config file to use]: :_files' \\\n  '(-s+ --shell=-)'{-s+,--shell=-}'[specify a new shell, defaults to ''/bin/bash -l -c'']: :' \\\n  '(--ssh-config-path=)--ssh-config-path=[ssh config path]: :_files' \\\n  '(--hide=-)--hide=-[comma-separated list of output levels to hide]: :->levels' \\\n  '(--show=-)--show=-[comma-separated list of output levels to show]: :->levels' \\\n  '*::: :->subcmds' && return 0\n\nif [[ CURRENT -ge 1 ]]; then\n    case $state in\n        noargs)\n             _message \"nothing to complete\";;\n        levels)\n            _describe -t commands \"output levels\" output_levels;;\n        *)\n            _targets;;\n    esac\n\n    return\nfi\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ffind",
    "content": "#compdef ffind\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ffind (https://github.com/jaimebuelta/ffind).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n# * Sergei Eremenko (https://github.com/SmartFinn)\n#\n# ------------------------------------------------------------------------------\n\n_arguments -C \\\n  '(-h --help)'{-h,--help}'[show help message and exit]' \\\n  '--version[show version number and exit]' \\\n  '-p[match whole path, not only name of files]' \\\n  '--nocolor[do not display color]' \\\n  '--nosymlinks[do not follow symlinks]' \\\n  '--hidden[do not ignore hidden directories]' \\\n  '-c[force case sensitive]' \\\n  '--delete[delete files found]' \\\n  '--exec[execute the given command with the file found]:command:_command_names' \\\n  '--module[execute the given module with the file found]:module_name args:' \\\n  '--command[execute the given python program with the file found]:program:_files' \\\n  '--ignore-vcs[ignore version control system files and directories]' \\\n  '-f[experimental fuzzy search]' \\\n  '--return-results[for testing purposes only]' \\\n  '1:directory to search:_path_files -/' \\\n  '*:filepattern:'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_fleetctl",
    "content": "#compdef fleetctl\n# ------------------------------------------------------------------------------\n# Copyright (c) 2009-2015 Robby Russell and contributors (see\n# https://github.com/robbyrussell/oh-my-zsh/contributors)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for fleetctl (https://github.com/coreos/fleet).\n#\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Remi Paulmier (https://github.com/shtouff)\n#\n# ------------------------------------------------------------------------------\n\n# fleetctl zsh completion\n\nlocal -a _1st_arguments\n_1st_arguments=(\n    'cat:Output the contents of a submitted unit'\n    'destroy:Destroy one or more units in the cluster'\n    'fd-forward:Proxy stdin and stdout to a unix domain socket'\n    'help:Show a list of commands or help for one command'\n    'journal:Print the journal of a unit in the cluster to stdout'\n    'list-machines:Enumerate the current hosts in the cluster'\n    'list-unit-files:List the units that exist in the cluster.'\n    'list-units:List the current state of units in the cluster'\n    'load:Schedule one or more units in the cluster, first submitting them if necessary.'\n    'ssh:Open interactive shell on a machine in the cluster'\n    'start:Instruct systemd to start one or more units in the cluster, first submitting and loading if necessary.'\n    'status:Output the status of one or more units in the cluster'\n    'stop:Instruct systemd to stop one or more units in the cluster.'\n    'submit:Upload one or more units to the cluster without starting them'\n    'unload:Unschedule one or more units in the cluster.'\n    'version:Print the version and exit'\n)\n\n__task_list ()\n{\n    local expl\n    declare -a tasks\n\n    tasks=(cat destroy fd-forward help journal list-machines list-unit-files \\\n      list-units load ssh start status stop submit unload version)\n\n    _wanted tasks expl 'help' compadd $tasks\n}\n\n__unit_list ()\n{\n    _wanted application expl 'command' compadd $(command fleetctl list-units | \\\n      tail -n +2  | awk '{print $1}')\n}\n\nlocal expl\n\nlocal curcontext=\"$curcontext\" state line\nlocal -A opt_args\n\n_arguments -C \\\n    ':command:->command' \\\n    '*::options:->options'\n\ncase $state in\n  (command)\n      _describe -t commands \"gem subcommand\" _1st_arguments\n      return\n  ;;\n\n  (options)\n    case $line[1] in\n      (help)\n         _arguments ':feature:__task_list'\n      ;;\n\n      (destroy|journal|start|status|stop|unload|cat)\n          _arguments '*:feature:__unit_list'\n      ;;\n\n      (load|submit)\n          _arguments '*:file:_files -g *.service'\n      ;;\n\n      (ssh)\n          _arguments '*:host:_hosts'\n      ;;\n\n      (*)\n          _arguments '*:file:_files'\n      ;;\n    esac\n  ;;\nesac\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_force",
    "content": "#compdef force\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for force CLI 0.22.39 (https://github.com/heroku/force).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Peter Limbach <https://github.com/pelim>\n#\n# ------------------------------------------------------------------------------\n\nlocal -a _1st_arguments\n_1st_arguments=(\n    'apiversion:Display/Set current API version'\n    'login:force login [-i=<instance>] [<-u=username> <-p=password>]'\n    'logout:Log out from force.com'\n    'logins:List force.com logins used'\n    'active:Show or set the active force.com account'\n    'whoami:Show information about the active account'\n    'describe:Describe the object or list of available objects'\n    'sobject:Manage standard & custom objects'\n    'bigobject:Manage big objects'\n    'field:Manage sobject fields'\n    'record:Create, modify, or view records'\n    'bulk:Load csv file use Bulk API'\n    'fetch:Export specified artifact(s) to a local directory'\n    'import:Import metadata from a local directory'\n    'export:Export metadata to a local directory'\n    'query:Execute a SOQL statement'\n    'apex:Execute anonymous Apex code'\n    'trace:Manage trace flags'\n    'log:Fetch debug logs'\n    'eventlogfile:List and fetch event log file'\n    'oauth:Manage ConnectedApp credentials'\n    'test:Run apex tests'\n    'security:Displays the OLS and FLS for a give SObject'\n    'version:Display current version'\n    'update:Update to the latest version'\n    'push:Deploy artifact from a local directory'\n    'aura:force aura push -f <filepath>'\n    'password:See password status or reset password'\n    'notify:Should notifications be used'\n    'limits:Display current limits'\n    'help:Show this help'\n    'datapipe:Manage DataPipes'\n)\n\nlocal -a _field_arguments\n\n\n_apex_types=(\n  'string' 'textarea' 'longtextarea' 'richtextarea'\n  'boolean' 'double' 'number' 'autonumber' 'picklist' \n  'lookup' 'masterdetail' 'geolocation'\n)\n\n_field_arguments=(\n   'list' 'create' 'delete' 'type'\n)\n\n_sobject_arguments=(\n   'list' 'create' 'delete'\n)\n\n_bulk_arguments=(\n  'insert:upload a .csv file to insert records'\n  'update:upload a .csv file to update records'\n  'query:run a SOQL statement to generate a .csv file on the server'\n  'retrieve:retrieve a query generated .csv file from the server'\n  'job:get information about a job based on job Id'\n  'batch:get detailed information about a batch within a job based on job Id and batch Id'\n  'batches:get a list of batches associated with a job based on job Id'\n)\n\n__sobject_list() {\n  _wanted application expl 'sobjects' compadd $(force sobject list)\n}\n\n__log_list() {\n  _wanted application expl 'logfiles' compadd $(force log | grep  -o -e '07\\w*')\n}\n\n__login_user_list() {\n   # remove active user string, remove colors & print the username\n  _wanted application expl 'usernames' compadd $(force logins | sed 's/(active)//' | sed 's,$(printf \"\\033\"\")\\\\[[0-9;]*[a-zA-Z],,g' | awk '{print $1}')\n}\n\n__login_instance_list() {\n  _wanted application expl 'instances' compadd $(force logins | awk '{print $3}' | sed 's/https:\\/\\///') \n}\n\n__sobject_command () {\n    local curcontext=\"$curcontext\" state line\n    typeset -A opt_args\n\n    _arguments -C \\\n        ':command:->command' \\\n        '*::options:->options'\n\n   case $state in\n       (command)\n           _describe -t commands \"sobject commands\" _sobject_arguments\n           return\n       ;;\n\n       (options)\n           case $line[1] in\n               (delete)\n                   _arguments ':feature:__sobject_list'\n               ;;\n           esac\n       ;;\n    esac\n}\n\n__field_command () {\n    local curcontext=\"$curcontext\" state line\n    typeset -A opt_args\n\n    _arguments -C \\\n        ':command:->command' \\\n        '*::options:->options'\n\n   case $state in\n       (command)\n           _describe -t commands \"field commands\" _field_arguments\n           return\n       ;;\n\n       (options)\n           case $line[1] in\n              (list)\n                   _arguments ':feature:__sobject_list'\n              ;;\n              (type)\n                   _describe -t commands \"apex types\" _apex_types\n                   return\n              ;;\n           esac\n       ;;\n    esac\n}\n\nlocal expl\nlocal -a active logins\n\nlocal curcontext=\"$curcontext\" state line\nlocal -A opt_args\n\n_arguments -C \\\n  ':command:->command' \\\n  '*::options:->options'\n\ncase $state in\n  (command)\n      _describe -t commands \"force commands\" _1st_arguments\n      return\n  ;;\n\n  (options)\n    case $line[1] in\n      (help)\n          _describe -t commands \"command help\" _1st_arguments\n          return\n      ;;\n\n      (login)\n        _arguments \\\n          '-u[salesforce user]:userame:__login_user_list' \\\n          '-i[salesforce instance]:instance:__login_instance_list' \\\n          '-p[salesforce password]'\n      ;;\n      (bulk)\n        _arguments \\\n          '-c[bulk command]:_bulk_arguments'\n      ;;\n\n      (log)\n        _arguments ':feature:__log_list'\n      ;;\n\n      (field)\n          __field_command\n      ;;\n\n      (sobject)\n          __sobject_command\n      ;;\n\n    esac\n  ;;\nesac"
  },
  {
    "path": ".config/zsh/completions/src/_gas",
    "content": "#compdef gas\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for gas (https://github.com/walle/gas).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Fredrik Wallgren <fredrik.wallgren@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line cmds ret=1\n\n_arguments -C \\\n  '(- 1 *)'{-v,--version}'[display version information]' \\\n  '(-h|--help)'{-h,--help}'[show help information]' \\\n  '1: :->cmds' \\\n  '*: :->args' && ret=0\n\ncase \"$state\" in\n  (cmds)\n    cmds=(\n      \"version:Prints Gas's version\"\n      \"use:Uses author\"\n      \"show:Shows your current user\"\n      \"list:Lists your authors\"\n      \"import:Imports current user to gasconfig\"\n      \"help:Describe available tasks or one specific task\"\n      \"delete:Deletes author\"\n      \"add:Adds author to gasconfig\"\n    )\n    _describe -t commands 'gas command' cmds && ret=0\n  ;;\n  (args)\n    case \"$line[1]\" in\n      (use|delete)\n        _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\\[\\(.*\\)\\]/\\1/p') && ret=0\n      ;;\n    esac\n  ;;\nesac\n\nreturn ret\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_geany",
    "content": "#compdef geany\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Geany (http://www.geany.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n  '(- 1 *)'{-h,--help}'[Show help options]' \\\n  '(- 1 *)--help-all[Show all help options]' \\\n  '(- 1 *)--help-gtk[Show GTK+ Options]' \\\n  '(- 1 *)'{-V,--version}'[Show version and exit]' \\\n  '(--column)--column[Set initial column number for the first opened file (useful in conjunction with --line)]:column number' \\\n  '(-c --config)'{-c,--config}'[Use an alternate configuration directory]:configuration file:_files' \\\n  '(--ft-names)--ft-names[Print internal filetype names]' \\\n  '(-g --generate-tags)'{-g,--generate-tags}'[Generate global tags file (see documentation)]' \\\n  '(-P --no-preprocessing)'{-P,--no-preprocessing}'[Don'\\''t preprocess C/C++ files when generating tags]' \\\n  '(-i --new-instance)'{-i,--new-instance}'[Don'\\''t open files in a running instance, force opening a new instance]' \\\n  '(--socket-file)--socket-file[Use this socket filename for communication with a running Geany instance]:socket file:_files' \\\n  '(--list-documents)--list-documents[Return a list of open documents in a running Geany instance]' \\\n  '(-l --line)'{-l,--line}'[Set initial line number for the first opened file]:line number' \\\n  '(-m --no-msgwin)'{-m,--no-msgwin}'[Don'\\''t show message window at startup]' \\\n  '(-n --no-ctags)'{-n,--no-ctags}'[Don'\\''t load auto completion data (see documentation)]' \\\n  '(-p --no-plugins)'{-p,--no-plugins}'[Don'\\''t load plugins]' \\\n  '(--print-prefix)--print-prefix[Print Geany'\\''s installation prefix]' \\\n  '(-s --no-session)'{-s,--no-session}'[Don'\\''t load the previous session'\\''s files]' \\\n  '(-t --no-terminal)'{-t,--no-terminal}'[Don'\\''t load terminal support]' \\\n  '(--vte-lib)--vte-lib[Filename of libvte.so]:libvte.so filename:_files -g \"*.so\"' \\\n  '(-v --verbose)'{-v,--verbose}'[Be verbose]' \\\n  '(--display)--display[X display to use]:X display:_x_display' \\\n  '*: :_files'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ghc",
    "content": "#compdef ghc ghci ghc-pkg\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n# Completion script for ghc (http://www.haskell.org/ghc/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n# * Gérard Milmeister\n# * Philip Dexter <philip.dexter@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal state\nlocal WORDS\n\n#\n# ghci\n#\n\n_ghc_ghci () { _ghc_compiler }\n\n#\n# ghc\n#\n\n_ghc_compiler ()\n{\n    _arguments \\\n        \"-no-hs-main[Don't assume this program contains main]\" \\\n        \"-no-user-package-conf[Don't load the user's package config file]\" \\\n        '(- *)'{--help,-\\?}'[Show help information]' \\\n        '*-I-[Add directory to path for #include files]:directory:_files -/' \\\n        '*-X-[Language flags]:flag:_ghc_language_flags' \\\n        '*-d-[Debugging options]:flag:_ghc_debugging_options' \\\n        '*-f-[Compiler options]:flag:_ghc_compiler_flags' \\\n        '*-hide-package[Hide package]:Package:_ghc_pkg_list_packages' \\\n        '*-trust[Expose package and set it to be trusted]:Package:_ghc_pkg_list_packages' \\\n        '*-distrust[Expose package and set it to be distrusted]:Package:_ghc_pkg_list_packages' \\\n        '*-distrust-all[Distrust all packages by default]' \\\n        '*-i-[Add directory to import path]:directory:->ghc_include_directory' \\\n        '*-package[Expose package]:Package:_ghc_pkg_list_packages' \\\n        '*:file:_files -g \\*.\\{lhs,hs,hc,c,s\\}' \\\n        '--info[Display information about the compiler]' \\\n        '--show-options[Display the supported command line options]' \\\n        '--interactive[Interactive mode]' \\\n        '--make[Compile and link a complete Haskell program]:file:_files -g \"*.{lhs,hs,hc,c,s}\"' \\\n        '--numeric-version[Display GHC version (numeric only)]' \\\n        '--print-libdir[Display GHC library directory]' \\\n        '--show-iface[Show interface]:file:_files -g \"*.hi\"' \\\n        {--supported-languages,--supported-extensions}'[Display the supported language extensions]' \\\n        '-C[Stop after generating C]' \\\n        '-E[Stop after generating preprocessed, de-litted Haskell]' \\\n        '-H[Minimum heap size]:size:' \\\n        '-M[Output Makefile rules]' \\\n        '-O-[Enable optimization]:level:(0 1 2)' \\\n        '-Rghc-timing[Summarise timing stats for GHC]' \\\n        '-S[Stop after generating assembler]' \\\n        '-V[Display GHC version]' \\\n        '-W[Enable normal warnings]' \\\n        '-Wall[Enable almost all warnings]' \\\n        '-Werror[Make warnings fatal]' \\\n        '-Wwarn[Make warnings non-fatal]' \\\n        '-c[Stop after generating object files]' \\\n        '-eventlog[Enable runtime event tracing]' \\\n        '-debug[Use the debugging runtime]' \\\n        \"-dylib-install-name[On Darwin/macOS only, set the install name]\" \\\n        '-dynamic[Use dynamic Haskell libraries]' \\\n        '-dynamic-too[Build dynamic object files as well as static object files during compilation]' \\\n        '-dynosuf[Set the output suffix for dynamic object files]' \\\n        '-dynload[Select one of a number of modes for finding shared libraries at runtime]' \\\n        '--mk-dll[DLL-creation mode (Windows only)]' \\\n        '-framework-path[On Darwin/macOS/iOS only, add dir to the list of directories searched for frameworks]' \\\n        '-shared[Generate a shared library (as opposed to an executable)]' \\\n        '-staticlib[On Darwin/macOS/iOS only, generate a standalone static library (as opposed to an executable)]' \\\n        '-e[Evaluate expression]' \\\n        '-hide-all-packages[Hide all packages by default]' \\\n        '-hpcdir[Directory to deposit .mix files during compilation (default is .hpc)]' \\\n        '-n[Do a dry run]' \\\n        '-o[Set output filename]:file:_files' \\\n        '-outputdir[Set output directory]:directory:_files -/' \\\n        '-package-name[Compile to be part of package]' \\\n        '-hide-all-packages[Hide all packages by default]' \\\n        '-package-db[Add file to the package db stack]:file:_files' \\\n        '-clear-package-db[Clear the package db stack]' \\\n        '-msse2[(x86 only) Use SSE2 for floating point]' \\\n        '-monly-\\[432\\]-regs[(x86 only) give some registers back to the C compiler]' \\\n        '-no-global-package-db[Remove the global package db from the stack]' \\\n        '-global-package-db[Add the global package db to the stack]' \\\n        \"-no-user-package-db[Remove the user's package db from the stack]\" \\\n        \"-user-package-db[Add the user's package db to the stack]\" \\\n        \"-no-auto-link-packages[Don't automatically link in the base and rts packages]\" \\\n        '-optL[pass option to the literate pre-processor]' \\\n        '-optP[pass option to cpp (with -cpp only)]' \\\n        '-optF[pass option to the custom pre-processor]' \\\n        '-optc[pass option to the C compiler]' \\\n        '-optlo[pass option to the LLVM optimiser]' \\\n        '-optlc[pass option to the LLVM compiler]' \\\n        '-optm[pass option to the mangler]' \\\n        '-opta[pass option to the assembler]' \\\n        '-optl[pass option to the linker]' \\\n        '-optdll[pass option to the DLL generator]' \\\n        '-optwindres[pass option to windres.]' \\\n        '-prof[Turn on profiling]' \\\n        '-pgmL[Use cmd as the literate pre-processor]' \\\n        '-pgmP[Use cmd as the C pre-processor (with -cpp only)]' \\\n        '-pgmc[Use cmd as the C compiler]' \\\n        '-pgms[Use cmd as the splitter]' \\\n        '-pgml[Use cmd as the linker]' \\\n        '-pgmdll[Use cmd as the DLL generator]' \\\n        '-pgmF[Use cmd as the pre-proecessor (with -F only)]' \\\n        '-pgmwindres[Use cmd as the program for embedding manifests on Windows]' \\\n        '-pgmlibtool[Use cmd as the command for libtool (with -staticlib only)]' \\\n        '-rtsopts[Only a minimum of safe options can be given to RTS]' \\\n        '-rtsopts=[Control whether the RTS behavior can be tweaked via command-line flags and the GHCRTS environment varaible (none, som, or all)]' \\\n        '-with-rtsopts=[Set the default RTS options]' \\\n        '-threaded[Use the threaded runtime]' \\\n        '-ticky[Turn on ticky-ticky profiling]' \\\n        '-tmpdir[Set the directory for temporary files]:directory:_files -/' \\\n        '-v-[Control verbosity]:level:(0 1 2 3 4 5)' \\\n        '-w[Disable all warnings]' \\\n        '-x[Override default behaviour for source files]:suffix:(hs lhs hc c s o hspp)' \\\n        '-hcsuf[Set the suffix to use for intermediate]:suffix:' \\\n        '-hidir[Set directory for interface files]:directory:_files -/' \\\n        '-hisuf[Set the suffix to use for interface files]:suffix:' \\\n        '-odir[Set directory for object files]:directory:_files -/' \\\n        '-ohi[Set the filename in which to put the interface]:filename:_files -/' \\\n        '-osuf[Set the output file suffix]:suffix:' \\\n        '-stubdir[Redirect FFi stub files]:directory:_files -/' \\\n        '-dumpdir[Redirect dump files]:directory:_files -/' \\\n        '-outputdir[Set output directory]:directory:_files -/' \\\n        '-keep-hc-files[Retain intermediate .hc files]' \\\n        '-keep-llvm-files[Retain intermediate LLVM .ll files]' \\\n        '-keep-s-files[Retain intermediate .s files]' \\\n        '-keep-raw-s-files[Retain intermediate .raw_s files]' \\\n        '-keep-tmp-files[Retain all intermediate temporary files]' \\\n        '-static[Use static Haskell libraries]' \\\n        '-split-objs[Split objects (for libraries)]' \\\n        '-no-link[Omit linking]' \\\n        '-main-is[Set main module and function]:function:' \\\n        '*-L-[Add dir to the list of directories searched for libraries]:directory:_files -/' \\\n        '*-l-[Link in library]:library:->library'\n\n    [[ -n \"$state\" ]] &&\n    case \"$state\" in\n        ghc_include_directory) _ghc_include_directory ;;\n        library)\n            _wanted libraries expl library \\\n                compadd - \\\n                ${^=LD_LIBRARY_PATH:-/usr/lib /usr/local/lib}/lib*.(a|so*)(:t:fr:s/lib//) \\\n                && ret=0\n    esac\n}\n\n\n_ghc_include_directory ()\n{\n    compset -P '*:'\n    compset -S ':*'\n    _path_files -r': ' -/\n}\n\n_ghc_compiler_flags ()\n{\n    local _ghc_compiler_flags_list\n    _ghc_compiler_flags_list=(\n        'ghci-hist-size:Set the number of entries GHCi keeps for \\:history'\n        'print-explicit-foralls:Print explicit forall quantification in types'\n        'print-explicit-kinds:Print explicit kind foralls and kind arguments in types'\n        {no-,}'break-on-error:Break on uncaught exceptions and errors'\n        {no-,}'break-on-exception:Break on any exception thrown'\n        {no-,}'case-merge:Enable case-merging'\n        {no-,}'defer-type-errors:Defer as many type errors as possible until runtime'\n        {no-,}'dicts-strict:Make dictionaries strict'\n        {no-,}'do-eta-reduction:Enable eta-reduction'\n        {no-,}'do-lambda-eta-expansion:Enable lambda eta-reduction'\n        'eager-blackholing:Turn on eager blackholing'\n        {no-,}'enable-rewrite-rules:Switch on all rewrite rules (including rules generated by automatic specialisation of overloaded functions)'\n        'error-spans:Output full span in error messages'\n        'ext-core:Generate .hcr external Core file'\n        'force-recomp:Turn off recompilation checking'\n        {no-,}'float-in:Turn on the float-in transformation'\n        {no-,}'full-laziness:Turn on full laziness (floating bindings outwards)'\n        {no-,}'fun-to-thunk:Allow worker-wrapper to convert a function closure into a thunk if the function does not use any of its arguments. Off by default.'\n        {no-,}'glasgow-exts:Enable most language extensions'\n        {no-,}'helpful-errors:Make suggestions for mis-spelled names'\n        'history-size:Set simplification history size'\n        {no-,}'ignore-asserts:Ignore assertions in the source'\n        {no-,}'ignore-interface-pragmas:Ignore pragmas in interface files'\n        {no-,}'loopification:Turn saturated self-recursive tail-calls into local jumps in the generated assembly'\n        {no-,}'late-dmd-anal:Run demand analysis again, at the end of the simplification pipeline'\n        {no-,}'liberate-case:Turn on the liberate-case transformation'\n        'liberate-case-threshold=:Set the size threshold for the liberate-case transformation (default 200)'\n        'no-liberate-case-threshold:Set the size threshold for the liberate-case transformation (default 200)'\n        {no-,}'max-relevant-bindings=N:Set the maximum number of bindings to display in type error messages (default 6).'\n        'max-worker-args=:If a worker has that many arguments, none will be unpacked anymore (default 10)'\n        'max-simplifier-iterations=:Set the max iterations for the simplifier'\n        'no-asm-mangling:Turn off assembly mangling'\n        'no-black-holing:Turn off black holing'\n        \"no-hi-version-check:Don't complain about .hi file mismatches\"\n        'no-implicit-import-qualified:Turn off implicit qualified import of everything in GHCi'\n        'no-print-bind-contents:Turn off printing of binding contents in GHCi'\n        'no-opt-coercion:Turn off the coercion optimiser'\n        'no-ghci-history:Do not use the load/store the GHCi command history from/to ghci_history'\n        'no-ghci-sandbox:Turn off the GHCi sandbox. Means computations are run in the main thread, rather than a forked thread'\n        'no-gen-manifest:Do not generate a manifest file (Windows only)'\n        'no-embed-manifest:Do not embed the manifest in the executable (Windows only)'\n        \"no-shared-implib:Don't generate an import library for a DLL (Windows only)\"\n        'no-pre-inlining:Turn off pre-inlining'\n        'no-state-hack:Turn off the \"state hack\" whereby any lambda with a real-world state token as argument is considered to be single-entry'\n        {no-,}'print-bind-result:Turn on printing of binding results in GHCi'\n        {no-,}'print-evld-with-show:Enable usage of Show instances in \\:print'\n        'unregisterised:Unregisterised compilation'\n        'asm:Use the native code generator'\n        'via-C:Compile via C'\n        'no-code:Omit code generation'\n        'byte-code:Generate byte-code'\n        'object-code:Generate object code'\n        'hpc:Turn on Haskell program coverage instrumentation'\n        'PIC:Generate position-independent code'\n        'plugin=:Load a plugin exported by a given module'\n        'plugin-opt=:Give arguments to a plugin module'\n        'context-stack=:Set the limit for context reduction (default is 20)'\n        'type-function-depth=:Set the limit for type function reductions (default is 200)'\n        'force-recomp:Turn off recompilation checking'\n        {no-,}\"omit-interface-pragmas:Don't generate interface pragmas\"\n        'package-trust:Enable Safe Haskell trusted package requirement for trustworthy modules'\n        {no-,}'pedantic-bottoms:Make GHC be more precise about its treatment of bottom'\n        {no-,}'disambiguate-record-fields:Enable record field disambiguation'\n        {no-,}'irrefutable-tuples:Make tuple pattern matching irrefutable'\n        {no-,}'vectorise:Enable vectorisation of nested data parallelism'\n        {no-,}'avoid-vect:Enable vectorisation avoidance'\n        {no-,}'excess-precision:Enable excess intermediate precision'\n        {no-,}'prof-auto:Auto-add SCCs to all bindings not marked INLINE'\n        {no-,}'prof-auto-top:Auto-add SCCs to all top-level bindings not marked INLINE'\n        {no-,}'prof-auto-exported:Auto-add SCCs to all exported bindings not marked INLINE'\n        {no-,}'prof-cafs:Auto-add SCCs to all CAFs'\n        {no-,}'prof-count-entries:Collect entry counts'\n        'simplifier-phases:Set the number of phases for the simplifier (default 2)'\n        'simpl-tick-factor=:Set the percentage factor for simplifier ticks (default 100)'\n        {no-,}'spec-constr:Turn on the SpecConstr transformation'\n        {no-,}'spec-constr-threshold=:Set the size threshold for the SpecConstr transformation (default 200)'\n        {no-,}'spec-constr-count=:Set the maximum number of specialisations that will be created for any one function by the SpecConstr transformation (default 3)'\n        'strictness=before=:Run an additional strictness analysis before a simplifier phase'\n        {no-,}'static-argument-transformation:Turn on the static argument transformation'\n        {no-,}'unbox-strict-fields:Flatten strict constructor fields'\n        {no-,}'unbox-small-strict-fields:Flatten strict constructor fields with a pointer-sized representation'\n        {no-,}'unfolding-creation-threshold:Tweak unfolding settings'\n        {no-,}'unfolding-fun-discount:Tweak unfolding settings'\n        {no-,}'unfolding-keeness-factor:Tweak unfolding settings'\n        {no-,}'unfolding-use-threshold:Tweak unfolding settings'\n        {no-,}'warn-warnings-deprecations:Warn about uses of functions & types that have warnings or deprecated pragmas'\n        {no-,}'warn-deprecated-flags:Warn about uses of commandline flags that are deprecated'\n        {no-,}'warn-duplicate-exports:Warn when an entity is exported multiple times'\n        {no-,}'warn-hi-shadowing:Warn when a .hi file in the current directory shadows a library'\n        {no-,}'warn-implicit-prelude:Warn when the Prelude is implicitly imported'\n        {no-,}'warn-incomplete-patterns:Warn when a pattern match could fail'\n        {no-,}'warn-incomplete-record-updates:Warn when a record update could fail'\n        {no-,}'warn-missing-fields:Warn when fields of a record are uninitialised'\n        {no-,}'warn-missing-methods:Warn when class methods are undefined'\n        {no-,}'warn-missing-signatures:Warn about top-level functions without signatures'\n        {no-,}'warn-duplicate-constraints:Warn when a constraint appears duplicated in a type signature'\n        {no-,}'warn-identities:Warn about uses of Prelude numeric conversions that are probably the identity (and hence could be omitted)'\n        {no-,}'warn-incomplete-uni-patterns:Warn when a pattern match in a lambda expression or pattern binding could fail'\n        {no-,}'warn-lazy-unlifted-bindings:(Deprecated) warn when a pattern binding looks lazy but must be strict'\n        {no-,}'warn-missing-import-lists:Warn when an import declaration does not explicitly list all the names brought into scope'\n        {no-,}'warn-missing-local-sigs:Warn about polymorphic local bindings without signatures'\n        {no-,}'warn-monomorphism-restriction:Warn when the Monomorphism Restriction is applied'\n        {no-,}'warn-name-shadowing:Warn when names are shadowed'\n        {warn-orphans,warn-auto-orphans}':Warn when the module contains orphan instance declarations or rewrite rules'\n        {no-,}'warn-overlapping-patterns:Warn about overlapping patterns'\n        {no-,}'warn-tabs:Warn if there are tabs in the source file'\n        {no-,}'warn-type-defaults:Warn when defaulting happens'\n        {no-,}\"warn-unrecognised-pragmas:Warn about uses of pragmas that GHC doesn't recognise\"\n        {no-,}'warn-unused-binds:Warn about bindings that are unused'\n        {no-,}'warn-unused-imports:Warn about unnecessary imports'\n        {no-,}\"warn-unused-matches:Warn about variables in patterns that aren't used\"\n        {no-,}'warn-unused-do-bind:Warn about do bindings that appear to throw away values of types other than ()'\n        {no-,}'warn-wrong-do-bind:Warn about do bindings that appear to throw away monadic values that you should have bound instead'\n        {no-,}'warn-unsafe:Warn if the module being compiled is regarded to be unsafe'\n        {no-,}'warn-safe:Warn if the module being compiled is regarded to be safe'\n        {no-,}'warn-amp:Warn on definitions conflicting with the Applicative-Monad Proposal (AMP)'\n        {no-,}'warn-typed-holes:Enable holes in expressions'\n        )\n    _describe -t flags 'ghc' _ghc_compiler_flags_list || compadd \"$@\"\n}\n\n_ghc_debugging_options ()\n{\n    local _ghc_debugging_options_list\n    _ghc_debugging_options_list=(\n        \"dump-hi:Dump the new interface to stdout\"\n        \"dump-hi-diffs:Show the differences vs. the old interface\"\n        \"dump-minimal-imports:Dump a minimal set of imports\"\n        \"core-lint:Turn on internal sanity checking\"\n        \"dump-asm:Dump assembly\"\n        \"dump-bcos:Dump interpreter byte code\"\n        \"dump-cmm:Dump C-- output\"\n        \"dump-cpranal:Dump output from CPR analysis\"\n        \"dump-cse:Dump CSE output\"\n        \"dump-deriv:Dump deriving output\"\n        \"dump-ds:Dump desugarer output\"\n        'dump-flatC:Dump \"flat\" C'\n        \"dump-foreign:Dump foreign export stubs\"\n        \"dump-hpc:Dump after instrumentation for program coverage\"\n        \"dump-inlinings:Dump inlining info\"\n        \"dump-occur-anal:Dump occurrence analysis output\"\n        \"dump-opt-cmm:Dump the results of C-- to C-- optimising passes\"\n        \"dump-parsed:Dump parse tree\"\n        \"dump-prep:Dump prepared core\"\n        \"dump-rn:Dump renamer output\"\n        \"dump-rules:Dump rules\"\n        \"dump-simpl:Dump final simplifier output\"\n        \"dump-simpl-phases:Dump output from each simplifier phase\"\n        \"dump-simpl-iterations:Dump output from each simplifier iteration\"\n        \"dump-spec:Dump specialiser output\"\n        \"dump-splices:Dump TH spliced expressions\"\n        \"dump-stg:Dump final STG\"\n        \"dump-stranal:Dump strictness analyser output\"\n        \"dump-tc:Dump typechecker output\"\n        \"dump-types:Dump type signatures\"\n        \"dump-worker-wrapper:Dump worker-wrapper output\"\n        \"dump-if-trace:Trace interface files\"\n        \"dump-tc-trace:Trace typechecker\"\n        \"dump-to-file:Dump to files instead of stdout\"\n        \"dump-core-stats:Print a one-line summary of the size of the Core program at the end of the optimisation pipeline\"\n        \"dump-llvm:Dump LLVM intermediate code\"\n        \"dump-rule-firings:Dump rule firing info\"\n        \"dump-rule-rewrites:Dump detailed rule firing info\"\n        \"dump-vect:Dump vectoriser input and output\"\n        \"dump-strsigs:Dump strictness signatures\"\n        \"dump-vt-trace:Trace vectoriser\"\n        \"dump-rn-trace:Trace renamer\"\n        \"dump-rn-stats:Renamer stats\"\n        \"dump-simpl-stats:Dump simplifier stats\"\n        \"suppress-all:In core dumps, suppress everything (except for uniques) that is suppressible\"\n        \"suppress-uniques:Suppress the printing of uniques in debug output (easier to use diff)\"\n        \"suppress-idinfo:Suppress extended information about identifiers where they are bound\"\n        \"suppress-module-prefixes:Suppress the printing of module qualification prefixes\"\n        \"suppress-type-signatures:Suppress type signatures\"\n        \"suppress-type-applications:Suppress type applications\"\n        \"suppress-coercions:Suppress the printing of coercions in Core dumps to make them shorter\"\n        \"no-debug-output:Suppress unsolicited debugging output\"\n        \"ppr-debug:Turn on debug printing (more verbose)\"\n        \"ppr-noprags:Don't output pragma info in dumps\"\n        \"ppr-user-length:Set the depth for printing expressions in error msgs\"\n        \"ppr-colsNNN:Set the width of debugging output. For example -dppr-cols200\"\n        \"ppr-case-as-let:Print single alternative case expressions as strict lets\"\n        \"source-stats:Dump haskell source stats\"\n        \"cmm-lint:C-- pass sanity checking\"\n        \"stg-lint:STG pass sanity checking\"\n        \"stg-stats:Dump STG stats\"\n        \"verbose-core2core:Show output from each core-to-core pass\"\n        \"verbose-stg2stg:Show output from each STG-to-STG pass\"\n        \"show-passes:Print out each pass name as it happens\"\n        \"faststring-stats:Show statistics for fast string usage when finished\"\n    )\n    _describe -t flags 'ghc' _ghc_debugging_options_list || compadd \"$@\"\n}\n\n\n_ghc_language_flags ()\n{\n    local _ghc_language_flags_list\n    _ghc_language_flags_list=(\n        \"AllowAmbiguousTypes:Allow the user to write ambiguous types, and the type inference engine to infer them\"\n        \"Arrows:Enable arrow notation extension\"\n        \"AutoDeriveTypeable:Automatically derive Typeable instances for every datatype and type class declaration\"\n        \"BangPatterns:Enable bang patterns\"\n        \"ConstraintKinds:Enable a kind of constraints\"\n        \"CPP:Enable the C preprocessor\"\n        \"ConstrainedClassMethods:Enable constrained class methods\"\n        \"DataKinds:Enable datatype promotion\"\n        \"DefaultSignatures:Enable default signatures\"\n        \"DeriveDataTypeable:Enable deriving for the Data and Typeable classes\"\n        \"DeriveGeneric:Enable deriving for the Generic class\"\n        \"DisambiguateRecordFields:Enable record field disambiguation\"\n        \"EmptyCase:Allow empty case alternatives\"\n        \"EmptyDataDecls:Enable empty data declarations\"\n        \"ExistentialQuantification:Enable existential quantification\"\n        \"ExplicitForAll:Enable explicit universal quantification\"\n        \"ExplicitNamespaces:Enable using the keyword type to specify the namespace of entries in imports and exports\"\n        \"ExtendedDefaultRules:Use GHCi's extended default rules in a normal module\"\n        \"FlexibleContexts:Enable flexible contexts\"\n        \"FlexibleInstances:Enable flexible instances\"\n        \"ForeignFunctionInterface:Enable foreign function interface\"\n        \"FunctionalDependencies:Enable functional dependencies\"\n        \"GADTs:Enable generalised algebraic data types\"\n        \"GADTSyntax:Enable generalised algebraic data type syntax\"\n        \"GeneralizedNewtypeDeriving:Enable newtype deriving\"\n        \"Generics:Enable generic classes\"\n        \"ImplicitParams:Enable Implicit Parameters\"\n        \"ImpredicativeTypes:Enable impredicative types\"\n        \"IncoherentInstances:Enable incoherent instances\"\n        \"InterruptibleFFI:Enable interruptible FFI\"\n        \"KindSignatures:Enable kind signatures\"\n        \"LambdaCase:Enable lambda-case expressions\"\n        \"LiberalTypeSynonyms:Enable liberalised type synonyms\"\n        \"MonadComprehensions:Enable monad comprehensions\"\n        \"MonoLocalBinds:Enable do not generalise local bindings\"\n        \"MultiParamTypeClasses:Enable multi parameter type classes\"\n        \"MultiWayIf:Enable multi-way if-expressions\"\n        \"NamedFieldPuns:Enable record puns\"\n        \"NegativeLiterals:Enable support for negative literals\"\n        \"NewQualifiedOperators:Enable new qualified operator syntax\"\n        \"NoImplicitPrelude:Don't implicitly import Prelude\"\n        \"NoMonoPatBinds:Make pattern bindings polymorphic\"\n        \"NoMonomorphismRestriction:Disable the monomorphism\"\n        \"NoNPlusKPatterns:Disable support for n+k patterns\"\n        \"NoTraditionalRecordSyntax:Disable support for traditional record syntax (as supported by Haskell 98) C {f = x}\"\n        \"NullaryTypeClasses:Enable nullary (no parameter) type classes\"\n        \"NumDecimals:Enable support for 'fractional' integer literals\"\n        \"OverlappingInstances:Enable overlapping instances\"\n        \"OverloadedLists:Enable overloaded lists\"\n        \"OverloadedStrings:Enable overloaded string literals\"\n        \"PArr:Enable parallel arrays\"\n        \"PackageImports:Enable package-qualified imports\"\n        \"ParallelArrays:Enable parallel arrays\"\n        \"ParallelListComp:Enable parallel list comprehensions\"\n        \"PatternGuards:Enable pattern guards\"\n        \"PolyKinds:Enable kind polymorphism\"\n        \"PolymorphicComponents:Enable polymorphic components for data constructors\"\n        \"QuasiQuotes:Enable quasiquotation\"\n        \"Rank2Types:Enable rank-2 types\"\n        \"RankNTypes:Enable rank-N types\"\n        \"RebindableSyntax:Employ rebindable syntax\"\n        \"RecordWildCards:Enable record wildcards\"\n        \"RecursiveDo:Enable recursive do (mdo) notation\"\n        \"RelaxedPolyRec:Relaxed checking for mutually-recursive polymorphic functions\"\n        \"Safe:Enable the Safe Haskell Safe mode\"\n        \"ScopedTypeVariables:Enable lexically-scoped type variables\"\n        \"StandaloneDeriving:Enable standalone deriving\"\n        \"TemplateHaskell:Enable Template Haskell\"\n        \"TransformListComp:Enable transform list comprehensions\"\n        \"TypeFamilies:Enable type families\"\n        \"TypeOperators:Enable type operators\"\n        \"TypeSynonymInstances:Enable type synonyms\"\n        \"Trustworthy:Enable the Safe Haskell Trustworthy mode\"\n        \"UnboxedTuples:Enable unboxed tuples\"\n        \"UndecidableInstances:Enable undecidable instances\"\n        \"UnicodeSyntax:Enable unicode syntax\"\n        \"UnliftedFFITypes:Enable unlifted FFI types\"\n        \"Unsafe:Enable Safe Haskell Unsafe mode\"\n        \"ViewPatterns:Enable view patterns\"\n        'MagicHash:Allow \"#\" as a postfix modifier on identifiers'\n    )\n    _describe -t flags 'ghc' _ghc_language_flags_list || compadd \"$@\"\n}\n\n#\n# ghc-pkg\n#\n\n_ghc_pkg ()\n{\n    WORDS=()\n    for w in $words[1,(($CURRENT - 1))]; do\n        if [[ $w != --* ]]; then WORDS+=$w; fi\n    done\n    _arguments '*:command:_ghc_pkg_command'\n}\n\n_ghc_pkg_command()\n{\n    local -a _ghc_pkg_cmds\n    _ghc_pkg_cmds=(\n        \"register:Register the package using package description\"\n        \"update:Register the package (overwriting existing package)\"\n        \"unregister:Unregister the specified package\"\n        \"expose:Expose the specified package\"\n        \"hide:Hide the specified package\"\n        \"list:List registered packages\"\n        \"find-module:List registered packages exposing module\"\n        \"latest:Prints the highest registered version of a package\"\n        \"check:Check the consistency of package dependencies and list broken packages\"\n        \"describe:Give the registered description for the specified package\"\n        \"field:Extract the specified field of the package description\"\n        \"dump:Dump the registered description for every package\"\n    )\n\n    if (( $#WORDS == 1 )); then\n\t_describe -t commands 'command' _ghc_pkg_cmds || compadd \"$@\"\n    else\n    \tlocal curcontext=\"$curcontext\"\n        cmd=\"${${_ghc_pkg_cmds[(r)$WORDS[2]:*]%%:*}}\"\n        if (( $#cmd )); then\n            _arguments \\\n                \"--user[Use current user's package database]\" \\\n                '--global[User the global package database]' \\\n                {-f,--package-conf=}'[Use the specified package config file]:Package config file:_files' \\\n                '--no-user-package-conf[Never reader the user package config]' \\\n                {-V,--version}'[Output version information and exit]' \\\n                '--force[Ignore missing directories and libraries only]' \\\n                {-g,--auto-ghci-libs}'[Automatically build libs for GHCi]' \\\n                {-?,--help}'[Display this help and exit]' \\\n                '--simple-output[Print output in easy-to-parse format for some commands]' \\\n                '--names-only[Only print package names, not versions]' \\\n                '--ignore-case[Ignore case for substring matching]' \\\n                '*:argument:_ghc_pkg_'$cmd\n        else\n            _message \"unknown ghc-pkg command: $WORDS[2]\"\n        fi\n    fi\n}\n\n_ghc_pkg_unregister () { _ghc_pkg_list_packages }\n\n_ghc_pkg_expose () { _ghc_pkg_list_packages }\n\n_ghc_pkg_hide () { _ghc_pkg_list_packages }\n\n_ghc_pkg_latest () { _ghc_pkg_list_packages }\n\n_ghc_pkg_describe () { _ghc_pkg_list_packages }\n\n_ghc_pkg_field ()\n{\n    _ghc_pkg_available_packages\n    if (( $#WORDS == 2 )); then\n        compadd \"$@\" -a -- _ghc_pkg_packages\n    elif (( $#WORDS == 3 )); then\n        compset -P '*,'\n        compset -S ',*'\n        compadd \"$@\" -S ',' -q -- \\\n            name version license copyright maintainer \\\n            stability homepage package-url description \\\n            category author exposed exposed-modules \\\n            hidden-modules import-dirs hs-libraries \\\n            extra-libraries extra-ghci-libraries include-dirs \\\n            includes depends hugs-options cc-options ld-options \\\n            framework-dirs frameworks haddock-interfaces \\\n            haddock-html\n    fi\n}\n\n_ghc_pkg_register () { _files }\n\n_ghc_pkg_update () { _files }\n\n_ghc_pkg_list () { _ghc_pkg_list_packages }\n\n_ghc_pkg_find-module ()\n{\n    if (( $#WORDS == 2)); then\n        if ( [[ ${+_ghc_modules} -eq 0 ]] || _cache_invalid GHC_MODULES ) &&\n\t    ! _retrieve_cache GHC_MODULES;\n        then\n            _ghc_modules=( $(ghc-pkg dump | sed -n '/^exposed-modules:/{s/^exposed-modules:[ ]\\+\\(.*\\)$/\\1/;s/ /\\n/;p;be};b;:e;n;/^ /{s/^[ ]\\+\\(.*\\)$/\\1/;s/ /\\n/;p;be}') )\n            _store_cache GHC_MODULES _ghc_modules\n        fi\n        compadd \"$@\" -a -- _ghc_modules\n    fi\n}\n\n_ghc_pkg_dump () {}\n\n_ghc_pkg_check () {}\n\n_ghc_pkg_available_packages ()\n{\n    if ( [[ ${+_ghc_pkg_packages_pkgs} -eq 0 ]] || _cache_invalid GHC_PACKAGES ) &&\n\t! _retrieve_cache GHC_PACKAGES;\n    then\n        _ghc_pkg_packages=( $(ghc-pkg list --simple-output --names-only) )\n        _store_cache GHC_PACKAGES _ghc_pkg_packages\n    fi\n}\n\n_ghc_pkg_list_packages ()\n{\n    _ghc_pkg_available_packages\n    compadd \"$@\" -a -- _ghc_pkg_packages\n}\n\n\n#\n# dispatcher\n#\n\ncase $service in\n    ghc)\n        _ghc_compiler\n        ;;\n    ghci)\n        _ghc_ghci\n        ;;\n    ghc-pkg)\n        _ghc_pkg\n        ;;\nesac\n"
  },
  {
    "path": ".config/zsh/completions/src/_gist",
    "content": "#compdef gist\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for gist (https://github.com/defunkt/gist)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Akira Maeda <https://github.com/glidenote>\n#  * Patrick Ziegler <https://github.com/patrick96>\n#\n# ------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line ret=1\ntypeset -A opt_args\n\n_arguments -C \\\n  '(--login)--login[Authenticate gist on this computer.]' \\\n  '(-f --filename)'{-f,--filename}'[Sets the filename and syntax type.]:NAME' \\\n  '(-t --type)'{-t,--type}'[Sets the file extension and syntax type.]:EXT' \\\n  '(-p --private)'{-p,--private}'[Makes your gist private.]' \\\n  '(--no-private)'--no-private'[Makes your gist no private.]' \\\n  '(-d --description)'{-d,--description}'[Adds a description to your gist.]:DESCRIPTION' \\\n  '(-s --shorten)'{-s,--shorten}'[Shorten the gist URL using git.io.]' \\\n  '(-u --update)'{-u,--update}'[Update an existing gist.]:URL ID' \\\n  '(-a --anonymous)'{-a,--anonymous}'[Create an anonymous gist.]' \\\n  '(-c --copy)'{-c,--copy}'[Copy the resulting URL to the clipboard]' \\\n  '(-e --embed)'{-e,--embed}'[Copy the embed code for the gist to the clipboard]' \\\n  '(-o --open)'{-o,--open}'[Open the resulting URL in a browser]' \\\n  '(--no-open)'--no-open'[No open the resulting URL in a browser]' \\\n  '(-P --paste)'{-P,--paste}'[Paste from the clipboard to gist]' \\\n  '(-h --help)'{-h,--help}'[print options help]' \\\n  '(-v --version)'{-v,--version}'[print version]' \\\n  '(-r --read)'{-r,--read}'[Read a gist and print out the contents]:user gists:user_gists' \\\n  '*: :_files' && ret=0\n\n_user_gists_cache_policy() {\n  # rebuild if cache is more than a day old\n  local -a oldp\n  oldp=( \"$1\"(mh+1) )\n  (( $#oldp ))\n}\n\nuser_gists() {\n  local update_policy ret=1\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  if [[ -z \"$update_policy\" ]]; then\n    zstyle \":completion:${curcontext}:\" cache-policy _user_gists_cache_policy\n  fi\n\n  # stores the gists of the logged in user in the format ID[Description]\n  _list=()\n  _cached_gists=\"user_gists\"\n\n  # retrieve/Write gists from/to cache\n  if _cache_invalid $_cached_gists  || ! _retrieve_cache $_cached_gists; then\n    _gists=$(gist -l)\n\n    if [ $? -eq 0 ]; then\n      _store_cache $_cached_gists _gists\n    else\n      # some error occurred, the user is probably not logged in\n      # set _gists to an empty string so that no completion is attempted\n      _gists=\"\"\n    fi\n  else\n    _retrieve_cache $_cached_gists\n  fi\n\n  if [ -n \"$_gists\" ]; then\n    echo \"$_gists\" | while read -r line; do\n      # Splitting the gist -l output\n      url=\"$(echo \"$line\" | cut -d \" \" -f 1 | cut -d \"/\" -f 4)\"\n      # gists w/o descriptions can have only one column in the output, those \n      # have their description set to an empty string\n      description=\"$(echo \"$line\" | awk '{if(NF > 1){$1=\"\"; print $0}}')\"\n\n      _list+=( \"${url}[${description}]\" )\n    done\n\n    _values \"gists\" $_list\n    ret=0\n  fi\n\n  return ret\n}\n\nreturn ret\n"
  },
  {
    "path": ".config/zsh/completions/src/_git-flow",
    "content": "#compdef git-flow\n# ------------------------------------------------------------------------------\n# Copyright (c) 2010-2015 Justin Hileman\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE\n# OR OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for git-flow (http://github.com/nvie/gitflow).\n#\n#  Source: https://github.com/bobthecow/git-flow-completion\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Justin Hileman (https://github.com/bobthecow)\n#  * Yusuke Muraoka (https://github.com/jbking)\n#  * Vincent Driessen (https://github.com/nvie)\n#  * Zifei Tong (https://github.com/chevalun)\n#  * Ben O'Hara (https://github.com/benohara)\n#\n# ------------------------------------------------------------------------------\n\n\n_git-flow ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options'\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n\t\t\t\t'init:Initialize a new git repo with support for the branching model.'\n\t\t\t\t'feature:Manage your feature branches.'\n\t\t\t\t'release:Manage your release branches.'\n\t\t\t\t'hotfix:Manage your hotfix branches.'\n\t\t\t\t'support:Manage your support branches.'\n\t\t\t\t'version:Shows version information.'\n\t\t\t\t'status:Shows some status.'\n\t\t\t)\n\t\t\t_describe -t commands 'git flow' subcommands\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\t\t\t\t(init)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-f'[Force setting of gitflow branches, even if already configured]' \\\n\t\t\t\t\t\t-d'[Use default branch naming conventions and prefixes]'\n\t\t\t\t\t;;\n\n\t\t\t\t\t(version)\n\t\t\t\t\t;;\n\n\t\t\t\t\t(hotfix)\n\t\t\t\t\t\t__git-flow-hotfix\n\t\t\t\t\t;;\n\n\t\t\t\t\t(release)\n\t\t\t\t\t\t__git-flow-release\n\t\t\t\t\t;;\n\n\t\t\t\t\t(feature)\n\t\t\t\t\t\t__git-flow-feature\n\t\t\t\t\t;;\n\n          (support)\n\t\t\t\t\t\t__git-flow-support\n\t\t\t\t\t;;\n\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n__git-flow-release ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options'\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n\t\t\t\t'start:Start a new release branch.'\n\t\t\t\t'finish:Finish a release branch.'\n\t\t\t\t'list:List all your release branches. (Alias to `git flow release`)'\n\t\t\t\t'publish:Publish this release branch to origin.`)'\n\t\t\t\t'track:Track a release branch from origin.`)'\n\t\t\t)\n\t\t\t_describe -t commands 'git flow release' subcommands\n\t\t\t_arguments \\\n\t\t\t\t-v'[Verbose (more) output]'\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\t\t\t\t(start)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]'\\\n\t\t\t\t\t\t':version:__git_flow_version_list'\n\t\t\t\t;;\n\n\t\t\t\t(finish)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]' \\\n\t\t\t\t\t\t-s'[Sign the release tag cryptographically]'\\\n\t\t\t\t\t\t-u'[Use the given GPG-key for the digital signature (implies -s)]'\\\n\t\t\t\t\t\t-m'[Use the given tag message]'\\\n\t\t\t\t\t\t-n'[Dont tag this release ]'\\\n\t\t\t\t\t\t-p'[Push to $ORIGIN after performing finish]'\\\n\t\t\t\t\t\t-k'[Keep branch after performing finish]'\\\n\t\t\t\t\t\t':version:__git_flow_version_list'\n\t\t\t\t;;\n\n\t\t\t\t(publish)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':version:__git_flow_version_list'\n\t\t\t\t;;\n\n\t\t\t\t(track)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':version:__git_flow_version_list'\n\t\t\t\t;;\n\n\n\n\t\t\t\t*)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-v'[Verbose (more) output]'\n\t\t\t\t;;\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n__git-flow-hotfix ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options'\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n\t\t\t\t'start:Start a new hotfix branch.'\n\t\t\t\t'finish:Finish a hotfix branch.'\n\t\t\t\t'list:List all your hotfix branches. (Alias to `git flow hotfix`)'\n\t\t\t\t'publish:Publish this hotfix branch to origin`)'\n\t\t\t)\n\t\t\t_describe -t commands 'git flow hotfix' subcommands\n\t\t\t_arguments \\\n\t\t\t\t-v'[Verbose (more) output]'\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\t\t\t\t(start)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]'\\\n\t\t\t\t\t\t':hotfix:__git_flow_version_list'\\\n\t\t\t\t\t\t':branch-name:__git_branch_names'\n\t\t\t\t;;\n\n\t\t\t\t(finish)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]' \\\n\t\t\t\t\t\t-s'[Sign the release tag cryptographically]'\\\n\t\t\t\t\t\t-u'[Use the given GPG-key for the digital signature (implies -s)]'\\\n\t\t\t\t\t\t-m'[Use the given tag message]'\\\n\t\t\t\t\t\t-p'[Push to $ORIGIN after performing finish]'\\\n\t\t\t\t\t\t':hotfix:__git_flow_hotfix_list'\n\t\t\t\t;;\n\n\t\t\t\t(publish)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':hotfix:__git_flow_hotfix_list'\n\t\t\t\t;;\n\n\t\t\t\t*)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-v'[Verbose (more) output]'\n\t\t\t\t;;\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n__git-flow-feature ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options'\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n\t\t\t\t'start:Start a new feature branch.'\n\t\t\t\t'finish:Finish a feature branch.'\n\t\t\t\t'list:List all your feature branches. (Alias to `git flow feature`)'\n\t\t\t\t'publish:Publish this feature branch to origin.'\n\t\t\t\t'track:Track a feature branch from origin.'\n\t\t\t\t'diff:Show a diff of changes since this feature branched off.'\n\t\t\t\t'rebase:Rebase a feature branch on top of develop.'\n        'checkout:Check out (switch to) the given feature branch.'\n\t\t\t\t'pull:Pull a feature branch from a remote peer.'\n\t\t\t)\n\t\t\t_describe -t commands 'git flow feature' subcommands\n\t\t\t_arguments \\\n\t\t\t\t-v'[Verbose (more) output]'\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\t\t\t\t(start)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]'\\\n\t\t\t\t\t\t':feature:__git_flow_feature_list'\\\n\t\t\t\t\t\t':branch-name:__git_branch_names'\n\t\t\t\t;;\n\n\t\t\t\t(finish)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]' \\\n\t\t\t\t\t\t-r'[Finish branch by rebasing first]'\\\n\t\t\t\t\t\t-k'[Keep branch after performing finish]'\\\n\t\t\t\t\t\t-D'[Force delete feature branch after finish]'\\\n\t\t\t\t\t\t':feature:__git_flow_feature_list'\n\t\t\t\t;;\n\n\t\t\t\t(publish)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':feature:__git_flow_feature_list'\\\n\t\t\t\t;;\n\n\t\t\t\t(track)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':feature:__git_flow_feature_list'\\\n\t\t\t\t;;\n\n\t\t\t\t(diff)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':branch:__git_branch_names'\\\n\t\t\t\t;;\n\n\t\t\t\t(rebase)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-i'[Do an interactive rebase]' \\\n\t\t\t\t\t\t':branch:__git_branch_names'\n\t\t\t\t;;\n\n\t\t\t\t(checkout)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':branch:__git_flow_feature_list'\\\n\t\t\t\t;;\n\n\t\t\t\t(pull)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t':remote:__git_remotes'\\\n\t\t\t\t\t\t':branch:__git_branch_names'\n\t\t\t\t;;\n\n\t\t\t\t*)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-v'[Verbose (more) output]'\n\t\t\t\t;;\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n__git-flow-support ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options'\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n\t\t\t\t'start:Start a new support branch.'\n\t\t\t\t'list:List all your support branches. (Alias to `git flow support`)'\n\t\t\t)\n\t\t\t_describe -t commands 'git flow support' subcommands\n\t\t\t_arguments \\\n\t\t\t\t-v'[Verbose (more) output]'\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\t\t\t\t(start)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-F'[Fetch from origin before performing finish]'\\\n\t\t\t\t\t\t':feature:__git_flow_support_list'\\\n\t\t\t\t\t\t':branch-name:__git_branch_names'\n\t\t\t\t;;\n\n\t\t\t\t*)\n\t\t\t\t\t_arguments \\\n\t\t\t\t\t\t-v'[Verbose (more) output]'\n\t\t\t\t;;\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n__git_flow_version_list ()\n{\n\tlocal expl\n\tdeclare -a versions\n\n\tversions=(${${(f)\"$(_call_program versions git flow release list 2> /dev/null | tr -d ' |*')\"}})\n\t__git_command_successful || return\n\n\t_wanted versions expl 'version' compadd $versions\n}\n\n__git_flow_feature_list ()\n{\n\tlocal expl\n\tdeclare -a features\n\n\tfeatures=(${${(f)\"$(_call_program features git flow feature list 2> /dev/null | tr -d ' |*')\"}})\n\t__git_command_successful || return\n\n\t_wanted features expl 'feature' compadd $features\n}\n\n__git_remotes () {\n\tlocal expl gitdir remotes\n\n\tgitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)\n\t__git_command_successful || return\n\n\tremotes=(${${(f)\"$(_call_program remotes git config --get-regexp '\"^remote\\..*\\.url$\"')\"}//#(#b)remote.(*).url */$match[1]})\n\t__git_command_successful || return\n\n\t# TODO: Should combine the two instead of either or.\n\tif (( $#remotes > 0 )); then\n\t\t_wanted remotes expl remote compadd $* - $remotes\n\telse\n\t\t_wanted remotes expl remote _files $* - -W \"($gitdir/remotes)\" -g \"$gitdir/remotes/*\"\n\tfi\n}\n\n__git_flow_hotfix_list ()\n{\n\tlocal expl\n\tdeclare -a hotfixes\n\n\thotfixes=(${${(f)\"$(_call_program hotfixes git flow hotfix list 2> /dev/null | tr -d ' |*')\"}})\n\t__git_command_successful || return\n\n\t_wanted hotfixes expl 'hotfix' compadd $hotfixes\n}\n\n__git_flow_support_list ()\n{\n\tlocal expl\n\tdeclare -a support\n\n\tsupport=(${${(f)\"$(_call_program support git flow support list 2> /dev/null | tr -d ' |*')\"}})\n\t__git_command_successful || return\n\n\t_wanted hotfixes expl 'support' compadd $support\n}\n\n\n__git_branch_names () {\n\tlocal expl\n\tdeclare -a branch_names\n\n\tbranch_names=(${${(f)\"$(_call_program branchrefs git for-each-ref --format='\"%(refname)\"' refs/heads 2>/dev/null)\"}#refs/heads/})\n\t__git_command_successful || return\n\n\t_wanted branch-names expl branch-name compadd $* - $branch_names\n}\n\n__git_command_successful () {\n\tif (( ${#pipestatus:#0} > 0 )); then\n\t\t_message 'not a git repository'\n\t\treturn 1\n\tfi\n\treturn 0\n}\n\n_git-flow \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_git-journal",
    "content": "#compdef git-journal\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n# \n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n# Completion script for git-journal:\n# https://github.com/saschagrunert/git-journal\n#\n# Authors\n# -------\n#\n# * Sascha Grunert <mail@saschagruenrt.de>\n# * Nico Wagner <nico@cryptopone.org>\n# ------------------------------------------------------------------------------\n\n_git-journal() {\n\ttypeset -A opt_args\n\tlocal ret=1\n\n\tlocal context curcontext=\"$curcontext\" state line\n    _arguments -s -S -C \\\n\"-p+[Sets a custom working path.]\" \\\n\"--path+[Sets a custom working path.]\" \\\n\"-n+[The number of tags until the parser stops when a single revision is given.]\" \\\n\"--tags-count+[The number of tags until the parser stops when a single revision is given.]\" \\\n\"-e+[A pattern to exclude git tags from the processing.]\" \\\n\"-t+[Use a custom output template.]\" \\\n\"--template+[Use a custom output template.]\" \\\n\"-o+[The output file for the changelog.]\" \\\n\"--output+[The output file for the changelog.]\" \\\n\"-a[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]\" \\\n\"--all[Do not stop parsing at the first tag when a single revision is given. Overwrites '-n/--tags-count'.]\" \\\n\"-g[Generate a fresh output template from a commit range.]\" \\\n\"--generate[Generate a fresh output template from a commit range.]\" \\\n\"-s[Print only the shortlog (summary) form.]\" \\\n\"--short[Print only the shortlog (summary) form.]\" \\\n\"-u[Skip entries without any relation to a git TAG.]\" \\\n\"--skip-unreleased[Skip entries without any relation to a git TAG.]\" \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n\"1:: :_git-journal_commands\" \\\n\"*:: :->git-journal\" \\\n&& ret=0\n    case $state in\n    (git-journal)\n        curcontext=\"${curcontext%:*:*}:git-journal-command-$words[1]:\"\n        case $line[1] in\n            (p)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n\"1:: :_git-journal_prepare_commands\" \\\n&& ret=0\n;;\n(prepare)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n\"1:: :_git-journal_prepare_commands\" \\\n&& ret=0\n;;\n(s)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n&& ret=0\n;;\n(setup)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n&& ret=0\n;;\n(v)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n\"1:: :_git-journal_verify_commands\" \\\n&& ret=0\n;;\n(verify)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n\"1:: :_git-journal_verify_commands\" \\\n&& ret=0\n;;\n(help)\n_arguments -s -S -C \\\n\"-h[Prints help information]\" \\\n\"--help[Prints help information]\" \\\n\"-V[Prints version information]\" \\\n\"--version[Prints version information]\" \\\n&& ret=0\n;;\n        esac\n    ;;\nesac\n}\n\n(( $+functions[_git-journal_commands] )) ||\n_git-journal_commands() {\n    local commands; commands=(\n        \"prepare:Prepare a commit message before the user can edit it.\" \\\n\"p:Prepare a commit message before the user can edit it.\" \\\n\"setup:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory.\" \\\n\"s:Creates all necessary git hooks and an initial configuration file. Shell completions for bash and fish will be available inside the current working directory.\" \\\n\"verify:Verify the specified commit message.\" \\\n\"v:Verify the specified commit message.\" \\\n\"help:Prints this message or the help of the given subcommand(s)\" \\\n\"REVISION_RANGE:Specifies the revision range to be processed. If a single revision is specified, the output will stop at the first following git TAG.\" \\\n    )\n    _describe -t commands 'git-journal commands' commands \"$@\"\n}\n(( $+functions[_git-journal_help_commands] )) ||\n_git-journal_help_commands() {\n    local commands; commands=(\n        \n    )\n    _describe -t commands 'git-journal help commands' commands \"$@\"\n}\n(( $+functions[_git-journal_p_commands] )) ||\n_git-journal_p_commands() {\n    local commands; commands=(\n        \"MESSAGE:The path to the commit message which should be prepared.\" \\\n\"TYPE:The type of the commit. For example \"message\".\" \\\n    )\n    _describe -t commands 'git-journal p commands' commands \"$@\"\n}\n(( $+functions[_p_commands] )) ||\n_p_commands() {\n    local commands; commands=(\n        \"MESSAGE:The path to the commit message which should be prepared.\" \\\n\"TYPE:The type of the commit. For example \"message\".\" \\\n    )\n    _describe -t commands 'p commands' commands \"$@\"\n}\n(( $+functions[_git-journal_prepare_commands] )) ||\n_git-journal_prepare_commands() {\n    local commands; commands=(\n        \"MESSAGE:The path to the commit message which should be prepared.\" \\\n\"TYPE:The type of the commit. For example \"message\".\" \\\n    )\n    _describe -t commands 'git-journal prepare commands' commands \"$@\"\n}\n(( $+functions[_git-journal_s_commands] )) ||\n_git-journal_s_commands() {\n    local commands; commands=(\n        \n    )\n    _describe -t commands 'git-journal s commands' commands \"$@\"\n}\n(( $+functions[_s_commands] )) ||\n_s_commands() {\n    local commands; commands=(\n        \n    )\n    _describe -t commands 's commands' commands \"$@\"\n}\n(( $+functions[_git-journal_setup_commands] )) ||\n_git-journal_setup_commands() {\n    local commands; commands=(\n        \n    )\n    _describe -t commands 'git-journal setup commands' commands \"$@\"\n}\n(( $+functions[_git-journal_v_commands] )) ||\n_git-journal_v_commands() {\n    local commands; commands=(\n        \"MESSAGE:The path to the commit message which should be prepared.\" \\\n    )\n    _describe -t commands 'git-journal v commands' commands \"$@\"\n}\n(( $+functions[_v_commands] )) ||\n_v_commands() {\n    local commands; commands=(\n        \"MESSAGE:The path to the commit message which should be prepared.\" \\\n    )\n    _describe -t commands 'v commands' commands \"$@\"\n}\n(( $+functions[_git-journal_verify_commands] )) ||\n_git-journal_verify_commands() {\n    local commands; commands=(\n        \"MESSAGE:The path to the commit message which should be prepared.\" \\\n    )\n    _describe -t commands 'git-journal verify commands' commands \"$@\"\n}\n\n_git-journal \"$@\""
  },
  {
    "path": ".config/zsh/completions/src/_git-pulls",
    "content": "#compdef git-pulls\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for git-pulls 0.3.1 (https://git-pulls.com/schacon/git-pulls).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud (https://github.com/nicoulaj)\n#\n# ------------------------------------------------------------------------------\n\n\n_git-pulls() {\n  typeset -A opt_args\n  local context state line curcontext=\"$curcontext\"\n\n  local ret=1\n\n  _arguments -C \\\n    '(- 1 *)--help[show usage]' \\\n    '1:cmd:->cmds' \\\n    '*::arg:->args' \\\n  && ret=0\n\n  case \"$state\" in\n    (cmds)\n      local commands; commands=(\n        'update:update pull requests list'\n        'list:list pull requests'\n        'show:show pull request'\n        'browse:open pull request in a web browser'\n        'merge:merge pull request'\n      )\n      _describe -t commands 'command' commands && ret=0\n    ;;\n    (args)\n      curcontext=\"${curcontext%:*:*}:git-pulls-cmd-$words[1]:\"\n      case $words[1] in\n        (update)\n          _message 'no more arguments' && ret=0\n        ;;\n        (list)\n          _arguments \\\n            '--reverse[list in reverse order]' \\\n          && ret=0\n        ;;\n        (show)\n          _arguments \\\n            '1: :_git-pulls_pull_requests_numbers' \\\n            '--full[use verbose output]' \\\n          && ret=0\n        ;;\n        (browse|merge)\n          _arguments \\\n            '1: :_git-pulls_pull_requests_numbers' \\\n          && ret=0\n        ;;\n      esac\n    ;;\n  esac\n\n  return ret\n}\n\n(( $+functions[_git-pulls_pull_requests_numbers] )) ||\n_git-pulls_pull_requests_numbers() {\n  local pull_requests; pull_requests=(${${${(M)${(f)\"$(_call_program users $service list)\"}:#[[:digit:]]##[[:space:]]*}//:/\\\\:}/[[:space:]]##/:})\n  _describe -t pull-request-numbers 'pull request number' pull_requests \"$@\"\n}\n\n_git-pulls \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_git-wtf",
    "content": "#compdef git-wtf\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for git-wtf, authored by\n#  William Morgan (http://git-wt-commit.rubyforge.org/git-wtf)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Mario Fernandez (https://github.com/sirech)\n#\n# ------------------------------------------------------------------------------\n\n_arguments -w -C -s \\\n    '(--long --short)'{-l,--long}'[include author info and date for each commit]' \\\n    '(--long --short)'{-s,--short}'[do not show commits]' \\\n    '(--all)'{-a,--all}'[show all branches across all remote repos, not just those from origin]' \\\n    '(--all-commits)'{-A,--all-commits}'[show all commits, not just the first 5]' \\\n    '(--key)'{-k,--key}'[show key]' \\\n    '(--relations)'{-r,--relations}'[show relation to features / integration branches]' \\\n    '(--dump-config)--dump-config[print out current configuration and exit]' \\\n    '*: :__git_branch_names'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_glances",
    "content": "#compdef glances\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for glances (http://nicolargo.github.com/glances/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * loranger (https://github.com/loranger)\n#\n# ------------------------------------------------------------------------------\n\n_glances() {\n\n\t_arguments \\\n\t\t\"-b[Display network rate in Byte per second]\" \\\n\t\t\"-B[Bind server to the given IP or host NAME]:host:_hosts\" \\\n\t\t\"-c[Connect to a Glances server]:host:_hosts\" \\\n\t\t\"-C[Path to the configuration file]:configuration path:_files -/\" \\\n\t\t\"-d[Disable disk I/O module]\" \\\n\t\t\"-e[Enable the sensors module (Linux-only)]\" \\\n\t\t\"-f[Set the output folder (HTML) or file (CSV)]:output path:_files -/\" \\\n\t\t\"-h[Display the syntax and exit]\" \\\n\t\t\"-m[Disable mount module]\" \\\n\t\t\"-n[Disable network module]\" \\\n\t\t\"-o[Define additional output (available: HTML or CSV)]:output type:(HTML CSV)\" \\\n\t\t\"-p[Define the client or server TCP port (default: 61209)]:port:_ports\" \\\n\t\t\"-P[Client/server password]:password:\" \\\n\t\t\"-s[Run Glances in server mode]\" \\\n\t\t\"-t[Set the refresh time in seconds (default: 3)]:seconds:\" \\\n\t\t\"-v[Display the version and exit]\" \\\n\t\t\"-z[Do not use the bold color attribute]\" \\\n}\n\n_glances \"$@\""
  },
  {
    "path": ".config/zsh/completions/src/_golang",
    "content": "#compdef go\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# Copyright (c) 2013-2015 Robby Russell and contributors (see\n# https://github.com/robbyrussell/oh-my-zsh/contributors)\n# Copyright (c) 2010-2014 Go authors\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY DIRECT,\n# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for go 1.5 (http://golang.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Mikkel Oscar Lyderik <mikkeloscar@gmail.com>\n#  * oh-my-zsh authors:\n#        https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/golang/golang.plugin.zsh\n#  * Go authors\n#\n# ------------------------------------------------------------------------------\n\ntypeset -A opt_args\n\nlocal -a commands build_flags\ncommands=(\n'build:compile packages and dependencies'\n'clean:remove object files'\n'doc:show documentation for package or symbol'\n'env:print Go environment information'\n'fix:run go tool fix on packages'\n'fmt:run gofmt on package sources'\n'generate:generate Go files by processing source'\n'get:download and install packages and dependencies'\n'install:compile and install packages and dependencies'\n'list:list packages'\n'run:compile and run Go program'\n'test:test packages'\n'tool:run specified go tool'\n'version:print Go version'\n'vet:run go tool vet on packages'\n'help:get more information about a command'\n)\n\n_arguments \\\n  \"1: :{_describe 'command' commands}\" \\\n  '*:: :->args'\n\ncase $state in\n  args)\n    build_flags=(\n    '-a[force rebuilding of packages that are already up-to-date]'\n    '-n[print the commands but do not run them]'\n    '-p[number of builds that can be run in parallel]:number'\n    '-race[enable data race detection]'\n    '-v[print the names of packages as they are compiled]'\n    '-work[print temporary work directory and keep it]'\n    '-x[print the commands]'\n    '-asmflags[arguments for each go tool asm invocation]:flags'\n    '-buildmode[build mode to use]:mode'\n    '-compiler[name of compiler to use]:name'\n    '-gccgoflags[arguments for gccgo]:args'\n    '-gcflags[arguments for each go tool compile invocation]:args'\n    '-installsuffix[suffix to add to package directory]:suffix'\n    '-ldflags[arguments to pass on each go tool link invocation.]:flags'\n    '-linkshared[link against shared libraries]'\n    '-pkgdir[install and load all packages from dir]:dir'\n    '-tags[list of build tags to consider satisfied]:tags'\n    '-toolexec[program to use to invoke toolchain programs]:args'\n    )\n\n    __go_packages() {\n      local gopaths\n      declare -a gopaths\n      gopaths=(\"${(s/:/)$(go env GOPATH)}\")\n      gopaths+=(\"$(go env GOROOT)\")\n      for p in $gopaths; do\n        _path_files -W \"$p/src\" -/\n      done\n    }\n\n    case $words[1] in\n      build)\n        _arguments \\\n          '-o[force build to write to named output file]:file:_files' \\\n          '-i[installs the packages that are dependencies of the target]' \\\n          ${build_flags[@]} \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      clean)\n        _arguments \\\n          '-i[remove corresponding installed archive or binary]' \\\n          '-r[apply clean recursively on all dependencies]' \\\n          ${build_flags[@]} \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      doc)\n        _arguments \\\n          '-c[respect case when matching symbols]' \\\n          '-cmd[treat a command (package main) like a regular package]' \\\n          '-u[show docs for unexported and exported symbols and methods]'\n          ;;\n\n      fix)\n        _arguments '*:importpaths:__go_packages'\n        ;;\n\n      fmt)\n        _arguments \\\n          '-n[prints commands that would be executed]' \\\n          '-x[prints commands as they are executed]' \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      generate)\n        _arguments \\\n          '-run=[specifies a regular expression to select directives]:regex' \\\n          '-x[print the commands]' \\\n          '-n[print the commands but do not run them]' \\\n          '-v[print the names of packages as they are compiled]' \\\n          \"*:args:{ _alternative ':importpaths:__go_packages' _files }\"\n          ;;\n\n      get)\n        _arguments \\\n          '-d[instructs get to stop after downloading the packages]' \\\n          '-f[force get -u not to verify that each package has been checked from vcs]' \\\n          '-fix[run the fix tool on the downloaded packages]' \\\n          '-insecure[permit fetching/resolving custom domains]' \\\n          '-t[also download the packages required to build tests]' \\\n          '-u[use the network to update the named packages]' \\\n          ${build_flags[@]} \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      install)\n        _arguments ${build_flags[@]} \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      list)\n        _arguments \\\n          '-e[changes the handling of erroneous packages]' \\\n          '-f[specifies an alternate format for the list]:format' \\\n          '-json[causes package data to be printed in JSON format]' \\\n          ${build_flags[@]} \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      run)\n        _arguments \\\n          ${build_flags[@]} \\\n          '-exec[invoke the binary using xprog]:xporg' \\\n          '*:file:_files -g \"*.go(-.)\"'\n          ;;\n\n      test)\n        _arguments \\\n          \"-c[compile but don't run test]\" \\\n          '-i[install dependencies of the test]' \\\n          '-bench[run benchmarks matching the regular expression]:regexp' \\\n          '-benchmem[print memory allocation statistics for benchmarks]' \\\n          '-benchtime[run benchmarks for t rime]:t' \\\n          '-blockprofile[write a goroutine blocking profile to the specified file]:block' \\\n          '-blockprofilerate[control goroutine blocking profiles]:n' \\\n          '-count[run each test and benchmark n times]:n' \\\n          '-cover[enable coverage analysis]' \\\n          '-covermode[set the mode for coverage analysis]:mode:(set count atomic)' \\\n          '-coverpkg[apply coverage analysis in each test of listed packages]:list' \\\n          '-coverprofile[write a coverage profile to file]:cover' \\\n          '-cpu[specify a list of GOMAXPROCS values]:cpus' \\\n          '-cpuprofile[write a CPU profile to the specified file]:profile' \\\n          '-memprofile[write a memory profile to file]:mem' \\\n          '-memprofilerate[enable more precise memory profiles]:n' \\\n          '-outputdir[place output files from profiling in output dir]:dir' \\\n          '-parallel[allow parallel execution of test functions]:n' \\\n          '-run[run tests and examples matching the regular expression]:regexp' \\\n          '-short[tell long-running tests to shorten their run time]' \\\n          '-timeout[timeout long running tests]:t' \\\n          '-trace[write an execution trace to the specified file]:trace' \\\n          '-v[verbose output]' \\\n          ${build_flags[@]} \\\n          '-exec[run test binary using xprog]:xprog' \\\n          '-o[compile test binary to named file]:file:_files' \\\n          '*:importpaths:__go_packages'\n          ;;\n\n      tool)\n        local -a tools\n        tools=($(go tool))\n\n        _arguments \\\n          '-n[print command that would be executed]' \\\n          \"1: :{_describe 'tool' tools}\" \\\n          '*:: :->args'\n\n        case $state in\n          args)\n            case $words[1] in\n              addr2line)\n                _files\n                ;;\n\n              asm)\n                _arguments \\\n                  '-D[predefined symbol with optional simple value]:value' \\\n                  '-I[include directory]:value' \\\n                  '-S[print assembly and machine code]' \\\n                  '-debug[dump instructions as they are parsed]' \\\n                  '-dynlink[support references to Go symbols]' \\\n                  '-o[output file]:string' \\\n                  '-shared[generate code that can be linked into a shared lib]' \\\n                  '-trimpath[remove prefix from recorded source file paths]:string'\n                ;;\n\n              callgraph)\n                local -a algos graphs\n                algos=(\n                'static:static calls only'\n                'cha:Class Hierarchy Analysis'\n                'rta:Rapid Type Analysis'\n                'pta:inclusion-based Points-To Analysis'\n                )\n                graphs=(\n                'digraph:output in digraph format'\n                'graphviz:output in AT&T GraphViz (.dot) format'\n                )\n\n                _arguments \\\n                  '-algo=[call-graph construction algorithm]:algos:{ _describe \"algos\" algos }' \\\n                  \"-test[include the package's tests in the analysis]\" \\\n                  '-format=[format in which each call graph edge is displayed]:graphs:{ _describe \"graphs\" graphs }'\n                ;;\n\n              cgo)\n                _arguments \\\n                  '-debug-define[print relevant #defines]' \\\n                  '-debug-gcc[print gcc invocations]' \\\n                  '-dynimport[if non-empty, print dynamic import data]:string' \\\n                  '-dynlinker[record dynamic linker information]' \\\n                  '-dynout[write -dynimport output to file]:file' \\\n                  '-dynpackage[set Go package for -dynimport output]:string' \\\n                  '-exportheader[where to write export header]:string' \\\n                  '-gccgo[generate files for use with gccgo]' \\\n                  '-gccgopkgpath[-fgo-pkgpath option used with gccgo]:string' \\\n                  '-gccgoprefix[-fgo-prefix option used with gccgo]:string' \\\n                  '-godefs[write Go definitions for C file to stdout]' \\\n                  '-import_runtime_cgo[import runtime/cgo in generated code]' \\\n                  '-import_syscall[import syscall in generated code]' \\\n                  '-importpath[import path of package being built]:path' \\\n                  '-objdir[object directory]:dir'\n                ;;\n\n              compile)\n                _arguments \\\n                  '-%[debug non-static initializers]' \\\n                  '-+[compiling runtime]' \\\n                  \"-A[for bootstrapping, allow 'any' type]\" \\\n                  '-B[disable bounds checking]' \\\n                  '-D[set relative path for local imports]:path' \\\n                  '-E[debug symbol export]' \\\n                  '-I[add directory to import search path]:directory' \\\n                  '-K[debug missing line numbers]' \\\n                  '-L[use full (long) path in error messages]' \\\n                  '-M[debug move generation]' \\\n                  '-N[disable optimizations]' \\\n                  '-P[debug peephole optimizer]' \\\n                  '-R[debug register optimizer]' \\\n                  '-S[print assembly listing]' \\\n                  '-V[print compiler version]' \\\n                  '-W[debug parse tree after type checking]' \\\n                  '-asmhdr[write assembly header to file]:file' \\\n                  '-buildid[record id as the build id in the export metadata]:id' \\\n                  '-complete[compiling complete package (no C or assembly)]' \\\n                  '-cpuprofile[write cpu profile to file]:file' \\\n                  '-d[print debug information about items in list]:list' \\\n                  '-dynlink[support references to Go symbols]' \\\n                  '-e[no limit on number of errors reported]' \\\n                  '-f[debug stack frames]' \\\n                  '-g[debug code generation]' \\\n                  '-h[halt on error]' \\\n                  '-i[debug line number stack]' \\\n                  '-importmap[add definition of the form source=actual to import map]:definition' \\\n                  '-installsuffix[set pkg directory suffix]:suffix' \\\n                  '-j[debug runtime-initialized variables]' \\\n                  '-l[disable inlining]' \\\n                  '-largemodel[generate code that assumes a large memory model]' \\\n                  '-live[debug liveness analysis]' \\\n                  '-m[print optimization decisions]' \\\n                  '-memprofile[write memory profile to file]:file' \\\n                  '-memprofilerate[set runtime.MemProfileRate to rate]:rate' \\\n                  '-nolocalimports[reject local (relative) imports]' \\\n                  '-o[write output to file]:file' \\\n                  '-p[set expected package import path]:path' \\\n                  '-pack[write package file instead of object file]' \\\n                  '-r[debug generated wrappers]' \\\n                  '-race[enable race detector]' \\\n                  '-s[warn about composite literals that can be simplified]' \\\n                  '-shared[generate code that can be linked into a shared library]' \\\n                  '-trimpath[remove prefix from recorded source file paths]:prefix' \\\n                  '-u[reject unsafe code]' \\\n                  '-v[increase debug verbosity]' \\\n                  '-w[debug type checking]' \\\n                  '-wb[enable write barrier (default 1)]' \\\n                  '-x[debug lexer]' \\\n                  '-y[debug declarations in canned imports (with -d)]' \\\n                  '*:file:_files -g \"*.go(-.)\"'\n                ;;\n\n              cover)\n                if (( CURRENT == 2 )); then\n                  _arguments \\\n                    '-func=[output coverage profile information for each function]:string' \\\n                    '-html=[generate HTML representation of coverage profile]:file:_files' \\\n                    '-mode=[coverage mode]:mode:(set count atomic)'\n                  return\n                fi\n\n                _arguments \\\n                  '-o[file for output]:file' \\\n                  '-var=[name of coverage variable to generate]:var' \\\n                  '*:file:_files -g \"*.go(-.)\"'\n                ;;\n\n              doc)\n                _arguments \\\n                  '-c[respect case when matching symbols]' \\\n                  '-cmd[treat a command (package main) like a regular package]' \\\n                  '-u[show docs for unexported and exported symbols and methods]' \\\n                  ;;\n\n              fix)\n                _arguments \\\n                  '-diff[display diffs instead of rewriting files]' \\\n                  '-force[force fixes to run even if the code looks updated]:string' \\\n                  '-r[restrict the rewrites]:string' \\\n                  '*:files:_files'\n                ;;\n\n              link)\n                _arguments \\\n                  '-B[add an ELF NT_GNU_BUILD_ID note when using ELF]:note' \\\n                  '-C[check Go calls to C code]' \\\n                  '-D[set data segment address (default -1)]:address' \\\n                  '-E[set entry symbol name]:entry' \\\n                  '-H[set header type]:type' \\\n                  '-I[use linker as ELF dynamic linker]:linker' \\\n                  '-L[add specified directory to library path]:directory' \\\n                  '-R[set address rounding quantum (default -1)]:quantum' \\\n                  '-T[set text segment address (default -1)]:address' \\\n                  '-V[print version and exit]' \\\n                  '-W[disassemble input]' \\\n                  '-X[add string value definition]:definition' \\\n                  '-a[disassemble output]' \\\n                  '-buildid[record id as Go toolchain build id]:id' \\\n                  '-buildmode[set build mode]:mode' \\\n                  '-c[dump call graph]' \\\n                  '-cpuprofile[write cpu profile to file]:file' \\\n                  '-d[disable dynamic executable]' \\\n                  '-extld[use linker when linking in external mode]:linker' \\\n                  '-extldflags[pass flags to external linker]:flags' \\\n                  '-f[ignore version mismatch]' \\\n                  '-g[disable go package data checks]' \\\n                  '-h[halt on error]' \\\n                  '-installsuffix[set package directory suffix]:suffix' \\\n                  '-k[set field tracking symbol]:symbol' \\\n                  '-linkmode[set link mode]:mode:(internal external auto)' \\\n                  '-linkshared[link against installed Go shared libraries]' \\\n                  '-memprofile[write memory profile to file]:file' \\\n                  '-memprofilerate[set runtime.MemProfileRate to rate]:rate' \\\n                  '-n[dump symbol table]' \\\n                  '-o[write output to file]:file' \\\n                  '-r[set the ELF dynamic linker search path to dir1:dir2:...]:path' \\\n                  '-race[enable race detector]' \\\n                  '-s[disable symbol table]' \\\n                  '-shared[generate shared object (implies -linkmode external)]' \\\n                  '-tmpdir[use directory for temporary files]:directory' \\\n                  '-u[reject unsafe packages]' \\\n                  '-v[print link trace]' \\\n                  '-w[disable DWARF generation]' \\\n                  '*:files:_files'\n                ;;\n\n              objdump)\n                _arguments \\\n                  '-s[only dump symbols matching this regexp]:regexp' \\\n                  '*:files:_files'\n                ;;\n\n              pack)\n                _arguments '1:ops:(c p r t x)' '::verbose:(v)' ':files:_files'\n                ;;\n\n              pprof)\n                _arguments \\\n                  '-callgrind[outputs a graph in callgrind format]' \\\n                  '-disasm=[output annotated assembly]:p' \\\n                  '-dot[outputs a graph in DOT format]' \\\n                  '-eog[visualize graph through eog]' \\\n                  '-evince[visualize graph through evince]' \\\n                  '-gif[outputs a graph image in GIF format]' \\\n                  '-gv[visualize graph through gv]' \\\n                  '-list=[output annotated source for functions matching regexp]:p' \\\n                  '-pdf[outputs a graph in PDF format]' \\\n                  '-peek=[output callers/callees of functions matching regexp]:p' \\\n                  '-png[outputs a graph image in PNG format]' \\\n                  '-proto[outputs the profile in compressed protobuf format]' \\\n                  '-ps[outputs a graph in PS format]' \\\n                  '-raw[outputs a text representation of the raw profile]' \\\n                  '-svg[outputs a graph in SVG format]' \\\n                  '-tags[outputs all tags in the profile]' \\\n                  '-text[outputs top entries in text form]' \\\n                  '-top[outputs top entries in text form]' \\\n                  '-tree[outputs a text rendering of call graph]' \\\n                  '-web[visualize graph through web browser]' \\\n                  '-weblist=[output annotated source in HTML]:p' \\\n                  '-output=[generate output on file f (stdout by default)]:f' \\\n                  '-functions[report at function level (default)]' \\\n                  '-files[report at source file level]' \\\n                  '-lines[report at source line level]' \\\n                  '-addresses[report at address level]' \\\n                  '-base[show delta from this profile]:profile' \\\n                  '-drop_negative[ignore negative differences]' \\\n                  '-cum[sort by cumulative data]' \\\n                  '-seconds=[length of time for dynamic profiles]:n' \\\n                  '-nodecount=[max number of nodes to show]:n' \\\n                  '-nodefraction=[hide nodes below <f>*total]:f' \\\n                  '-edgefraction=[hide edges below <f>*total]:f' \\\n                  '-sample_index[index of sample value to display]' \\\n                  '-mean[average sample value over first value]' \\\n                  '-inuse_space[display in-use memory size]' \\\n                  '-inuse_objects[display in-use object counts]' \\\n                  '-alloc_space[display allocated memory size]' \\\n                  '-alloc_objects[display allocated object counts]' \\\n                  '-total_delay[display total delay at each region]' \\\n                  '-contentions[display number of delays at each region]' \\\n                  '-mean_delay[display mean delay at each region]' \\\n                  '-runtime[show runtime call frames in memory profiles]' \\\n                  '-focus=[restricts to paths going through a node matching regexp]:r' \\\n                  '-ignore=[skips paths going through any nodes matching regexp]:r' \\\n                  '-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \\\n                  '-tagignore=[discard samples tagged with key:value matching regexp]' \\\n                  '-call_tree[generate a context-sensitive call tree]' \\\n                  '-unit=[convert all samples to unit u for display]:u' \\\n                  '-divide_by=[scale all samples by dividing them by f]:f' \\\n                  '-buildid=[override build id for main binary in profile]:id' \\\n                  '-tools=[search path for object-level tools]:path' \\\n                  '-help[help message]' \\\n                  '*:files:_files'\n                ;;\n\n              trace)\n                _arguments \\\n                  '-http=[HTTP service address]:addr' \\\n                  '*:files:_files'\n                ;;\n\n              vet)\n                _arguments \\\n                  '-all[check everything]' \\\n                  '-asmdecl[check assembly against Go declarations]' \\\n                  '-assign[check for useless assignments]' \\\n                  '-atomic[check for common mistaken usages of the sync/atomic]' \\\n                  '-bool[check for mistakes involving boolean operators]' \\\n                  '-buildtags[check that +build tags are valid]' \\\n                  '-composites[check that composite literals used field-keyed elements]' \\\n                  '-compositewhitelist[use composite white list]' \\\n                  '-copylocks[check that locks are not passed by value]' \\\n                  '-methods[check that canonically named methods are canonically defined]' \\\n                  '-nilfunc[check for comparisons between functions and nil]' \\\n                  '-printf[check printf-like invocations]' \\\n                  '-printfuncs[print function names to check]:string' \\\n                  '-rangeloops[check that range loop variables are used correctly]' \\\n                  '-shadow[check for shadowed variables]' \\\n                  '-shadowstrict[whether to be strict about shadowing]' \\\n                  '-shift[check for useless shifts]' \\\n                  '-structtags[check that struct field tags have canonical format]' \\\n                  '-tags[list of build tags to apply when parsing]:list' \\\n                  '-test[for testing only: sets -all and -shadow]' \\\n                  '-unreachable[check for unreachable code]' \\\n                  '-unsafeptr[check for misuse of unsafe.Pointer]' \\\n                  '-unusedfuncs[list of functions whose results must be used]:string' \\\n                  '-unusedresult[check for unused result of calls to functions in -unusedfuncs]' \\\n                  '-unusedstringmethods[list of methods whose results must be used]:string' \\\n                  '-v[verbose]' \\\n                  '*:files:_files'\n                ;;\n\n              yacc)\n                _arguments \\\n                  '-o[output]:output' \\\n                  '-v[parsetable]:parsetable' \\\n                  '*:files:_files'\n                ;;\n            esac\n            ;;\n        esac\n        ;;\n\n      vet)\n        _arguments \\\n          '-n[print commands that would be executed]' \\\n          '-x[prints commands as they are executed]' \\\n          ${build_flags[@]} \\\n          '*:importpaths:__go_packages'\n          ;;\n      help)\n        local -a topics\n        topics=(\n        'c:calling between Go and C'\n        'buildmode:description of build modes'\n        'filetype:file types'\n        'gopath:GOPATH environment variable'\n        'environment:environment variables'\n        'importpath:import path syntax'\n        'packages:description of package lists'\n        'testflag:description of testing flags'\n        'testfunc:description of testing functions'\n        )\n\n        _arguments \"1: :{_describe 'command' commands -- topics}\"\n        ;;\n    esac\n    ;;\nesac\n"
  },
  {
    "path": ".config/zsh/completions/src/_google",
    "content": "#compdef google\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for googlecl (https://code.google.com/p/googlecl/)\n#\n#  Source: https://raw.github.com/dadrc/zsh-cfg/master/completions/_google\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * dadrc (https://github.com/dadrc)\n#  * Ben O'Hara (https://github.com/benohara)\n#\n# ------------------------------------------------------------------------------\n\n_google() {\n  # init variables\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  # init state\n   _arguments \\\n    '1: :->service'\\\n    '2: :->task'\n\n  case $state in\n  service)\n    _arguments '1:service:(picasa blogger youtube docs contacts calendar finance)'\n  ;;\n  *)\n    case $words[2] in\n    picasa)\n      compadd \"$@\" get create list list-albums tag post delete\n      ;;\n    blogger)\n      compadd \"$@\" post tag list delete\n      ;;\n    youtube)\n      compadd \"$@\" post tag list delete\n      ;;\n    docs)\n      compadd \"$@\" edit delete list upload get\n      ;;\n    contacts)\n      compadd \"$@\" list list-groups add add-groups delete-groups delete\n      ;;\n    calendar)\n      compadd \"$@\" add list today delete\n      ;;\n    finance)\n      compadd \"$@\" list-txn delete-pos create-pos delete-txn create create-txn list list-pos delete\n      ;;\n    *)\n    esac\n  esac\n}\n\n_google \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_gtk-launch",
    "content": "#compdef gtk-launch\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for gtk-launch on gtk+-3.14.8 (http://www.gtk.org/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * ncaq <ncaq@ncaq.net> (version 3.14.8)\n#\n# ------------------------------------------------------------------------------\n\n_gtk-launch() {\n  _arguments \\\n    {-h,--help}'[Show help options]' \\\n    --help-all'[Show all help options]' \\\n    --help-gtk'[Show GTK+ Options]' \\\n    --display='[X display to use]' \\\n    '1: :_applications'\n}\n\n_applications() {\n  local -a applications\n\n  for file in /usr/share/applications/*.desktop; do\n    applications+=`_format_entry $file`\n  done\n\n  _values -w \\\n          'applications' \\\n          $applications\n}\n\n_format_entry() {\n  echo \"`_remove_path_extension $1`[`_get_description $1`]\"\n}\n\n_remove_path_extension() {\n  # echo arg\n  # remove path string\n  # remove extension string\n  echo $1 | \\\n    sed 's/.*\\///' | \\\n    sed 's/\\.desktop//'\n}\n\n_get_description() {\n  # grep --no-messages option is handling of not UTF-8 text\n  grep --no-messages '^Comment=\\|^Exec=' $1 | \\\n    tr '\\n' ' '\n}\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_homestead",
    "content": "#compdef homestead\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for homestead (http://laravel.com/docs/homestead).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * loranger (https://github.com/loranger)\n#\n# ------------------------------------------------------------------------------\n\n\n_homestead_get_command_list () {\n    homestead --no-ansi | sed \"1,/Available commands/d\" | awk '/ [a-z]+/ { print $1 }'\n}\n\n_homestead () {\n    if [ -f homestead ]; then\n        compadd `_homestead_get_command_list`\n    fi\n}\n\ncompdef _homestead php homestead\ncompdef _homestead homestead\n"
  },
  {
    "path": ".config/zsh/completions/src/_httpie",
    "content": "#compdef http\n# ------------------------------------------------------------------------------\n# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for httpie 0.7.2  (http://httpie.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Akira Maeda <https://github.com/glidenote>\n#  * Valodim <https://github.com/Valodim>\n#  * Claus Klingberg <https://github.com/cjk>\n#\n# ------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# ------------------------------------------------------------------------------\n\n_httpie_params () {\n\n    local ret=1 expl\n\n    # or a url\n    if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then\n        _httpie_urls && ret=0\n\n    # regular param, if we already have a url\n    elif (( CURRENT > NORMARG )); then\n\n        # if the suffix is precisely : this is shorthand for a header\n        if [[ -prefix ':' ]]; then\n            PREFIX=\n            SUFFIX=:\n        fi\n\n        # if we are in front of a : (possibly due to the PREFIX move before)\n        if [[ -suffix ':' ]]; then\n\n            # this is rather buggy with normal tab behavior :\\\n            compstate[insert]=menu\n            _wanted http_header expl 'HTTP Header' \\\n                compadd -s ':' -S '' -- Content-Type Cookie && return 0\n        fi\n\n        # ignore all prefix stuff\n        compset -P '(#b)([^:@=]#)'\n        local name=$match[1]\n\n        if compset -P '='; then\n            _message \"$name data field value\"\n        elif compset -P '@'; then\n            _files\n        elif compset -P ':=@'; then\n            _files\n        elif compset -P ':='; then\n            _message \"$name raw json data\"\n        elif compset -P '=='; then\n            _message \"$name url parameter value\"\n        elif compset -P ':'; then\n            _message \"$name header content\"\n        else\n            typeset -a ops\n            ops=(\n                '=:data field'\n                '\\::header'\n                '==:request parameter'\n                '@:data file field'\n                '\\:=:raw json field'\n                '\\:=@:raw json field file path'\n            )\n            _describe -t httpparams \"parameter types\" ops -Q -S ''\n        fi\n\n        ret=0\n\n    fi\n\n    # first arg may be a request method\n    (( CURRENT == NORMARG )) &&\n        _wanted http_method expl 'Request Method' \\\n            compadd GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK && ret=0\n\n    return $ret\n\n}\n\n_httpie_urls() {\n\n  local ret=1\n\n  if ! [[ -prefix [-+.a-z0-9]#:// ]]; then\n    local expl\n    compset -S '[^:/]*' && compstate[to_end]=''\n    _wanted url-schemas expl 'URL schema' compadd -S '' http:// https:// && ret=0\n  else\n    _urls && ret=0\n  fi\n\n  return $ret\n\n}\n\n_httpie_printflags () {\n\n    local ret=1\n\n    # not sure why this is necessary, but it will complete \"-pH\" style without it\n    [[ $IPREFIX == \"-p\" ]] && IPREFIX+=\" \"\n\n    compset -P '(#b)([a-zA-Z]#)'\n\n    local -a flags\n    [[ $match[1] != *H* ]] && flags+=( \"H:request headers\" )\n    [[ $match[1] != *B* ]] && flags+=( \"B:request body\" )\n    [[ $match[1] != *h* ]] && flags+=( \"h:response headers\" )\n    [[ $match[1] != *b* ]] && flags+=( \"b:response body\" )\n\n    _describe -t printflags \"print flags\" flags -S '' && ret=0\n\n    return $ret\n\n}\n\ninteger NORMARG\n\n_arguments -n -C -s \\\n  '(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object.]' \\\n  '(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields.]' \\\n  '--pretty=[Controls output processing.]:output format:(all colors format none)' \\\n  '(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:(autumn borland bw colorful default emacs friendly fruity manni monokai murphy native pastie perldoc ttr solarized tango trac vim vs)' \\\n  '(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \\\n  '(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response.]' \\\n  '(-p -h --headers)'{-h,--headers}'[Print only the response headers.]' \\\n  '(-p -b --body)'{-b,--body}'[Print only the response body.]' \\\n  '(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`.]' \\\n  '(-o --output)'{-o,--output}'=[Save output to FILE.]:output file:_files' \\\n  '(-d --download)'{-d,--download}'=[Do not print the response body to stdout.]' \\\n  '(-c --continue)'{-c,--continue}'[Resume an interrupted download.]' \\\n  '(--session-read-only)--session=[Create, or reuse and update a session.]:session name (or path)' \\\n  '(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange.]:session name (or path)' \\\n  '(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\\:PASS' \\\n  '--auth-type=[The authentication mechanism to be used. Defaults to \"basic\".]:AUTH-TYPE:(basic digest)' \\\n  '--proxy=[String mapping protocol to the URL of the proxy.]:PROXY' \\\n  '--follow[Allow full redirects.]' \\\n  \"--verify=[Enable or disable verification of ssl certificates.]:verify certificate:(yes no)\" \\\n  '--allow-redirects[Set this flag if full redirects are allowed (e.g. re-POST-ing of data at new ``Location``)]' \\\n  '--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback).]:timeout (seconds)' \\\n  '--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \\\n  '--ignore-stdin[Do not attempt to read stdin.]' \\\n  '(- *)--help[show help message.]' \\\n  \"(- *)--version[show program's version number and exit.]\" \\\n  '--traceback[Prints exception traceback should one occur.]' \\\n  '--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself.]' \\\n  '*:args:_httpie_params' && return 0\n"
  },
  {
    "path": ".config/zsh/completions/src/_ibus",
    "content": "#compdef ibus\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ibus (https://github.com/ibus/ibus).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Tomo Kazahaya <https://github.com/tomonacci>\n#\n# ------------------------------------------------------------------------------\n\n# The completion of \"ibus emoji --lang=\" depends on _language_codes from\n# https://github.com/zsh-users/zsh-completions.\n\nlocal context state state_descr line\ntypeset -A opt_args\nlocal curcontext=$curcontext\n\n_arguments -C \\\n  \":command:(($(ibus help|sed -ne 's/^  \\(\\S\\+\\) \\+\\(.*\\)/\"\\1\\\\:\\2\"/p')))\" \\\n  '*:: :->args' \\\n  && return\n\ncase $state in\n  args)\n    case $line[1] in\n      engine)\n        _arguments \\\n          \":engine:(($(ibus list-engine|sed -ne 's/:/\\\\\\\\:/g' -e 's/^  \\(\\S\\+\\) - \\(.*\\)$/\"\\1:\\2\"/p')))\" \\\n          && return\n        ;;\n      read-cache)\n        _arguments \\\n          '--system[show the content of the system registry cache]' \\\n          '--file=[custom registry cache to show]:registry cache:_files' \\\n          && return\n        ;;\n      write-cache)\n        _arguments \\\n          '--system[save the system registry cache]' \\\n          '--file=[custom registry cache to save]:registry cache:_files' \\\n          && return\n        ;;\n      emoji)\n        _arguments \\\n          '--font=[emoji font]:emoji font: ' \\\n          '--lang=[language of emoji annotations]:language:_language_codes ISO-639-1' \\\n          '--partial-match[match annotations with a partial string]' \\\n          && return\n        ;;\n    esac\n    ;;\nesac\n\nreturn 1\n"
  },
  {
    "path": ".config/zsh/completions/src/_jmeter",
    "content": "#compdef jmeter\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for JMeter (http://jakarta.apache.org/jmeter).\n#\n#  Status: incomplete\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n  '(- 1 *)'{-h,--help}'[print usage information and exit]' \\\n  '(- 1 *)'{-v,--version}'[print the version information and exit]' \\\n  {-p,--propfile}'[the jmeter property file to use]:properties file:_files -g \"*.properties\"' \\\n  '*'{-q,--addprop}'[additional property file(s)]:properties file:_files -g \"*.properties\"' \\\n  {-t,--testfile}'[the jmeter test plan file to run]:JMeter test plan file:_files -g \"*.jmx\"' \\\n  {-j,--jmeterlogfile}'[the jmeter log file]: :_files -g \"*.log\"' \\\n  {-l,--logfile}'[the file to log samples to]: :_files -g \"*.jtl\"' \\\n  {-n,--nongui}'[run JMeter in nongui mode]' \\\n  {-s,--server}'[run the JMeter server]' \\\n  {-H,--proxyHost}'[set a proxy server for JMeter to use]: :_hosts' \\\n  {-P,--proxyPort}'[set proxy server port for JMeter to use]:number' \\\n  {-u,--username}'[set username for proxy server that JMeter is to use]:username:_users' \\\n  {-a,--password}'[set password for proxy server that JMeter is to use]:password' \\\n  {-J-,--jmeterproperty}'[define additional JMeter properties]:argument=value' \\\n  {-G-,--globalproperty}'[define Global properties (sent to servers)]:argument=value' \\\n  {-D-,--systemproperty}'[define additional System properties]:argument=value' \\\n  {-S,--systemPropertyFile}'[a property file to be added as System properties]:properties file:_files -g \"*.properties\"' \\\n  {-L,--loglevel}'[define loglevel]:[category=]level' \\\n  {-r,--runremote}'[start remote servers (as defined by the jmeter property remote_hosts)]' \\\n  {-R,--remotestart}'[start these remote servers (overrides remote_hosts)]:remote servers list' \\\n  {-d,--homedir}'[the JMeter home directory to use]: :_files -/' \\\n  {-X,--remoteexit}'[exit the remote servers at end of test (non-GUI)]'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_jmeter-plugins",
    "content": "#compdef jmeter-plugins\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for jmeter-plugins command line tool 0.4.2\n#  (http://code.google.com/p/jmeter-plugins).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n  '(- 1 *)--help[show help options]' \\\n  '--generate-png[generate PNG file containing graph]:PNG file name:_files -g \"*.png\"' \\\n  '--generate-csv[generate CSV file containing graph data]:CSV file name:_files -g \"*.csv\"' \\\n  '--input-jtl[load data from specified JTL file]:JTL file:_files -g \"*.jtl\"' \\\n  '--plugin-type[type of graph to use for results generation]:class:((AggregateReport ThreadsStateOverTime BytesThroughputOverTime HitsPerSecond LatenciesOverTime PerfMon ResponseCodesPerSecond ResponseTimesDistribution ResponseTimesOverTime ResponseTimesPercentiles ThroughputOverTime ThroughputVsThreads TimesVsThreads TransactionsPerSecond))' \\\n  '--width[set graph width]:graph width (pixels)' \\\n  '--height[set graph height]::graph height (pixels)' \\\n  '--granulation[granulation time for samples]:time (ms)' \\\n  '--relative-times[use relative X axis times, no will set absolute times]: :((yes no))' \\\n  '--aggregate-rows[aggregate all rows into one]: :((yes no))' \\\n  '--paint-gradient[paint gradient background]: :((yes no))' \\\n  '--paint-zeroing[paint zeroing lines]: :((yes no))' \\\n  '--prevent-outliers[prevent outliers on distribution graph]: :((yes no))' \\\n  '--limit-rows[limit number of points in row]:number of points' \\\n  '--force-y[force Y axis limit]:limit' \\\n  '--hide-low-counts[hide points with sample count below limit]:limit'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_jonas",
    "content": "#compdef jonas\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for JOnAS 5.2 (http://jonas.ow2.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\ntypeset -A opt_args\nlocal context state line curcontext=\"$curcontext\" ret=1\n\n_arguments -C \\\n  '1:cmd:->cmds' \\\n  '*::arg:->args' \\\n&& ret=0\n\ncase \"$state\" in\n  (cmds)\n    local commands; commands=(\n      'version:show version information'\n      'check:check that the JOnAS environment is correctly set'\n      'start:start a server instance'\n      'stop:stop a server instance'\n      'admin:administrate a server instance'\n    )\n    _describe -t commands 'command' commands && ret=0\n  ;;\n  (args)\n    curcontext=\"${curcontext%:*:*}:jonas-cmd-$words[1]:\"\n    case $words[1] in\n      (version|check)\n        _message 'no more arguments' && ret=0\n      ;;\n      (start)\n        _arguments \\\n          '-standby[start a minimal JOnAS server with only mandatory services]' \\\n          '(-bg)-fg[start the server in foreground mode]' \\\n          '(-fg)-bg[start the server in background mode]' \\\n          '-win[start the server in a new window]' \\\n          '(-bg)-tui[start the Apache Felix TUI (force foreground mode)]' \\\n          '-gui[start the Apache Felix GUI]' \\\n          '-dev[start a JOnAS server by using bundles present in the default maven repository instead of bundles under $JONAS_ROOT/lib/bundles]' \\\n          '-clean[clean the Apache Felix cache before starting a JOnAS server]' \\\n          '-n[set the server name, must be unique in the domain (default: jonas)]:name' \\\n          '-target[start another server or cluster (group of servers) in the domain]:server' \\\n          '-Ddomain.name=[set the name of the management domain to which the server belongs]:domain' \\\n        && ret=0\n      ;;\n      (stop)\n        _arguments \\\n          '-standby[stop all services except the mandatory ones]' \\\n          '-n[set the name of the server to stop (default: jonas)]:name' \\\n          '-target[stop another server or cluster (group of servers) in the domain]:server' \\\n          '-Ddomain.name=[set the name of the management domain to which the server belongs]:domain' \\\n        && ret=0\n      ;;\n      (admin)\n        _arguments \\\n          '(- : *)-?[print the help message]' \\\n          '-win[administer the server in a new window]' \\\n          '-n[set the name of the server to administer (default: jonas)]:name' \\\n          '-username[set the username when authentication is required]: :_users' \\\n          '-password[set the password when authentication is required]:password' \\\n          '-registry[set the registry URL]: :_urls' \\\n          '-protocol[set the protocol name]:protocol:((jrmp\\:JRE\\ implementation\\ of\\ RMI\\ on\\ the\\ JRMP\\ protocol\\ \\(default\\) iiop\\:JacORB\\ implementation\\ of\\ RMI\\ over\\ the\\ IIOP\\ protocol irmi\\:Oracle\\ JRE\\ independant\\ implementation\\ of\\ RMI))' \\\n          '-a[deploy an application from a given filepath on the current server, or on another target in the domain if the current server is a master]:Java application archive:_files -g \"*.(j|w|r|e)ar\"' \\\n          '-r[undeploy a previously deployed application from the current server or from the specified target if the current server is a master]:Java application archive:_files -g \"*.(j|w|r|e)ar\"' \\\n          '-gc[run the garbage collector on the current JOnAS server]' \\\n          '-passivate[passivate all entity bean instances]' \\\n          '-e[list the properties of the current JOnAS server]' \\\n          '-j[list the registered JNDI names, as seen by the current JOnAS server]' \\\n          '-l[list the beans currently loaded by the current JOnAS server]' \\\n          '-synch[synchronize the entity bean instances on the current JOnAS server]' \\\n          '-debug[set the logging level for the given topic to DEBUG]:topic' \\\n          '-tt[change the default timeout for transactions]:timeout (seconds)' \\\n          '-ping[wait until the JOnAS server is available]' \\\n          '-timeout[maximum time to wait when -ping is used]:timeout (seconds)' \\\n        && ret=0\n      ;;\n    esac\n  ;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_jq",
    "content": "#compdef jq\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for jq (http://stedolan.github.io/jq/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Hideaki Miyake (https://github.com/mollifier)\n#  * George Kontridze (https://github.com/gkze)\n#\n# ------------------------------------------------------------------------------\n\ndeclare -a opts args\nargs=(\n  '--argfile[This option passes the first value from the named file as a value to the jq program as a predefined variable]'\n  '--unbuffered[Flush the output after each JSON object is printed]'\n  '(-C --color-output)'{-C,--color-output}'[Colorize the output even if writing to a pipe or a file]'\n  '(-I --online-input)'{-I,--online-input}'[When the top-level input value is an array produce its elements instead of the array]'\n  '(-M --monochrome-output)'{-M,--monochrome-output}'[Not colorize the output]'\n  '(-R --raw-input)'{-R,--raw-input}'[Parse the input as not JSON but string]'\n  '(-S --sort-keys)'{-S,--sort-keys}'[Output the fields of each object with the keys in sorted order]'\n  '(-V --version)'{-V,--version}'[Display version information]'\n  '(-a --ascii-output)'{-a,--ascii-output}'[Output with pure ASCII characters]'\n  '(-e --exit-status)'{-e,--exit-status}'[Sets the exitstatus of jq to 0 if the last output values was neither false nor null, 1 if the last output value was either false or null, or 4 if no valid result was ever produced]'\n  '(-c --compact-output)'{-c,--compact-output}'[Compact output]'\n  '(-h --help)'{-h,--help}'[Display help information]'\n  '(-n --null-input)'{-n,--null-input}'[Run the filter using null as the input]'\n  '(-r --raw-output)'{-r,--raw-output}'[Not format string result as a JSON string with quotes]'\n  '(-s --slurp)'{-s,--slurp}'[Run the filter just once]'\n  '--arg[Passes a value to the jq program, e.g. --arg foo bar]:jq variable: '\n  '1: :_guard \"^-*\" pattern'\n  '*:files:->file'\n)\nlocal curcontext=$curcontext state line ret=1\ndeclare -A opt_args\n\n_arguments -C $opts \\\n  $args && ret=0\n\ncase $state in\n  file)\n    _files && ret=0\n    ;;\nesac\n\nreturn $ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_jrnl",
    "content": "#compdef jrnl\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for jrnl a simple journal application for your command line. (https://maebert.github.io/jrnl/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_jrnl() {\n\n    _arguments -C \\\n      '(- 1 *)'-h\"[Show help and exit]\" \\\n      '(- 1 *)'-v\"[Prints version information and exits]\" \\\n      '(- 1 *)'-ls\"[Displays accessible journals]\" \\\n      '(- 1 *)'-d\"[Execute in debug mode]\" \\\n      '(- 1 *)'--tags\"[Returns a list of all tags and number of occurences]\" \\\n      \"--short[Show only titles or line containing the search]\" \\\n      \"-from[View entries after this date]:date:\" \\\n      \"-until[View entries before this date]:date:\" \\\n      \"-to[View entries before this date]:date:\" \\\n      \"-on[View entries on this date]:date:\" \\\n      \"-and[Filter by tags using AND (default: OR)]\" \\\n      \"-starred[Show only starred entries]\" \\\n      \"-n[Shows the last n entries matching the filter. And '-3' have the same effect.]\":number: \\\n      \"--export[Export your journal. TYPE can be json, markdown text.]:format:(json markdown text)\" \\\n      \"-o[Optionally specifies output file when using --export If OUTPUT is a directory, exports each entry in individual file instead.]:output file:\" \\\n      \"--encrypt[Encrypts your existing journal with a new pass]\" \\\n      \"--decrypt[Decrypts your journal and stores it in plain text]\" \\\n}\n\n_jrnl\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_kak",
    "content": "#compdef kak\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for kak (https://github.com/mawww/kakoune)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Frank LENORMAND <https://github.com/lenormf>\n#\n# ------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# ------------------------------------------------------------------------------\n\n_kak_sessions() {\n  session_ids=($(_call_program session_ids kak -l))\n  _values \"${session_ids[@]}\"\n}\n\n_kak() {\n  _arguments \\\n        '-n[do not source rc files on startup]' \\\n        '-l[list existing sessions]:session_id:_kak_sessions' \\\n        '-clear[clear dead sessions]' \\\n        '-ro[readonly mode]' \\\n        '(-help --help)'{-help,--help}'[display a help message and quit]' \\\n        '-d[run as a headless session (requires -s)]' \\\n        '-q[in filter mode, be quiet about errors applying keys]' \\\n        '-c[connect to given session]:session_id:_kak_sessions' \\\n        '-e[execute argument on client initialisation]:keys' \\\n        '-E[execute argument on server initialisation]:keys' \\\n        '-s[set session name]:session_id' \\\n        '-p[just send stdin as commands to the given session]:session_id:_kak_sessions' \\\n        '-f[act as a filter, executing given keys on given files]:keys' \\\n        '-i[backup the files on which a filter is applied using the given suffix]:suffix' \\\n        '-ui[set the type of user interface to use (ncurses, dummy, or json)]:ui_type:(ncurses dummy json)' \\\n        '*::files:_files'\n}\n\n_kak \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_kitchen",
    "content": "#compdef kitchen\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Test Kitchen (http://kitchen.ci/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Peter Eisentraut (https://github.com/petere)\n#\n# ------------------------------------------------------------------------------\n\n\n_kitchen() {\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  _arguments '1: :->cmds'\\\n             '2: :->args'\n\n  case $state in\n    cmds)\n      _kitchen_commands\n      ;;\n    args)\n      case $line[1] in\n        converge|create|destroy|diagnose|list|setup|test|verify)\n          compadd 'all'\n          _kitchen_instances\n          ;;\n        login)\n          _kitchen_instances\n          ;;\n      esac\n      ;;\n  esac\n}\n\n_kitchen_commands() {\n  local commands\n\n  commands=(\"${(@f)$(_call_program commands $service help | sed -n 's/^  kitchen \\([[:alpha:]]*\\) [ [].*# \\(.*\\)$/\\1:\\2/p')}\")\n  _describe -t commands 'kitchen commands' commands\n}\n\n_kitchen_instances() {\n  if [[ $_kitchen_instances_cache_dir != $PWD ]]; then\n    unset _kitchen_instances_cache\n  fi\n  if [[ ${+_kitchen_instances_cache} -eq 0 ]]; then\n    _kitchen_instances_cache=(${(f)\"$(_call_program instances $service list -b 2>/dev/null)\"})\n    _kitchen_instances_cache_dir=$PWD\n  fi\n  _wanted instances expl 'instance' compadd -a _kitchen_instances_cache\n}\n\n_kitchen \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_knife",
    "content": "#compdef knife\n# ------------------------------------------------------------------------------\n# Copyright (c) 2009-2015 Robby Russell and contributors (see\n# https://github.com/robbyrussell/oh-my-zsh/contributors)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Chef's knife (http://www.opscode.com/chef).\n#\n#  Source: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/knife\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Frank Louwers (https://github.com/franklouwers)\n#  * Mark Cornick (https://github.com/markcornick)\n#\n# ------------------------------------------------------------------------------\n\n\n# knife has a very special syntax, some example calls are:\n# knife status\n# knife cookbook list\n# knife role show ROLENAME\n# knife data bag show DATABAGNAME\n# knife role show ROLENAME --attribute ATTRIBUTENAME\n# knife cookbook show COOKBOOKNAME COOKBOOKVERSION recipes\n\n# The -Q switch in compadd allow for completions of things like \"data bag\" without having to go through two rounds of completion and avoids zsh inserting a \\ for escaping spaces\n_knife() {\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  # These flags should be available everywhere according to man knife\n  knife_general_flags=( --help --server-url --key --config --editor --format --log_level --logfile --no-editor --user --print-after --version --yes --environment )\n\n  cloudproviders=(bluebox ec2 rackspace slicehost terremark)\n  _arguments \\\n    '1: :->knifecmd'\\\n    '2: :->knifesubcmd'\\\n    '3: :->knifesubcmd2' \\\n    '4: :->knifesubcmd3' \\\n    '5: :->knifesubcmd4' \\\n    '6: :->knifesubcmd5'\n  \n  case $state in\n  knifecmd)\n    compadd -Q \"$@\" bootstrap client configure cookbook \"cookbook site\" \"data bag\" diff environment user exec index node recipe role search ssh status windows $cloudproviders\n  ;;\n  knifesubcmd)\n    case $words[2] in\n    (bluebox|ec2|rackspace|slicehost|terremark)\n      compadd \"$@\" server images\n    ;;\n    client)\n      compadd -Q \"$@\" \"bulk delete\" list create show delete edit reregister\n    ;;\n    configure)\n      compadd \"$@\" client\n    ;;\n    cookbook)\n      compadd -Q \"$@\" test list create download delete \"metadata from\" show \"bulk delete\" metadata upload\n    ;;\n    diff)\n      _arguments '*:file or directory:_files -g \"*.(rb|json)\"'\n    ;;\n    environment)\n      compadd -Q \"$@\" create delete edit \"from file\" list show\n    ;;\n    user)\n      compadd -Q \"$@\" create delete edit list reregister show\n    ;;\n    node)\n     compadd -Q \"$@\" \"from file\" create show edit delete list run_list \"bulk delete\"\n    ;;\n    recipe)\n     compadd \"$@\" list\n    ;;\n    role)\n      compadd -Q \"$@\" \"bulk delete\" create delete edit \"from file\" list show\n    ;; \n    windows)\n      compadd \"$@\" bootstrap\n    ;;\n    *)\n    _arguments '2:Subsubcommands:($(_knife_options1))'\n    esac\n   ;;\n   knifesubcmd2)\n    case $words[3] in\n     server)\n      compadd \"$@\" list create delete\n    ;;\n     images)\n      compadd \"$@\" list\n    ;;\n     site)\n      compadd \"$@\" vendor show share search download list unshare\n    ;;\n     (show|delete|edit)\n     _arguments '3:Subsubcommands:($(_chef_$words[2]s_remote))'\n    ;;\n    (upload|test)\n     _arguments '3:Subsubcommands:($(_chef_$words[2]s_local) --all)'\n    ;;\n    list)\n     compadd -a \"$@\" knife_general_flags\n    ;;\n    bag)\n      compadd -Q \"$@\" show edit list \"from file\" create delete\n    ;;\n    *)\n      _arguments '3:Subsubcommands:($(_knife_options2))'\n    esac\n   ;;\n   knifesubcmd3)\n     case $words[3] in\n      show)\n       case $words[2] in\n       cookbook)\n          versioncomp=1\n          _arguments '4:Cookbookversions:($(_cookbook_versions) latest)'\n       ;;\n       (node|client|role|environment)\n         compadd \"$@\" --attribute\n       esac\n     esac\n     case $words[4] in\n     (show|edit)\n     _arguments '4:Subsubsubcommands:($(_chef_$words[2]_$words[3]s_remote))'\n    ;;\n     file)\n     _arguments '*:file or directory:_files -g \"*.(rb|json)\"'\n    ;;\n      list)\n     compadd -a \"$@\" knife_general_flags\n    ;;\n        *)\n       _arguments '*:Subsubcommands:($(_knife_options3))'\n    esac\n    ;;\n    knifesubcmd4)\n      if (( versioncomp > 0 )); then\n        compadd \"$@\" attributes definitions files libraries providers recipes resources templates\n      else\n       _arguments '*:Subsubcommands:($(_knife_options2))'\n      fi\n    ;; \n    knifesubcmd5) \n      _arguments '*:Subsubcommands:($(_knife_options3))'\n   esac\n}\n\n# Helper functions to provide the argument completion for several depths of commands\n_knife_options1() {\n ( for line in $( knife $words[2] --help | grep -v \"^knife\" ); do echo $line | grep \"\\-\\-\"; done )\n}\n\n_knife_options2() {\n ( for line in $( knife $words[2] $words[3] --help | grep -v \"^knife\" ); do echo $line | grep \"\\-\\-\"; done )\n}\n\n_knife_options3() {\n ( for line in $( knife $words[2] $words[3] $words[4] --help | grep -v \"^knife\" ); do echo $line | grep \"\\-\\-\"; done )\n}\n\n# The chef_x_remote functions use knife to get a list of objects of type x on the server\n_chef_roles_remote() {\n (knife role list | awk '{print $1}')\n}\n\n_chef_clients_remote() {\n (knife client list | awk '{print $1}')\n}\n\n_chef_nodes_remote() {\n (knife node list | awk '{print $1}')\n}\n\n_chef_cookbooks_remote() {\n (knife cookbook list | awk '{print $1}')\n}\n\n_chef_sitecookbooks_remote() {\n (knife cookbook site list | awk '{print $1}')\n}\n\n_chef_data_bags_remote() {\n (knife data bag list | awk '{print $1}')\n}\n\n_chef_environments_remote() {\n (knife environment list | awk '{print $1}')\n}\n\n_chef_users_remote() {\n (knife user list | awk '{print $1}')\n}\n\n# The chef_x_local functions use the knife config to find the paths of relevant objects x to be uploaded to the server\n_chef_cookbooks_local() {\n (for i in $( grep cookbook_path $HOME/.chef/knife.rb | awk 'BEGIN {FS = \"[\" }; {print $2}' | sed 's/\\,//g' | sed \"s/'//g\" | sed 's/\\(.*\\)]/\\1/'  | cut -d '\"' -f2 ); do ls $i; done)\n}\n\n# This function extracts the available cookbook versions on the chef server\n_cookbook_versions() {\n  (knife cookbook show $words[4] | grep -v $words[4] | grep -v -E '\\]|\\[|\\{|\\}' | sed 's/ //g' | sed 's/\"//g')\n}\n\n_knife \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_language_codes",
    "content": "#autoload\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completer for language codes.\n#\n#  Usage: _language_codes ISO-639-1\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n(( $+functions[_language_codes_iso_639_1] )) ||\n_language_codes_iso_639_1() {\n  local codes; codes=(\n    'aa:Afar'\n    'ab:Abkhazian'\n    'af:Afrikaans'\n    'ak:Akan'\n    'sq:Albanian'\n    'am:Amharic'\n    'ar:Arabic'\n    'an:Aragonese'\n    'hy:Armenian'\n    'as:Assamese'\n    'av:Avaric'\n    'ae:Avestan'\n    'ay:Aymara'\n    'az:Azerbaijani'\n    'ba:Bashkir'\n    'bm:Bambara'\n    'eu:Basque'\n    'be:Belarusian'\n    'bn:Bengali'\n    'bh:Bihari languages'\n    'bi:Bislama'\n    'bo:Tibetan'\n    'bs:Bosnian'\n    'br:Breton'\n    'bg:Bulgarian'\n    'my:Burmese'\n    'ca:Catalan'\n    'cs:Czech'\n    'ch:Chamorro'\n    'ce:Chechen'\n    'zh:Chinese'\n    'cu:Church Slavic'\n    'cv:Chuvash'\n    'kw:Cornish'\n    'co:Corsican'\n    'cr:Cree'\n    'cy:Welsh'\n    'cs:Czech'\n    'da:Danish'\n    'de:German'\n    'dv:Divehi'\n    'nl:Dutch'\n    'dz:Dzongkha'\n    'el:Greek, Modern (1453-)'\n    'en:English'\n    'eo:Esperanto'\n    'et:Estonian'\n    'eu:Basque'\n    'ee:Ewe'\n    'fo:Faroese'\n    'fa:Persian'\n    'fj:Fijian'\n    'fi:Finnish'\n    'fr:French'\n    'fy:Western Frisian'\n    'ff:Fulah'\n    'ka:Georgian'\n    'de:German'\n    'gd:Gaelic'\n    'ga:Irish'\n    'gl:Galician'\n    'gv:Manx'\n    'gn:Guarani'\n    'gu:Gujarati'\n    'ht:Haitian'\n    'ha:Hausa'\n    'he:Hebrew'\n    'hz:Herero'\n    'hi:Hindi'\n    'ho:Hiri Motu'\n    'hr:Croatian'\n    'hu:Hungarian'\n    'hy:Armenian'\n    'ig:Igbo'\n    'is:Icelandic'\n    'io:Ido'\n    'ii:Sichuan Yi'\n    'iu:Inuktitut'\n    'ie:Interlingue'\n    'ia:Interlingua (International Auxiliary Language Association)'\n    'id:Indonesian'\n    'ik:Inupiaq'\n    'is:Icelandic'\n    'it:Italian'\n    'jv:Javanese'\n    'ja:Japanese'\n    'kl:Kalaallisut'\n    'kn:Kannada'\n    'ks:Kashmiri'\n    'ka:Georgian'\n    'kr:Kanuri'\n    'kk:Kazakh'\n    'km:Central Khmer'\n    'ki:Kikuyu'\n    'rw:Kinyarwanda'\n    'ky:Kirghiz'\n    'kv:Komi'\n    'kg:Kongo'\n    'ko:Korean'\n    'kj:Kuanyama'\n    'ku:Kurdish'\n    'lo:Lao'\n    'la:Latin'\n    'lv:Latvian'\n    'li:Limburgan'\n    'ln:Lingala'\n    'lt:Lithuanian'\n    'lb:Luxembourgish'\n    'lu:Luba-Katanga'\n    'lg:Ganda'\n    'mk:Macedonian'\n    'mh:Marshallese'\n    'ml:Malayalam'\n    'mi:Maori'\n    'mr:Marathi'\n    'ms:Malay'\n    'mk:Macedonian'\n    'mg:Malagasy'\n    'mt:Maltese'\n    'mn:Mongolian'\n    'mi:Maori'\n    'ms:Malay'\n    'my:Burmese'\n    'na:Nauru'\n    'nv:Navajo'\n    'nr:Ndebele, South'\n    'nd:Ndebele, North'\n    'ng:Ndonga'\n    'ne:Nepali'\n    'nl:Dutch'\n    'nn:Norwegian Nynorsk'\n    'nb:Bokmål, Norwegian'\n    'no:Norwegian'\n    'ny:Chichewa'\n    'oc:Occitan (post 1500)'\n    'oj:Ojibwa'\n    'or:Oriya'\n    'om:Oromo'\n    'os:Ossetian'\n    'pa:Panjabi'\n    'fa:Persian'\n    'pi:Pali'\n    'pl:Polish'\n    'pt:Portuguese'\n    'ps:Pushto'\n    'qu:Quechua'\n    'rm:Romansh'\n    'ro:Romanian'\n    'ro:Romanian'\n    'rn:Rundi'\n    'ru:Russian'\n    'sg:Sango'\n    'sa:Sanskrit'\n    'si:Sinhala'\n    'sk:Slovak'\n    'sk:Slovak'\n    'sl:Slovenian'\n    'se:Northern Sami'\n    'sm:Samoan'\n    'sn:Shona'\n    'sd:Sindhi'\n    'so:Somali'\n    'st:Sotho, Southern'\n    'es:Spanish'\n    'sq:Albanian'\n    'sc:Sardinian'\n    'sr:Serbian'\n    'ss:Swati'\n    'su:Sundanese'\n    'sw:Swahili'\n    'sv:Swedish'\n    'ty:Tahitian'\n    'ta:Tamil'\n    'tt:Tatar'\n    'te:Telugu'\n    'tg:Tajik'\n    'tl:Tagalog'\n    'th:Thai'\n    'bo:Tibetan'\n    'ti:Tigrinya'\n    'to:Tonga (Tonga Islands)'\n    'tn:Tswana'\n    'ts:Tsonga'\n    'tk:Turkmen'\n    'tr:Turkish'\n    'tw:Twi'\n    'ug:Uighur'\n    'uk:Ukrainian'\n    'ur:Urdu'\n    'uz:Uzbek'\n    've:Venda'\n    'vi:Vietnamese'\n    'vietnamien'\n    'vo:Volapük'\n    'cy:Welsh'\n    'wa:Walloon'\n    'wo:Wolof'\n    'xh:Xhosa'\n    'yi:Yiddish'\n    'yo:Yoruba'\n    'za:Zhuang'\n    'zh:Chinese'\n    'zu:Zulu'\n  )\n  _describe -t language-codes 'ISO 639-1 language code' codes \"$@\"\n}\n\n_language_codes() {\n  local command=\"$argv[$#]\" ret=1\n\n  case $command in\n    ISO-639-1)\n\t  _language_codes_${${command//-/_}:l} \"${@[1,-2]}\" && ret=0\n      ;;\n    *)\n      _message \"unknown command: $command\"\n      ;;\n  esac\n\n  return ret    \n}\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_lsattr",
    "content": "#compdef lsattr\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for lsattr a tool which lists file attributes on a Linux second extended file system. (http://e2fsprogs.sourceforge.net/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_lsattr() {\n\n_arguments -C \\\n   \"(-d)-R[Recursively list attributes of directories and their contents.]\" \\\n   \"-V[Display the program version.]\" \\\n   \"(-d)-a[List all files in directories, including files that start with '.']\" \\\n   \"(-a -R)-d[List directories like other files, rather than listing their contents.]\" \\\n   \"-v[List the file\\'s version/generation number.]\" \\\n  '*:files:_files' \\\n}\n\n_lsattr\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_lsblk",
    "content": "#compdef lsblk\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for lsblk (from util-linux 2.27.1->)\n#    (https://git.kernel.org/cgit/utils/util-linux/util-linux.git/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Ole Jørgen Brønner <olejorgenb@yahoo.no>\n#\n# ------------------------------------------------------------------------------\n#\n# Note: lsblk has upstream bash completions, which has served as a guide\n# Note: Credit to https://github.com/RobSis/zsh-completion-generator which was\n#       used to generate an initial skeleton\n\nlocal arguments\n\nlocal lsblk_cols_all=(\n    NAME KNAME MAJ:MIN FSTYPE MOUNTPOINT\n    LABEL UUID PARTTYPE PARTLABEL PARTUUID PARTFLAGS\n    RA RO RM\n    MODEL SIZE STATE OWNER GROUP MODE\n    ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC\n    ROTA SCHED RQ-SIZE TYPE DISC-ALN\n    DISC-GRAN DISC-MAX DISC-ZERO WSAME WWN\n    RAND PKNAME HCTL TRAN REV VENDOR)\n\n_lsblk_columns() {\n    compadd $@ $lsblk_cols_all\n}\n\n_lsblk_major_number() {\n    # /sys/dev/block/ contains MAJOR:MINOR symlinks. eg. 7:0\n    local device_paths=(/sys/dev/block/*(N))\n    local major_numbers=(${${device_paths##*/}%%:*})\n    # major_numbers might have duplicates but compadd handles that\n    compadd $@ $major_numbers\n}\n\narguments=(\n    '(-a --all)'{-a,--all}'[print all devices]'\n    '(-b --bytes)'{-b,--bytes}'[print size in bytes rather than in human readable format]'\n    '(-d --nodeps)'{-d,--nodeps}'[dont print slaves or holders]'\n    '(-D --discard)'{-D,--discard}'[print discard capabilities]'\n    '(-e --exclude)'{-e,--exclude}'[exclude devices by major number]:major number:_sequence _lsblk_major_number'\n    '(-f --fs)'{-f,--fs}'[output info about filesystems]'\n    '(-i --ascii)'{-i,--ascii}'[use ascii characters only]'\n    '(-I --include)'{-I,--include}'=[show only devices with specified major numbers]:major number:_sequence _lsblk_major_number'\n    '(-J --json)'{-J,--json}'[use JSON output format]'\n    '(-l --list)'{-l,--list}'[use list format output]'\n    '(-m --perms)'{-m,--perms}'[output info about permissions]'\n    '(-n --noheadings)'{-n,--noheadings}'[dont print headings]'\n    '(-o --output)'{-o,--output}'=[specify output columns]:output column:_sequence _lsblk_columns'\n    '(-O --output-all)'{-O,--output-all}'[output all columns]'\n    '(-p --paths)'{-p,--paths}'[print complete device path]'\n    '(-P --pairs)'{-P,--pairs}'[use key=\"value\" output format]'\n    '(-r --raw)'{-r,--raw}'[use raw output format]'\n    '(-s --inverse)'{-s,--inverse}'[inverse dependencies]'\n    '(-S --scsi)'{-S,--scsi}'[output info about SCSI devices]'\n    '(-t --topology)'{-t,--topology}'[output info about topology]'\n    '(-x --sort)'{-x,--sort}'=[sort output by specified column]:sort column:_lsblk_columns'\n    '(-h --help)'{-h,--help}'[display this help and exit]'\n    '(-V --version)'{-V,--version}'[output version information and exit]'\n    '*:device:_path_files -g \"*(N-%) *(N-/)\"'\n)\n\n_arguments -s $arguments\n"
  },
  {
    "path": ".config/zsh/completions/src/_lunchy",
    "content": "#compdef lunchy\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for lunchy (https://github.com/mperham/lunchy).\n#\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Blake Walters (https://github.com/markupboy)\n#\n# ------------------------------------------------------------------------------\n\nlocal state line cmds ret=1\n\n_arguments -C '1: :->cmds' '*: :->args'\n\ncase $state in\n  cmds)\n    local -a cmds\n    cmds=(\n      'ls:list available agents'\n      'start:start an agent'\n      'stop:stop an agent'\n      'restart:restart an agent'\n      'status:get the status of agent[s]'\n      'install:install an agents plist file'\n      'edit:edit an agent'\n    )\n    _describe -t commands 'lunchy command' cmds && ret=0\n    ;;\n  args)\n    case $line[1] in\n      (install)\n        ;;\n      (restart|stop)\n        _values 'items' `lunchy status | awk '{print $3}' ` 2>/dev/null && ret=0\n        ;;\n      *)\n        _values 'items' `lunchy ls` 2>/dev/null && ret=0\n        ;;\n    esac\n    ;;\nesac\n\nreturn ret\n"
  },
  {
    "path": ".config/zsh/completions/src/_middleman",
    "content": "#compdef middleman\n# ------------------------------------------------------------------------------\n# Copyright (c) 2013 Jozef Izso, MIT License\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for middleman (http://middlemanapp.com/)\n#  Includes commands from middleman-blog and middleman-deploy extesions.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jozef Izso (https://github.com/jozefizso)\n#\n# ------------------------------------------------------------------------------\n\nlocal ret=1 state\n\nlocal -a common_ops\ncommon_ops=(\n  \"--help[Display help]\"\n)\n\ntypeset -A opt_args\n_arguments \\\n  ':subcommand:->subcommand' \\\n  $common_ops \\\n  '*::options:->options' && ret=0\n\ncase $state in\n  subcommand)\n    local -a subcommands\n    subcommands=(\n      \"article:Create a new blog article\"\n      \"build:Builds the static site for deployment\"\n      \"console:Start an interactive console in the context of your Middleman application\"\n      \"deploy:Deploy a middleman built site over rsync, ftp, sftp, or git (e.g. gh-pages on github).\"\n      \"extension:Create Middleman extension scaffold\"\n      \"init:Create new project\"\n      \"server:Start the preview server\"\n      \"upgrade:Upgrade installed bundle\"\n      \"version:Show version\"\n    )\n\n    _describe -t subcommands 'middleman subcommand' subcommands && ret=0\n  ;;\n\n  options)\n    local -a args\n    args=(\n      $common_ops\n    )\n\n    local -a help\n    help=(\n      \"--help[Display help information]\"\n    )\n\n    case $words[1] in\n      article)\n        args=(\n          {-d,--date}\"[The date to create the post with (defaults to now)]:date\"\n        )\n      ;;\n\n      build)\n        args=(\n          \"--clean[Remove orphaned files from build (Default: true)]\"\n          \"--no-clean[Disable removing orphaned files from build]\"\n          {-g,--glob}\"[Build a subset of the project]:glob\"\n          \"--verbose[Print debug messages]\"\n          \"--instrument[Print instrument messages]:instrument\"\n          \"--profile[Generate profiling report for the build]\"\n        )\n      ;;\n\n      console)\n        args=(\n          {-e,--environment}\"[The environment Middleman will run under (Default: development)]:environment\"\n          \"--verbose[Print debug messages]\"\n        )\n      ;;\n\n      deploy)\n        args=(\n          {-b,--build-before}\"[Run \\`middleman build\\` before the deploy step]\"\n        )\n      ;;\n\n      extension)\n        args=(\n          \"--git[Default: true]\"\n        )\n      ;;\n\n      init)\n        args=(\n          {-T,--template}\"[Use a project template: default, html5, mobile, smacss, empty. (Default: default)]:template\"\n          \"--css-dir      [The path to the css files]:css_dir\"\n          \"--js-dir       [The path to the javascript files]:js_dir\"\n          \"--images-dir   [The path to the image files]:images_dir\"\n          \"--rack         [Include a config.ru file]\"\n          \"--skip-gemfile [Don't create a Gemfile]\"\n          \"--skip-bundle  [Don't run bundle install]\"\n          \"--skip-git     [Skip Git ignores and keeps]\"\n        )\n      ;;\n\n      server)\n        args=(\n          {-e,--environment}\"[The environment Middleman will run under (Default: development)]:environment\"\n          {-h,--host}\"[Bind to HOST address (Default: 0.0.0.0)]:host\"\n          {-p,--port}\"[The port Middleman will listen on (Default: 4567)]:port\"\n          \"--verbose                    [Print debug messages]\"\n          \"--instrument                 [Print instrument messages]:instrument\"\n          \"--disable-watcher            [Disable the file change and delete watcher process]\"\n          \"--profile                    [Generate profiling report for server startup]\"\n          \"--reload-paths               [Additional paths to auto-reload when files change]:reload_paths\"\n          \"--force-polling              [Force file watcher into polling mode]\"\n        )\n      ;;\n\n      upgrade)\n        args=()\n      ;;\n\n      version)\n        args=()\n      ;;\n    esac\n\n    _arguments $args && ret=0\n  ;;\nesac\n\nreturn ret\n"
  },
  {
    "path": ".config/zsh/completions/src/_mina",
    "content": "#compdef mina\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Mina (http://nadarei.co/mina/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Kazuya Takeshima (https://github.com/mitukiii)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal curcontext=\"$curcontext\" state line cmds ret=1\n\n_arguments -C \\\n  {-h,--help}'[Show help]' \\\n  {-V,--version}'[Show program version]' \\\n  {-v,--verbose}'[Show commands as they happen]' \\\n  {-s,--simulate}'[Run in simulation mode]' \\\n  {-t,--trace}'[Show backtraces when errors occur]' \\\n  -f'[Use FILE as the deploy configuration]:file:_files' \\\n  '*: :->cmds' && ret=0\n\ncase $state in\n  cmds)\n    cmds=( ${(f)\"$(_call_program commands mina -T 2> /dev/null | sed -e 's/:/\\\\:/g; s/\\[/\\\\[/g; s/\\]/\\\\]/g; s/mina \\([^ ]*\\) .*# /\\1:/g')\"} )\n    _describe -t commands 'mina command' cmds && ret=0\n    ;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_mix",
    "content": "#compdef mix\n#autoload\n\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Elixir Mix\n#\n#  Last updated: 18.04.2017\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Han Ngo (https://github.com/tieubao)\n#  * Teja Sophista (https://github.com/tejanium)\n#\n# ------------------------------------------------------------------------------\n\nlocal -a _1st_arguments\n_1st_arguments=(\n    'app.start:Starts all registered apps'\n    'app.tree:Prints the application tree'\n    'archive:Lists installed archives'\n    'archive.build:Archives this project into a .ez file'\n    'archive.install:Installs an archive locally'\n    'archive.uninstall:Uninstalls archives'\n    'clean:Deletes generated application files'\n    'cmd:Executes the given command'\n    'compile:Compiles source files'\n    'deps:Lists dependencies and their status'\n    \"deps.clean:Deletes the given dependencies' files\"\n    'deps.compile:Compiles dependencies'\n    'deps.get:Gets all out of date dependencies'\n    'deps.tree:Prints the dependency tree'\n    'deps.unlock:Unlocks the given dependencies'\n    'deps.update:Updates the given dependencies'\n    'do:Executes the tasks separated by comma'\n    'ecto:Prints Ecto help information'\n    'ecto.create:Creates the repository storage'\n    'ecto.drop:Drops the repository storage'\n    'ecto.dump:Dumps the repository database structure'\n    'ecto.gen.migration:Generates a new migration for the repo'\n    'ecto.gen.repo:Generates a new repository'\n    'ecto.load:Loads previously dumped database structure'\n    'ecto.migrate:Runs the repository migrations'\n    'ecto.migrations:Displays the repository migration status'\n    'ecto.rollback:Rolls back the repository migrations'\n    'escript:Lists installed escripts'\n    'escript.build:Builds an escript for the project'\n    'escript.install:Installs an escript locally'\n    'escript.uninstall:Uninstalls escripts'\n    'gettext.extract:Extracts translations from source code'\n    'gettext.merge:Merge template files into translation files'\n    'help:Prints help information for tasks'\n    'hex:Prints Hex help information'\n    'hex.build:Builds a new package version locally'\n    'hex.config:Reads, updates or deletes Hex config'\n    'hex.docs:Fetch or open documentation of a package'\n    'hex.info:Prints Hex information'\n    'hex.key:Manages Hex API key'\n    'hex.outdated:Shows outdated Hex deps for the current project'\n    'hex.owner:Manages Hex package ownership'\n    'hex.public_keys:Manages Hex public keys'\n    'hex.publish:Publishes a new package version'\n    'hex.retire:Retires a package version'\n    'hex.search:Searches for package names'\n    'hex.user:Registers or manages Hex user'\n    'loadconfig:Loads and persists the given configuration'\n    'local:Lists local tasks'\n    'local.hex:Installs Hex locally'\n    'local.phoenix:Updates Phoenix locally'\n    'local.phx:Updates the Phoenix project generator locally'\n    'local.public_keys:Manages public keys'\n    'local.rebar:Installs Rebar locally'\n    'new:Creates a new Elixir project'\n    'phoenix.gen.html:Generates controller, model and views for an HTML based resource'\n    'phoenix.server:Starts applications and their servers'\n    'phx.digest:Digests and compresses static files'\n    'phx.digest.clean:Removes old versions of static assets.'\n    'phx.gen.channel:Generates a Phoenix channel'\n    'phx.gen.context:Generates a context with functions around an Ecto schema'\n    'phx.gen.html:Generates controller, views, and context for an HTML resource'\n    'phx.gen.json:Generates controller, views, and context for a JSON resource'\n    'phx.gen.presence:Generates a Presence tracker'\n    'phx.gen.schema:Generates an Ecto schema and migration file'\n    'phx.gen.secret:Generates a secret'\n    'phx.new:Creates a new Phoenix application'\n    'phx.new.ecto:Creates a new Ecto project within an umbrella project'\n    'phx.new.web:Creates a new Phoenix web project within an umbrella project'\n    'phx.routes:Prints all routes'\n    'phx.server:Starts applications and their servers'\n    'profile.fprof:Profiles the given file or expression with fprof'\n    'run:Runs the given file or expression'\n    \"test:Runs a project's tests\"\n    'xref:Performs cross reference checks'\n    '--help:Describe available tasks'\n    '--version:Prints the Elixir version information'\n)\n\n__task_list ()\n{\n    local expl\n    declare -a tasks\n\n    tasks=(\n        'app.start'\n        'app.tree'\n        'archive'\n        'archive.build'\n        'archive.install'\n        'archive.uninstall'\n        'clean'\n        'cmd'\n        'compile'\n        'deps'\n        'deps.clean'\n        'deps.compile'\n        'deps.get'\n        'deps.tree'\n        'deps.unlock'\n        'deps.update'\n        'do'\n        'ecto'\n        'ecto.create'\n        'ecto.drop'\n        'ecto.dump'\n        'ecto.gen.migration'\n        'ecto.gen.repo'\n        'ecto.load'\n        'ecto.migrate'\n        'ecto.migrations'\n        'ecto.rollback'\n        'escript'\n        'escript.build'\n        'escript.install'\n        'escript.uninstall'\n        'gettext.extract'\n        'gettext.merge'\n        'help'\n        'hex'\n        'hex.build'\n        'hex.config'\n        'hex.docs'\n        'hex.info'\n        'hex.key'\n        'hex.outdated'\n        'hex.owner'\n        'hex.public_keys'\n        'hex.publish'\n        'hex.retire'\n        'hex.search'\n        'hex.user'\n        'loadconfig'\n        'local'\n        'local.hex'\n        'local.public_keys'\n        'local.rebar'\n        'new'\n        'phoenix.gen.html'\n        'phoenix.server'\n        'phx.digest'\n        'phx.digest.clean'\n        'phx.gen.channel'\n        'phx.gen.context'\n        'phx.gen.html'\n        'phx.gen.json'\n        'phx.gen.presence'\n        'phx.gen.schema'\n        'phx.gen.secret'\n        'phx.routes'\n        'phx.server'\n        'profile.fprof'\n        'run'\n        'test'\n        'xref'\n    )\n\n    _wanted tasks expl 'help' compadd $tasks\n}\n\nlocal expl\n\nlocal curcontext=\"$curcontext\" state line\ntypeset -A opt_args\n\n_arguments -C \\\n    ':command:->command' \\\n    '*::options:->options'\n\ncase $state in\n  (command)\n      _describe -t commands \"mix subcommand\" _1st_arguments\n      return\n  ;;\n\n  (options)\n    case $line[1] in\n      (help)\n         _arguments ':feature:__task_list'\n         return\n      ;;\n      (test)\n         _arguments ':PATH:_files'\n         return\n      ;;\n    esac\n  ;;\nesac\n"
  },
  {
    "path": ".config/zsh/completions/src/_multirust",
    "content": "#compdef multirust\n# ------------------------------------------------------------------------------\n# Copyright (C) 2016 by Hideo Hattori <hhatto.jp@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for multirust (https://github.com/brson/multirust).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Hideo Hattori (https://github.com/hhatto)\n#\n# ------------------------------------------------------------------------------\n\n_multirust() {\n  typeset -A opt_args\n  local context state line\n\n  _arguments -s -S \\\n    \"--verbose[run verbosely]\" \\\n    \"--version[print version info]\" \\\n    \"*::multirust commands:_multirust_command\"\n}\n\n(( $+functions[_multirust_command] )) ||\n_multirust_command() {\n  local cmd ret=1\n\n  (( $+multirust_cmds )) || _multirust_cmds=(\n    \"default:Set the default toolchain\" \\\n    \"override:Set the toolchain override for the current directory tree\" \\\n    \"update:Install or update a given toolchain\" \\\n    \"show-override:Show information about the current override\" \\\n    \"show-default:Show information about the current default\" \\\n    \"list-overrides:List all overrides\" \\\n    \"list-toolchains:List all installed toolchains\" \\\n    \"remove-override:Remove an override, for current directory unless specified\" \\\n    \"remove-toolchain:Uninstall a toolchain\" \\\n    \"run:Run a command in an environment configured for a toolchain\" \\\n    \"delete-data:Delete all user metadata, including installed toolchains\" \\\n    \"upgrade-data:Upgrade the ~/.multirust directory from previous versions\" \\\n    \"doc:Open the documentation for the currently active toolchain\" \\\n    \"which:Report location of the currently active Rust tool.\" \\\n    \"help:Show help for this command or subcommands\" \\\n    )\n\n  if (( CURRENT == 1 )); then\n    _describe -t commands 'multirust subcommand' _multirust_cmds || compadd \"$@\" - ${(s.:.)${(j.:.)_multirust_syns}}\n  else\n    local curcontext=\"$curcontext\"\n\n    cmd=\"${${_multirust_cmds[(r)$words[1]:*]%%:*}:-${(k)_multirust_syns[(r)(*:|)$words[1](:*|)]}}\"\n    if (( $#cmd )); then\n      curcontext=\"${curcontext%:*:*}:multirust-${cmd}:\"\n      _call_function ret _multirust_$cmd || _message 'no more arguments'\n    else\n      _message \"unknown multirust command: $words[1]\"\n      fi\n    return ret\n  fi\n}\n\n(( $+functions[_multirust_default] )) ||\n_multirust_default() {\n  _arguments -s \\\n    \"--copy-local[install by copying a local toolchain]:PATH:_gnu_generic::\" \\\n    \"--link-local[install by linking a local toolchain]:PATH:_gnu_generic::\" \\\n    \"--installer[allows arbitrary builds of rust to be installed from a custom-built installer]:PATH:_gnu_generic::\" \\\n    \"*::multirust commands:_multirust\"\n}\n\n(( $+functions[_multirust_override] )) ||\n_multirust_override() {\n  _multirust_default\n}\n\n(( $+functions[_multirust_update] )) ||\n_multirust_update() {\n  _multirust_default\n}\n\n__overrides() {\n  declare -a overrides\n  overrides=($(multirust list-overrides|awk -F\";\" '{print $1\":\"$2}'))\n  _describe 'override' overrides\n}\n\n__toolchains() {\n  declare -a toolchains\n  toolchains=($(multirust list-toolchains))\n  _describe \"toolchain\" toolchains\n}\n\n__subcommands() {\n  declare -a cmds\n  cmds=($(multirust|grep \"#    \"|awk '{print $2}'))\n  _describe \"command\" cmds\n}\n\n(( $+functions[_multirust_remove-override] )) ||\n_multirust_remove-override() {\n  __overrides\n}\n\n(( $+functions[_multirust_remove-toolchain] )) ||\n_multirust_remove-toolchain() {\n  __toolchains\n}\n\n(( $+functions[_multirust_run] )) ||\n_multirust_run() {\n  __toolchains\n}\n\n(( $+functions[_multirust_delete-data] )) ||\n_multirust_delete-data() {\n  _arguments -s \\\n    \"-y[Disable prompt]\" \\\n    \"*::multirust commands:_multirust\"\n}\n\n(( $+functions[_multirust_doc] )) ||\n_multirust_doc() {\n  _arguments -s \\\n    \"--all[open the documentation overview page, which gives access to all the installed documentation]:\" \\\n    \"*::multirust commands:_multirust\"\n}\n\n(( $+functions[_multirust_help] )) ||\n_multirust_help() {\n  __subcommands\n}\n\n_multirust \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_mussh",
    "content": "#compdef mussh\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for MUltihost SSH Wrapper (http://mussh.sourceforge.net/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Mario Fernandez (https://github.com/sirech)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line ret=1\ntypeset -A opt_args\n\n# TODO:\n# -i: admit more than one use\n# -d, -v, -t: control input\n# -m: Accept number (but also empty)\n# -h: Accept multiple hosts, also more than one use\n# -H: Accept multiple files, also more than one use\n\n_arguments -C \\\n  '--help[display this help message]' \\\n  '-V[print version info and exit]' \\\n  '-d[Verbose debug]:level (from 0 to 2)' \\\n  '-v[SSH debug level]:level (from 0 to 3)' \\\n  '-m[Run concurrently]' \\\n  '(-b -B)-b[Print each hosts output in a block without mingling with other hosts output]' \\\n  '(-b -B)-B[Allow hosts output to mingle. (default)]' \\\n  '(-a -A)-a[Force loading ssh-agent]' \\\n  '(-a -A)-A[Do NOT load ssh-agent]' \\\n  '(-u -U)-u[Unique. Eliminate duplicate hosts. (default)]' \\\n  '(-u -U)-U[Do NOT make host list unique]' \\\n  '-P[Do NOT fall back to passwords on any host. This will skip hosts where keys fail]' \\\n  '-i[Load an identity file. May be used more than once]:identity' \\\n  '-o[Args to pass to ssh with -o option]:ssh-args' \\\n  '(-l -L)-l[Use _login_ when no other is specified with the hostname]:login' \\\n  '(-l -L)-L[Force use of _login_ on all hosts]:login' \\\n  '-s[Path to shell on remote host]:shell' \\\n  '-t[Timeout setting for each session]:timeout' \\\n  '-p[Host to use as proxy]:[user@]host' \\\n  '-po[Args to pass to ssh on proxy with -o option]:ssh-args' \\\n  '(-h -H)-h[Add a host to list of hosts]:[user@]host' \\\n  '(-h -H)-H[Add contents of file to list of hosts]:host file:_files' \\\n  '(-c -C)-c[Add a command or quoted list of commands to list of commands to be executed on each host]:command' \\\n  '(-c -C)-C[Add file contents to list of commands to be executed on each host]:commands file:_files' \\\n  '(-q)-q[No output unless necessary]' && ret=0\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_mvn",
    "content": "#compdef mvn mvnDebug\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Maven (http://maven.apache.org).\n#\n#  Status: See FIXME and TODO tags.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n# Notes\n# -----\n#\n#   * By default advanced phases are displayed only if you start typing them. To have\n#     them always displayed:\n#\n#       zstyle ':completion:*:mvn:*' show-all-phases true\n#\n#   * By default full form plugins (groupId:artifactId[:version]) are only shown if you\n#     start typing them. To have them always displayed:\n#\n#       zstyle ':completion:*:mvn:*' show-full-form-plugins true\n#\n#   * By default only the plugins for which the completion has already been\n#     called (\"mvn plugin:<TAB>\") are shown. To define your own list of plugins:\n#\n#       maven_plugins=(jboss tomcat gwt android)\n#       zstyle ':completion:*:mvn:*' plugins $maven_plugins\n#\n#   * To have a better presentation of completions:\n#\n#       zstyle ':completion:*:*:mvn:*:matches' group 'yes'\n#       zstyle ':completion:*:*:mvn:*:options' description 'yes'\n#       zstyle ':completion:*:*:mvn:*:options' auto-description '%d'\n#       zstyle ':completion:*:*:mvn:*:descriptions' format $'\\e[1m -- %d --\\e[22m'\n#       zstyle ':completion:*:*:mvn:*:messages' format $'\\e[1m -- %d --\\e[22m'\n#       zstyle ':completion:*:*:mvn:*:warnings' format $'\\e[1m -- No matches found --\\e[22m'\n#\n# ------------------------------------------------------------------------------\n\n\n_mvn() {\n  typeset -A opt_args\n  local context state line\n\n  local curcontext=\"$curcontext\" maven_version excl_opts\n\n  excl_opts=(-h --help -v --version -ep --encrypt-password -emp --encrypt-master-password)\n\n  _pick_variant -r maven_version maven3='Maven 3' maven2='Maven 2' unknown --version\n  if [[ $maven_version == 'maven3' ]]; then\n    opts=(\n      \"($excl_opts -T --threads)\"{-T,--threads}'[thread count, for instance 2.0C where C is core multiplied]:thread count:_mvn_thread_counts'\n      \"($excl_opts -t --toolchains)\"{-t,--toolchains}'[alternate path for the user toolchains file]:toolchains file:_mvn_toolchains_files'\n      \"($excl_opts -l --log-file)\"{-l,--log-file}'[log file to where all build output will go]:log file:_mvn_log_files'\n    )\n  elif [[ $maven_version == 'maven2' ]]; then\n    opts=(\n      \"($excl_opts -cpu --check-plugin-updates -up --update-plugins -npu --no-plugin-updates -o --offline)\"{-cpu,--check-plugin-updates,-up,--update-plugins}'[force upToDate check for any relevant registered plugins]'\n      \"($excl_opts -npr --no-plugin-registry)\"{-npr,--no-plugin-registry}'[don'\\''t use plugin-registry.xml for plugin versions]'\n      \"($excl_opts -npu --no-plugin-updates -cpu --check-plugin-updates -up --update-plugins)\"{-npu,--no-plugin-updates}'[suppress upToDate check for any relevant registered plugins]'\n      \"($excl_opts -r --reactor)\"{-r,--reactor}'[dynamically build reactor from subdirectories]:reactor:_mvn_reactors'\n    )\n  fi\n\n  [[ -n ${(M)words:#\"-pl\"} || -n ${(M)words:#\"--projects\"} ]] && opts+=(\n    \"($excl_opts -am --also-make)\"{-am,--also-make}'[if project list is specified, also build projects required by the list]'\n    \"($excl_opts -amd --also-make-dependents)\"{-amd,--also-make-dependents}'[if project list is specified, also build projects that depend on projects on the list]'\n  )\n\n  _arguments -C \\\n    \"(- : *)\"{-h,--help}'[display help information]' \\\n    \"(- : *)\"{-v,--version}'[display version information]' \\\n    \"(- : *)\"{-emp,--encrypt-master-password}'[encrypt master security password]:master password:_mvn_passwords' \\\n    \"(- : *)\"{-ep,--encrypt-password}'[encrypt server password]:password:_mvn_passwords' \\\n    \"($excl_opts -B --batch-mode)\"{-B,--batch-mode}'[run in non-interactive (batch) mode]' \\\n    \"($excl_opts -V --show-version)\"{-V,--show-version}'[display version information without stopping build]' \\\n    \"($excl_opts -q --quiet -X --debug)\"{-q,--quiet}'[quiet output, only show errors]' \\\n    \"($excl_opts -X --debug -q --quiet)\"{-X,--debug}'[produce execution debug output]' \\\n    \"($excl_opts -N --non-recursive)\"{-N,--non-recursive}'[do not recurse into sub-projects]' \\\n    \"($excl_opts -C --strict-checksums -c --lax-checksums)\"{-C,--strict-checksums}'[fail the build if checksums don'\\''t match]' \\\n    \"($excl_opts -c --lax-checksums -C --strict-checksums)\"{-c,--lax-checksums}'[warn if checksums don'\\''t match]' \\\n    \"($excl_opts -e --errors)\"{-e,--errors}'[produce execution error messages]' \\\n    \"($excl_opts -f --file)\"{-f,--file}'[force the use of an alternate POM file]:POM file:_mvn_pom_files' \\\n    \"($excl_opts -s --settings)\"{-s,--settings}'[alternate path for the user settings file]:settings file:_mvn_settings_files' \\\n    \"($excl_opts -gs --global-settings)\"{-gs,--global-settings}'[alternate path for the global settings file]:global settings file:_mvn_settings_files' \\\n    \"($excl_opts -fae --fail-at-end -ff --fail-fast -fn --fail-never)\"{-fae,--fail-at-end}'[only fail the build afterwards, allow all non-impacted builds to continue]' \\\n    \"($excl_opts -ff --fail-fast -fae --fail-at-end -fn --fail-never)\"{-ff,--fail-fast}'[stop at first failure in reactorized builds]' \\\n    \"($excl_opts -fn --fail-never -fae --fail-at-end -ff --fail-fast)\"{-fn,--fail-never}'[never fail the build, regardless of project result]' \\\n    \"($excl_opts)*\"{-P,--activate-profiles}'[comma-delimited list of profiles to activate]:profile:_mvn_profiles -s ,' \\\n    \"($excl_opts -pl --projects)\"{-pl,--projects}'[build specified reactor projects instead of all projects]:project list:_mvn_projects -s ,' \\\n    \"($excl_opts -rf --resume-from)\"{-rf,--resume-from}'[resume reactor from specified project]:project:_mvn_projects' \\\n    \"($excl_opts -o --offline -U --update-snapshots -cpu --check-plugin-updates -up --update-plugins)\"{-o,--offline}'[work offline]' \\\n    \"($excl_opts -U --update-snapshots -nsu --no-snapshot-updates -o --offline)\"{-U,--update-snapshots}'[force a check for updated releases and snapshots on remote repositories]' \\\n    \"($excl_opts -nsu --no-snapshot-updates -U --update-snapshots -o --offline)\"{-nsu,--no-snapshot-updates}'[Suppress SNAPSHOT updates]' \\\n    \"*\"{-D-,--define}'[define a system property]:property:_mvn_properties' \\\n    \"${opts[@]}\" \\\n    \"($excl_opts)*: :_mvn_args\"\n}\n\n(( $+functions[_mvn_args] )) ||\n_mvn_args() {\n  _alternative \\\n    'phases:phase:_mvn_phases' \\\n    'plugin-colon-goals:plugin colon goal:_mvn_plugin_colon_goals'\n}\n\n(( $+functions[_mvn_phases] )) ||\n_mvn_phases() {\n  local phases\n  phases=(\n    'clean:remove all files generated by the previous build'\n    'compile:compile the source code of the project'\n    'test:run tests using a suitable unit testing framework'\n    'package:take the compiled code and package it in its distributable format, such as a JAR'\n    'integration-test:process and deploy the package if necessary into an environment where integration tests can be run'\n    'verify:run any checks to verify the package is valid and meets quality criteria'\n    'install:install the package into the local repository, for use as a dependency in other projects locally'\n    'deploy:done in an integration or release environment, copies the final package to the remote repository'\n    'site:generates the projects site documentation'\n    'site-deploy:deploys the generated site documentation to the specified web server'\n  )\n  if [[ $#PREFIX -gt 0 ]] || zstyle -t \":completion:${curcontext}:\" show-all-phases; then\n    phases+=(\n      'pre-clean:executes processes needed prior to the actual project cleaning'\n      'post-clean:executes processes needed to finalize the project cleaning'\n      'validate:validate the project is correct and all necessary information is available'\n      'initialize:initialize build state, e.g. set properties or create directories'\n      'generate-sources:generate any source code for inclusion in compilation'\n      'process-sources:process the source code, for example to filter any values'\n      'generate-resources:generate resources for inclusion in the package'\n      'process-resources:copy and process the resources into the destination directory, ready for packaging'\n      'process-classes:post-process the generated files from compilation'\n      'generate-test-sources:generate any test source code for inclusion in compilation'\n      'process-test-sources:process the test source code, for example to filter any values'\n      'generate-test-resources:create resources for testing'\n      'process-test-resources:copy and process the resources into the test destination directory'\n      'test-compile:compile the test source code into the test destination directory'\n      'process-test-classes:post-process the generated files from test compilation'\n      'prepare-package:perform any operations necessary to prepare a package before the actual packaging'\n      'pre-integration-test:perform actions required before integration tests are executed'\n      'post-integration-test:perform actions required after integration tests have been executed'\n      'pre-site:executes processes needed prior to the actual project site generation.'\n      'post-site:executes processes needed to finalize the site generation, and to prepare for site deployment'\n    )\n  fi\n  _describe -t 'phases' \"phase\" phases\n}\n\n(( $+functions[_mvn_plugins] )) ||\n_mvn_plugins() {\n  local ret=1\n  if [[ $words[CURRENT] == *.* ]] || zstyle -t \":completion:${curcontext}:\" show-full-form-plugins; then\n    _wanted full-form-plugins expl 'full form plugin' _mvn_full_form_plugins && ret=0\n  else\n    _wanted plugin-prefixes expl 'plugin prefix' _mvn_plugin_prefixes && ret=0\n  fi\n  return ret\n}\n\n(( $+functions[_mvn_plugin_colon_goals] )) ||\n_mvn_plugin_colon_goals() {\n  local ret=1\n  if [[ $words[CURRENT] == *.* ]] || zstyle -t \":completion:${curcontext}:\" show-full-form-plugins; then\n    _wanted full-form-plugin-colon-goals expl 'full form plugin colon goal' _mvn_full_form_plugin_colon_goals && ret=0\n  else\n    _wanted plugin-prefix-colon-goals expl 'plugin prefix colon goal' _mvn_plugin_prefix_colon_goals && ret=0\n  fi\n  return ret\n}\n\n(( $+functions[_mvn_plugin_prefix_colon_goals] )) ||\n_mvn_plugin_prefix_colon_goals() {\n  local ret=1\n  if compset -P '*:'; then\n    local plugin=\"${IPREFIX%:}\"\n    _wanted goals expl \"${plugin} plugin goal\" _mvn_plugin_goals $plugin && ret=0\n  else\n    _wanted plugin-prefixes expl 'plugin prefix' _mvn_plugin_prefixes -qS: && ret=0\n  fi\n  return ret\n}\n\n(( $+functions[_mvn_plugin_prefixes] )) ||\n_mvn_plugin_prefixes() {\n  local plugins\n  zstyle -a \":completion:${curcontext}:\" plugins plugins\n  [[ $#plugins -eq 0 ]] && plugins=($(__mvn_get_plugin_prefix $(__mvn_get_cache_dir)/mvn/plugins/*(:t)))\n  _describe -t plugin-prefixes 'plugin prefix' plugins $@\n}\n\n(( $+functions[_mvn_full_form_plugin_colon_goals] )) ||\n_mvn_full_form_plugin_colon_goals() {\n  local ret=1\n  # FIXME Duplicates _mvn_full_form_plugins\n  if compset -P 1 '*:'; then\n    local groupId=\"${${IPREFIX%:}##*:}\"\n    if compset -P 1 '*:'; then\n      local artifactId=\"${${IPREFIX%:}##*:}\"\n      if compset -P 1 '*:'; then\n        local version=\"${${IPREFIX%:}##*:}\"\n        _wanted goals expl \"${artifactId}:${version} goal\" _mvn_plugin_goals \"${groupId}:${artifactId}:${version}\" && ret=0\n      else\n        _alternative \\\n          \"versions:${artifactId} version:_mvn_artifact_versions -qS: ${groupId}:${artifactId}\" \\\n          \"goals:${artifactId} goal:_mvn_plugin_goals ${groupId}:${artifactId}\" \\\n        && ret=0\n      fi\n    else\n      _wanted artifactIds expl \"${groupId} artifactId\" _mvn_groupId_artifactIds -qS: $groupId && ret=0\n    fi\n  else\n    _wanted groupIds expl \"groupId\" _mvn_groupIds -qS: && ret=0\n  fi\n  return ret\n}\n\n(( $+functions[_mvn_full_form_plugins] )) ||\n_mvn_full_form_plugins() {\n  local ret=1 chunk=\"${PREFIX%%:*}\"\n  if compset -P 1 '*:'; then\n    local groupId=\"$chunk\"\n    chunk=\"${PREFIX%%:*}\"\n    if compset -P 1 '*:'; then\n      _wanted versions expl \"${current} version\" _mvn_artifact_versions $@ \"${groupId}:${chunk}\" && ret=0\n    else\n      _wanted artifactIds expl \"${groupId} artifactId\" _mvn_groupId_artifactIds -qS: \"${groupId}\" && ret=0\n    fi\n  else\n    _wanted groupIds expl \"groupId\" _mvn_groupIds -qS: && ret=0\n  fi\n  return ret\n}\n\n(( $+functions[_mvn_groupIds] )) ||\n_mvn_groupIds() {\n  local repository_location=$(__mvn_get_repository_location) update_policy ret=1\n\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  [[ -z \"$update_policy\" ]] && zstyle \":completion:${curcontext}:\" cache-policy _mvn_groupIds_caching_policy\n\n  if [[ -d $repository_location ]]; then\n    unset _groupIds\n    if ( [[ ${+_groupIds} -eq 0 ]] || _cache_invalid \"mvn/repositories/${repository_location}/groupIds\" ) && ! _retrieve_cache \"mvn/repositories/${repository_location}/groupIds\"; then\n      _groupIds=($repository_location/**/)\n      _groupIds=(${${${(u)_groupIds:h:h}#\"$repository_location/\"}//\\//.})\n      [[ $#_groupIds -gt 0 ]] && _store_cache \"mvn/repositories/${repository_location}/groupIds\" _groupIds\n    fi\n\n    [[ $#_groupIds -gt 0 ]] && _multi_parts $@ . _groupIds && ret=0\n  fi\n\n  return ret\n}\n\n(( $+functions[_mvn_groupId_artifactIds] )) ||\n_mvn_groupId_artifactIds() {\n  local groupId_repository_location=\"${$(__mvn_get_repository_location)}/${${@[-1]}//\\.//}\" ret=1\n\n  if [[ -d $groupId_repository_location ]]; then\n    local artifactIds; artifactIds=($groupId_repository_location/*/*/*.pom(:h:h:t))\n    _describe -t artifactIds \"artifactId\" artifactIds $@[0,-2] && ret=0\n  fi\n\n  return ret\n}\n\n(( $+functions[_mvn_artifact_versions] )) ||\n_mvn_artifact_versions() {\n  local artifact_repository_location=\"${$(__mvn_get_repository_location)}/${${@[-1]}//[\\.:]//}\" ret=1\n\n  if [[ -d $artifact_repository_location ]]; then\n    local versions; versions=($artifact_repository_location/*/*.pom(:h:t))\n    _describe -t versions \"version\" versions $@[0,-2]\n  fi\n\n  return ret\n}\n\n(( $+functions[_mvn_plugin_goals] )) ||\n_mvn_plugin_goals() {\n  local ret=1 plugin=\"$@[-1]\" update_policy\n\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  [[ -z \"$update_policy\" ]] && zstyle \":completion:${curcontext}:\" cache-policy _mvn_goals_caching_policy \n\n  unset _goals\n  if ( [[ ${+_goals} -eq 0 ]] || _cache_invalid \"mvn/plugins/${plugin}\" ) && ! _retrieve_cache \"mvn/plugins/${plugin}\"; then\n    setopt localoptions extendedglob\n    _goals=(${(s:,,,:)${${${(f)${${${(f)${${${${(F)${(S)${(f)\"$(_call_program goals $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=$plugin)\"}//#$(__mvn_get_plugin_prefix $plugin):/,,,}}:#*BUILD FAILURE*}#*This plugin has*goals#:}%For more information, run \\'mvn help:describe*}}//:/\\\\:}}}// ##/ }// Description\\\\: /:}})\n    [[ $#_goals -gt 0 ]] && _store_cache \"mvn/plugins/${plugin}\" _goals\n  fi\n\n  [[ $#_goals -gt 0 ]] && _describe -t \"goals\" \"${plugin} goal\" _goals $@[0,-2] && ret=0\n\n  return ret\n}\n\n(( $+functions[_mvn_profiles] )) ||\n_mvn_profiles() {\n\n  # FIXME Use \"mvn help:all-profiles\" output instead of parsing settings and pom files...\n  # Blocked on http://jira.codehaus.org/browse/MPH-82 and http://jira.codehaus.org/browse/MPH-83\n  local profs update_policy settings_file=$(__mvn_get_settings_file) parent_pom_file=$(__mvn_get_parent_pom_file) cache_name profiles_section ret=1\n\n  # TODO Should be split into _mvn_profiles/mvn_profiles_lists\n\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  [[ -z \"$update_policy\" ]] && zstyle \":completion:${curcontext}:\" cache-policy _mvn_profiles_caching_policy\n\n  profs=()\n\n  # Resolve profiles from settings.xml\n  if [[ -f  $settings_file ]]; then\n    unset _profiles\n    cache_name=\"mvn/profiles${settings_file:A}\" # FIXME Don't use A modifier, it is only available on Zsh >= 4.3.10\n    if ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid \"$cache_name\" ) && ! _retrieve_cache \"$cache_name\"; then\n      _profiles=()\n      profiles_section=\"${(M)${(f)$(<$settings_file)}:#*<profiles>*}\"\n      if [[ -n \"$profiles_section\" ]]; then\n        for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*<profile>}%</profile>*}//<repositories>*<\\/repositories>}//<pluginRepositories>*<\\/pluginRepositories>}//<build>*<\\/build>}//<\\/id>*<id>/,,,}##*<id>}%%</id>*}}; do\n          [[ -z ${(M)profiles:#\"$profile\"*} ]] && _profiles+=(\"$profile\"'['\"in settings file\"']')\n        done\n      fi\n      [[ $#_profiles -gt 0 ]] && _store_cache \"$cache_name\" _profiles\n    fi\n    profs+=($_profiles)\n  fi\n\n  # Resolve project profiles\n  if [[ -f  $parent_pom_file ]]; then\n    unset _profiles\n    cache_name=\"mvn/profiles${parent_pom_file:A}\" # FIXME Don't use A modifier, it is only available on Zsh >= 4.3.10\n    if ( [[ ${+_profiles} -eq 0 ]] || _cache_invalid \"$cache_name\" ) && ! _retrieve_cache \"$cache_name\"; then\n      _profiles=()\n      setopt localoptions extendedglob\n      for file in ${parent_pom_file:h}/**/pom.xml~*target\\/*; do  # FIXME project.build.directory is not always target/\n        profiles_section=\"${(M)${(f)$(<$file)}:#*<profiles>*}\"\n        if [[ -n \"$profiles_section\" ]]; then\n          for profile in ${(s:,,,:)${${${(S)${(S)${(S)${(S)${${profiles_section#*<profile>}%</profile>*}//<repositories>*<\\/repositories>}//<pluginRepositories>*<\\/pluginRepositories>}//<build>*<\\/build>}//<\\/id>*<id>/,,,}##*<id>}%%</id>*}}; do\n            [[ -z ${(M)profiles:#\"$profile\"*} ]] && _profiles+=(\"$profile\"'['\"in ${file#${parent_pom_file:h}\\/}\"']')\n          done\n        fi\n      done\n      [[ $#_profiles -gt 0 ]] && _store_cache \"$cache_name\" _profiles\n    fi\n    profs+=($_profiles)\n  fi\n\n  compset -P '-'; compset -P '+'; compset -P '!' # FIXME Only works for the first profile\n\n  [[ $#profs -gt 0 ]] && _values $@ 'profile' \"${profs[@]}\" && ret=0\n\n  return ret\n}\n\n(( $+functions[_mvn_projects] )) ||\n_mvn_projects() {\n  # TODO Projects can also be given in the form [groupId:]artifactId.\n  # TODO Should be split into _mvn_projects/mvn_projects_lists\n  local pom_file=$(__mvn_get_parent_pom_file) ret=1\n\n  if [[ -f $pom_file ]]; then\n    setopt localoptions extendedglob\n    local projects; projects=(${pom_file:h}/*/**/pom.xml~*target\\/*) # FIXME project.build.directory is not always target/\n    projects=(${${projects#.\\/}:h})\n    [[ $#projects -gt 0 ]] && _values \"$@\" 'project' \"${projects[@]}\" && ret=0\n  fi\n\n  return ret\n}\n\n(( $+functions[_mvn_properties] )) ||\n_mvn_properties() {\n  local ret=1\n  if compset -P '*='; then\n    _wanted property-values expl 'property value' _mvn_property_values ${${IPREFIX%=}#-D} && ret=0\n  else\n    _wanted property-names expl 'property name' _mvn_property_names -qS= && ret=0\n  fi\n  return ret\n}\n\n(( $+functions[_mvn_property_names] )) ||\n_mvn_property_names() {\n  # FIXME \"-qS=\" should be inherited from _mvn_properties\n  local alternatives; alternatives=(\n    \"common-property-names:common property name:_mvn_common_property_names -qS=\"\n  )\n  for plugin_colon_goal in ${(M)words:#[^-]*:*}; do\n    alternatives+=(\"plugin-property-names:plugin property name:_mvn_plugin_goal_property_names -qS= ${plugin_colon_goal}\")\n  done\n  _alternative \"${alternatives[@]}\"\n}\n\n(( $+functions[_mvn_common_property_names] )) ||\n_mvn_common_property_names() {\n  local properties; properties=(\n    'skipTests:skip tests execution'\n    'maven.test.skip:skip tests compilation and execution'\n    'gpg.passphrase:gpg passphrase'\n    'tycho.mode:enable maven mode for Tycho projects to disable p2 resolution'\n  )\n  _describe -t 'common-property-names' 'common property name' properties $@\n}\n\n(( $+functions[_mvn_plugin_goal_property_names] )) ||\n_mvn_plugin_goal_property_names() {\n  local plugin_colon_goal=\"$@[-1]\" update_policy ret=1\n\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  [[ -z \"$update_policy\" ]] && zstyle \":completion:${curcontext}:\" cache-policy _mvn_properties_caching_policy\n\n  unset _properties\n  if ( [[ ${+_properties} -eq 0 ]] || _cache_invalid \"mvn/plugins/${plugin_colon_goal}\" ) && ! _retrieve_cache \"mvn/plugins/${plugin_colon_goal}\"; then\n    # FIXME Does not work for:\n    #   android:apk (new line before expression)\n    #   ear:ear (unknown cause)\n    _properties=(${(M)${(ps:,,,:)${${${${(pj: :)${${${(f)${\"$(_call_program properties $words[1] -N org.apache.maven.plugins:maven-help-plugin:2.1.1:describe -Dplugin=${plugin_colon_goal%:*} -Dgoal=${plugin_colon_goal##*:} -Ddetail)\"#*Available parameters:}%%\\[INFO\\]*}//#    [a-z]*/,,,}##*Expression: \\$\\{}}//\\}[[:space:]]##/:}//[[:space:]]##/ }//[[:space:]]#,,,[[:space:]]#/,,,}}:#[a-zA-Z]##:*})\n    [[ $#_properties -gt 0 ]] && _store_cache \"mvn/plugins/${plugin_colon_goal}\" _properties\n  fi\n\n  [[ $#_properties -gt 0 ]] && _describe -t \"${plugin_colon_goal//:/-}-property-names\" \"${plugin_colon_goal} property name\" _properties $@[0,-2] && ret=0\n\n  return ret\n}\n\n(( $+functions[_mvn_property_values] )) ||\n_mvn_property_values() {\n  local ret=1\n  setopt localoptions extendedglob\n  case $@[-1] in\n    ((#i)*pomFile*) _wanted pom-files expl 'POM file' _mvn_pom_files && ret=0;;\n    ((#i)*file*) _wanted files expl 'file' _files && ret=0;;\n    ((#i)*groupId*) _wanted groupIds expl 'groupId' _mvn_groupIds && ret=0;;\n    ((#i)*artifactId*) _wanted artifactIds expl 'artifactId' _mvn_groupId_artifactIds ${${(M)${(ps.:.)opt_args[(K)-D]}:#groupId=*}#groupId=} && ret=0;;\n    ((#i)*version*) _wanted versions expl 'version' _mvn_artifact_versions ${${(M)${(ps.:.)opt_args[(K)-D]}:#groupId=*}#groupId=}:${${(M)${(ps.:.)opt_args[(K)-D]}:#artifactId=*}#artifactId=} && ret=0;;\n    ((#i)*repositoryId*) _message -e repositoryIds 'repositoryId' && ret=0;; # TODO Not implemented\n    ((#i)*classifier*) _message -e classifiers 'classifier' && ret=0;;\n    ((#i)*scope*) _wanted scopes expl 'scope' _mvn_scopes && ret=0;;\n    ((#i)*url*) _wanted urls expl 'url' _urls && ret=0;; # TODO Use _alternative and add repository urls from settings + projects\n    ((#i)*(password|passphrase)*) _wanted passwords expl password _mvn_passwords && ret=0;;\n    ((#i)*(createChecksum|generatePom|maven.test.skip)*) _wanted booleans expl 'boolean' _mvn_booleans && ret=0;;\n    ((#i)*user*) _wanted users expl 'user' _users && ret=0;; # TODO Use _alternative and add repository usernames from settings + projects\n    ((#i)*plugin*) _wanted plugin expl 'plugin' _mvn_plugins && ret=0;;\n    ((#i)*tycho.mode*) _wanted tychomodes expl 'tychomode' _mvn_tycho_modes && ret=0;;\n    (*) _default && ret=0;;\n  esac\n  return ret\n}\n\n(( $+functions[_mvn_scopes] )) ||\n_mvn_scopes() {\n  local scopes; scopes=(\n    'compile:default scope, used if none is specified. Compile dependencies are available in all classpaths of a project. Furthermore, those dependencies are propagated to dependent projects.'\n    'provided:much like compile, but indicates you expect the JDK or a container to provide the dependency at runtime. For example, when building a web application for the Java Enterprise Edition, you would set the dependency on the Servlet API and related Java EE APIs to scope provided because the web container provides those classes. This scope is only available on the compilation and test classpath, and is not transitive.'\n    'runtime:indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath.'\n    'test:indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases.'\n    'system:similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository.'\n    'import:only used on a dependency of type pom in the <dependencyManagement> section. It indicates that the specified POM should be replaced with the dependencies in that POM'\\''s <dependencyManagement> section. Since they are replaced, dependencies with a scope of import do not actually participate in limiting the transitivity of a dependency.'\n  )\n  _describe -t scopes 'scope' scopes\n}\n\n(( $+functions[_mvn_thread_counts] )) ||\n_mvn_thread_counts() {\n  local thread_counts; thread_counts=(\n    '1:build with 1 thread'  '1C:build with 1 thread per CPU core'\n    '2:build with 2 threads' '2C:build with 2 threads per CPU core'\n    '3:build with 3 threads' '3C:build with 3 threads per CPU core'\n    '4:build with 4 threads' '4C:build with 4 threads per CPU core'\n    '5:build with 5 threads' '5C:build with 5 threads per CPU core'\n    '6:build with 6 threads' '6C:build with 6 threads per CPU core'\n    '7:build with 7 threads' '7C:build with 7 threads per CPU core'\n    '8:build with 8 threads' '8C:build with 8 threads per CPU core'\n  )\n  _describe -t thread-counts 'thread count' thread_counts\n}\n\n(( $+functions[_mvn_reactors] )) ||\n_mvn_reactors() {\n  _message -e reactors 'reactor' # FIXME No idea what kind of value the \"--reactor\" option is supposed to take\n}\n\n(( $+functions[_mvn_passwords] )) ||\n_mvn_passwords() {\n  _message -e passwords 'password'\n}\n\n(( $+functions[_mvn_pom_files] )) ||\n_mvn_pom_files() {\n  _files -g '*pom*\\.xml*'\n}\n\n(( $+functions[_mvn_toolchains_files] )) ||\n_mvn_toolchains_files() {\n  _files -g '*toolchains*\\.xml*'\n}\n\n(( $+functions[_mvn_settings_files] )) ||\n_mvn_settings_files() {\n  _files -g '*settings*\\.xml*'\n}\n\n(( $+functions[_mvn_log_files] )) ||\n_mvn_log_files() {\n  _files\n}\n\n(( $+functions[_mvn_booleans] )) ||\n_mvn_booleans() {\n  local booleans; booleans=(\n    'true:\"true\" boolean value'\n    'false:\"false\" boolean value'\n  )\n  _describe -t booleans 'boolean' booleans\n}\n\n\n(( $+functions[_mvn_tycho_modes] )) ||\n_mvn_tycho_modes() {\n  local tychomodes; tychomodes=(\n    'maven:maven mode, Tycho will not do any p2 dependency resolution'\n  )\n  _describe -t tychomodes 'boolean' tychomodes\n}\n\n# ------------------------------------------------------------------------------\n# Helper functions\n# ------------------------------------------------------------------------------\n\n__mvn_get_pom_file() {\n  print ${~opt_args[-f]:-${opt_args[--file]:-pom.xml}}\n}\n\n__mvn_get_parent_pom_file() {\n  local pom_file=$(__mvn_get_pom_file)\n  while [[ -f ${pom_file:a:h:h}/pom.xml ]]; do\n    pom_file=${pom_file:a:h:h}/pom.xml;\n  done\n  print $pom_file\n}\n\n__mvn_get_settings_file() {\n  print ${~opt_args[-s]:-${opt_args[--settings]:-$HOME/.m2/settings.xml}}\n}\n\n__mvn_get_repository_location() {\n  print ${${${${(M)\"$(<$(__mvn_get_settings_file))\":#*<localRepository>*}:-$HOME/.m2/repository}##*<localRepository>}%%<\\/localRepository>*}\n}\n\n__mvn_get_plugin_prefix() {\n  print ${${${${@#*.*:}%%:*}%-plugin}/-#maven-#}\n}\n\n__mvn_get_cache_dir() {\n  local cache_dir\n  zstyle -s \":completion:${curcontext}:\" cache-path cache_dir\n  print ${cache_dir:-${ZDOTDIR:-$HOME}/.zcompcache}\n}\n\n\n# ------------------------------------------------------------------------------\n# Caching policies\n# ------------------------------------------------------------------------------\n\n(( $+functions[_mvn_goals_caching_policy] )) ||\n_mvn_goals_caching_policy() {\n  # Rebuild if cache is older than one month.\n  local -a oldp\n  oldp=( \"$1\"(NmM+1) )\n  (( $#oldp ))\n}\n\n(( $+functions[_mvn_properties_caching_policy] )) ||\n_mvn_properties_caching_policy() {\n  _mvn_goals_caching_policy \n}\n\n(( $+functions[_mvn_groupIds_caching_policy] )) ||\n_mvn_groupIds_caching_policy() {\n  _mvn_goals_caching_policy\n}\n\n(( $+functions[_mvn_profiles_caching_policy] )) ||\n_mvn_profiles_caching_policy() {\n  # Rebuild if cached file more recent than cache.\n  local cached_file=\"${1#$(__mvn_get_cache_dir)}\"\n  [[ -f $cached_file && $cached_file -nt \"$1\" ]] && return 0\n\n  # Rebuild if cache is older than one week.  \n  local -a oldp\n  oldp=( \"$1\"(Nmw+1) )\n  (( $#oldp )) && return 0\n\n  return 1\n}\n\n_mvn \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_node",
    "content": "#compdef node\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Node.js v0.8.4 (http://nodejs.org)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Mario Fernandez (https://github.com/sirech)\n#  * Nicholas Penree (https://github.com/drudge)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line ret=1\ntypeset -A opt_args\n\n_arguments -C \\\n  '(- 1 *)--help[print options help]' \\\n  '(- 1 *)'{-v,--version}'[print node version]' \\\n  '(--no-deprecation)--no-deprecation[silence deprecation warnings]' \\\n  '(--trace-deprecation)--trace-deprecation[show stack traces on deprecations]' \\\n  '(- 1 *)--v8-options[print v8 command line options]' \\\n  '(--max-stack-size)--max-stack-size=[set max v8 stack size (bytes)]' \\\n  '(-e --eval)'{-e,--eval}'[evaluate script]:Inline Script' \\\n  '(-i --interactive)'{-i,--interactive}'[always enter the REPL even if stdin does not appear to be a terminal]' \\\n  '(-p --print)'{-p,--print}'[print result of --eval]' \\\n  '(--vars)--vars[print various compiled-in variables]' \\\n  '*:JS Script:_files -g \"*.js\"' && ret=0\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_nvm",
    "content": "#compdef nvm\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for nvm (https://github.com/creationix/nvm).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Changwoo Park (https://github.com/pismute)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line  ret=1\n\nlocal -a _1st_arguments\n_1st_arguments=(\n  'help:Show this message'\n  'install:Download and install a <version>'\n  'uninstall:Uninstall a <version>'\n  'use:Modify PATH to use <version>'\n  'run:Run <version> with <args> as arguments'\n  'ls:List installed [versions]'\n  'ls-remote:List remote versions available for install'\n  'deactivate:Undo effects of NVM on current shell'\n  'alias:Set an alias named <name> pointing to <version>. Show all aliases beginning with [<pattern>].'\n  'unalias:Deletes the alias named <name>'\n  'copy-packages:Install global NPM packages contained in <version> to current version'\n  'clear-cache:Clear cache'\n  'version:Show current node version'\n)\n\n_arguments -C \\\n  '1: :->cmds' \\\n  '*: :->args' && ret=0\n\n__nvm_aliases(){\n  local aliases\n  aliases=\"\"\n  if [ -d $NVM_DIR/alias ]; then\n    aliases=\"`cd $NVM_DIR/alias && ls`\"\n  fi\n  echo \"${aliases}\"\n}\n\n__nvm_versions(){\n  echo \"$(nvm_ls) $(__nvm_aliases)\"\n}\n\ncase $state in\n  cmds)\n    _describe -t commands 'nvm command' _1st_arguments && ret=0\n    ;;\n\n  args)\n    case $words[2] in\n      (use|run|ls|list|install|uninstall|copy-packages)\n\n        _values 'version' $(__nvm_versions) && ret=0\n        ;;\n\n      (alias|unalias)\n\n        _values 'aliases' $(__nvm_aliases) && ret=0\n        ;;\n\n      *)\n        (( ret )) && _message 'no more arguments'\n        ;;\n\n    esac\n    ;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_openssl",
    "content": "#compdef openssl\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n\n# openssl command [ command_opts ] [ command_args ]\n\n_openssl() {\n  local openssl_commands cmd cmds\n  if [[ \"$CURRENT\" -lt 2 ]]; then\n    # I do not think this can happen...\n    return\n  elif [[ \"$CURRENT\" -eq 2 ]]; then\n    # first parameter, the command\n    openssl_commands=(${(z)${${(f)\"$(openssl help 2>&1)\"}:#([A-Z]|openssl:Error:)*}})\n    _describe 'openssl commands' openssl_commands\n  else\n    # $CURRENT -gt 2\n    cmd=\"${words[2]}\"\n    # Note: we could use ${(k)functions} to get a list of all functions and\n    # filter those that start with _openssl_\n    # but that would mean defining a new function *somewhere* might mess with\n    # the completion...\n    cmds=(asn1parse ca ciphers cms crl crl2pkcs7 dgst dh dhparam dsa dsaparam \\\n          ec ecparam enc engine errstr gendh gendsa genpkey genrsa nseq ocsp \\\n          passwd pkcs12 pkcs7 pkcs8 pkey pkeyparam pkeyutl prime rand req rsa \\\n          rsautl s_client s_server s_time sess_id smime speed spkac srp ts \\\n          verify version x509)\n    # check if $cmd is in $cmds, the list of supported commands\n    if [[ \"${cmds[(r)$cmd]}\" == \"${cmd}\" ]]; then\n      # we should be able to complete $cmd\n      # run _openssl_$cmd with the remaining words from the command line\n      shift words\n      (( CURRENT-- ))\n      _openssl_${cmd}\n    elif [[ ${${=${\"$(openssl help 2>&1)\"/*Cipher commands[^)]#)/}}[(re)$cmd]} == \"$cmd\" ]]; then\n      # $cmd is a cipher command, which is practically an alias to enc\n      shift words\n      (( CURRENT-- ))\n      _openssl_enc\n    elif [[ ${${=${${\"$(openssl help 2>&1)\"%%Cipher commands*}/*Message Digest commands[^)]#)/}}[(re)$cmd]} == \"$cmd\" ]]; then\n      # $cmd is a message digest command, which is practically an alias to dgst\n      shift words\n      (( CURRENT-- ))\n      _openssl_dgst\n    fi\n  fi\n}\n\n\n_openssl_asn1parse() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format - one of DER PEM]:format:(DER PEM)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file (output format is always DER]:file:_files' \\\n    \"-noout[don't produce any output]\" \\\n    '-offset[offset into file]:number: ' \\\n    '-length[length of section in file]:number: ' \\\n    '-i[indent entries]' \\\n    '-dump[dump unknown data in hex form]' \\\n    '-dlimit[dump the first arg bytes of unknown data in hex form]:number: ' \\\n    '-oid[file of extra oid definitions]:file:_files' \\\n    \"-strparse[a series of these can be used to 'dig' into multiple ASN1 blob wrappings]:offset:\" \\\n    '-genstr[string to generate ASN1 structure from]:str:' \\\n    '-genconf[file to generate ASN1 structure from]:file:_files'\n}\n\n\n_openssl_ca() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-verbose[talk alot while doing things]' \\\n    '-config[a config file]:file:_files' \\\n    '-name[the particular CA definition to use]:section: ' \\\n    '-gencrl[generate a new CRL]' \\\n    '-crldays[days is when the next CRL is due]:days: ' \\\n    '-crlhours[hours is when the next CRL is due]:hours: ' \\\n    '-startdate[certificate validity notBefore]:date: ' \\\n    '-enddate[certificate validity notAfter (overrides -days)]:date: ' \\\n    '-days[number of days to certify the certificate for]:days: ' \\\n    '-md[md to use, one of md2, md5, sha or sha1]:alg:(md2 md5 sha sha1)' \\\n    \"-policy[the CA 'policy' to support]:policy: \" \\\n    '-keyfile[private key file]:file:_files' \\\n    '-keyform[private key file format (PEM or ENGINE)]:format:(PEM ENGINE)' \\\n    '-key[key to decode the private key if it is encrypted]:password: ' \\\n    '-cert[the CA certificate]:file:_files' \\\n    '-selfsign[sign a certificate with the key associated with it]' \\\n    '-in[the input PEM encoded certificate request(s)]:file:_files' \\\n    '-out[where to put the output file(s)]:file:_files' \\\n    '-outdir[where to put output certificates]:dir:_files -/' \\\n    '-infiles[the last argument, requests to process]:*:files:_files' \\\n    '-spkac[file contains DN and signed public key and challenge]:file:_files' \\\n    '-ss_cert[file contains a self signed cert to sign]:file:_files' \\\n    \"-preserveDN[don't re-order the DN]\" \\\n    \"-noemailDN[don't add the EMAIL field into certificate' subject]\" \\\n    \"-batch[don't ask questions]\" \\\n    '-msie_hack[msie modifications to handle all those universal strings]' \\\n    '-revoke[revoke a certificate (given in file)]:file:_files' \\\n    \"-subj[use arg instead of request's subject]:subject: \" \\\n    '-utf8[input characters are UTF8 (default ASCII)]' \\\n    '-multivalue-rdn[enable support for multivalued RDNs]' \\\n    '-extensions[extension section (override value in config file)]:section: ' \\\n    '-extfile[configuration file with X509v3 extentions to add]:file:_files' \\\n    '-crlexts[CRL extension section (override value in config file)]:section: ' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-status[shows certificate status given the serial number]:serial: ' \\\n    '-updatedb[updates db for expired certificates]'\n}\n\n\n_openssl_ciphers() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-v[verbose mode, a textual listing of the SSL/TLS ciphers in OpenSSL]' \\\n    '-V[even more verbose]' \\\n    '-ssl2[SSL2 mode]' \\\n    '-ssl3[SSL3 mode]' \\\n    '-tls1[TLS1 mode]' \\\n    ':cipher suite:_list_ciphers'\n}\n\n\n_openssl_cms() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-encrypt[encrypt message]' \\\n    '-decrypt[decrypt encrypted message]' \\\n    '-sign[sign message]' \\\n    '-verify[verify signed message]' \\\n    '-cmsout[output CMS structure]' \\\n    '-des3[encrypt with triple DES]' \\\n    '-des[encrypt with DES]' \\\n    '-seed[encrypt with SEED]' \\\n    '-rc2-40[encrypt with RC2-40 (default)]' \\\n    '-rc2-64[encrypt with RC2-64]' \\\n    '-rc2-128[encrypt with RC2-128]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    \"-nointern[don't search certificates in message for signer]\" \\\n    \"-nosigs[don't verify message signature]\" \\\n    \"-noverify[don't verify signers certificate]\" \\\n    \"-nocerts[don't include signers certificate when signing]\" \\\n    '-nodetach[use opaque signing]' \\\n    \"-noattr[don't include any signed attributes]\" \\\n    \"-binary[don't translate message to text]\" \\\n    '-certfile[other certificates file]:file:_files' \\\n    '-certsout[certificate output file]:file:_files' \\\n    '-signer[signer certificate file]:file:_files' \\\n    '-recip[recipient certificate file for decryption]:file:_files' \\\n    '-keyid[use subject key identifier]' \\\n    '-in[input file]:file:_files' \\\n    '-inform[input format SMIME (default), PEM or DER]:format:(SMIME PEM DER)' \\\n    '-inkey[input private key (if not signer or recipient)]:file:_files' \\\n    '-keyform[input private key format (PEM or ENGINE)]:format:(PEM ENGINE)' \\\n    '-out[output file]:file:_files' \\\n    '-outform[output format SMIME (default), PEM or DER]:format:(SMIME PEM DER)' \\\n    '-content[supply or override content for detached signature]:file:_files' \\\n    '-to[to address mail head]:address: ' \\\n    '-from[from address mail head]:address: ' \\\n    '-subject[subject mail head]:subject: ' \\\n    '-text[include or delete text MIME headers]' \\\n    '-CApath[trusted certificates directory]:dir:_files -/' \\\n    '-CAfile[trusted certificates file]:file:_files' \\\n    \"-crl_check[check revocation status of signer's certificate using CRLs]\" \\\n    \"-crl_check_all[check revocation status of signer's certificate chain using CRLs]\" \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '*:certificate:_files'\n}\n\n\n_openssl_crl() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format - default PEM (DER or PEM)]:format:(PEM DER)' \\\n    '-outform[output format - default PEM]:format:(PEM DER)' \\\n    '-text[print out a text format version]' \\\n    '-in[input file - default stdin]:file:_files' \\\n    '-out[output file - default stdout]:file:_files' \\\n    '-hash[print hash value]' \\\n    '-hash_old[print old-style (MD5) hash value]' \\\n    '-fingerprint[print the crl fingerprint]' \\\n    '-issuer[print issuer DN]' \\\n    '-lastupdate[print lastUpdate field]' \\\n    '-nextupdate[print nextUpdate field]' \\\n    '-crlnumber[print CRL number]' \\\n    '-noout[no CRL output]' \\\n    '-CAfile[verify CRL using certificates in the specified file]:file:_files' \\\n    '-CApath[verify CRL using certificates in the specified directory]:dir:_files -/' \\\n    '*-nameopt[various certificate name options]:options:_nameopts'\n}\n\n\n_openssl_crl2pkcs7() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format - DER or PEM]:format:(PEM DER)' \\\n    '-outform[output format - DER or PEM]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-certfile[certificates file of chain to a trusted CA (can be used more than once)]:file:_files' \\\n    \"-nocrl[no crl to load, just certs from '-certfile']\"\n}\n\n\n_openssl_dgst() {\n  # written for openssl 1.0.1k\n  local digests\n  digests=(-dss1 -md4 -md5 -mdc2 -ripemd160 -sha -sha1 -sha224 -sha256 -sha384 -sha512 -whirlpool)\n  # -hmac is listed twice because it's documented twice by openssl\n  _arguments -C -A '-*' \\\n    '(-r -hex -binary)-c[to output the digest with separating colons]' \\\n    '(-c -hex -binary)-r[to output the digest in coreutils format]' \\\n    '-d[to output debug info]' \\\n    '(-c -r -binary)-hex[output as hex dump]' \\\n    '(-c -r -hex)-binary[output in binary form]' \\\n    '-hmac[set the HMAC key to arg]:key: ' \\\n    '-non-fips-allow[allow use of non FIPS digest]' \\\n    '-sign[sign digest using private key in the specified file]:file:_files' \\\n    '-verify[verify a signature using public key in the specified file]:file:_files' \\\n    '-prverify[verify a signature using private key in the specified file]:file:_files' \\\n    '-keyform[key file format (PEM or ENGINE)]:format:(PEM ENGINE)' \\\n    '-out[output to filename rather than stdout]:file:_files' \\\n    '-signature[signature to verify]:file:_files' \\\n    '-sigopt[signature parameter]:nm\\:v: ' \\\n    '-hmac[create hashed MAC with key]:key: ' \\\n    '-mac[create MAC (not neccessarily HMAC)]:algorithm: ' \\\n    '-macopt[MAC algorithm parameters or key]:nm\\:v: ' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    \"($digests)-dss1[use the dss1 message digest algorithm]\" \\\n    \"($digests)-md4[to use the md4 message digest algorithm]\" \\\n    \"($digests)-md5[to use the md5 message digest algorithm]\" \\\n    \"($digests)-mdc2[to use the mdc2 message digest algorithm]\" \\\n    \"($digests)-ripemd160[to use the ripemd160 message digest algorithm]\" \\\n    \"($digests)-sha[to use the sha message digest algorithm]\" \\\n    \"($digests)-sha1[to use the sha1 message digest algorithm]\" \\\n    \"($digests)-sha224[to use the sha224 message digest algorithm]\" \\\n    \"($digests)-sha256[to use the sha256 message digest algorithm]\" \\\n    \"($digests)-sha384[to use the sha384 message digest algorithm]\" \\\n    \"($digests)-sha512[to use the sha512 message digest algorithm]\" \\\n    \"($digests)-whirlpool[to use the whirlpool message digest algorithm]\" \\\n    '*:file:_files'\n}\n\n\n_openssl_dh() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-check[check the DH parameters]' \\\n    '-text[print a text form of the DH parameters]' \\\n    '-C[output C code]' \\\n    '-noout[no output]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_dhparam() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-dsaparam[read or generate DSA parameters, convert to DH]' \\\n    '-check[check the DH parameters]' \\\n    '-text[print a text form of the DH parameters]' \\\n    '-C[output C code]' \\\n    '-2[generate parameters using  2 as the generator value]' \\\n    '-5[generate parameters using  5 as the generator value]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-noout[no output]' \\\n    ':numbits: '\n}\n\n\n_openssl_dsa() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-passin[input file pass phrase source]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-passout[output file pass phrase source]:file:_files' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-des[encrypt PEM output with cbc des]' \\\n    '-des3[encrypt PEM output with ede cbc des using 168 bit key]' \\\n    '-idea[encrypt PEM output with cbc idea]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    '-seed[encrypt PEM output with cbc seed]' \\\n    '-text[print the key in text]' \\\n    \"-noout[don't print key out]\" \\\n    '-modulus[print the DSA public value]'\n}\n\n\n_openssl_dsaparam() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-text[print as text]' \\\n    '-C[output C code]' \\\n    '-noout[no output]' \\\n    '-genkey[generate a DSA key]' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    ':numbits: '\n}\n\n\n_openssl_ec() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-passin[input file pass phrase source]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-passout[output file pass phrase source]:file:_files' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    \"-des[encrypt PEM output, instead of 'des' every other cipher supported by OpenSSL can be used]\" \\\n    '-text[print the key]' \\\n    \"-noout[don't print key out]\" \\\n    '-param_out[print the elliptic curve parameters]' \\\n    '-conv_form[specifies the point conversion form]:form:(compressed uncompressed hybrid)' \\\n    '-param_enc[specifies the way the ec parameters are encoded in the asn1 der encoding]:encoding:(named_curve explicit)'\n}\n\n\n_openssl_ecparam() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file  - default stdin]:file:_files' \\\n    '-out[output file - default stdout]:file:_files' \\\n    '-noout[do not print the ec parameter]' \\\n    '-text[print the ec parameters in text form]' \\\n    '-check[validate the ec parameters]' \\\n    \"-C[print a 'C' function creating the parameters]\" \\\n    \"-name[use the ec parameters with 'short name' name]:name: \" \\\n    \"-list_curves[prints a list of all currently available curve 'short names']\" \\\n    '-conv_form[specifies the point conversion form]:form:(compressed uncompressed hybrid)' \\\n    '-param_enc[specifies the way the ec parameters are encoded in the asn1 der encoding]:encoding:(named_curve explicit)' \\\n    \"-no_seed[if 'explicit' parameters are chosen do not use the seed]\" \\\n    '-genkey[generate ec key]' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_enc() {\n  # written for openssl 1.0.1k\n  local ciphers\n  ciphers=(-aes-128-cbc -aes-128-cbc-hmac-sha1 -aes-128-cfb -aes-128-cfb1 \\\n           -aes-128-cfb8 -aes-128-ctr -aes-128-ecb -aes-128-gcm -aes-128-ofb \\\n           -aes-128-xts -aes-192-cbc -aes-192-cfb -aes-192-cfb1 -aes-192-cfb8 \\\n           -aes-192-ctr -aes-192-ecb -aes-192-gcm -aes-192-ofb -aes-256-cbc \\\n           -aes-256-cbc-hmac-sha1 -aes-256-cfb -aes-256-cfb1 -aes-256-cfb8 \\\n           -aes-256-ctr -aes-256-ecb -aes-256-gcm -aes-256-ofb -aes-256-xts \\\n           -aes128 -aes192 -aes256 -bf -bf-cbc -bf-cfb -bf-ecb -bf-ofb \\\n           -blowfish -camellia-128-cbc -camellia-128-cfb -camellia-128-cfb1 \\\n           -camellia-128-cfb8 -camellia-128-ecb -camellia-128-ofb \\\n           -camellia-192-cbc -camellia-192-cfb -camellia-192-cfb1 \\\n           -camellia-192-cfb8 -camellia-192-ecb -camellia-192-ofb \\\n           -camellia-256-cbc -camellia-256-cfb -camellia-256-cfb1 \\\n           -camellia-256-cfb8 -camellia-256-ecb -camellia-256-ofb \\\n           -camellia128 -camellia192 -camellia256 -cast -cast-cbc -cast5-cbc \\\n           -cast5-cfb -cast5-ecb -cast5-ofb -des -des-cbc -des-cfb -des-cfb1 \\\n           -des-cfb8 -des-ecb -des-ede -des-ede-cbc -des-ede-cfb -des-ede-ofb \\\n           -des-ede3 -des-ede3-cbc -des-ede3-cfb -des-ede3-cfb1 \\\n           -des-ede3-cfb8 -des-ede3-ofb -des-ofb -des3 -desx -desx-cbc \\\n           -id-aes128-GCM -id-aes192-GCM -id-aes256-GCM -idea -idea-cbc \\\n           -idea-cfb -idea-ecb -idea-ofb -rc2 -rc2-40-cbc -rc2-64-cbc \\\n           -rc2-cbc -rc2-cfb -rc2-ecb -rc2-ofb -rc4 -rc4-40 -rc4-hmac-md5 \\\n           -rc5 -rc5-cbc -rc5-cfb -rc5-ecb -rc5-ofb -seed -seed-cbc -seed-cfb \\\n           -seed-ecb -seed-ofb)\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-pass[pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-e[encrypt]' \\\n    '-d[decrypt]' \\\n    '(-a -base64)'{-a,-base64}'[base64 encode/decode, depending on encryption flag]' \\\n    '-k[the password to derive the key from]:password: ' \\\n    '-kfile[read the password to derive the key from the first line of the file]:file:_files' \\\n    '-md[the md to use to create a key from a passphrase]:alg:(md2 md5 sha sha1)' \\\n    '-S[the actual salt to use]:salt: ' \\\n    '-K[the actual key to use]:key: ' \\\n    '-iv[the actual IV to use]:IV: ' \\\n    '-p[print out the key and IV used]' \\\n    '-P[print out the key and IV used the exit]' \\\n    '-bufsize[set the buffer size for I/O]:size: ' \\\n    '-nopad[disable standard block padding]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    \"(${ciphers})-aes-128-cbc[cipher types]\" \\\n    \"(${ciphers})-aes-128-cbc-hmac-sha1[cipher types]\" \\\n    \"(${ciphers})-aes-128-cfb[cipher types]\" \\\n    \"(${ciphers})-aes-128-cfb1[cipher types]\" \\\n    \"(${ciphers})-aes-128-cfb8[cipher types]\" \\\n    \"(${ciphers})-aes-128-ctr[cipher types]\" \\\n    \"(${ciphers})-aes-128-ecb[cipher types]\" \\\n    \"(${ciphers})-aes-128-gcm[cipher types]\" \\\n    \"(${ciphers})-aes-128-ofb[cipher types]\" \\\n    \"(${ciphers})-aes-128-xts[cipher types]\" \\\n    \"(${ciphers})-aes-192-cbc[cipher types]\" \\\n    \"(${ciphers})-aes-192-cfb[cipher types]\" \\\n    \"(${ciphers})-aes-192-cfb1[cipher types]\" \\\n    \"(${ciphers})-aes-192-cfb8[cipher types]\" \\\n    \"(${ciphers})-aes-192-ctr[cipher types]\" \\\n    \"(${ciphers})-aes-192-ecb[cipher types]\" \\\n    \"(${ciphers})-aes-192-gcm[cipher types]\" \\\n    \"(${ciphers})-aes-192-ofb[cipher types]\" \\\n    \"(${ciphers})-aes-256-cbc[cipher types]\" \\\n    \"(${ciphers})-aes-256-cbc-hmac-sha1[cipher types]\" \\\n    \"(${ciphers})-aes-256-cfb[cipher types]\" \\\n    \"(${ciphers})-aes-256-cfb1[cipher types]\" \\\n    \"(${ciphers})-aes-256-cfb8[cipher types]\" \\\n    \"(${ciphers})-aes-256-ctr[cipher types]\" \\\n    \"(${ciphers})-aes-256-ecb[cipher types]\" \\\n    \"(${ciphers})-aes-256-gcm[cipher types]\" \\\n    \"(${ciphers})-aes-256-ofb[cipher types]\" \\\n    \"(${ciphers})-aes-256-xts[cipher types]\" \\\n    \"(${ciphers})-aes128[cipher types]\" \\\n    \"(${ciphers})-aes192[cipher types]\" \\\n    \"(${ciphers})-aes256[cipher types]\" \\\n    \"(${ciphers})-bf[cipher types]\" \\\n    \"(${ciphers})-bf-cbc[cipher types]\" \\\n    \"(${ciphers})-bf-cfb[cipher types]\" \\\n    \"(${ciphers})-bf-ecb[cipher types]\" \\\n    \"(${ciphers})-bf-ofb[cipher types]\" \\\n    \"(${ciphers})-blowfish[cipher types]\" \\\n    \"(${ciphers})-camellia-128-cbc[cipher types]\" \\\n    \"(${ciphers})-camellia-128-cfb[cipher types]\" \\\n    \"(${ciphers})-camellia-128-cfb1[cipher types]\" \\\n    \"(${ciphers})-camellia-128-cfb8[cipher types]\" \\\n    \"(${ciphers})-camellia-128-ecb[cipher types]\" \\\n    \"(${ciphers})-camellia-128-ofb[cipher types]\" \\\n    \"(${ciphers})-camellia-192-cbc[cipher types]\" \\\n    \"(${ciphers})-camellia-192-cfb[cipher types]\" \\\n    \"(${ciphers})-camellia-192-cfb1[cipher types]\" \\\n    \"(${ciphers})-camellia-192-cfb8[cipher types]\" \\\n    \"(${ciphers})-camellia-192-ecb[cipher types]\" \\\n    \"(${ciphers})-camellia-192-ofb[cipher types]\" \\\n    \"(${ciphers})-camellia-256-cbc[cipher types]\" \\\n    \"(${ciphers})-camellia-256-cfb[cipher types]\" \\\n    \"(${ciphers})-camellia-256-cfb1[cipher types]\" \\\n    \"(${ciphers})-camellia-256-cfb8[cipher types]\" \\\n    \"(${ciphers})-camellia-256-ecb[cipher types]\" \\\n    \"(${ciphers})-camellia-256-ofb[cipher types]\" \\\n    \"(${ciphers})-camellia128[cipher types]\" \\\n    \"(${ciphers})-camellia192[cipher types]\" \\\n    \"(${ciphers})-camellia256[cipher types]\" \\\n    \"(${ciphers})-cast[cipher types]\" \\\n    \"(${ciphers})-cast-cbc[cipher types]\" \\\n    \"(${ciphers})-cast5-cbc[cipher types]\" \\\n    \"(${ciphers})-cast5-cfb[cipher types]\" \\\n    \"(${ciphers})-cast5-ecb[cipher types]\" \\\n    \"(${ciphers})-cast5-ofb[cipher types]\" \\\n    \"(${ciphers})-des[cipher types]\" \\\n    \"(${ciphers})-des-cbc[cipher types]\" \\\n    \"(${ciphers})-des-cfb[cipher types]\" \\\n    \"(${ciphers})-des-cfb1[cipher types]\" \\\n    \"(${ciphers})-des-cfb8[cipher types]\" \\\n    \"(${ciphers})-des-ecb[cipher types]\" \\\n    \"(${ciphers})-des-ede[cipher types]\" \\\n    \"(${ciphers})-des-ede-cbc[cipher types]\" \\\n    \"(${ciphers})-des-ede-cfb[cipher types]\" \\\n    \"(${ciphers})-des-ede-ofb[cipher types]\" \\\n    \"(${ciphers})-des-ede3[cipher types]\" \\\n    \"(${ciphers})-des-ede3-cbc[cipher types]\" \\\n    \"(${ciphers})-des-ede3-cfb[cipher types]\" \\\n    \"(${ciphers})-des-ede3-cfb1[cipher types]\" \\\n    \"(${ciphers})-des-ede3-cfb8[cipher types]\" \\\n    \"(${ciphers})-des-ede3-ofb[cipher types]\" \\\n    \"(${ciphers})-des-ofb[cipher types]\" \\\n    \"(${ciphers})-des3[cipher types]\" \\\n    \"(${ciphers})-desx[cipher types]\" \\\n    \"(${ciphers})-desx-cbc[cipher types]\" \\\n    \"(${ciphers})-id-aes128-GCM[cipher types]\" \\\n    \"(${ciphers})-id-aes192-GCM[cipher types]\" \\\n    \"(${ciphers})-id-aes256-GCM[cipher types]\" \\\n    \"(${ciphers})-idea[cipher types]\" \\\n    \"(${ciphers})-idea-cbc[cipher types]\" \\\n    \"(${ciphers})-idea-cfb[cipher types]\" \\\n    \"(${ciphers})-idea-ecb[cipher types]\" \\\n    \"(${ciphers})-idea-ofb[cipher types]\" \\\n    \"(${ciphers})-rc2[cipher types]\" \\\n    \"(${ciphers})-rc2-40-cbc[cipher types]\" \\\n    \"(${ciphers})-rc2-64-cbc[cipher types]\" \\\n    \"(${ciphers})-rc2-cbc[cipher types]\" \\\n    \"(${ciphers})-rc2-cfb[cipher types]\" \\\n    \"(${ciphers})-rc2-ecb[cipher types]\" \\\n    \"(${ciphers})-rc2-ofb[cipher types]\" \\\n    \"(${ciphers})-rc4[cipher types]\" \\\n    \"(${ciphers})-rc4-40[cipher types]\" \\\n    \"(${ciphers})-rc4-hmac-md5[cipher types]\" \\\n    \"(${ciphers})-rc5[cipher types]\" \\\n    \"(${ciphers})-rc5-cbc[cipher types]\" \\\n    \"(${ciphers})-rc5-cfb[cipher types]\" \\\n    \"(${ciphers})-rc5-ecb[cipher types]\" \\\n    \"(${ciphers})-rc5-ofb[cipher types]\" \\\n    \"(${ciphers})-seed[cipher types]\" \\\n    \"(${ciphers})-seed-cbc[cipher types]\" \\\n    \"(${ciphers})-seed-cfb[cipher types]\" \\\n    \"(${ciphers})-seed-ecb[cipher types]\" \\\n    \"(${ciphers})-seed-ofb[cipher types]\"\n}\n\n\n_openssl_engine() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '(-vv -vvv -vvvv)-v[verbose mode, for each engine, list its \"control commands\"]' \\\n    \"(-v -vvv -vvvv)-vv[like -v, but additionally display each command's description]\" \\\n    '(-v -vv -vvvv)-vvv[like -vv, but also add the input flags for each command]' \\\n    '(-v -vv -vvv)-vvvv[like -vvv, but also show internal input flags]' \\\n    '-c[for each engine, also list the capabilities]' \\\n    '(-tt)-t[for each engine, check that they are really available]' \\\n    '(-t)-tt[display error trace for unavailable engines]' \\\n    \"-pre[runs command 'cmd' against the ENGINE before any attempts to load it (if -t is used)]:cmd: \" \\\n    \"-post[runs command 'cmd' against the ENGINE after loading it (only used if -t is also provided)]:cmd: \" \\\n    '*:engine:_engines'\n  # TODO: can cmd (for -pre and -post) be completed?\n}\n\n\n_openssl_errstr() {\n  # written for openssl 1.0.1k\n  # written for openssl 1.0.2a\n  _arguments -C \\\n    '-stats' \\\n    ':errno: '\n}\n\n\n_openssl_gendh() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    \"-out[output the key to 'file']:file:_files\" \\\n    '-2[use 2 as the generator value]' \\\n    '-5[use 5 as the generator value]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    ':numbits: '\n}\n\n\n_openssl_gendsa() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    \"-out[output the key to 'file']:file:_files\" \\\n    '-des[encrypt the generated key with DES in cbc mode]' \\\n    '-des3[encrypt the generated key with DES in ede cbc mode (168 bit key)]' \\\n    '-idea[encrypt the generated key with IDEA in cbc mode]' \\\n    '-seed[encrypt PEM output with cbc seed]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    ':dsaparam-file:_files'\n}\n\n\n_openssl_genpkey() {\n  # written for openssl 1.0.1k\n  local ciphers cipher_opts\n  ciphers=( ${$(openssl list-cipher-algorithms | cut -d' ' -f1)} )\n  cipher_opts=()\n  for alg in ${ciphers}; do\n    cipher_opts=(${cipher_opts} \"(${${(l:32:: ::-:)ciphers[@]}//  / })-${alg}[use this cipher to encrypt the key]\")\n  done\n  _arguments -C \\\n    '-out[output file]:file:_files' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-pass[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    $cipher_opts \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '(-algorithm)-paramfile[parameters file]:file:_files' \\\n    '(-paramfile)-algorithm[the public key algorithm]:algorithm:(EC RSA DSA DH)' \\\n    '-pkeyopt[public key options]:option\\:value: ' \\\n    '-genparam[generate parameters, not key]' \\\n    '-text[print the in text]'\n  # NB: options order may be important!  See the manual page.\n  # TODO: complete pkeyopts\n  # However: \"The precise set of options supported depends on the public key\n  # algorithm used and its implementation.\"\n}\n\n\n_openssl_genrsa() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-des[encrypt the generated key with DES in cbc mode]' \\\n    '-des3[encrypt the generated key with DES in ede cbc mode (168 bit key)]' \\\n    '-idea[encrypt the generated key with IDEA in cbc mode]' \\\n    '-seed[encrypt PEM output with cbc seed]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    '-out[output the key to file]:file:_files' \\\n    '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-f4[use F4 (0x10001) for the E value]' \\\n    '-3[use 3 for the E value]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    ':numbits: '\n}\n\n\n_openssl_nseq() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-toseq[output NS Sequence file]'\n}\n\n\n_openssl_ocsp() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-out[output filename]:file:_files' \\\n    '-issuer[issuer certificate]:file:_files' \\\n    '-cert[certificate to check]:file:_files' \\\n    '-serial[serial number to check]:serial: ' \\\n    '-signer[certificate to sign OCSP request with]:file:_files' \\\n    '-signkey[private key to sign OCSP request with]:file:_files' \\\n    '-sign_other[additional certificates to include in signed request]:file:_files' \\\n    \"-no_certs[don't include any certificates in signed request]\" \\\n    '-req_text[print text form of request]' \\\n    '-resp_text[print text form of response]' \\\n    '-text[print text form of request and response]' \\\n    '-reqout[write DER encoded OCSP request to \"file\"]:file:_files' \\\n    '-respout[write DER encoded OCSP reponse to \"file\"]:file:_files' \\\n    '-reqin[read DER encoded OCSP request from \"file\"]:file:_files' \\\n    '-respin[read DER encoded OCSP reponse from \"file\"]:file:_files' \\\n    '-nonce[add OCSP nonce to request]' \\\n    \"-no_nonce[don't add OCSP nonce to request]\" \\\n    '-url[OCSP responder URL]:URL: ' \\\n    '-host[send OCSP request to given host on given port]:host\\:port: ' \\\n    '-path[path to use in OCSP request]' \\\n    '-CApath[trusted certificates directory]:directory:_files -/' \\\n    '-CAfile[trusted certificates file]:file:_files' \\\n    '-VAfile[validator certificates file]:file:_files' \\\n    '-validity_period[maximum validity discrepancy in seconds]:seconds: ' \\\n    '-status_age[maximum status age in seconds]:seconds: ' \\\n    \"-noverify[don't verify response at all]\" \\\n    '-verify_other[additional certificates to search for signer]:file:_files' \\\n    \"-trust_other[don't verify additional certificates]\" \\\n    \"-no_intern[don't search certificates contained in response for signer]\" \\\n    \"-no_signature_verify[don't check signature on response]\" \\\n    \"-no_cert_verify[don't check signing certificate]\" \\\n    \"-no_chain[don't chain verify response]\" \\\n    \"-no_cert_checks[don't do additional checks on signing certificate]\" \\\n    '-port[port to run responder on]:port: ' \\\n    '-index[certificate status index file]:file:_files' \\\n    '-CA[CA certificate]:file:_files' \\\n    '-rsigner[responder certificate to sign responses with]:file:_files' \\\n    '-rkey[responder key to sign responses with]:file:_files' \\\n    '-rother[other certificates to include in response]:file:_files' \\\n    \"-resp_no_certs[don't include any certificates in response]\" \\\n    '-nmin[number of minutes before next update]:minutes: ' \\\n    '-ndays[number of days before next update]:days: ' \\\n    '-resp_key_id[identify reponse by signing certificate key ID]' \\\n    '-nrequest[number of requests to accept (default unlimited)]:limit: ' \\\n    '-dss1[use specified digest in the request]' \\\n    '-md4[use specified digest in the request]' \\\n    '-md5[use specified digest in the request]' \\\n    '-mdc2[use specified digest in the request]' \\\n    '-ripemd160[use specified digest in the request]' \\\n    '-ripemd[use specified digest in the request]' \\\n    '-rmd160[use specified digest in the request]' \\\n    '-sha1[use specified digest in the request]' \\\n    '-sha224[use specified digest in the request]' \\\n    '-sha256[use specified digest in the request]' \\\n    '-sha384[use specified digest in the request]' \\\n    '-sha512[use specified digest in the request]' \\\n    '-sha[use specified digest in the request]' \\\n    '-ssl2-md5[use specified digest in the request]' \\\n    '-ssl3-md5[use specified digest in the request]' \\\n    '-ssl3-sha1[use specified digest in the request]' \\\n    '-whirlpool[use specified digest in the request]' \\\n    '-timeout[timeout connection to OCSP responder after n seconds]:seconds: '\n}\n\n\n_openssl_passwd() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-crypt[standard Unix password algorithm (default)]' \\\n    '-1[MD5-based password algorithm]' \\\n    '-apr1[MD5-based password algorithm, Apache variant]' \\\n    '-salt[use provided salt]:salt: ' \\\n    '-in[read passwords from file]:file:_files' \\\n    '-stdin[read passwords from stdin]' \\\n    '-noverify[never verify when reading password from terminal]' \\\n    '-quiet[no warnings]' \\\n    '-table[format output as table]' \\\n    '-reverse[switch table columns]' \\\n    '*:password:'\n}\n\n\n_openssl_pkcs12() {\n  # written for openssl 1.0.2d\n  local algorithms\n  algorithms=(aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc \\\n              aes-256-ecb bf-cbc bf-cfb bf-ecb bf-ofb camellia-128-cbc \\\n              camellia-128-ecb camellia-192-cbc camellia-192-ecb \\\n              camellia-256-cbc camellia-256-ecb cast-cbc cast5-cbc cast5-cfb \\\n              cast5-ecb cast5-ofb des-cbc des-cfb des-ecb des-ede des-ede-cbc \\\n              des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb \\\n              des-ede3-ofb des-ofb idea-cbc idea-cfb idea-ecb idea-ofb \\\n              rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 \\\n              rc4-40 rc5-cbc rc5-cfb rc5-ecb rc5-ofb seed-cbc seed-cfb \\\n              seed-ecb seed-ofb PBE-MD2-DES PBE-MD5-DES PBE-SHA1-RC2-64 \\\n              PBE-MD2-RC2-64 PBE-MD5-RC2-64 PBE-SHA1-DES PBE-SHA1-RC4-128 \\\n              PBE-SHA1-RC4-40 PBE-SHA1-3DES PBE-SHA1-2DES PBE-SHA1-RC2-128 \\\n              PBE-SHA1-RC2-40)\n  _arguments -C \\\n    '-export[output PKCS12 file]' \\\n    '-chain[add certificate chain]' \\\n    '-inkey[private key if not infile]:file:_files' \\\n    '-certfile[add all certs in the specified file]:file:_files' \\\n    \"-CApath[PEM format directory of CA's]:file:_files\" \\\n    \"-CAfile[PEM format file of CA's]:file:_files\" \\\n    '-name[use specified friendly name]:name: ' \\\n    '*-caname[use specified CA friendly name]:name: ' \\\n    '-in[input filename]:file:_files' \\\n    '-out[output filename]:file:_files' \\\n    \"-noout[don't output anything, just verify]\" \\\n    \"-nomacver[don't verify MAC]\" \\\n    \"-nocerts[don't output certificates]\" \\\n    '-clcerts[only output client certificates]' \\\n    '-cacerts[only output CA certificates]' \\\n    \"-nokeys[don't output private keys]\" \\\n    '-info[give info about PKCS#12 structure]' \\\n    '-des[encrypt private keys with DES]' \\\n    '-des3[encrypt private keys with triple DES (default)]' \\\n    '-idea[encrypt private keys with idea]' \\\n    '-seed[encrypt private keys with seed]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    \"-nodes[don't encrypt private keys]\" \\\n    \"-noiter[don't use encryption iteration]\" \\\n    \"-nomaciter[don't use MAC iteration]\" \\\n    '-maciter[use MAC iteration]' \\\n    \"-nomac[don't generate MAC]\" \\\n    '-twopass[separate MAC, encryption passwords]' \\\n    '-descert[encrypt PKCS#12 certificates with triple DES (default RC2-40)]' \\\n    \"-certpbe[specify certificate PBE algorithm (default RC2-40)]:alg:(${algorithms})\" \\\n    '-keypbe[specify private key PBE algorithm (default 3DES)]:alg:(${algorithms})' \\\n    '-macalg[digest algorithm used in MAC (default SHA1)]:alg:_list_message_digest_algorithms' \\\n    '-keyex[set MS key exchange type]' \\\n    '-keysig[set MS key signature type]' \\\n    '-password[set import/export password source]:pass phrase source:_pass_phrase_source' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-CSP[Microsoft CSP name]:name: ' \\\n    '-LMK[add local machine keyset attribute to private key]'\n}\n\n\n_openssl_pkcs7() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-print_certs[print any certs or crl in the input]' \\\n    '-text[print full details of certificates]' \\\n    \"-noout[don't output encoded data]\" \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_pkcs8() {\n  # written for openssl 1.0.2d\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-out[output file]:file:_files' \\\n    '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-topk8[output PKCS8 file]' \\\n    '-nooct[use (nonstandard) no octet format]' \\\n    '-embed[use (nonstandard) embedded DSA parameters format]' \\\n    '-nsdb[use (nonstandard) DSA Netscape DB format]' \\\n    '-noiter[use 1 as iteration count]' \\\n    '-nocrypt[use or expect unencrypted private key]' \\\n    '-v2[use PKCS#5 v2.0 and given cipher]:alg:(aes-128-cbc aes-128-ecb aes-192-cbc aes-192-ecb aes-256-cbc aes-256-ecb bf bf-cbc bf-cfb bf-ecb bf-ofb camellia-128-cbc camellia-128-ecb camellia-192-cbc camellia-192-ecb camellia-256-cbc camellia-256-ecb cast cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb des des-cbc des-cfb des-ecb des-ede des-ede-cbc des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc des-ede3-cfb des-ede3-ofb des-ofb des3 desx idea idea-cbc idea-cfb idea-ecb idea-ofb rc2 rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb rc4 rc4-40 rc5 rc5-cbc rc5-cfb rc5-ecb rc5-ofb seed seed-cbc seed-cfb seed-ecb seed-ofb)' \\\n    '-v2prf[set the PRF algorithm to use with PKCS#5 v2.0]:alg:(hmacWithMD5 hmacWithRMD160 hmacWithSHA1 hmacWithSHA224 hmacWithSHA256 hmacWithSHA384 hmacWithSHA512)' \\\n    '-v1[use PKCS#5 v1.5 and given cipher]:obj:(PBE-MD2-DES PBE-MD5-DES PBE-SHA1-RC2-64 PBE-MD2-RC2-64 PBE-MD5-RC2-64 PBE-SHA1-DES PBE-SHA1-RC4-128 PBE-SHA1-RC4-40 PBE-SHA1-3DES PBE-SHA1-2DES PBE-SHA1-RC2-128 PBE-SHA1-RC2-40)' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_pkey() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-out[output file]:file:_files' \\\n    '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_pkeyparam() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-in[the input filename to read parameters from]:file:_files' \\\n    '-out[the output filename to write parameters]:file:_files' \\\n    '-text[prints out the parameters in plain text in addition to the encoded version]' \\\n    '-noout[do not output the encoded version of the parameters]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_pkeyutl() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-sigfile[signature file (verify operation only)]:file:_files' \\\n    '-inkey[input key]:file:_files' \\\n    '-keyform[private key format]:format:(PEM DER)' \\\n    '-pubin[input is a public key]' \\\n    '-certin[input is a certificate carrying a public key]' \\\n    '-pkeyopt[public key options]:option\\:value:_pkeyopts' \\\n    '-sign[sign with private key]' \\\n    '-verify[verify with public key]' \\\n    '-verifyrecover[verify with public key, recover original data]' \\\n    '-encrypt[encrypt with public key]' \\\n    '-decrypt[decrypt with private key]' \\\n    '-derive[derive shared secret]' \\\n    '-hexdump[hex dump output]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-passin[pass phrase source]:pass phrase source:_pass_phrase_source'\n}\n\n\n_openssl_prime() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-hex[hex]' \\\n    '-checks[number of checks]:checks: ' \\\n    ':number:'\n}\n\n\n_openssl_rand() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-out[write to file]:file:_files' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-base64[base64 encode output]' \\\n    '-hex[hex encode output]' \\\n    ':num:'\n}\n\n\n_openssl_req() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-text[text form of request]' \\\n    '-pubkey[output public key]' \\\n    '-noout[do not output REQ]' \\\n    '-verify[verify signature on REQ]' \\\n    '-modulus[RSA modulus]' \\\n    \"-nodes[don't encrypt the output key]\" \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    \"-subject[output the request's subject]\" \\\n    '-passin[private key pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-key[use the private key contained in the specified file]:file:_files' \\\n    '-keyform[key file format]:format:(PEM DER)' \\\n    '-keyout[file to send the key to]:file:_files' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    \"-newkey rsa\\:-[generate a new RSA key of the specified number of bits in size]:bits: \" \\\n    \"-newkey dsa\\:[generate a new DSA key, parameters taken from CA in the specified file]:file:_files\" \\\n    \"-newkey ec\\:[generate a new EC key, parameters taken from CA in the specified file]:file:_files\" \\\n    '-md2[digest to sign with]' \\\n    '-md4[digest to sign with]' \\\n    '-md5[digest to sign with]' \\\n    '-mdc2[digest to sign with]' \\\n    '-sha1[digest to sign with]' \\\n    '-config[request template file]:file:_files' \\\n    '-subj[set or modify request subject]:subject: ' \\\n    '-multivalue-rdn[enable support for multivalued RDNs]' \\\n    '-new[new request]' \\\n    '-batch[do not ask anything during request generation]' \\\n    '-x509[output a x509 structure instead of a certificate request]' \\\n    '-days[number of days a certificate generated by -x509 is valid for]:days: ' \\\n    '-set_serial[serial number to use for a certificate generated by -x509]:serial: ' \\\n    '-newhdr[output \"NEW\" in the header lines]' \\\n    \"-asn1-kludge[output the 'request' in a format that is wrong but some CA's have been reported as requiring]\" \\\n    '-extensions[specify certificate extension section (override value in config file)]:section: ' \\\n    '-reqexts[specify request extension section (override value in config file)]:section: ' \\\n    '-utf8[input characters are UTF8 (default ASCII)]' \\\n    '*-nameopt[various certificate name options]:options:_nameopts' \\\n    '*-reqopt[- various request text options]:options:_certopts'\n  # TODO: complete -extensions and -reqexts\n}\n\n\n_openssl_rsa() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER NET)' \\\n    '-outform[output format]:format:(PEM DER NET)' \\\n    '-in[input file]:file:_files' \\\n    '-sgckey[use IIS SGC key format]' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-out[output file]:file:_files' \\\n    '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-des[encrypt PEM output with cbc des]' \\\n    '-des3[encrypt PEM output with ede cbc des using 168 bit key]' \\\n    '-idea[encrypt PEM output with cbc idea]' \\\n    '-seed[encrypt PEM output with cbc seed]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    '-text[print the key in text]' \\\n    \"-noout[don't print key out]\" \\\n    '-modulus[print the RSA key modulus]' \\\n    '-check[verify key consistency]' \\\n    '-pubin[expect a public key in input file]' \\\n    '-pubout[output a public key]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_rsautl() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-inkey[input key]:file:_files' \\\n    '-keyform[private key format]:format:(PEM DER)' \\\n    '-pubin[input is an RSA public]' \\\n    '-certin[input is a certificate carrying an RSA public key]' \\\n    '-ssl[use SSL v2 padding]' \\\n    '-raw[use no padding]' \\\n    '-pkcs[use PKCS#1 v1.5 padding (default)]' \\\n    '-oaep[use PKCS#1 OAEP]' \\\n    '-sign[sign with private key]' \\\n    '-verify[verify with public key]' \\\n    '-encrypt[encrypt with public key]' \\\n    '-decrypt[decrypt with private key]' \\\n    '-hexdump[hex dump output]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-passin[pass phrase source]:pass phrase source:_pass_phrase_source'\n}\n\n\n_openssl_s_client() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '(-6)-4[use IPv4 only]' \\\n    '(-4)-6[use IPv6 only]' \\\n    '(-connect)-host[use -connect instead]:host: ' \\\n    '(-connect)-port[use -connect instead]:port: ' \\\n    '(-host -port)-connect[who to connect to (default is localhost:4433)]:host\\:port: ' \\\n    '-verify[turn on peer certificate verification]:depth: ' \\\n    '-verify_return_error[return verification errors]' \\\n    '-cert[certificate file to use, PEM format assumed]:file:_files' \\\n    '-certform[certificate format (PEM or DER) PEM default]:format:(PEM DER)' \\\n    '-key[private key file to use, in cert file if not specified but cert file is]:file:_files' \\\n    '-keyform[key format (PEM or DER) PEM default]:format:(PEM DER)' \\\n    '-pass[private key file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    \"-CApath[PEM format directory of CA's]:directory:_files -/\" \\\n    \"-CAfile[PEM format file of CA's]:file:_files\" \\\n    '-reconnect[drop and re-make the connection with the same Session-ID]' \\\n    '-pause[sleep(1) after each read(2) and write(2) system call]' \\\n    '-prexit[print session information even on connection failure]' \\\n    '-showcerts[show all certificates in the chain]' \\\n    '-debug[extra output]' \\\n    '-msg[show protocol messages]' \\\n    '-nbio_test[more ssl protocol testing]' \\\n    \"-state[print the 'ssl' states]\" \\\n    '-nbio[run with non-blocking IO]' \\\n    '-crlf[convert LF from terminal into CRLF]' \\\n    '-quiet[no s_client output]' \\\n    '(-no_ign_eof)-ign_eof[ignore input eof (default when -quiet)]' \\\n    \"(-ign_eof)-no_ign_eof[don't ignore input eof]\" \\\n    '-psk_identity[PSK identity]:identity: ' \\\n    '-psk[PSK in hex (without 0x)]:key: ' \\\n    \"-srpuser[SRP authentification for 'user']:user: \" \\\n    \"-srppass[password for 'user']:password: \" \\\n    '-srp_lateuser[SRP username into second ClientHello message]' \\\n    '-srp_moregroups[tolerate other than the known g N values]' \\\n    '-srp_strength[minimal length in bits for N (default 1024)]:int: ' \\\n    '(-no_ssl2 -ssl3 -tls1 -tls1_1 -tls1_2 -dtls1)-ssl2[just use SSLv2]' \\\n    '(-no_ssl3 -ssl2 -tls1 -tls1_1 -tls1_2 -dtls1)-ssl3[just use SSLv3]' \\\n    '(-no_tls1_2 -ssl2 -ssl3 -tls1 -tls1_1 -dtls1)-tls1_2[just use TLSv1.2]' \\\n    '(-no_tls1_1 -ssl2 -ssl3 -tls1 -tls1_1 -dtls1)-tls1_1[just use TLSv1.1]' \\\n    '(-no_tls1 -ssl2 -ssl3 -tls1 -tls1_1 -dtls1)-tls1[just use TLSv1.0]' \\\n    '(-no_dtls1 -ssl2 -ssl3 -tls1 -tls1_1 -tls1_2)-dtls1[just use DTLSv1]' \\\n    '-fallback_scsv[send TLS_FALLBACK_SCSV]' \\\n    '-mtu[set the link layer MTU]' \\\n    '(-tls1_2)-no_tls1_2[turn off TLSv1.2]' \\\n    '(-tls1_1)-no_tls1_1[turn off TLSv1.1]' \\\n    '(-tls1)-no_tls1[turn off TLSv1.0]' \\\n    '(-ssl3)-no_ssl3[turn off SSLv3]' \\\n    '(-ssl2)-no_ssl2[turn off SSLv2]' \\\n    '-bugs[switch on all SSL implementation bug workarounds]' \\\n    \"-serverpref[use server's cipher preferences (only SSLv2)]\" \\\n    '-cipher[preferred cipher to use]:cipher suite:_list_ciphers' \\\n    \"-starttls[use the STARTTLS command before starting TLS for those protocols that support it]:protocol:(smtp pop3 imap ftp xmpp)\" \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-sess_out[file to write SSL session to]:file:_files' \\\n    '-sess_in[file to read SSL session from]:file:_files' \\\n    '-servername[set TLS extension servername in ClientHello]:host: ' \\\n    '-tlsextdebug[hex dump of all TLS extensions received]' \\\n    '-status[request certificate status from server]' \\\n    '-no_ticket[disable use of RFC4507bis session tickets]' \\\n    '-nextprotoneg[enable NPN extension, considering named protocols supported (comma-separated list)]:protocols: ' \\\n    '-legacy_renegotiation[enable use of legacy renegotiation (dangerous)]' \\\n    '-use_srtp[offer SRTP key management with a colon-separated profile list]:profiles: ' \\\n    '-keymatexport[export keying material using label]:label: ' \\\n    '-keymatexportlen[export len bytes of keying material (default 20)]:len: '\n}\n\n\n_openssl_s_server() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-accept[port to accept on (default is 4433)]:port: ' \\\n    '-context[set session ID context]:id: ' \\\n    '-verify[turn on peer certificate verification]:depth: ' \\\n    '-Verify[turn on peer certificate verification, must have a cert]:depth: ' \\\n    '-verify_return_error[return verification errors]' \\\n    '-cert[certificate file to use (default is server.pem)]:file:_files' \\\n    '-crl_check[check the peer certificate has not been revoked by its CA]' \\\n    '-crl_check_all[check the peer certificate has not been revoked by its CA or any other CRL in the CA chain]' \\\n    '-certform[certificate format]:format:(PEM DER)' \\\n    '-key[Private Key file to use, in cert file if not specified (default is server.pem)]:file:_files' \\\n    '-keyform[key format]:format:(PEM DER ENGINE)' \\\n    '-pass[private key file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-dcert[second certificate file to use (usually for DSA)]:file:_files' \\\n    '-dcertform[second certificate format]:format:(PEM DER)' \\\n    '-dkey[second private key file to use (usually for DSA)]:file:_files' \\\n    '-dkeyform[second key format]:format:(PEM DER ENGINE)' \\\n    '-dpass[second private key file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-dhparam[DH parameter file to use, in cert file if not specified or a default set of parameters is used]:file:_files' \\\n    '-named_curve[elliptic curve name to use for ephemeral ECDH keys. (default is nistp256)]:named curve:_list_curves' \\\n    '-nbio[run with non-blocking IO]' \\\n    '-nbio_test[test with the non-blocking test bio]' \\\n    '-crlf[convert LF from terminal into CRLF]' \\\n    '-debug[print more output]' \\\n    '-msg[show protocol messages]' \\\n    '-state[print the SSL states]' \\\n    \"-CApath[PEM format directory of CA's]:file:_files -/\" \\\n    \"-CAfile[PEM format file of CA's]:file:_files\" \\\n    \"-nocert[don't use any certificates (Anon-DH)]\" \\\n    '-cipher[preferred cipher to use]:cipher suite:_list_ciphers' \\\n    \"-serverpref[use server's cipher preferences]\" \\\n    '-quiet[no server output]' \\\n    '-no_tmp_rsa[do not generate a tmp RSA key]' \\\n    '-psk_hint[PSK identity hint to use]:hint: ' \\\n    '-psk[PSK in hex (without 0x)]:PSK: ' \\\n    '-srpvfile[the verifier file for SRP]:file:_files' \\\n    '-srpuserseed[a seed string for a default user salt]:seed: ' \\\n    '-ssl2[just talk SSLv2]' \\\n    '-ssl3[just talk SSLv3]' \\\n    '-tls1_2[just talk TLSv1.2]' \\\n    '-tls1_1[just talk TLSv1.1]' \\\n    '-tls1[just talk TLSv1]' \\\n    '-dtls1[just talk DTLSv1]' \\\n    '-timeout[enable timeouts]' \\\n    '-mtu[set link layer MTU]' \\\n    '-chain[read a certificate chain]' \\\n    '-no_ssl2[just disable SSLv2]' \\\n    '-no_ssl3[just disable SSLv3]' \\\n    '-no_tls1[just disable TLSv1]' \\\n    '-no_tls1_1[just disable TLSv1.1]' \\\n    '-no_tls1_2[just disable TLSv1.2]' \\\n    '-no_dhe[disable ephemeral DH]' \\\n    '-no_ecdhe[disable ephemeral ECDH]' \\\n    '-bugs[turn on SSL bug compatibility]' \\\n    '-hack[workaround for early Netscape code]' \\\n    \"-www[respond to a 'GET /' with a status page]\" \\\n    \"-WWW[respond to a 'GET /<path> HTTP/1.0' with file ./<path>]\" \\\n    \"-HTTP[respond to a 'GET /<path> HTTP/1.0' with file ./<path> with the assumption it contains a complete HTTP response]\" \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-id_prefix[generate SSL/TLS session IDs prefixed by arg]:prefix: ' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    '-servername[servername for HostName TLS extension]:hostname: ' \\\n    '-servername_fatal[on mismatch send fatal alert (default warning alert)]' \\\n    '-cert2[certificate file to use for servername (default is server2.pem)]:file:_files' \\\n    '-key2[Private Key file to use for servername, in cert file if not specified (default is server2.pem)]:file:_files' \\\n    '-tlsextdebug[hex dump of all TLS extensions received]' \\\n    '-no_ticket[disable use of RFC4507bis session tickets]' \\\n    '-legacy_renegotiation[enable use of legacy renegotiation (dangerous)]' \\\n    '-nextprotoneg[set the advertised protocols for the NPN extension (comma-separated list)]:protocol:(http/1.0 http/1.1)' \\\n    '-use_srtp[offer SRTP key management with a colon-separated profile list]:profiles: ' \\\n    '-4[use IPv4 only]' \\\n    '-6[use IPv6 only]' \\\n    '-keymatexport[export keying material using label]:label: ' \\\n    '-keymatexportlen[export len bytes of keying material (default 20)]:length: ' \\\n    '-status[respond to certificate status requests]' \\\n    '-status_verbose[enable status request verbose printout]' \\\n    '-status_timeout[status request responder timeout]:seconds: ' \\\n    '-status_url[status request fallback URL]:URL: '\n  # TODO: srtp profiles\n}\n\n\n_openssl_s_time() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-connect[host:port to connect to (default is localhost:4433)]:host\\:port: ' \\\n    '-nbio[run with non-blocking IO]' \\\n    '-ssl2[just use SSLv2]' \\\n    '-ssl3[just use SSLv3]' \\\n    '-bugs[turn on SSL bug compatibility]' \\\n    '-new[just time new connections]' \\\n    '-reuse[just time connection reuse]' \\\n    \"-www[retrieve the specified page from the site]:page: \" \\\n    '-time[max number of seconds to collect data, default 30]:seconds: ' \\\n    '-verify[turn on peer certificate verification]:depth: ' \\\n    '-cert[certificate file to use, PEM format assumed]:file:_files' \\\n    '-key[RSA file to use, PEM format assumed, key is in cert file]:file:_files' \\\n    \"-CApath[PEM format directory of CA's]:file:_files -/\" \\\n    \"-CAfile[PEM format file of CA's]:file:_files\" \\\n    '-cipher[preferred cipher to use]:cipher suite:_list_ciphers'\n}\n\n\n_openssl_sess_id() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format]:format:(PEM DER)' \\\n    '-outform[output format]:format:(PEM DER)' \\\n    '-in[input file (default stdin)]:file:_files' \\\n    '-out[output file (default stdout)]:file:_files' \\\n    '-text[print ssl session id details]' \\\n    '-cert[output certificate ]' \\\n    '-noout[no CRL output]' \\\n    '-context[set the session ID context]:id: '\n}\n\n\n_openssl_smime() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-encrypt[encrypt message]' \\\n    '-decrypt[decrypt encrypted message]' \\\n    '-sign[sign message]' \\\n    '-verify[verify signed message]' \\\n    '-pk7out[output PKCS#7 structure]' \\\n    '-des3[encrypt with triple DES]' \\\n    '-des[encrypt with DES]' \\\n    '-seed[encrypt with SEED]' \\\n    '-rc2-40[encrypt with RC2-40 (default)]' \\\n    '-rc2-64[encrypt with RC2-64]' \\\n    '-rc2-128[encrypt with RC2-128]' \\\n    '-aes128[encrypt PEM output with cbc aes]' \\\n    '-aes192[encrypt PEM output with cbc aes]' \\\n    '-aes256[encrypt PEM output with cbc aes]' \\\n    '-camellia128[encrypt PEM output with cbc camellia]' \\\n    '-camellia192[encrypt PEM output with cbc camellia]' \\\n    '-camellia256[encrypt PEM output with cbc camellia]' \\\n    \"-nointern[don't search certificates in message for signer]\" \\\n    \"-nosigs[don't verify message signature]\" \\\n    \"-noverify[don't verify signers certificate]\" \\\n    \"-nocerts[don't include signers certificate when signing]\" \\\n    '-nodetach[use opaque signing]' \\\n    \"-noattr[don't include any signed attributes]\" \\\n    \"-binary[don't translate message to text]\" \\\n    '-certfile[other certificates file]:file:_files' \\\n    '-signer[signer certificate file]:file:_files' \\\n    '-recip[recipient certificate file for decryption]:file:_files' \\\n    '-in[input file]:file:_files' \\\n    '-inform[input format]:format:(SMIME PEM DER)' \\\n    '-inkey[input private key (if not signer or recipient)]:file:_files' \\\n    '-keyform[input private key format]:format:(PEM ENGINE)' \\\n    '-out[output file]:file:_files' \\\n    '-outform[output format]:format:(SMIME PEM DER)' \\\n    '-content[supply or override content for detached signature]:file:_files' \\\n    '-to[to address]:address: ' \\\n    '-from[from address]:address: ' \\\n    '-subject[subject]:subject: ' \\\n    '-text[include or delete text MIME headers]' \\\n    '-CApath[trusted certificates directory]:directory:_files -/' \\\n    '-CAfile[trusted certificates file]:file:_files' \\\n    \"-crl_check[check revocation status of signer's certificate using CRLs]\" \\\n    \"-crl_check_all[check revocation status of signer's certificate chain using CRLs]\" \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    ':certificate:_files'\n}\n\n\n_openssl_speed() {\n  # written for openssl 1.0.1k\n  local algorithms\n  algorithms=(mdc2 md4 md5 hmac sha1 sha256 sha512 whirlpoolrmd160 idea-cbc \\\n              seed-cbc rc2-cbc rc5-cbc bf-cbc des-cbc des-ede3 aes-128-cbc \\\n              aes-192-cbc aes-256-cbc aes-128-ige aes-192-ige aes-256-ige \\\n              camellia-128-cbc camellia-192-cbc camellia-256-cbc rc4 rsa512 \\\n              rsa1024 rsa2048 rsa4096 dsa512 dsa1024 dsa2048 ecdsap160 \\\n              ecdsap192 ecdsap224 ecdsap256 ecdsap384 ecdsap521 ecdsak163 \\\n              ecdsak233 ecdsak283 ecdsak409 ecdsak571 ecdsab163 ecdsab233 \\\n              ecdsab283 ecdsab409 ecdsab571 ecdsa ecdhp160 ecdhp192 ecdhp224 \\\n              ecdhp256 ecdhp384 ecdhp521 ecdhk163 ecdhk233 ecdhk283 ecdhk409 \\\n              ecdhk571 ecdhb163 ecdhb233 ecdhb283 ecdhb409 ecdhb571 ecdh idea \\\n              seed rc2 des aes camellia rsa blowfish)\n  _arguments -C \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-evp[use the specified EVP]:EVP: ' \\\n    '-decrypt[time decryption instead of encryption (only EVP)]' \\\n    '-mr[produce machine readable output]' \\\n    '-multi[run n benchmarks in parallel]:benchmarks: ' \\\n    \"*:algorithm:(${algorithms})\"\n}\n\n\n_openssl_spkac() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-in[input file]:file:_files' \\\n    '-out[output file]:file:_files' \\\n    '-key[create SPKAC using private key]:file:_files' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-challenge[challenge string]:string: ' \\\n    '-spkac[alternative SPKAC name]:spkacname: ' \\\n    '-spksect[alternative section name]:section: ' \\\n    \"-noout[don't print SPKAC]\" \\\n    '-pubkey[output public key]' \\\n    '-verify[verify SPKAC signature]' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n}\n\n\n_openssl_srp() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-verbose[talk alot while doing things]' \\\n    '-config[a config file]:file:_files' \\\n    '-name[the particular srp definition to use]:definition: ' \\\n    '-srpvfile[the srp verifier file name]:file:_files' \\\n    '(-modify -delete -list)-add[add an user and srp verifier]' \\\n    '(-add -delete -list)-modify[modify the srp verifier of an existing user]' \\\n    '(-add -modify -list)-delete[delete user from verifier file]' \\\n    '(-add -modify -delete)-list[list user]' \\\n    '-gn[g and N values to be used for new verifier]:g and N: ' \\\n    '-userinfo[additional info to be set for user]:userinfo: ' \\\n    '-passin[input file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-passout[output file pass phrase source]:pass phrase source:_pass_phrase_source' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '-rand[files to use for random number input]:file:_rand_files' \\\n    ':user:'\n}\n\n\n_openssl_ts() {\n  # written for openssl 1.0.1k\n  # written for openssl 1.0.2e\n  local action digests\n  digests=(-dss1 -md4 -md5 -mdc2 -ripemd160 -sha -sha1 -sha224 -sha256 \\\n           -sha384 -sha512 -whirlpool)\n  if [[ \"${CURRENT}\" -eq 2 ]]; then\n    # first parameter to ts\n    _values 'openssl time stamp action' '-query[time stamp request generation]' '-reply[time stamp response generation]' '-verify[time stamp response verification]'\n  else\n    action=\"${words[2]}\"\n    case \"${action}\" in\n      -query)\n        _arguments -C \\\n          '-rand[files to use for random number input]:file:_rand_files' \\\n          '-config[config file to use]:file:_files' \\\n          '(-digest)-data[data file for which the time stamp request needs to be created]:file:_files' \\\n          '(-data)-digest[digest of the data file]:bytes: ' \\\n          \"($digests)-dss1[use the dss1 message digest algorithm]\" \\\n          \"($digests)-md4[to use the md4 message digest algorithm]\" \\\n          \"($digests)-md5[to use the md5 message digest algorithm]\" \\\n          \"($digests)-mdc2[to use the mdc2 message digest algorithm]\" \\\n          \"($digests)-ripemd160[to use the ripemd160 message digest algorithm]\" \\\n          \"($digests)-sha[to use the sha message digest algorithm]\" \\\n          \"($digests)-sha1[to use the sha1 message digest algorithm]\" \\\n          \"($digests)-sha224[to use the sha224 message digest algorithm]\" \\\n          \"($digests)-sha256[to use the sha256 message digest algorithm]\" \\\n          \"($digests)-sha384[to use the sha384 message digest algorithm]\" \\\n          \"($digests)-sha512[to use the sha512 message digest algorithm]\" \\\n          \"($digests)-whirlpool[to use the whirlpool message digest algorithm]\" \\\n          '-policy[policy to use for creating the time stamp token]:policy ID: ' \\\n          '-no_nonce[do not include a nonce in the request]' \\\n          '-cert[request a signing certificate in the response]' \\\n          '-in[use the previously created time stamp request]:file:_files' \\\n          '-out[name of the output file to which the request will be written]:file:_files' \\\n          '-text[output in human-readable format instead of DER]'\n        ;;\n      -reply)\n        _arguments -C \\\n          '-config[config file to use]:file:_files' \\\n          '-section[config file section for response generation]:section: ' \\\n          '-queryfile[file containing a DER encoded time stamp request]:file:_files' \\\n          '-passin[private key password source]:pass phrase source:_pass_phrase_source' \\\n          '-signer[signer certificate of the TSA in PEM format]:file:_files' \\\n          '-inkey[signer private key in PEM format]:file:_files' \\\n          '-chain[signer certificate chain in PEM format]:file:_files' \\\n          '-policy[default policy to use for response]:policy ID: ' \\\n          '-in[use the previously created time stamp response in DER format]:file:_files' \\\n          '-token_in[the paramter to -in is a time stamp token in DER format]' \\\n          '-out[name of the output file to which the response will be written]:file:_files' \\\n          '-token_out[output a time stamp token instead of a time stamp response]' \\\n          '-text[output in human-readable format instead of DER]' \\\n          '-engine[use the specified engine, possibly a hardware device]:engine:_engines'\n        ;;\n      -verify)\n        _arguments -C \\\n          '(-digest -queryfile)-data[verify response against the specified file]:file:_files' \\\n          '(-data -queryfile)-digest[verify the response against the specified message digest]:digest bytes: ' \\\n          '(-data -digest)-queryfile[the original time stamp request in DER format]:file:_files' \\\n          '-in[time stamp response that needs to be verified in DER format]:file:_files' \\\n          '-token_in[the paramter to -in is a time stamp token in DER format]' \\\n          '-CApath[directory containing the trused CA certificates of the client]:directory:_files -/' \\\n          '-CAFile[file containing a set of trusted self-signed CA certificates in PEM format]:file:_files' \\\n          '-untrusted[set of additional untrusted certificates in PEM format which may be needed when building the certificate chain]:file:_files'\n        ;;\n    esac\n  fi\n}\n\n\n_openssl_verify() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-CApath[a directory of trusted certificates]:directory:_files -/' \\\n    '-CAfile[file A file of trusted certificates]:file:_files' \\\n    '-purpose[the intended use for the certificate]:purpose:(sslclient sslserver nssslserver smimesign smimeencrypt crlsign any ocsphelper timestampsign)' \\\n    '*-policy[enable policy processing and add arg to the user-initial-policy-set]:object name or OID: ' \\\n    '-ignore_critical[ignore critical extensions]' \\\n    '-attime[perform validation checks using the given time]:timestamp: ' \\\n    '-check_ss_sig[verify the signature on the self-signed root CA]' \\\n    \"-crlfile[file containing one or more CRL's (in PEM format) to load]:file:_files\" \\\n    '-crl_check[check end entity certificate in CRL]' \\\n    '-crl_check_all[check all certificates in CRL]' \\\n    '-policy_check[enables certificate policy processing]' \\\n    '-explicit_policy[set policy variable require-explicit-policy]' \\\n    '-inhibit_any[set policy variable inhibit-any-policy]' \\\n    '-inhibit_map[set policy variable inhibit-policy-mapping]' \\\n    '-x509_strict[strict X.509-compliance]' \\\n    '-extended_crl[enable extended CRL features]' \\\n    '-use_deltas[enable support for delta CRLs]' \\\n    '-policy_print[print out diagnostics related to policy processing]' \\\n    '-untrusted[a file of untrusted certificates]:file:_files' \\\n    '(-*)-help[print out a usage message]' \\\n    '-issuer_checks[print out diagnostics relating to searches for the issuer certificate of the current certificate]' \\\n    '-verbose[print extra information about the operations being performed]' \\\n    '*:certificate:_files'\n  # TODO: - may be used to separate certificates from options\n  # TODO: Do not hardcode purposes\n}\n\n\n_openssl_version() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-a[all information, this is the same as setting all the other flags]' \\\n    '-v[the current OpenSSL version]' \\\n    '-b[the date the current version of OpenSSL was built]' \\\n    '-o[option information: various options set when the library was built]' \\\n    '-f[compilation flags]' \\\n    '-p[platform setting]' \\\n    '-d[OPENSSLDIR setting]'\n}\n\n\n_openssl_x509() {\n  # written for openssl 1.0.1k\n  _arguments -C \\\n    '-inform[input format - default PEM (one of DER, NET or PEM)]:format:(DER NET PEM)' \\\n    '-outform[output format - default PEM (one of DER, NET or PEM)]:arg:(DER NET PEM)' \\\n    '-keyform[private key format - default PEM]:arg:(DER PEM)' \\\n    '-CAform[CA format - default PEM]:arg:(DER PEM)' \\\n    '-CAkeyform[CA key format - default PEM]:arg:(DER PEM)' \\\n    '-in[input file - default stdin]:file:_files' \\\n    '-out[output file - default stdout]:file:_files' \\\n    '-passin[private key password source]:pass phrase source:_pass_phrase_source' \\\n    '-serial[print serial number value]' \\\n    '-subject_hash[print subject hash value]' \\\n    '-subject_hash_old[print old-style (MD5) subject hash value]' \\\n    '-issuer_hash[print issuer hash value]' \\\n    '-issuer_hash_old[print old-style (MD5) issuer hash value]' \\\n    '-hash[synonym for -subject_hash]' \\\n    '-subject[print subject DN]' \\\n    '-issuer[print issuer DN]' \\\n    '-email[print email address(es)]' \\\n    '-startdate[notBefore field]' \\\n    '-enddate[notAfter field]' \\\n    '-purpose[print out certificate purposes]' \\\n    '-dates[both Before and After dates]' \\\n    '-modulus[print the RSA key modulus]' \\\n    '-pubkey[output the public key]' \\\n    '-fingerprint[print the certificate fingerprint]' \\\n    '-alias[output certificate alias]' \\\n    '-noout[no certificate output]' \\\n    '-ocspid[print OCSP hash values for the subject name and public key]' \\\n    '-ocsp_uri[print OCSP Responder URL(s)]' \\\n    '-trustout[output a \"trusted\" certificate]' \\\n    '-clrtrust[clear all trusted purposes]' \\\n    '-clrreject[clear all rejected purposes]' \\\n    '-addtrust[trust certificate for a given purpose]:purpose:(clientAuth serverAuth emailProtection)' \\\n    '-addreject[reject certificate for a given purpose]:purpose:(clientAuth serverAuth emailProtection)' \\\n    '-setalias[set certificate alias]:alias: ' \\\n    '-days[how long till expiry of a signed certificate (default 30 days)]:days: ' \\\n    '-checkend[check whether the cert expires in the specified time]:seconds: ' \\\n    '-signkey[self sign cert with arg]:file:_files' \\\n    '-x509toreq[output a certification request object]' \\\n    '-req[input is a certificate request, sign and output]' \\\n    '-CA[set the CA certificate, must be PEM format]:file:_files' \\\n    '-CAkey[set the CA key, must be PEM format]:file:_files' \\\n    '-CAcreateserial[create serial number file if it does not exist]' \\\n    '-CAserial[serial file]:file:_files' \\\n    '-set_serial[serial number to use]' \\\n    '-text[print the certificate in text form]' \\\n    '-C[print out C code forms]' \\\n    '(-md5 -sha1 -mdc2)-md2[digest to use]' \\\n    '(-md2 -sha1 -mdc2)-md5[digest to use]' \\\n    '(-md2 -md5 -mdc2)-sha1[digest to use]' \\\n    '(-md2 -md5 -sha1)-mdc2[digest to use]' \\\n    '-extfile[configuration file with X509V3 extensions to add]' \\\n    '-extensions[section from config file with X509V3 extensions to add]' \\\n    '-clrext[delete extensions before signing and input certificate]' \\\n    '*-nameopt[various certificate name options]:options:_nameopts' \\\n    '-engine[use the specified engine, possibly a hardware device]:engine:_engines' \\\n    '*-certopt[various certificate text options]:options:_certopts'\n}\n\n\n_pass_phrase_source() {\n  # pass:password\n  # env:var\n  # file:pathname\n  # fd:number\n  # stdin\n  _values -S : 'pass phrase source' \\\n    'pass[obtain the password from the command line]:password: ' \\\n    'env[obtain the password from the environment variable var]:var:_parameters -g \"*export*\"' \\\n    'file[obtain the password from a file]:file:_files' \\\n    'fd[read the password from the file descriptor number]:number: ' \\\n    'stdin[read the password from standard input]'\n}\n\n\n_rand_files() {\n  # FIXME: this does not allow using multiple files separated by :\n  # the following would probably work, but how to generate $files?\n  #_values -s : -S ' ' 'random source file or directory' ${files}\n  _files\n}\n\n\n_engines() {\n  # openssl engines\n  local engines\n  engines=(${${${(@f)\"$(_call_program engines openssl engine)\"}%)*}#\\(})\n  _values 'engines' ${engines}\n}\n\n\n_list_ciphers() {\n  # openssl ciphers\n  local ciphers\n  # add cipher suites\n  ciphers=(${(@s/:/)\"$(_call_program ciphers openssl ciphers)\"})\n  # add static cipher strings\n  ciphers=(${ciphers} \\\n    'DEFAULT[the default cipher list]' \\\n    'COMPLEMENTOFDEFAULT[the ciphers included in ALL but not enabled by default]' \\\n    'ALL[all cipher suites except the eNULL ciphers]' \\\n    'COMPLEMENTOFALL[the cipher suites not enabled by ALL]' \\\n    'HIGH[\"high\" encryption cipher suites]' \\\n    'MEDIUM[\"medium\" encryption cipher suites]' \\\n    'LOW[\"low\" encryption cipher suites]' \\\n    {EXP,EXPORT}'[export encryption algorithms]' \\\n    'EXPORT40[40 bit export encryption algorithms]' \\\n    'EXPORT56[56 bit export encryption algorithms]' \\\n    {eNULL,NULL}'[ciphers offering no encryption]' \\\n    'aNULL[ciphers offering no authentication]' \\\n    {kRSA,RSA}'[cipher suites rusing RSA key exchange]' \\\n    'kDHr[cipher suites using DH key agreement signed by CAs with RSA keys]' \\\n    'kDHd[cipher suites using DH key agreement signed by CAs with DSS keys]' \\\n    'kDH[cipher suites using DH key agreement]' \\\n    {kDHE,kEDH}'[cipher suites using ephemeral DH key agreement, including anonymous cipher suites]' \\\n    {DHE,EDH}'[cipher suites using authenticated ephemeral DH key agreement]' \\\n    'ADH[anonymous DH cipher suites, not including anonymous ECDH ciphers]' \\\n    'DH[cipher suites using DH, including anonymous DH, ephemeral DH and fixed DH]' \\\n    'kECDHr[cipher suites using fixed ECDH key agreement signed by CAs with RSA keys]' \\\n    'kECDHe[cipher suites using fixed ECDH key agreement signed by CAs with ECDSA keys]' \\\n    'kECDH[cipher suites using fixed ECDH key agreement]' \\\n    {kECDHE,kEECDH}'[cipher suites using ephemeral ECDH key agreement, including anonymous cipher suites]' \\\n    {ECDHE,kEECDH}'[cipher suites using authenticated ephemeral ECDH key agreement]' \\\n    'AECDH[anonymous Elliptic Curve Diffie Hellman cipher suites]' \\\n    'ECDH[cipher suites using ECDH key exchange, including anonymous, ephemeral and fixed ECDH]' \\\n    'aRSA[cipher suites using RSA authentication]' \\\n    {aDSS,DSS}'[cipher suites using DSS authentication]' \\\n    'aDH[cipher suites effectively using DH authentication]' \\\n    'aECDH[cipher suites effectively using ECDH authentication]' \\\n    {aECDSA,ECDSA}'[cipher suites using ECDSA authentication]' \\\n    'TLSv1.2[TLSv1.2 cipher suites]' \\\n    'TLSv1[TLSv1.0 cipher suites]' \\\n    'SSLv3[SSLv3.0 cipher suites]' \\\n    'SSLv2[SSLv2.0 cipher suites]' \\\n    'AES128[cipher suites using 128 bit AES]' \\\n    'AES256[cipher suites using 256 bit AES]' \\\n    'AES[cipher suites using AES]' \\\n    'AESGCM[AES in Galois Counter Mode (GCM)]' \\\n    'CAMELLIA128[cipher suites using 128 bit CAMELLIA]' \\\n    'CAMELLIA256[cipher suites using 256 bit CAMELLIA]' \\\n    'CAMELLIA[cipher suites using CAMELLIA]' \\\n    '3DES[cipher suites using triple DES]' \\\n    'DES[cipher suites using DES (not triple DES)]' \\\n    'RC4[cipher suites using RC4]' \\\n    'RC2[cipher suites using RC2]' \\\n    'IDEA[cipher suites using IDEA]' \\\n    'SEED[cipher suites using SEED]' \\\n    'MD5[cipher suites using MD5]' \\\n    {SHA1,SHA}'[cipher suites using SHA1]' \\\n    'SHA256[cipher suites using SHA256]' \\\n    'SHA384[cipher suites using SHA284]' \\\n    'aGOST[cipher suites using GOST R 34.10 for authenticaction]' \\\n    'aGOST01[cipher suites using GOST R 34.10-2001 authentication]' \\\n    'aGOST94[cipher suites using GOST R 34.10-94 authentication]' \\\n    'kGOST[cipher suites, using VKO 34.10 key exchange]' \\\n    'GOST94[cipher suites, using HMAC based on GOST R 34.11-94]' \\\n    'GOST89MAC[cipher suites using GOST 28147-89 MAC instead of HMAC]' \\\n    'PSK[cipher suites using pre-shared keys (PSK)]' \\\n    'SUITEB128[suite B mode operation using 128 or 192 bit level of security]' \\\n    'SUITEB128ONLY[suite B mode operation using 128 bit level of security]' \\\n    'SUITEB192[suite B mode operation using 192 bit level of security]' \\\n    )\n  # FIXME: support !, + and - before each cipher suite\n  _values -s : 'cipher suite' ${ciphers}\n}\n\n\n_list_curves() {\n  # openssl ecparam -list_curves\n  local curves not_curves\n  curves=\"$(_call_program list_curves openssl ecparam -list_curves)\"\n  # identify lines that do not contain curve names but only descriptions\n  not_curves=(${${(f)curves[@]}:#*:*})\n  # remove non-curve lines, trailing descriptions and leading spaces\n  curves=(${${${${(f)curves[@]}:|not_curves}%:*}##* })\n  _values 'named curves' ${curves}\n}\n\n\n_list_message_digest_algorithms() {\n  # openssl list-message-digest-algorithms\n  local algorithms\n  algorithms=(${${(@f)\"$(_call_program message_digest_algorithms openssl list-message-digest-algorithms)\"}%% *})\n  _values 'message digest algorithms' ${algorithms}\n}\n\n\n_nameopts() {\n  _values -s ',' -w 'nameopts' \\\n    '(-compat compat)'{-compat,compat}'[use the old format. This is equivalent to specifying no name options at all]' \\\n    '(-RFC2253 RFC2253)'{-RFC2253,RFC2253}'[displays names compatible with RFC2253 equivalent to esc_2253, esc_ctrl, esc_msb, utf8, dump_nostr, dump_unknown, dump_der, sep_comma_plus, dn_rev and sname]' \\\n    '(-oneline oneline)'{-oneline,oneline}'[a oneline format which is more readable than RFC2253. Equivalent to esc_2253, esc_ctrl, esc_msb, utf8, dump_nostr, dump_der, use_quote, sep_comma_plus_space, space_eq and sname options]' \\\n    '(-multiline multiline)'{-multiline,multiline}'[a multiline format. Equivalent to esc_ctrl, esc_msb, sep_multiline, space_eq, lname and align]' \\\n    '(-esc_2253 esc_2253)'{-esc_2253,esc_2253}'[escape the \"special\" characters required by RFC2253 in a field]' \\\n    '(-esc_ctrl esc_ctrl)'{-esc_ctrl,esc_ctrl}'[escape control characters]' \\\n    '(-esc_msb esc_msb)'{-esc_msb,esc_msb}'[escape characters with the MSB set]' \\\n    '(-use_quote use_quote)'{-use_quote,use_quote}'[escapes some characters by surrounding the whole string with \" characters]' \\\n    '(-utf8 utf8)'{-utf8,utf8}'[convert all strings to UTF8 format first]' \\\n    '(-ignore_type ignore_type)'{-ignore_type,ignore_type}'[this option does not attempt to interpret multibyte characters in any way]' \\\n    '(-show_type show_type)'{-show_type,show_type}'[show the type of the ASN1 character string]' \\\n    '(-dump_der dump_der)'{-dump_der,dump_der}'[use DER encoding when hexdumping fields]' \\\n    '(-dump_nostr dump_nostr)'{-dump_nostr,dump_nostr}'[dump non character string types]' \\\n    '(-dump_all dump_all)'{-dump_all,dump_all}'[dump all fields]' \\\n    '(-dump_unknown dump_unknown)'{-dump_unknown,dump_unknown}'[dump any field whose OID is not recognised by OpenSSL]' \\\n    '(-sep_comma_plus sep_comma_plus)'{-sep_comma_plus,sep_comma_plus}'[these options determine the field separators]' \\\n    '(-sep_comma_plus_space sep_comma_plus_space)'{-sep_comma_plus_space,sep_comma_plus_space}'[these options determine the field separators]' \\\n    '(-sep_semi_plus_space sep_semi_plus_space)'{-sep_semi_plus_space,sep_semi_plus_space}'[these options determine the field separators]' \\\n    '(-sep_multiline sep_multiline)'{-sep_multiline,sep_multiline}'[these options determine the field separators]' \\\n    '(-dn_rev dn_rev)'{-dn_rev,dn_rev}'[reverse the fields of the DN]' \\\n    '(-nofname nofname)'{-nofname,nofname}'[do not display field names]' \\\n    '(-sname sname)'{-sname,sname}'[display field names in short form]' \\\n    '(-lname lname)'{-lname,lname}'[display field names in long form]' \\\n    '(-oid oid)'{-oid,oid}'[display field names in numerical form]' \\\n    '(-align align)'{-align,align}'[align field values for a more readable output. Only usable with sep_multiline]' \\\n    '(-space_eq space_eq)'{-space_eq,space_eq}'[places spaces around the = character which follows the field name]'\n}\n\n\n_certopts() {\n  _values -s ',' -w 'certopts' \\\n    'compatible[use the old format. This is equivalent to specifying no output options at all]' \\\n    \"no_header[don't print header information: that is the lines saying \\\"Certificate\\\" and \\\"Data\\\"]\" \\\n    \"no_version[don't print out the version number]\" \\\n    \"no_serial[don't print out the serial number]\" \\\n    \"no_signame[don't print out the signature algorithm used]\" \\\n    \"no_validity[don't print the validity, that is the notBefore and notAfter fields]\" \\\n    \"no_subject[don't print out the subject name]\" \\\n    \"no_issuer[don't print out the issuer name]\" \\\n    \"no_pubkey[don't print out the public key]\" \\\n    \"no_sigdump[don't give a hexadecimal dump of the certificate signature]\" \\\n    \"no_aux[don't print out certificate trust information]\" \\\n    \"no_extensions[don't print out any X509V3 extensions]\" \\\n    'ext_default[retain default extension behaviour: attempt to print out unsupported certificate extensions]' \\\n    'ext_error[print an error message for unsupported certificate extensions]' \\\n    'ext_parse[ASN1 parse unsupported extensions]' \\\n    'ext_dump[hex dump unsupported extensions]' \\\n    '(no_issuer no_pubkey no_header no_version no_sigdump no_signame)ca_default[the value used by the ca utility, equivalent to no_issuer, no_pubkey, no_header, no_version, no_sigdump and no_signame]'\n}\n\n\n_openssl \"$@\"\n\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_optirun",
    "content": "#compdef optirun\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for the optirun command from bumblebee\n#  (https://github.com/Bumblebee-Project/Bumblebee).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Christophe-Marie Duquesne <chm.duquesne@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line\ntypeset -A opt_args\n\nlocal -a arguments\n\narguments=(\n    '--version[output version information]'\n    '(-h --help)'{-h,--help}'[show help]'\n    '(-c --vgl-compress)'{-c,--vgl-compress}'[image transport method]:method:(proxy jpeg rgb xb yuv)'\n    '--failsafe[run a program even if the nvidia card is unavailable]:boolean:(true false)'\n    '--no-failsafe[do not run a program if the nvidia card is unavailable]'\n    '--vgl-options[options to be passed to vglrun (example: +tr)]'\n    '(-q --quiet --silent)'{-q,--quiet,--silent}'[suppress all logging messages]'\n    '(-v --verbose)'{-v,--verbose}'[increase the verbosity level of log messages]'\n    '--debug[set the verbosity level to the maximum]'\n    '(-b --bridge)'{-b,--bridge}'[specify bridge library to use: VirtualGL, Primus or auto]:method:(auto primus virtualgl none)'\n    '(-d --display)'{-d,--display}'[the X display number to use]'\n    '(-C --config)'{-C,--config}'[retrieve settings for Bumblebee from FILE]:file:_files'\n    '(-l --ldpath)'{-l,--ldpath}'[PATH the libraries like libGL.so are searched in]:file:_files'\n    '--primus-ldpath[a colon-separated list of paths which are searched for the primus libGL.so.1]:file:_files'\n    '(-s --socket)'{-s,--socket}'[use FILE for communication with the daemon]:file:_files'\n    '--no-xorg[do not start secondary X server (implies -b none)]'\n    '*::arguments: _normal'\n)\n\n_arguments $arguments\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_paste",
    "content": "#compdef paste\n#\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for paste (from util-linux 2.27.1->)\n#    (https://git.kernel.org/cgit/utils/util-linux/util-linux.git/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Ole Jørgen Brønner <olejorgenb@yahoo.no>\n#\n# ------------------------------------------------------------------------------\n#\n# Note: paste has upstream bash completion\n# Note: Credit to https://github.com/RobSis/zsh-completion-generator which was\n#       used to generate most of the script.\n\nlocal arguments\n\narguments=(\n    '*'{-d,--delimiters}'[reuse characters from LIST instead of TABs]:delimiters'\n    '(-s --serial)'{-s,--serial}'[paste one file at a time instead of in parallel]'\n    '(-z --zero-terminated)'{-z,--zero-terminated}'[line delimiter is NUL, not newline]'\n    '--help[display this help and exit]'\n    '--version[output version information and exit]'\n    '*:filename:_files'\n)\n\n_arguments -s $arguments\n"
  },
  {
    "path": ".config/zsh/completions/src/_patool",
    "content": "#compdef patool\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for patool (https://github.com/wummel/patool).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n# * Sergei Eremenko (https://github.com/SmartFinn)\n#\n# ------------------------------------------------------------------------------\n\nlocal state line ret=1\n\n_arguments -C \\\n  '(-h --help)'{-h,--help}'[show help message and exit]' \\\n  '(--non-interactive)'--non-interactive'[do not query for user input]' \\\n  '(-v --verbose)'{-v,--verbose}'[verbose operation]' \\\n  '1:cmd:->cmds' \\\n  '*:arg:->args' && ret=0\n\ncase $state in\n  (cmds)\n    local -a cmds\n\n    cmds=(\n      'create:create an archive from given files'\n      'diff:show differences between two archives'\n      'extract:extract files from given archives'\n      'formats:show all supported archive formats'\n      'list:list files in archives'\n      'repack:repackage archive to a different format'\n      'recompress:recompress an archive to smaller size'\n      'search:search in archive contents for given pattern'\n      'test:test the given archives'\n    )\n\n    _describe -t commands 'patool commands' cmds && ret=0\n    ;;\n  (args)\n    case $line[1] in\n      (extract)\n        _arguments \\\n          '--outdir[extract to the given output directory]:select directory:_files -/' \\\n          '*:files:_files' && ret=0\n      ;;\n      (formats)\n        _message 'no more arguments' && ret=0\n      ;;\n      (search)\n        _arguments \\\n          '2:search pattern:' \\\n          '*:files:_files' && ret=0\n      ;;\n      (*)\n        _arguments \\\n          '*:files:_files' && ret=0\n      ;;\n    esac\n    ;;\nesac\n\nreturn $ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_perf",
    "content": "#compdef perf\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Linux performance counters 3.3 (perf.wiki.kernel.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_perf() {\n  local context curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  local ret=1\n\n  _arguments -C \\\n    '(- : *)--version[show version number and exit]' \\\n    '(- : *)--help[show help]: :_perf_cmds' \\\n    '1: :_perf_cmds' \\\n    '*::arg:->args' \\\n  && ret=0\n\n  case $state in\n    (args)\n      curcontext=\"${curcontext%:*:*}:perf-cmd-$words[1]:\"\n      case $line[1] in\n        (annotate)\n          # TODO Complete CPU list\n          # TODO Complete disassembler style\n          _arguments \\\n            '(- : *)'{-a,--all}'[prints all the available commands on the standard output]' \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '(-d --dsos)'{-d,--dsos=}'[only consider symbols in these dsos]:dso list' \\\n            '(-s --symbol)'{-s,--symbol=}'[symbol to annotate]:symbol' \\\n            '(-f --force)'{-f,--force}'[do not complain, do it]' \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            '(-D --dump-raw-trace)'{-D,--dump-raw-trace}'[dump raw trace in ASCII]' \\\n            '(-k --vmlinux)'{-k,--vmlinux=}'[vmlinux pathname]: :_files' \\\n            '(-m --modules)'{-m,--modules}'[load module symbols]' \\\n            '(-l --print-line)'{-l,--print-line}'[print matching source lines]' \\\n            '(-P --full-paths)'{-P,--full-paths}'[don'\\''t shorten the displayed pathnames]' \\\n            '--stdio[use the stdio interface]' \\\n            '--tui[use the TUI interface]' \\\n            '(-C --cpu)'{-C,--cpu}'[only report samples for the list of CPUs provided]:CPU list' \\\n            '--asm-raw[show raw instruction encoding of assembly instructions]' \\\n            '(--no-source)--source[interleave source code with assembly code]' \\\n            '(--source)--no-source[don'\\''t interleave source code with assembly code]' \\\n            '--symfs=[look for files with symbols relative to this directory]: :_files -/' \\\n            '(-M --disassembler-style)'{-M,--disassembler-style=}'[set disassembler style for objdump]:disassembler style' \\\n            '1::symbol name' \\\n            && ret=0\n        ;;\n        (archive)\n          _arguments \\\n            '1: :_files' \\\n            && ret=0\n        ;;\n        (bench)\n          # TODO Complete subsystems\n          # TODO Complete suites\n          _arguments \\\n            '(-f --format)'{-f,--format=}'[specify format style]: :((default\\:mainly\\ for\\ human\\ reading simple\\:friendly\\ for\\ automated\\ processing\\ by\\ scripts))' \\\n            '1::subsystem' \\\n            '2::suite' \\\n            && ret=0\n        ;;\n        (buildid-cache)\n          _arguments \\\n            '(-a --add)'{-a,--add=}'[add specified file to the cache]: :_files' \\\n            '(-r --remove)'{-r,--remove=}'[remove specified file from the cache]: :_files' \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            && ret=0\n\t\t;;\n        (buildid-list)\n          _arguments \\\n            '(-H --with-hits)'{-H,--with-hits}'[show only DSOs with hits]' \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '(-f --force)'{-f,--force}'[don'\\''t do ownership validation]' \\\n            '(-k --kernel)'{-k,--kernel}'[show running kernel build id]' \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            && ret=0\n        ;;\n        (diff)\n          _arguments \\\n            '(-M --displacement)'{-M,--displacement}'[show position displacement relative to baseline]' \\\n            '(-D --dump-raw-trace)'{-D,--dump-raw-trace}'[dump raw trace in ASCII]' \\\n            '(-m --modules)'{-m,--modules}'[load module symbols]' \\\n            '(-d --dsos)'{-d,--dsos=}'[only consider symbols in these dsos]:dso list' \\\n            '(-C --comms)'{-C,--comms=}'[only consider symbols in these comms]:comm list' \\\n            '(-S --symbols)'{-S,--symbols=}'[only consider these symbols]:symbol list' \\\n            '(-s --sort)'{-s,--sort=}'[sort by key(s)]: :_values -s , key pid comm dso symbol' \\\n            '(-t --field-separator)'{-t,--field-separator=}'[use a special separator character and don'\\''t pad with spaces]:separator' \\\n            '(-v --verbose)'{-v,--verbose}'[be verbose, for instance, show the raw counts in addition to the diff]' \\\n            '(-f --force)'{-f,--force}'[don'\\''t complain, do it]' \\\n            '--symfs=[look for files with symbols relative to this directory]: :_files -/' \\\n            '1:old file:_files' \\\n            '2:new file:_files' \\\n            && ret=0\n        ;;\n        (evlist)\n          _arguments \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            && ret=0\n        ;;\n        (inject)\n          _arguments \\\n            '(-b --build-ids)'{-b,--build-ids=}'[inject build-ids into the output stream]:build-id list' \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            && ret=0\n        ;;\n        (kmem)\n          # TODO Complete 'record' command\n          _arguments \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '--caller[show per-callsite statistics]' \\\n            '--alloc[show per-allocation statistics]' \\\n            '(-s --sort)'{-s,--sort=}'[sort by output]: :_values -s , key frag hit bytes' \\\n            '(-n --lines)'{-n,--lines}'[print n lines only]:number' \\\n            '1:command:((record\\:record\\ the\\ kmem\\ events\\ of\\ an\\ arbitrary\\ workload stat\\:report\\ kernel\\ memory\\ statistics))' \\\n            && ret=0\n        ;;\n        (kvm)\n          _arguments \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '(-o --output)'{-o,--output=}'[output file name]: :_files' \\\n            '--host=[collect host side performance profile]:host' \\\n            '--guest=[collect guest side performance profile]:guest' \\\n            '--guestmount=[guest os root file system mount directory]: :_files -/' \\\n            '--guestkallsyms=[guest os /proc/kallsyms file copy]: :_files' \\\n            '--guestmodules=[guest os /proc/modules file copy]: :_files' \\\n            '--guestvmlinux=[guest os kernel vmlinux]: :_files' \\\n            '1:command:((top record report diff buildid-list))' \\\n            && ret=0\n        ;;\n        (list)\n          _arguments \\\n            '1:event type:((hw\\:hardware\\ events hardware\\:hardware\\ events sw\\:software\\ events software\\:software\\ events cache\\:cache\\ events hwcache\\:cache\\ events tracepoint\\:tracepoint\\ events))' \\\n            && ret=0\n        ;;\n        (lock)\n          # TODO Complete 'record' command\n          # TODO Complete 'report' command options\n          _arguments \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            '(-D --dump-raw-trace)'{-D,--dump-raw-trace}'[dump raw trace in ASCII]' \\\n            '1:command:((record\\:record\\ lock\\ events trace\\:show\\ raw\\ lock\\ events report\\:report\\ statistical\\ data))' \\\n            && ret=0\n        ;;\n        (probe)\n          # TODO not implemented\n        ;;\n        (record)\n          # TODO not implemented\n        ;;\n        (report)\n          # TODO not implemented\n        ;;\n        (sched)\n          # TODO Complete 'record' command\n          _arguments \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            '(-D --dump-raw-trace)'{-D,--dump-raw-trace}'[dump raw trace in ASCII]' \\\n            '1:command:((record\\:record\\ scheduling\\ events script\\:see\\ a\\ detailed\\ trace replay\\:simulate\\ the\\ workload map\\:print\\ a\\ textual\\ context-switching\\ outline))' \\\n            && ret=0\n        ;;\n        (script)\n          # TODO not implemented\n        ;;\n        (stat)\n          # TODO not implemented\n        ;;\n        (test)\n          _arguments \\\n            '(-v --verbose)'{-v,--verbose}'[be more verbose]' \\\n            && ret=0\n        ;;\n        (timechart)\n          # TODO Complete 'record' command\n          _arguments \\\n            '(-i --input)'{-i,--input=}'[input file name]: :_files' \\\n            '(-o --output)'{-o,--output=}'[output file name]: :_files' \\\n            '(-w --width)'{-w,--width=}'[select the width of the SVG file]:width' \\\n            '(-P --power-only)'{-P,--power-only}'[only output the CPU power section of the diagram]' \\\n            '(-p --process)'{-p,--process}'[select the processes to display, by name or PID]:process' \\\n            '--symfs=[look for files with symbols relative to this directory]: :_files -/' \\\n            '1:command:((record))' \\\n            && ret=0\n        ;;\n        (top)\n          # TODO not implemented\n        ;;\n        (help)\n          _arguments \\\n            '(- : *)'{-a,--all}'[prints all the available commands on the standard output]' \\\n            '1: :_perf_cmds' \\\n            && ret=0\n          ;;\n        *)\n          _call_function ret _perf_cmd_$words[1] && ret=0\n          (( ret )) && _message 'no more arguments'\n        ;;\n      esac\n    ;;\n  esac\n}\n\n# FIXME Parse 'perf --help' instead of hard-coding.\n(( $+functions[_perf_cmds] )) ||\n_perf_cmds() {\n  local commands; commands=(\n    'annotate:read perf.data (created by perf record) and display annotated code'\n    'archive:create archive with object files with build-ids found in perf.data file'\n    'bench:general framework for benchmark suites'\n    'buildid-cache:manage build-id cache'\n    'buildid-list:list the buildids in a perf.data file'\n    'diff:read two perf.data files and display the differential profile'\n    'evlist:list the event names in a perf.data file'\n    'inject:filter to augment the events stream with additional information'\n    'kmem:tool to trace/measure kernel memory(slab) properties'\n    'kvm:tool to trace/measure kvm guest os'\n    'list:list all symbolic event types'\n    'lock:analyze lock events'\n    'probe:define new dynamic tracepoints'\n    'record:run a command and record its profile into perf.data'\n    'report:read perf.data (created by perf record) and display the profile'\n    'sched:tool to trace/measure scheduler properties (latencies)'\n    'script:read perf.data (created by perf record) and display trace output'\n    'stat:run a command and gather performance counter statistics'\n    'test:runs sanity tests'\n    'timechart:tool to visualize total system behavior during a workload'\n    'top:system profiling tool'\n    'help:show command usage information'\n  )\n  _describe -t commands 'command' commands \"$@\"\n}\n\n_perf \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_periscope",
    "content": "#compdef periscope\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Periscope (http://code.google.com/p/periscope).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n  '(- : *)'{-h,--help}'[show help message and exit]' \\\n  '(- : *)--version[show version number and exit]' \\\n  '*'{-l,--language}'[wanted language]: :_language_codes ISO-639-1' \\\n  '(-f --force)'{-f,--force}'[replace existing subtitle file]' \\\n  '(-q --query)'{-q,--query}'[query to send to the subtitles website]:queries' \\\n  '--list-plugins[list all plugins supported by periscope]' \\\n  '--list-active-plugins[list all plugins used to search subtitles]' \\\n  '--cache-folder[cache/config directory to use]: :_files -/' \\\n  '--quiet[run in quiet mode (only show warn and error messages)]' \\\n  '--debug[set the logging level to debug]' \\\n  '*: :_files'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_pgsql_utils",
    "content": "#compdef psql pg_dump pg_dumpall pg_restore createdb dropdb vacuumdb createuser dropuser initdb\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users, Dominic Mitchell, Johann 'Myrkraverk' Oskarsson, Daniel Serodio, J Smith\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for PostgreSQL utils (http://postgresql.org).\n#\n#  Source: http://www.zsh.org/mla/users/2004/msg01006.html\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Dominic Mitchell <dom+zsh@happygiraffe.net>\n#\n#  * Johann 'Myrkraverk' Oskarsson <johann@2ndquadrant.com>\n#\n#  * Daniel Serodio <dserodio@gmail.com> pg_dumpall completion\n#\n#  * J Smith <dark.panda@gmail.com> pg_restore completion\n#\n# ------------------------------------------------------------------------------\n\n\n_pgsql_get_identity () {\n    _pgsql_user=${(v)opt_args[(i)-U|--username]}\n    _pgsql_port=${(v)opt_args[(i)-p|--port]}\n    _pgsql_host=${(v)opt_args[(i)-h|--host]}\n\n    _pgsql_params=(\n        ${_pgsql_user:+\"--username=$_pgsql_user\"}\n        ${_pgsql_port:+\"--port=$_pgsql_port\"}\n        ${_pgsql_host:+\"--host=$_pgsql_host\"}\n    )\n}\n\n# Postgres Allows specifying the path to the directory containing the\n# socket as well as a hostname.\n_pgsql_host_or_dir() {\n    _alternative \\\n        'hosts:host:_hosts' \\\n        'directories:directory:_directories'\n}\n\n# This creates a port completion list based on socket files on the\n# local computer.  Be default, Postgres puts them in /tmp/ but Debian\n# changed that to /var/run/postgresql/ in their packages.\n_pgsql_ports() {\n    compadd \"$@\" - /tmp/.s.PGSQL.<->(N:e) /var/run/postgresql/.s.PGSQL.<->(N:e)\n}\n\n_pgsql_users () {\n    local _pgsql_user _pgsql_port _pgsql_host _pgsql_params\n    local _pgsql_user_sql\n    _pgsql_get_identity\n\n    # We use _pgsql_port and _pgsql_host directly here instead of\n    # _pgsql_params so as to not pick up a partially completed\n    # username.\n    _pgsql_params=(\n        ${_pgsql_port:+\"--port=$_pgsql_port\"}\n        ${_pgsql_host:+\"--host=$_pgsql_host\"}\n    )\n\n    _pgsql_user_sql='select r.rolname from pg_catalog.pg_roles r where r.rolcanlogin = true'\n\n    compadd \"$@\" - $( psql $_pgsql_params[@] -Aqt -c $_pgsql_user_sql template1 2>/dev/null )\n\n}\n\n_pgsql_tables () {\n    local _pgsql_user _pgsql_port _pgsql_host _pgsql_params\n    _pgsql_get_identity\n\n    # Need to pull out the database name from the existing arguments.\n    # This is going to vary between commands.  Thankfully, it's only\n    # used by pg_dump, which always has the dbname in arg1.  If it's\n    # not present it defaults to ${PGDATABASE:-$LOGNAME}, which\n    # matches (I think) the PostgreSQL behaviour.\n\n    local db\n    db=${line[1]:-${PGDATABASE:-$LOGNAME}}\n\n    ## Instead of parsing the output of the psql \\ commands, we look\n    ## up the tables ourselves.  The following query has been tested\n    ## with Postgres 8.2 - 9.2.\n\n    local _pgsql_table_sql\n    _pgsql_table_sql=\"select n.nspname || '.' || c.relname \\\n\tfrom pg_catalog.pg_class c \\\n\t\tleft join pg_catalog.pg_namespace n on n.oid = c.relnamespace \\\n\twhere c.relkind in ('r', '') \\\n\t\tand n.nspname <> 'pg_catalog' \\\n\t\tand n.nspname <> 'information_schema' \\\n\t\tand n.nspname !~ '^pg_toast' \\\n\t\tand pg_catalog.pg_table_is_visible( c.oid ) \\\n\torder by 1\"\n\n    compadd \"$@\" - \\\n        $( psql $_pgsql_params[@] -Aqt -c $_pgsql_table_sql $db 2>/dev/null )\n}\n\n_pgsql_schemas () {\n    local _pgsql_user _pgsql_port _pgsql_host _pgsql_params\n    _pgsql_get_identity\n\n    local db\n    db=${line[1]:-${PGDATABASE:-$LOGNAME}}\n\n    local _pgsql_schema_sql=\"select n.nspname \\\n        from pg_catalog.pg_namespace n \\\n        where n.nspname !~ '^pg_' \\\n            and n.nspname <> 'information_schema' \\\n        order by 1;\"\n\n    compadd \"$@\" - \\\n        $( psql $_pgsql_params[@] -Aqt -c $_pgsql_schema_sql $db 2>/dev/null )\n}\n\n_pgsql_databases () {\n    local _pgsql_user _pgsql_port _pgsql_host _pgsql_params\n    _pgsql_get_identity\n\n    local _pgsql_services _pgsql_service_files\n    _pgsql_service_files=(\n      ~/.pg_service.conf\n      $(pg_config --sysconfdir)/pg_service.conf\n    )\n    _pgsql_services=$( grep -h '^\\[.*\\]' $_pgsql_service_files 2>/dev/null \\\n                         | sed -e 's/^\\[/service=/' -e 's/\\].*$//' )\n\n    local _pgsql_db_sql\n    _pgsql_db_sql=\"select d.datname from pg_catalog.pg_database d \\\n\twhere d.datname <> 'template0'\"\n\n    compadd \"$@\" - \\\n            ${(f)_pgsql_services} \\\n            $( psql $_pgsql_params[@] -Atq -c $_pgsql_db_sql template1 2>/dev/null )\n}\n\n_pgsql_encodings () {\n    local _pgsql_user\n    _pgsql_get_identity\n\n    local _pgsql_db_sql\n    _pgsql_db_sql=\"select pg_encoding_to_char(i) from generate_series(0,100) i;\"\n\n    compadd \"$@\" - $( psql $_pgsql_params[@] -Atq -c $_pgsql_db_sql template1  )\n}\n\n\n##\n## The actual completion code for the commands\n##\n\n_psql () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \"-*\" \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-V,--version}'[display client version]' \\\n        {-a,--echo-all}'[print commands read]' \\\n        {-A,--no-align}'[unaligned output mode]' \\\n        {-c+,--command=}':execute SQL command:' \\\n        {-d+,--dbname=}':database to connect to:_pgsql_databases' \\\n        {-b,--echo-errors}'[echo failed commands]' \\\n        {-e,--echo-queries}'[display queries submitted]' \\\n        {-E,--echo-hidden}'[display hidden queries]' \\\n        {-L,--log-file=}'[send session log to file]' \\\n        {-n,--no-readline}'[disable enhanced command line editing (readline)]' \\\n        {-f+,--file=}':SQL file to read:_files' \\\n        {-F+,--field-separator=}':field separator char:' \\\n        {-H,--html}'[HTML output]' \\\n        {-l,--list}'[list databases]' \\\n        {-o+,--output=}':query output:_files' \\\n        {-P+,--pset=}':set psql variable:' \\\n        {-q,--quiet}'[non verbose mode]' \\\n        {-R+,--record-separator=}':record separator char:' \\\n        {-s,--single-step}'[prompt before each query]' \\\n        {-S,--single-line}'[newline sends query]' \\\n        {-t,--tuples-only}'[dont display header/footer]' \\\n        {-T+,--table-attr=}':HTML table options:' \\\n        -u'[prompt for username/password]' \\\n        {-v+,--set=,--variable=}':set SQL variable:' \\\n        {-x,--expanded}'[one column per line]' \\\n        {-z,--field-separator-zero}'[set field separator for unaligned output to zero byte]' \\\n        {-0,--record-separator-zero}'[set record separator for unaligned output to zero byte]' \\\n        {-X,--no-psqlrc}'[dont read ~/.psqlrc]' \\\n        ':PostgreSQL database:_pgsql_databases' \\\n        ':PostgreSQL user:_pgsql_users'\n}\n\n_pg_dump () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-a,--data-only}'[dump only data]' \\\n        {-b,--blobs}'[dump blobs as well]' \\\n        {-c,--clean}'[include clean cmds in dump]' \\\n        {-C,--create}'[include createdb cmds in dump]' \\\n        {-E+,--encoding=}':database encoding:_pgsql_encodings' \\\n        {-d,--inserts}'[use INSERT not COPY]' \\\n        {-D,--{attribute,column}-inserts}'[use INSERT (cols) not COPY]' \\\n        {-f+,--file=}':output file:_files' \\\n        {-F+,--format=}':output format:_values \"format\" \"p[plain text]\" \"t[tar]\" \"c[custom]\"' \\\n        {-j,--jobs=}'[use this many parallel jobs to dump]' \\\n        {-i,--ignore-version}'[ignore version mismatch]' \\\n        {-n+,--schema=}':schema to dump:_pgsql_schemas' \\\n        {-N+,--exclude-schema=}':schema to NOT dump:_pgsql_schemas' \\\n        {-o,--oids}'[dump objects identifiers for every table]' \\\n        {-O,--no-owner}'[dont recreate as same owner]' \\\n        {-R,--no-reconnect}'[dont output connect]' \\\n        {-s,--schema-only}'[no data, only schema]' \\\n        {-S+,--superuser=}':superuser name:_pgsql_users' \\\n        {-t+,--table=}':table to dump:_pgsql_tables' \\\n        {-T+,--exclude-table=}':table to NOT dump:_pgsql_tables' \\\n        {-v,--verbose}'[verbose mode]' \\\n        {-V,--version}'[display client version]' \\\n        {-x,--no-{acl,privileges}}'[dont dump ACLs]' \\\n        -X+':option:_values \"option\" use-set-session-authorization disable-triggers' \\\n        {-Z+,--compress=}':compression level:_values \"level\" 9 8 7 6 5 4 3 2 1 0' \\\n        ':PostgreSQL database:_pgsql_databases' \\\n        --section=':dump named section:_values \"section\" pre-data data post-data' \\\n        --binary-upgrade'[for use by upgrade utilities only]' \\\n        --column-inserts'[dump data as INSERT commands with column names]' \\\n        --disable-dollar-quoting'[disable dollar quoting, use SQL standard quoting]' \\\n        --disable-triggers'[disable triggers during data-only restore]' \\\n        --enable-row-security'[enable row security (dump only content user has access to)]' \\\n        --exclude-table-data='[do NOT dump data for the named table(s)]' \\\n        --if-exists'[use IF EXISTS when dropping objects]' \\\n        --inserts'[dump data as INSERT commands, rather than COPY]' \\\n        --lock-wait-timeout='[fail after waiting TIMEOUT for a table lock]' \\\n        --no-security-labels'[do not dump security label assignments]' \\\n        --no-synchronized-snapshots'[do not use synchronized snapshots in parallel jobs]' \\\n        --no-tablespaces'[do not dump tablespace assignments]' \\\n        --no-unlogged-table-data'[do not dump unlogged table data]' \\\n        --quote-all-identifiers'[quote all identifiers, even if not key words]' \\\n        --serializable-deferrable'[wait until the dump can run without anomalies]' \\\n        --snapshot='[use given snapshot for the dump]' \\\n        --strict-names'[require table and/or schema include patterns to match at least one entity each]' \\\n        --use-set-session-authorization'[use SET SESSION AUTHORIZATION commands instead of ALTER OWNER]'\n}\n\n_pg_restore () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-d+,--dbname=}':database to connect to:_pgsql_databases' \\\n        {-f+,--file=}':output file:_files' \\\n        {-F+,--format=}':output format:_values \"format\" \"p[plain text]\" \"t[tar]\" \"c[custom]\"' \\\n        {-l,--list}'[list databases]' \\\n        {-a,--data-only}'[dump only data]' \\\n        {-c,--clean}'[include clean (drop) cmds before recreating]' \\\n        {-C,--create}'[include createdb cmds in dump]' \\\n        {-e,--exit-on-error}'[exit on error, default is to continue]' \\\n        {-I,--index=}':index name:' \\\n        {-j,--jobs=}':use this many parallel jobs to restore:' \\\n        {-L,--use-list=}':use table of contents from this file for selecting/ordering output:' \\\n        {-n,--schema=}':restore only objects in this schema:' \\\n        {-O,--no-owner}'[skip restoration of object ownership]' \\\n        {-P,--function=}':restore named function:' \\\n        {-s,--schema-only}'[restore only the schema, no data]' \\\n        {-S,--superuser=}':superuser user name to use for disabling triggers:' \\\n        {-t,--table=}':restore named table:' \\\n        {-T,--trigger=}':restore named trigger:' \\\n        {-x,--no-privileges}'[skip restoration of access privileges (grant/revoke)]' \\\n        {-1,--single-transaction}'[restore as a single transaction]' \\\n        {-v,--verbose}'[verbose mode]' \\\n        {-V,--version}'[display client version]' \\\n        --disable-triggers'[disable triggers during data-only restore]' \\\n        --if-exists'[use IF EXISTS when dropping objects]' \\\n        --no-data-for-failed-tables'[do not restore data of tables that could not be created]' \\\n        --no-security-labels'[do not restore security labels]' \\\n        --no-tablespaces'[do not restore tablespace assignments]' \\\n        --section=':dump named section:_values \"section\" pre-data data post-data' \\\n        --use-set-session-authorization'[use SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to set ownership]'\n}\n\n_pg_dumpall () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-a,--data-only}'[dump only data]' \\\n        {-c,--clean}'[include clean (drop) cmds before recreating]' \\\n        {-g,--globals-only}'[dump only global objects, no databases]' \\\n        {-f+,--file=}':output file:_files' \\\n        {-o,--oids}'[dump objects identifiers for every table]' \\\n        {-O,--no-owner}'[dont recreate as same owner]' \\\n        {-r,--roles-only}'[no databases or tablespaces, only roles]' \\\n        {-s,--schema-only}'[no data, only schema]' \\\n        {-S+,--superuser=}':superuser name:_pgsql_users' \\\n        {-t,--tablespaces-only}'[no databases or roles, only tablespaces]' \\\n        {-x,--no-privileges}'[dont dump ACLs]' \\\n        --binary-upgrade'[for use by upgrade utilities only]' \\\n        --column-inserts'[use INSERT with column names not COPY]' \\\n        --disable-dollar-quoting'[disable dollar quoting, use SQL standard quoting]' \\\n        --disable-triggers'[disable triggers during data-only restore]' \\\n        --inserts'[use INSERT not COPY]' \\\n        --no-security-labels'[do not dump security label assignments]' \\\n        --no-tablespaces'[do not dump tablespace assignments]' \\\n        --no-unlogged-table-data'[do not dump unlogged table data]' \\\n        --quote-all-identifiers'[quote all identifiers, even if not key words]' \\\n        --use-set-session-authorization'[use SET SESSION AUTHORIZATION cmds instead of ALTER OWNER]'\n}\n\n_createdb () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-e,--echo}'[display SQL queries]' \\\n        {-q,--quiet}'[non verbose mode]' \\\n        {-D+,--location=}':database location:_directories' \\\n        {-T+,--template=}':database template:_pgsql_databases' \\\n        {-E+,--encoding=}':database encoding:_pgsql_encodings' \\\n        ':PostgreSQL database:' \\\n        ':comment:'\n}\n\n_dropdb () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-e,--echo}'[display SQL queries]' \\\n        {-q,--quiet}'[non verbose mode]' \\\n        {-i,--interactive}'[confirm before drop]' \\\n        ':PostgreSQL database:_pgsql_databases'\n}\n\n_vacuumdb () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-a,--all}'[vacuum all databases]' \\\n        {-d+,--dbname=}':database to connect to:_pgsql_databases' \\\n        {-t+,--table=}':table to dump:_pgsql_tables' \\\n        {-f,--full}'[do full vacuuming]' \\\n        {-z,--analyze}'[update optimizer hints]' \\\n        {-e,--echo}'[show the commands being sent to the server]' \\\n        {-q,--quiet}'[do not write any messages]' \\\n        {-v,--verbose}'[write a lot of output]' \\\n        '--help[show this help, then exit]' \\\n        '--version[output version information, then exit]' \\\n        '1:PostgreSQL database:_pgsql_databases'\n}\n\n_createuser () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-e,--echo}'[display SQL queries]' \\\n        {-c,--connection-limit=}'[connection limit for role (default: no limit)]' \\\n        {-d,--createdb}'[role can create new databases]' \\\n        {-D,--no-createdb}'[role cannot create databases]' \\\n        {-E,--encrypted}'[encrypt stored password]' \\\n        {-g,--role=}'[new role will be a member of this role]' \\\n        {-i,--inherit}'[role inherits privileges of roles it is a member of (default)]' \\\n        {-I,--no-inherit}'[role does not inherit privileges]' \\\n        {-l,--login}'[role can login (default)]' \\\n        {-L,--no-login}'[role cannot login]' \\\n        {-N,--unencrypted}'[do not encrypt stored password]' \\\n        {-P,--pwprompt}'[assign a password to new role]' \\\n        {-r,--createrole}'[role can create new roles]' \\\n        {-R,--no-createrole}'[role cannot create roles]' \\\n        {-s,--superuser}'[role will be superuser]' \\\n        {-S,--no-superuser}'[role will not be superuser]' \\\n        {--interactive}'[prompt for missing role name and attributes rather than using defaults]' \\\n        {--replication}'[role can initiate replication]' \\\n        {--no-replication}'[role cannot initiate replication]' \\\n}\n\n_dropuser () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        \"$_pgsql_common_opts[@]\" \\\n        {-e,--echo}'[display SQL queries]' \\\n        {-q,--quiet}'[non verbose mode]' \\\n        {-i,--interactive}'[prompt before deleting anything, and prompt for role name if not specified]' \\\n        ':PostgreSQL user:_pgsql_users'\n}\n\n_initdb () {\n    local curcontext=\"$curcontext\" state line expl\n    typeset -A opt_args\n\n    _arguments -C -s \\\n        {--auth=,-A+}':default authentication method for local connections:_values \"auth methods\" $_pgsql_auth_methods[@]' \\\n        --auth-host=':default authentication method for local TCP/IP connections:_values \"auth methods\" $_pgsql_auth_methods[@]' \\\n        --auth-local=':default authentication method for local-socket connections:_values \"auth methods\" $_pgsql_auth_methods[@]' \\\n        {-D+,--pgdata=}':location for this database cluster:_files' \\\n        {-E+,--encoding=}':set default encoding for new databases:' \\\n        --locale=':set default locale for new databases:' \\\n        --lc-collate=':set the default locale for collate:' \\\n        --lc-ctype=':set the default locale for ctype:' \\\n        --lc-messages=':set the default locale for messages:' \\\n        --lc-monetary=':set the default locale for monetary:' \\\n        --lc-numeric=':set the default locale for numeric:' \\\n        --lc-time=':set the default local for time:' \\\n        --no-locale'[equivalent to --locale=C]' \\\n        --pwfile=':read password for the new superuser from file:_files' \\\n        {-T+,--text-search-config=}'[default text search configuration]' \\\n        {-U+,--username=NAME}':database superuser name:' \\\n        {-W,--pwprompt}'[prompt for a password for the new superuser]' \\\n        {-X+,--xlogdir=}':location for the transaction log directory:_files' \\\n        {-d,--debug}'[generate lots of debugging output]' \\\n        -L+':where to find the input files:_files' \\\n        {-k,--data-checksums}':use data page checksums:' \\\n        {-n,--noclean}'[do not clean up after errors]' \\\n        {-N,--nosync}':do not wait for changes to be written safely to disk:' \\\n        {-s,--show}'[show internal settings]' \\\n        {-S,--sync-only}'[only sync data directory]' \\\n        ':location for this database cluster:_files'\n}\n\n_pgsql_utils () {\n    local _pgsql_common_opts _pgsql_auth_methods\n\n    _pgsql_common_opts=(\n        {-\\?,--help}'[display help]'\n        {-h+,--host=}':database host:_pgsql_host_or_dir'\n        {-p+,--port=}':database port number:_pgsql_ports'\n        {-U+,--username=}':connect as user:_pgsql_users'\n        {-W,--password}'[prompt for password]'\n        --role='[do SET ROLE before restore]'\n    )\n\n    _pgsql_auth_methods=(\n        trust\n        reject\n        md5\n        password\n        gss\n        sspi\n        krb5\n        ident\n        peer\n        ldap\n        radius\n        cert\n        pam\n    )\n\n    case \"$service\" in\n        psql)     _psql \"$@\"     ;;\n        pg_dump)  _pg_dump \"$@\"  ;;\n        pg_restore)  _pg_restore \"$@\" ;;\n        createdb) _createdb \"$@\" ;;\n        dropdb)   _dropdb \"$@\"   ;;\n        vacuumdb) _vacuumdb \"$@\"   ;;\n        createuser) _createuser \"$@\" ;;\n        dropuser) _dropuser \"$@\" ;;\n        initdb) _initdb \"$@\"     ;;\n    esac\n}\n\n_pgsql_utils \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_phing",
    "content": "#compdef phing\n# ------------------------------------------------------------------------------\n# Copyright (c) Igor M. Timoshenko <igor.timoshenko@i.ua>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is furnished\n# to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Phing (http://phing.info).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Igor Timoshenko <igor.timoshenko@i.ua>\n#\n# ------------------------------------------------------------------------------\n\n_phing() {\n  local context curcontext=\"$curcontext\" state line ret=1\n  integer NORMARG\n  typeset -A opt_args\n\n  # Follow http://phing.info/docs/stable/webhelp/sec.commandlineargs.html for more information\n  _arguments \\\n    '(-h -help)'{-h,-help}'[display the help screen]' \\\n    '(-v -version)'{-v,-version}'[print version information and exit]' \\\n    '(-l -list)'{-l,-list}'[list all available targets in buildfile (excluding targets that have their hidden attribute set to true)]' \\\n    '(-q -quiet)'{-q,-quiet}'[quiet operation, no output at all]' \\\n    '-verbose[verbose, give some more output]' \\\n    '-debug[output debug information]' \\\n    '-logfile [use given file for log]:file:_files' \\\n    '-D[set the property to the specified value to be used in the buildfile]' \\\n    '-find []:file:_files' \\\n    '-buildfile [specify an alternate buildfile name. Default is build.xml]:file:_files' \\\n    '-logger [specify an alternate logger. Default is phing.listener.DefaultLogger. Other options include phing.listener.NoBannerLogger, phing.listener.AnsiColorLogger, phing.listener.XmlLogger, phing.listener.TargetLogger and phing.listener.HtmlColorLogger]' \\\n    '-propertyfile [load properties from the specified file]:file:_files' \\\n    '(-v --version)'{-v,--version}'[show version]' \\\n    '1: :->targets' \\\n    '*:: :->args' \\\n  && ret=0\n\n  case $state in\n    targets)\n      local buildfile; buildfile=build.xml\n      if [[ ! -f $buildfile ]]\n      then\n        ret=0\n      else\n        local targets; targets=($(sed -nE \"/<target /s/.*name=[\\\"'](\\w+)[\\\"'].*/\\1/p\" $buildfile))\n        _describe -t 'targets' 'target' targets && ret=0\n      fi\n    ;;\n    args)\n      if [[ CURRENT -eq NORMARG && ${+opt_args[--match]} -eq 0 ]]\n      then\n        # If the current argument is the first non-option argument\n        # and --match isn't present then a pattern is expected\n        _message -e patterns 'pattern' && ret=0\n      else\n        _files\n      fi\n    ;;\n  esac\n\n  return ret\n}\n\n_phing \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_pixz",
    "content": "#compdef pixz\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for pixz a parallel, indexing version of xz. (https://github.com/vasi/pixz).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\nlocal -a files index\nfiles=()\nindex=()\n\n_pixz_compressed_files() {\n    files=(\"${(f)$(ls -l | grep '.tpxz$\\|.xz$' | rev | cut -d' ' -f1 | rev)}\")\n}\n\n_pixz_load_file_index() {\n    index=(\"${(f)$(pixz -l $1)}\")\n}\n\n_pixz() {\n\n    _arguments -C \\\n      '(- 1 *)'-h\"[Show help and exit]\" \\\n      '(- 1 *)'-l\"[List tarball contents very fast]:file:->xzfiles\" \\\n      '(- 1 *)'-x\"[Extract one file very fast]:filepath:->filepath\" \\\n      '(- 1 *)'-d\"[Decompress]:file:->xzfiles\" \\\n      \"-i[Input]:file:->files\" \\\n      \"-o[Output]:output:->outputxz\" \\\n      \"-p[Use a maximum of NUM CPU-intensive threads]:cpu:->cpus\" \\\n      \"-t[Don't assume input is in tar format]\" \\\n      \"-k[Keep original input (do not remove it)]\" \\\n      \"-e[Use \"extreme\" compression, which is much slower]\" \\\n      \"-f[Set the size of each compression block, relative to the LZMA dictionary size (default is 2.0)]:num\" \\\n      \"-q[Set the number of blocks to allocate for the compression queue (default is 1.3 * cores + 2)]:num\" \\\n      '1:inputfile:->files' \\\n      '2:outputfile' \\\n      '*: : :->args' \\\n\n    case \"$state\" in\n      (cmds)\n            _describe -t commands 'commands' commands\n      ;;\n      (xzfiles)\n            _pixz_compressed_files\n            _describe -t files 'files' files\n      ;;\n      (files)\n          _files\n      ;;\n      (cpus)\n          local num_cpus cores\n          num_cpus=$(nproc)\n          cores=()\n          for i in {1..$num_cpus}; do\n              cores+=($i)\n          done\n          _describe -t cores 'cores' cores\n      ;;\n      (filepath)\n      ;;\n      (*)\n      ;;\n    esac\n}\n\n_pixz\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_pkcon",
    "content": "#compdef pkcon\n# ------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for pkcon (http://www.packagekit.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\nlocal -a options\noptions=(\n  '--version[Show the program version and exit]'\n  '--filter[Set the filter, e.g. installed]'\n  \"--root[Set the install root, e.g. '/' or '/mnt/ltsp']\"\n  '(-n --nowait)'{-n,--nowait}'[Exit without waiting for actions to complete]'\n  '(-y --noninteractive)'{-g,--noninteractive}'[Install the packages without asking for confirmation]'\n  '--background[Run the command using idle network bandwidth and also using less power]'\n  '(-p --plain)'{-p,--plain}'[Print to screen a machine readable output, rather than using animated widgets]'\n  '(-c --cache-age)'{-c,--cache-age}\"[The maximum metadata cache age. Use -1 for 'never'.]\"\n  '(-h --help)'{-h,--help}'[Show help options.]'\n  '(-v --verbose)'{-v,--verbose}'[Show debugging information for all files]'\n)\n\nlocal -a actions\nactions=(\n  'accept-eula'\n  'get-roles'\n  'get-distro-upgrades'\n  'get-categories'\n  'get-actions'\n  'get-groups'\n  'get-filters'\n  'get-transactions'\n  'get-time'\n  'search'\n  'install'\n  'install-local'\n  'download'\n  'remove'\n  'update'\n  'refresh'\n  'resolve'\n  'get-updates'\n  'get-depends'\n  'get-requires'\n  'get-details'\n  'get-files'\n  'get-update-detail'\n  'get-packages'\n  'repo-list'\n  'repo-enable'\n  'repo-disable'\n  'repo-set-data'\n  'what-provides'\n  'upgrade-system'\n)\n\nlocal context state line expl cmd\nlocal -A opt_args\n\ninteger i=2\nwhile (( i < $#words )); do\n  case \"$words[$i]\" in\n    -*)\n      # skip option\n      (( i++ ))\n      continue\n    ;;\n  esac\n\n  if [[ -z \"$cmd\" ]]; then\n    cmd=\"$words[$i]\"\n    words[$i]=()\n    (( CURRENT-- ))\n  fi\n  (( i++ ))\ndone\n\nif [[ -z \"$cmd\" ]]\nthen\n  _arguments -s -w : $options \\\n    \":action:($actions)\"\n  return\nfi\n\ncase \"$cmd\" in\n  search)\n    _arguments : $options \\\n      ':type:(name details group file)' \\\n      ':data: :'\n  ;;\n  refresh)\n    _arguments -s -w : $options \\\n      '--force'\n  ;;\n  *)\n    _arguments -s -w : $options\n  ;;\nesac\nreturn 1\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_play",
    "content": "#compdef play\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Play! framework 1.2.2 (http://www.playframework.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#  * Mario Fernandez (https://github.com/sirech)\n#\n# ------------------------------------------------------------------------------\n\n\n_play() {\n  local context curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  local ret=1\n\n  _arguments -C \\\n    '1: :_play_cmds' \\\n    '*::arg:->args' \\\n  && ret=0\n\n  case $state in\n    (args)\n      curcontext=\"${curcontext%:*:*}:play-cmd-$words[1]:\"\n      case $line[1] in\n        (build-module|list-modules|lm|check|id)\n          _message 'no more arguments' && ret=0\n        ;;\n        (dependencies|deps)\n          _arguments \\\n            '1:: :_play_apps' \\\n            '(--debug)--debug[Debug mode (even more informations logged than in verbose mode)]' \\\n            '(--jpda)--jpda[Listen for JPDA connection. The process will  suspended until a client is plugged to the JPDA port.]' \\\n            '(--sync)--sync[Keep lib/ and modules/ directory synced. Delete unknown dependencies.]' \\\n            '(--verbose)--verbose[Verbose Mode]' \\\n          && ret=0\n        ;;\n        (clean|javadoc|jd|out|pid|secret|stop)\n          _arguments '1:: :_play_apps' && ret=0\n        ;;\n        (help)\n          _arguments '1: :_play_cmds -F \"(cp deps ec idea jd st lm nb nm help antify evolutions evolutions:apply evolutions:markApplied evolutions:resolve)\"' && ret=0\n        ;;\n        (status|st)\n          _arguments \\\n            '1:: :_play_apps' \\\n            '(--url)--url[If you want to monitor an application running on a remote server, specify the application URL using this option]:URL:_urls' \\\n            '(--secret)--secret[You can provide your own secret key using this option]:Secret key' \\\n          && ret=0\n        ;;\n        (new)\n          _arguments \\\n            '1: :_play_apps' \\\n            '(--with)--with[Automatically enable this set of module for the newly created application]:Modules list:_play_modules_list' \\\n          && ret=0\n        ;;\n        (install)\n          _arguments '1:Play! module:_play_modules_dash_versions' && ret=0\n        ;;\n        (new-module)\n          _arguments '1:Module directory:_files -/' && ret=0\n        ;;\n        (test|precompile|run|start|war|auto-test|classpath|cp|eclipsify|ec|idealize|idea|modules|netbeansify|nb)\n          local cmd_args; cmd_args=(\n            '1:: :_play_apps'\n            '(--deps)--deps[Resolve and install dependencies before running the command]'\n          )\n          case $line[1] in\n            (precompile|run|start|restart|war)\n              local app_dir=\"$line[2]\"\n              [[ -d \"$app_dir\" ]] || app_dir=.\n              [[ -f \"$app_dir/conf/application.conf\" ]] && cmd_args+=('--'${(u)${(M)$(<$app_dir/conf/application.conf):#%*}%%.*}'[Use this ID to run the application (override the default framework ID)]')\n            ;|\n            (test|run)\n              cmd_args+=('(-f)-f[Disable the JPDA port checking and force the jpda.port value]')\n            ;|\n            (war)\n              cmd_args+=(\n                '(-o --output)'{-o,--output}'[The path where the WAR directory will be created. The contents of this directory will first be deleted]:output directory:_files -/'\n                '(--zip)--zip[By default, the script creates an exploded WAR. If you want a zipped archive, specify the --zip option]'\n                '(--exclude)--exclude[Excludes a list of colon separated directories]:excluded directories list:_play_colon_dirs_list'\n              )\n            ;|\n            (test|run|start|restart|war)\n              cmd_args+=('*:Java option')\n            ;;\n          esac\n          _arguments \"$cmd_args[@]\" && ret=0\n        ;;\n        *)\n          _call_function ret _play_cmd_$words[1] && ret=0\n          (( ret )) && _message 'no more arguments'\n        ;;\n      esac\n    ;;\n  esac\n}\n\n# FIXME Completes only core commands, some modules add commands too (eg Maven). Where do we get them ?\n# FIXME Parse 'play help' and 'play help <command>' (for aliases) instead of hard-coding.\n(( $+functions[_play_cmds] )) ||\n_play_cmds() {\n  local commands; commands=(\n    'antify:Create a build.xml file for this project'\n    'auto-test:Automatically run all application tests'\n    'build-module:Build and package a module'\n    'check:Check for a release newer than the current one'\n    {classpath,cp}':Display the computed classpath'\n    'clean:Delete temporary files (including the bytecode cache)'\n    {dependencies,deps}':Resolve and retrieve project dependencies'\n    {eclipsify,ec}':Create all Eclipse configuration files'\n    'evolutions:Run the evolution check'\n    'evolutions\\:apply:Automatically apply pending evolutions'\n    'evolutions\\:mark:AppliedMark pending evolutions as manually applied'\n    'evolutions\\:resolve:Resolve partially applied evolution'\n    'help:Display help on a specific command'\n    'id:Define the framework ID'\n    {idealize,idea}':Create all IntelliJ Idea configuration files'\n    'install:Install a module'\n    {javadoc,jd}':Generate your application Javadoc'\n    {list-modules,lm}':List modules available from the central modules repository'\n    'modules:Display the computed modules list'\n    {netbeansify,nb}':Create all NetBeans configuration files'\n    'new:Create a new application'\n    {new-module,nm}':Create a module'\n    'out:Follow logs/system.out file'\n    'pid:Show the PID of the running application'\n    'precompile:Precompile all Java sources and templates to speed up application start-up'\n    'restart:Restart the running application'\n    'run:Run the application in the current shell'\n    'secret:Generate a new secret key'\n    'start:Start the application in the background'\n    {status,st}':Display the running application status'\n    'stop:Stop the running application'\n    'test:Run the application in test mode in the current shell'\n    'war:Export the application as a standalone WAR archive'\n  )\n  _describe -t commands 'Play! command' commands \"$@\"\n}\n\n(( $+functions[_play_apps] )) ||\n_play_apps() {\n  _wanted application expl 'Play! application directory' _files -/\n}\n\n(( $+functions[_play_modules] )) ||\n_play_modules() {\n  local modules; modules=(${(ps:,:)${${${(S)${(f)$(_call_program modules $service list-modules)}//\\]*\\[/,}%%\\]*}##*\\[}})\n  _describe -t modules 'Play! module' modules \"$@\"\n}\n\n(( $+functions[_play_modules_dash_versions] )) ||\n_play_modules_dash_versions() {\n  local ret=1\n  if compset -P '*-'; then\n    local versions; versions=(${(ps:,:)${${${${${(f)$(_call_program versions $service list-modules)}##*${IPREFIX%-}\\]}#*Versions:}%%\"~\"*}//[[:space:]]/}})\n    _describe -t module-versions \"${IPREFIX%-} module versions\" versions && ret=0\n  else\n    _wanted modules expl 'Play! module' _play_modules -qS- && ret=0\n  fi\n}\n\n(( $+functions[_play_modules_list] )) ||\n_play_modules_list() {\n  compset -P '*,'; compset -S ',*'\n  _wanted module-list expl 'Play! modules list' _play_modules -qS,\n}\n\n(( $+functions[_play_colon_dirs_list] )) ||\n_play_colon_dirs_list() {\n  compset -P '*:'; compset -S ':*'\n  _wanted directories-list expl 'Directories list' _files -/ -qS:\n}\n\n_play \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_port",
    "content": "#compdef port\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for MacPorts (http://www.macports.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Matt Cable <wozz@wookie.net>\n#  * Sorin Ionescu <sorin.ionescu@gmail.com>\n#  * Aljaž Srebrnič <a2piratesoft@gmail.com>\n# -----------------------------------------------------------------------------\n# License\n# -------\n#\n# Copyright (c) 2016, Matt Cable, Sorin Ionescu, Aljaž Srebrnič\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the <organization> nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n# ------------------------------------------------------------------------------\n\n_port() {\n  local -a  upgrade_options revupgrade_options select_options \\\n              actions pseudo_common pseudo_advanced port_prefix\n\n  port_prefix=$(which port | sed 's|/bin/port||')\n\n  actions=(\n    'activate\\:Activate\\ the\\ given\\ ports'\n    'archive\\:Archive\\ the\\ given\\ ports,\\ i.e.\\ install\\ the\\ port\\ image\\ but\\ do\\ not\\ activate'\n    'archivefetch\\:Fetch\\ archive\\ for\\ the\\ given\\ ports'\n    'build\\:Build\\ the\\ given\\ ports'\n    'cat\\:Writes\\ the\\ Portfiles\\ of\\ the\\ given\\ ports\\ to\\ stdout'\n    'checksum\\:Compares\\ the\\ checksums\\ for\\ the\\ downloaded\\ files\\ of\\ the\\ given\\ ports'\n    'clean\\:Removes\\ files\\ associated\\ with\\ the\\ given\\ ports'\n    'configure\\:Configure\\ the\\ given\\ ports'\n    'contents\\:\\Returns\\ a\\ list\\ of\\ files\\ installed\\ by\\ given\\ ports'\n    'deactivate\\:Deactivates\\ the\\ given\\ ports'\n    'dependents\\:Returns\\ a\\ list\\ of\\ installed\\ dependents\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'deps\\:Display\\ a\\ dependency\\ listing\\ for\\ the\\ given\\ ports'\n    'destroot\\:Destroot\\ the\\ given\\ ports'\n    'dir\\:Returns\\ the\\ directories\\ of\\ the\\ given\\ ports'\n    'distcheck\\:Checks\\ if\\ the\\ given\\ ports\\ can\\ be\\ fetched\\ from\\ all\\ of\\ its\\ master_sites'\n    'distfiles\\:Returns\\ a\\ list\\ of\\ distfiles\\ for\\ the\\ given\\ port'\n    'dmg\\:Creates\\ a\\ dmg\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'dpkg\\:Creates\\ a\\ dpkg\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'echo\\:Returns\\ the\\ list\\ of\\ ports\\ the\\ argument\\ expands\\ to'\n    'edit\\:Edit\\ given\\ ports'\n    'extract\\:Extract\\ the\\ downloaded\\ files\\ of\\ the\\ given\\ ports'\n    'fetch\\:Downloaded\\ distfiles\\ for\\ the\\ given\\ ports'\n    'file\\:Returns\\ the\\ path\\ to\\ the\\ Portfile\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'gohome\\:Opens\\ the\\ homepages\\ of\\ the\\ given\\ ports\\ in\\ your\\ browser'\n    'help\\:Displays\\ short\\ help\\ texts\\ for\\ the\\ given\\ actions'\n    'info\\:Returns\\ information\\ about\\ the\\ given\\ ports '\n    'install\\:Installs\\ the\\ given\\ ports'\n    'installed\\:List\\ installed\\ versions\\ of\\ the\\ given\\ port,\\ or\\ all\\ installed\\ ports\\ if\\ no\\ port\\ is\\ given'\n    'lint\\:Checks\\ if\\ the\\ Portfile\\ is\\ lint-free\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'list\\:List\\ the\\ available\\ version\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'livecheck\\:Checks\\ if\\ a\\ new\\ version\\ of\\ the\\ software\\ is\\ available'\n    'load\\:Interface\\ to\\ launchctl(1)\\ for\\ ports\\ providing\\ startup\\ items'\n    'location\\:Returns\\ the\\ install\\ location\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'log\\:Shows\\ main\\ log\\ for\\ given\\ ports'\n    'logfile\\:Returns\\ the\\ log\\ file\\ path\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'mdmg\\:Creates\\ a\\ dmg\\ containing\\ an\\ mpkg\\ for\\ each\\ of\\ the\\ given\\ ports\\ and\\ their\\ dependencies'\n    'mirror\\:Fetches\\ distfiles\\ for\\ the\\ given\\ ports'\n    'mpkg\\:Creates\\ an\\ mpkg\\ for\\ each\\ of\\ the\\ given\\ ports\\ and\\ their\\ dependencies'\n    'notes\\:Displays\\ informational\\ notes\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'outdated\\:Returns\\ a\\ list\\ of\\ outdated\\ ports'\n    'patch\\:Applies\\ patches\\ to\\ each\\ of\\ the\\ given\\ ports'\n    'pkg\\:Creates\\ a\\ pkg\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'platform\\:Returns\\ the\\ current\\ platform\\ that\\ port\\ is\\ running\\ on'\n    'provides\\:Return\\ which\\ port\\ provides\\ each\\ of\\ the\\ files\\ given'\n    'rdependents\\:Recursive\\ version\\ of\\ dependents'\n    'rdeps\\:Display\\ a\\ recursive\\ dependency\\ listing\\ for\\ the\\ given\\ ports'\n    'rev-upgrade\\:Scan\\ for\\ broken\\ binaries\\ in\\ the\\ installed\\ ports\\ and\\ rebuild\\ them\\ as\\ needed'\n    'rpm\\:Creates\\ a\\ rpm\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'search\\:Search\\ for\\ a\\ port'\n    'select\\:Select\\ between\\ multiple\\ versions\\ of\\ a\\ versioned\\ port'\n    'selfupdate\\:Upgrade\\ MacPorts\\ itself\\ and\\ run\\ the\\ sync\\ target'\n    'setrequested\\:Marks\\ each\\ of\\ the\\ given\\ ports\\ as\\ requested'\n    'space\\:Show\\ the\\ disk\\ space\\ used\\ by\\ the\\ given\\ ports'\n    'srpm\\:Creates\\ a\\ srpm\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'sync\\:Synchronize\\ the\\ set\\ of\\ Portfiles'\n    'test\\:Run\\ tests\\ on\\ each\\ of\\ the\\ given\\ ports'\n    'unarchive\\:Unarchive\\ the\\ destroot\\ of\\ the\\ given\\ ports\\ from\\ installed\\ images'\n    'uninstall\\:Uninstall\\ the\\ given\\ ports'\n    'unload\\:Interface\\ to\\ launchctl(1)\\ for\\ ports\\ providing\\ startup\\ items'\n    'unsetrequested\\:Marks\\ each\\ of\\ the\\ given\\ ports\\ as\\ unrequested'\n    'upgrade\\:Upgrades\\ the\\ given\\ ports\\ to\\ the\\ latest\\ version'\n    'url\\:Returns\\ the\\ URL\\ for\\ each\\ of\\ the\\ given\\ ports'\n    'usage\\:Returns\\ basic\\ usage\\ of\\ the\\ port\\ command'\n    'variants\\:Returns\\ a\\ list\\ of\\ variants\\ provided\\ by\\ the\\ given\\ ports,\\ with\\ descriptions\\ if\\ present'\n    'version\\:Returns\\ the\\ version\\ of\\ MacPorts'\n    'work\\:Returns\\ the\\ path\\ to\\ the\\ work\\ directory\\ for\\ each\\ of\\ the\\ given\\ ports'\n  )\n\n  pseudo_common=(all current active inactive actinact installed uninstalled outdated\n  obsolete requested unrequested leaves)\n\n  pseudo_advanced=('variants:' 'variant:' 'description:' 'depends:'\n  'depends_lib:' 'depends_run:' 'depends_build:' 'depends_fetch:' 'depends_extract:'\n  'portdir:' 'homepage:' 'epoch:' 'platforms:' 'platform:' 'name:' 'long_description:'\n  'maintainers:' 'maintainer:' 'categories:' 'category:' 'version:' 'revision:' 'license:')\n\n  select_options=(\n  '--list:List available versions for the group'\n  '--set:Select the given version for the group'\n  '--show:Show which version is currently selected for the group (default if none given)'\n  )\n\n  revupgrade_options=('--id-loadcmd-check:Run more checks against a special loadcommand in Mach-O binaries')\n\n  upgrade_options=(\n    '--force\\:Ignore\\ circumstances\\ that\\ would\\ normally\\ cause\\ ports\\ to\\ be\\ skipped\\ \\(e.g.\\ not\\ outdated\\).' \\\n    '--enforce-variants\\:If\\ the\\ installed\\ variants\\ do\\ not\\ match\\ those\\ requested,\\ upgrade\\ even\\ if\\ the\\ port\\ is\\ not\\ outdated.' \\\n    '--no-replace\\:Do\\ not\\ replace\\ one\\ port\\ with\\ another\\ according\\ to\\ the\\ replaced_by\\ field.' \\\n  )\n\n  _arguments -s -C \\\n    '-v[Verbose mode (generate verbose messages)]' \\\n    '-d[Debug mode (generate debugging messages, implies -v)]' \\\n    '-q[Quiet mode (suppress messages)]' \\\n    \"-n[Don't upgrade dependencies (affects upgrade and install)]\" \\\n    \"-R[Also upgrade dependents (only affects upgrade) - note that this does not upgrade dependents' dependencies]\" \\\n    '-u[Uninstall non-active ports when upgrading and uninstalling]' \\\n    '-f[Force mode (ignore state file)]' \\\n    '-o[Honor state files even if the Portfile has been modified since (called -o because it used to mean \"older\")]' \\\n    '-s[Source-only mode (build and install from source, do not attempt to fetch binary archives)]' \\\n    '-b[Binary-only mode (build and install from binary archives, ignore source, abort if no archive available)]' \\\n    '-c[Autoclean mode (execute clean after install)]' \\\n    \"-k[Keep mode (don't autoclean after install)]\" \\\n    '-D[Specify portdir]' \\\n    '-F[Read and process the file of commands specified by the argument.]' \\\n    '-p[Despite any errors encountered, proceed to process multiple ports and commands.]' \\\n    '-y[Perform a dry run.]' \\\n    '-t[Enable trace mode debug facilities on platforms that support it (macOS).]' \\\n    \"1:Port actions:(($actions))\" \\\n    '::Per-action arguments:_port_dispatch' \\\n    && return 0\n}\n\n_port_dispatch() {\n  local cache_policy\n  zstyle -s \":completion:${curcontext}:\" cache-policy cache_policy\n  zstyle \":completion:${curcontext}:\" cache-policy ${cache_policy:-_port_caching_policy}\n\n  case \"$words[2]\" in\n    provides)\n      _files\n      ;;\n    search)\n      _message 'pattern'\n      ;;\n    help)\n      _describe -t actions 'Port actions' actions\n      ;;\n    select)\n      _call_function - _port_select\n      ;;\n    contents|deactivate|setrequested|space|uninstall|unsetrequested)\n      # Cache the list of installed ports.\n      if ( [[ ${+_port_installed_packages} -eq 0 ]] || _cache_invalid PORT_INSTALLED_PACKAGES ) &&\n        ! _retrieve_cache PORT_INSTALLED_PACKAGES;\n      then\n        _port_installed_packages=( $(_call_program path-all \"port -q echo installed\") )\n        _store_cache PORT_INSTALLED_PACKAGES _port_installed_packages\n      fi\n      _alternative \\\n        \"ports:Installed ports:($_port_installed_packages)\" \\\n        \"pseudo-common:Common Pseudo-portnames:($pseudo_common)\" \\\n        \"pseudo-advanced:Advanced Pseudo-portnames:($pseudo_advanced)\"\n      ;;\n    upgrade)\n      # No good reason to actually cache outdated ports list\n      local outdated_packages\n      outdated_packages=( $(_call_program path-outdated \"port -q echo outdated\") )\n      _alternative -- \\\n        \"upgrade-options:Upgrade options:(($upgrade_options))\" \\\n        \"ports:Outdated ports:($outdated_packages)\" \\\n        \"pseudo-common:Common Pseudo-portnames:($pseudo_common)\" \\\n        \"pseudo-advanced:Advanced Pseudo-portnames:($pseudo_advanced)\"\n      ;;\n    rev-upgrade)\n      if (( CURRENT == 3 )); then\n        _describe 'Rev-upgrade options' revupgrade_options\n      fi\n      ;;\n    outdated|sync)\n      # No need to complete anything more here.\n      return 0;\n      ;;\n    selfupdate)\n      _all_labels 'Selfupdate options' '--nosync'\n      ;;\n    *)\n      # Cache the list of all ports.\n      if ( [[ ${+_port_available_packages} -eq 0 ]] || _cache_invalid PORT_AVAILABLE_PACKAGES ) &&\n        ! _retrieve_cache PORT_AVAILABLE_PACKAGES;\n      then\n        _port_available_packages=( $(_call_program path-all \"port -q echo all\") )\n        _store_cache PORT_AVAILABLE_PACKAGES _port_available_packages\n      fi\n      _alternative \\\n        \"ports:Available ports:($_port_available_packages)\" \\\n        \"pseudo-common:Common Pseudo-portnames:($pseudo_common)\" \\\n        \"pseudo-advanced:Advanced Pseudo-portnames:($pseudo_advanced)\"\n      ;;\n  esac\n}\n\n_port_select() {\n  if (( CURRENT == 3 )); then\n    _describe 'Port select options' select_options\n  elif (( CURRENT == 4 )); then\n    local select_group\n    select_group=()\n    for f in $port_prefix/etc/select/*; do\n      select_group+=$(basename $f)\n    done\n    _describe \"Port select groups\" select_group\n  elif [[ $CURRENT -eq 5 && $words[3] == '--set' ]]; then\n    local select_variants\n    select_variants=(\"${(f)$(port select --list $words[4] | sed -e '1 d' -e 's/^[ \\t]*//' -e 's/ (active)$//')}\")\n    _describe \"Port select group $words[4] variants\" select_variants\n  fi\n}\n\nstat -f%m . > /dev/null 2>&1\nif [ \"$?\" = 0 ]; then\n  stat_cmd=(stat -f%Z)\nelse\n  stat_cmd=(stat --format=%Z)\nfi\n\n_port_caching_policy() {\n  local reg_time comp_time check_file\n  case \"${1##*/}\" in\n    PORT_INSTALLED_PACKAGES)\n      check_file=$port_prefix/var/macports/registry/registry.db\n      ;;\n    PORT_AVAILABLE_PACKAGES)\n      check_file=${$(port dir MacPorts)%/*/*}/PortIndex\n      ;;\n  esac\n  reg_time=$($stat_cmd $check_file)\n  comp_time=$($stat_cmd $1)\n  return $(( reg_time < comp_time ))\n}\n\n_port \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_pygmentize",
    "content": "#compdef pygmentize\n# ------------------------------------------------------------------------------\n# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for pygmentize.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Hideo Hattori <hhatto.jp@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_pygmentize() {\n  local context state line\n\n  _arguments -s -S \\\n    '-h[prints help]:' \\\n    '-V[prints the package version]:' \\\n    '-L[lists lexers, formatters, styles or filters]:args:(lexers formatters styles filters):' \\\n    '-f[formatter]:FORMATTER:_get_formatters' \\\n    '-o[output file]:FILENAME:_gnu_generic' \\\n    '(-h -V -L -f -o -S -F -H -g -l)-N[guesses and prints out a lexer name based solely on given filename]:FILENAME:_files:' \\\n    '(-h -V -L -o -F -H -g -l -N)-S[style]:STYLE:_get_styles' \\\n    '-F[filter]:STYLE:_get_filters' \\\n    '-H[prints detailed help for the object <name> of type <type>]:' \\\n    '(-g)-l[lexer]::LEXER:_get_lexers:' \\\n    '(-l)-g[attempt to guess the lexer from the file contents]' \\\n    '*:args:_gnu_generic'\n}\n\n\n_get_filters() {\n  local cache_policy\n  zstyle -s \":completion:${curcontext}:\" cache-policy cache_policy\n  if [[ -z \"$cache_policy\" ]]; then\n    zstyle \":completion:${curcontext}:\" cache-policy _pygmentize_caching_policy\n  fi\n\n  if ( [[ ${+_pygmentize_filters} -eq 0 ]] || _cache_invalid pygmentize_filters ) \\\n      && ! _retrieve_cache pygmentize_filters; then\n    _pygmentize_filters=(${${(f)\"$(pygmentize -L filters | grep '* ' | cut -c3- | sed -e 's/:$//')\"}})\n    _store_cache pygmentize_filters _pygmentize_filters\n  fi\n\n  local expl\n  _wanted pygmentize_filters expl 'pygmentize filters' compadd -a _pygmentize_filters\n}\n\n\n(( $+functions[_pygmentize_get_formatters] )) ||\n_get_formatters() {\n  local cache_policy\n  zstyle -s \":completion:${curcontext}:\" cache-policy cache_policy\n  if [[ -z \"$cache_policy\" ]]; then\n    zstyle \":completion:${curcontext}:\" cache-policy _pygmentize_caching_policy\n  fi\n\n  if ( [[ ${+_pygmentize_formatter} -eq 0 ]] || _cache_invalid pygmentize_formatter ) \\\n      && ! _retrieve_cache pygmentize_formatter; then\n    _pygmentize_formatter=(${${(f)\"$(pygmentize -L formatters | grep '* ' | cut -c3- | sed -e 's/, /\\n/g' -e 's/:$//')\"}})\n    _store_cache pygmentize_formatter _pygmentize_formatter\n  fi\n\n  local expl\n  _wanted pygmentize_formatter expl 'pygmentize formatters' compadd -a _pygmentize_formatter\n}\n\n\n_get_lexers() {\n  local cache_policy\n  zstyle -s \":completion:${curcontext}:\" cache-policy cache_policy\n  if [[ -z \"$cache_policy\" ]]; then\n    zstyle \":completion:${curcontext}:\" cache-policy _pygmentize_caching_policy\n  fi\n\n  if ( [[ ${+_pygmentize_lexer} -eq 0 ]] || _cache_invalid pygmentize_lexer ) \\\n      && ! _retrieve_cache pygmentize_lexer; then\n    _pygmentize_lexer=(${${(f)\"$(pygmentize -L lexers | grep '* ' | cut -c3- | sed -e 's/, /\\n/g' -e 's/:$//')\"}})\n    _store_cache pygmentize_lexer _pygmentize_lexer\n  fi\n\n  local expl\n  _wanted pygmentize_lexer expl 'pygmentize lexers' compadd -a _pygmentize_lexer\n}\n\n\n_get_styles() {\n  local cache_policy\n  zstyle -s \":completion:${curcontext}:\" cache-policy cache_policy\n  if [[ -z \"$cache_policy\" ]]; then\n    zstyle \":completion:${curcontext}:\" cache-policy _pygmentize_caching_policy\n  fi\n\n  if ( [[ ${+_pygmentize_style} -eq 0 ]] || _cache_invalid pygmentize_style ) \\\n      && ! _retrieve_cache pygmentize_style; then\n    _pygmentize_style=(${${(f)\"$(pygmentize -L styles | grep '* ' | cut -c3- | sed -e 's/:$//')\"}})\n    _store_cache pygmentize_style _pygmentize_style\n  fi\n\n  local expl\n  _wanted pygmentize_style expl 'pygmentize styles' compadd -a _pygmentize_style\n}\n\n\n_pygmentize_caching_policy() {\n  local -a oldp\n  oldp=( \"$1\"(Nmh+24) )     # 24 hour\n  (( $#oldp ))\n}\n\n_pygmentize \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_rails",
    "content": "#compdef rails\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Ruby on Rails (http://rubyonrails.org/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Kazuya Takeshima (https://github.com/mitukiii)\n#\n# ------------------------------------------------------------------------------\n\n\n_rails() {\n  local context state line curcontext=\"$curcontext\"\n\n  if (( CURRENT > 2 )); then\n    (( CURRENT-- ))\n    shift words\n    _call_function - \"_rails_${words[1]}\" || _nothing\n  else\n    __rails_commands\n  fi\n}\n\n__rails_commands() {\n  local context state line curcontext=\"$curcontext\"\n\n  local -a rails_options\n  __rails_setup_rails_options\n\n  _arguments -C \\\n    $rails_options \\\n    ': :->command'\n\n  case \"$state\" in\n    command)\n      local -a commands\n      local application_directory\n      __rails_setup_application_directory\n\n      if [ -n \"$application_directory\" ]; then\n        commands=(\n          {generate,g}'[Generate new code]'\n          {console,c}'[Start the Rails console]'\n          {server,s}'[Start the Rails server]'\n          {dbconsole,db}'[Start a console for the database specified in config/database.yml]'\n          application'[Generate the Rails application code]'\n          {destroy,d}'[Undo code generated with \"generate\"]'\n          benchmarker'[See how fast a piece of code runs]'\n          profiler'[Get profile information from a piece of code]'\n          plugin'[Install a plugin]'\n          {runner,r}'[Run a piece of code in the application environment]'\n          {test,t}'[Run tests]'\n        )\n      else\n        commands=(\n          new'[Create a new Rails application]'\n        )\n      fi\n\n      _values 'command' $commands\n      ;;\n  esac\n}\n\n__rails_setup_application_directory() {\n  application_directory=\"$(pwd)\"\n\n  while [ -n \"$application_directory\" ]; do\n    if [ -f \"${application_directory}/script/rails\" -o -f \"${application_directory}/bin/rails\" ]; then\n      return\n    fi\n    application_directory=\"${application_directory%/*}\"\n  done\n\n  application_directory=\n}\n\n__rails_setup_rails_options() {\n  rails_options=(\n    {-h,--help}'[Show this help message and quit]'\n    {-v,--version}'[Show Rails version number and quit]'\n  )\n}\n\n__rails_setup_runtime_options() {\n  runtime_options=(\n    '(-f --force)'{-f,--force}'[Overwrite files that already exist]'\n    '(-p --pretend)'{-p,--pretend}'[Run but do not make any changes]'\n    '(-q --quiet)'{-q,--quiet}'[Suppress status output]'\n    '(-s --skip)'{-s,--skip}'[Skip files that already exist]'\n  )\n}\n\n__rails_setup_generators_options() {\n  local -a runtime_options\n  __rails_setup_runtime_options\n\n  generators_options=(\n    $runtime_options\n    --skip-namespace'[Skip namespace (affects only isolated applications)]'\n    --old-style-hash\"[Force using old style hash (:foo => 'bar') on Ruby >= 1.9]\"\n  )\n}\n\n__rails_setup_model_generators_options() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  model_generators_options=(\n    $generators_options\n    '(-o --orm)'{-o,--orm=}'[Orm to be invoked]:orm'\n  )\n}\n\n__rails_setup_resource_generators_options() {\n  local -a model_generators_options\n  __rails_setup_model_generators_options\n\n  resource_generators_options=(\n    $model_generators_options\n    --force-plural'[Forces the use of a plural ModelName]'\n    --resource-route'[Indicates when to generate resource route]: :__rails_boolean'\n  )\n}\n\n__rails_boolean() {\n  _values 'boolean' 'true' 'false'\n}\n\n__rails_migration_fields() {\n  if compset -P '*:*:'; then\n    _values 'index' 'index' 'uniq'\n  else\n    if compset -P '*:'; then\n      _values -s ':' 'type' 'string' 'text' 'integer' 'float' 'decimal' 'datetime' 'timestamp' 'time' 'date' 'binary' 'boolean' 'references'\n    else\n      _guard '[[:alnum:]_]#' 'field'\n    fi\n  fi\n}\n\n_rails_generate() {\n  local context state line curcontext=\"$curcontext\"\n\n  if (( CURRENT > 2 )); then\n    (( CURRENT-- ))\n    shift words\n    _call_function - \"_rails_generate_${words[1]}\" || _rails_generate_default\n  else\n    __rails_generate_commands\n  fi\n}\n\n_rails_g() {\n  _rails_generate\n}\n\n__rails_generate_commands() {\n  local context curcontext=\"$curcontext\" update_policy\n\n  zstyle -s \":completion:${curcontext}:\" cache-policy update_policy\n  if [ -z \"$update_policy\" ]; then\n    zstyle \":completion:${curcontext}:\" cache-policy _rails_generate_commands_caching_policy\n  fi\n\n  local application_directory\n  __rails_setup_application_directory\n  local cache_name\n  cache_name=\"rails/${application_directory##*/}/all_generators\"\n  if ! _retrieve_cache ${cache_name}; then\n    local -a all_generators\n    all_generators=($(_call_program rails_generators rails generate 2> /dev/null | awk '/^  [a-zA-Z_]+/{ print $1 }'))\n    _store_cache ${cache_name} all_generators\n  fi\n\n  local -a rails_generators\n  rails_generators=(${all_generators:#*:*})\n  _describe -t rails_generators 'rails generator' rails_generators\n\n  local -a -U namespaces\n  local namespace\n  local -a generators\n  namespaces=(${(R)${(M)all_generators:#*:*}%:*})\n  for namespace in $namespaces; do\n    generators=(${${(M)all_generators:#${namespace}:*}/:/\\\\:})\n    _describe -t ${namespace}_generators \"${namespace/_/ } generator\" generators\n  done\n}\n\n_rails_generate_commands_caching_policy() {\n  local application_directory\n  __rails_setup_application_directory\n\n  if [ \"${application_directory}/Gemfile\" -nt \"$1\" ]; then\n    return 0\n  fi\n\n  local -a oldp\n  oldp=( \"$1\"(Nmw+1) )\n  (( $#oldp ))\n}\n\n_rails_generate_default() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    '*:argument'\n}\n\n_rails_generate_assets() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    '(-j --javascripts)'{-j,--javascripts}'[Generate JavaScripts]: :__rails_boolean' \\\n    '(-y --stylesheets)'{-y,--stylesheets}'[Generate Stylesheets]: :__rails_boolean' \\\n    '(-je --javascript-engine)'{-je,--javascript-engine=}'[Engine for JavaScripts]:javascript engine' \\\n    '(-se --stylesheet-engine)'{-se,--stylesheet-engine=}'[Engine for Stylesheets]:stylesheet engine' \\\n    ': :_guard \"^-*\" \"name\"'\n}\n\n_rails_generate_controller() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:template engine' \\\n    '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \\\n    --helper'[Indicates when to generate helper]: :__rails_boolean' \\\n    --assets'[Indicates when to generate assets]: :__rails_boolean' \\\n    ': :_guard \"^-*\" \"name\"' \\\n    '*: :_guard \"^-*\" \"action\"'\n}\n\n_rails_generate_generator() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    --namespace'[Namespace generator under lib/generators/name]: :__rails_boolean' \\\n    ': :_guard \"^-*\" \"name\"'\n}\n\n_rails_generate_helper() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \\\n    ': :_guard \"^-*\" \"name\"' \\\n}\n\n_rails_generate_integration_test() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    --integration-tool='[Integration tool to be invoke]:integration tool' \\\n    ': :_guard \"^-*\" \"name\"' \\\n}\n\n_rails_generate_jbuilder() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    ': :_guard \"^-*\" \"name\"' \\\n    '*: :__rails_migration_fields'\n}\n\n_rails_generate_mailer() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:template engine' \\\n    '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \\\n    ': :_guard \"^-*\" \"name\"' \\\n    '*: :_guard \"^-*\" \"method\"'\n}\n\n_rails_generate_migration() {\n  local -a modelgenerators_options\n  __rails_setup_model_generators_options\n\n  _arguments \\\n    $model_generators_options \\\n    ': :_guard \"^-*\" \"name\"' \\\n    '*: :__rails_migration_fields'\n}\n\n_rails_generate_model() {\n  _rails_generate_migration\n}\n\n_rails_generate_observer() {\n  local -a model_generators_options\n  __rails_setup_model_generators_options\n\n  _arguments \\\n    $model_generators_options \\\n    ': :_guard \"^-*\" \"name\"'\n}\n\n_rails_generate_performance_test() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    --performance-tool='[Performance tool to be invoked]:performance tool' \\\n    ': :_guard \"^-*\" \"name\"' \\\n}\n\n_rails_generate_resource() {\n  local context state line curcontext=\"$curcontext\"\n\n  local -a resource_generators_options\n  __rails_setup_resource_generators_options\n\n  _arguments -C \\\n    $resource_generators_options \\\n    '(-c --resource-controller)'{-c,--resource-controller=}'[Resource controller to be invoked]:name' \\\n    '(-a --actions)'{-a,--actions=}'[Actions for the resource controller]: :->actions' \\\n    ': :->name' \\\n    '*: :->fields'\n\n  if (( words[(I)(--actions=*|-a)] > 0 && words[(I)(--actions=*|-a)] == words[(I)-*] )); then\n    state=actions\n  fi\n\n  case \"$state\" in\n    actions)\n      _guard \"[[:alnum:]_]#\" \"actions\"\n      ;;\n    name)\n      _guard \"^-*\" \"name\"\n      ;;\n    fields)\n      __rails_migration_fields\n      ;;\n  esac\n}\n\n_rails_generate_scaffold() {\n  local -a resource_generators_options\n  __rails_setup_resource_generators_options\n\n  _arguments \\\n    $resource_generators_options \\\n    '(-y --stylesheets)'{-y,--stylesheets}'[Generate Stylesheets]: :__rails_boolean' \\\n    '(-se --stylesheet-engine)'{-se,--stylesheet-engine=}'[Engine for Stylesheets]:stylesheet engine' \\\n    '(-c --scaffold-controller)'{-c,--scaffold-controller=}'[Scaffold controller to be invoked]:name' \\\n    --assets'[Indicates when to generate assets]:boolean:(true false)' \\\n    ': :_guard \"^-*\" \"name\"' \\\n    '*: :__rails_migration_fields'\n}\n\n_rails_generate_scaffold_controller() {\n  local -a model_generators_options\n  __rails_setup_model_generators_options\n\n  _arguments \\\n    $model_generators_options \\\n    '(-e --template-engine)'{-e,--template-engine=}'[Template engine to be invoked]:template engine' \\\n    '(-t --test-framework)'{-t,--test-framework=}'[Test framework to be invoked]:test framework' \\\n      --helper'[Indicates when to generate helper]: :__rails_boolean' \\\n    ': :_guard \"^-*\" \"name\"'\n}\n\n_rails_generate_session_migration() {\n  local -a model_generators_options\n  __rails_setup_model_generators_options\n\n  _arguments \\\n    $model_generators_options \\\n    ': :_guard \"^-*\" \"name\"'\n}\n\n_rails_generate_task() {\n  local -a generators_options\n  __rails_setup_generators_options\n\n  _arguments \\\n    $generators_options \\\n    ': :_guard \"^-*\" \"name\"' \\\n    '*: :_guard \"^-*\" \"action\"'\n}\n\n_rails_console() {\n  _arguments \\\n    '(- *)'{-h,--help}'[Show this help message]' \\\n    '(-s --sandbox)'{-s,--sandbox}'[Rollback database modifications on exit]' \\\n    --debugger'[Enable ruby-debugging for the console]'\n}\n\n_rails_c() {\n  _rails_console\n}\n\n_rails_server() {\n  _arguments \\\n    '(- *)'{-h,--help}'[Show this help message]' \\\n    '(-p --port)'{-p,--port=}'[Runs Rails on the specified port]: :_guard \"[[\\:digit\\:]]#\" \"port\"' \\\n    '(-b --binding)'{-b,--binding=}'[Binds Rails to the specified ip]:ip:_hosts' \\\n    '(-c --config)'{-c,--config=}'[Use custom rackup configuration file]:file:_files -g \"*.ru\"' \\\n    '(-d --daemon)'{-d,--daemon}'[Make server run as a Daemon]' \\\n    '(-u --debugger)'{-u,--debugger}'[Enable ruby-debugging for the server]' \\\n    '(-e --environment)'{-e,--environment=}'[Specifies the environment to run this server under (test/development/production)]:name:(test development production)' \\\n    '(-P --pid)'{-P,--pid=}'[Specifies the PID file]:pid:_files -g \"*.pid\"'\n}\n\n_rails_s() {\n  _rails_server\n}\n\n_rails_dbconsole() {\n  _arguments \\\n    '(- *)'--help'[Show this help message]' \\\n    '(-p --include-password)'{-p,--include-password}'[Automatically provide the password from database.yml]' \\\n    --mode'[Automatically put the sqlite3 database in the specified mode (html, list, line, column)]:mode:(html list line column)' \\\n    --header\n}\n\n_rails_new() {\n  local context state line curcontext=\"$curcontext\"\n\n  local _a rails_options runtime_options\n  __rails_setup_rails_options\n  __rails_setup_runtime_options\n\n  _arguments -C \\\n    $rails_options \\\n    $runtime_options \\\n    '(-r --ruby)'{-r,--ruby=}'[Path to the Ruby binary of your choice]:path' \\\n    '(-b --builder)'{-b,--builder=}'[Path to a application builder (can be a filesystem path or URL)]: :->path_or_url' \\\n    '(-m --template)'{-m,--template=}'[Path to an application template (can be a filesystem path or URL)]: :->path_or_url' \\\n    --skip-gemfile\"[Don't create a Gemfile]\" \\\n    --skip-bundle\"[Don't run bundle install]\" \\\n    '(-G --skip-git)'{-G,--skip-git}'[Skip Git ignores and keeps]' \\\n    '(-O --skip-active-record)'{-O,--skip-active-record}'[Skip Active Record files]' \\\n    '(-S --skip-sprockets)'{-S,--skip-sprockets}'[Skip Sprockets files]' \\\n    '(-d --database)'{-d,--database=}'[Preconfigure for selected database]:database:(mysql oracle postgresql sqlite3 frontbase ibm_db sqlserver jdbcmysql jdbcsqlite3 jdbcpostgresql jdbc)' \\\n    '(-j --javascript)'{-j,--javascript=}'[Preconfigure for selected JavaScript library]:javascript' \\\n    '(-J --skip-javascript)'{-J,--skip-javascript}'[Skip JavaScript files]' \\\n    --dev'[Setup the application with Gemfile pointing to your Rails checkout]' \\\n    --edge'[Setup the application with Gemfile pointing to Rails repository]' \\\n    '(-T --skip-test-unit)'{-T,--skip-test-unit}'[Skip Test::Unit files]' \\\n    --old-style-hash\"[Force using old style hash (:foo => 'bar') on Ruby >= 1.9]\" \\\n    ':app path:_directories'\n\n  case \"$state\" in\n    path_or_url)\n      _alternative \\\n        'files:path:_files -g \"*.rb\"' \\\n        'url:url:_urls'\n      ;;\n  esac\n}\n\n_rails_application() {\n  _rails_new\n}\n\n_rails_db() {\n  _rails_dbconsole\n}\n\n_rails_destroy() {\n  _rails_generate\n}\n\n_rails_d() {\n  _rails_destroy\n}\n\n_rails_benchmarker() {\n  _arguments \\\n    '(- *)'{-h,--help}'[Show this help message]' \\\n    '(-r --runs)'{-r,--runs}'[Number of runs]: :_guard \"[[\\:digit\\:]]#\" \"number\"' \\\n    '(-o --output)'{-o,--output}'[Directory to use when writing the results]:directory:_directories' \\\n    '(-m --metrics)'{-m,--metrics}'[Metrics to use]: :_values -s \",\" \"metrics\" \"wall_time\" \"memory\" \"objects\" \"gc_runs\" \"gc_time\"' \\\n    '*: :_guard \"^-*\" \"ruby code\"'\n}\n\n_rails_profiler() {\n  _arguments \\\n    '(- *)'{-h,--help}'[Show this help message]' \\\n    '(-r --runs)'{-r,--runs}'[Number of runs]: :_guard \"[[\\:digit\\:]]#\" \"number\"' \\\n    '(-o --output)'{-o,--output}'[Directory to use when writing the results]:directory:_directories' \\\n    '(-m --metrics)'{-m,--metrics}'[Metrics to use]: :_values -s \",\" \"metrics\" \"process_time\" \"memory\" \"objects\"' \\\n    '(-f --formats)'{-f,--formats}'[Formats to output to]: :_values -s \",\" \"formats\" \"flat\" \"graph\" \"html\" \"call_tree\" \"call_stack\"' \\\n    '*: :_guard \"^-*\" \"ruby code\"'\n}\n\n_rails_plugin() {\n  local context state line curcontext=\"$curcontext\"\n\n  if (( CURRENT > 2 )); then\n    (( CURRENT-- ))\n    shift words\n    _call_function - \"_rails_plugin_${words[1]}\" || _nothing\n  else\n    __rails_plugin_commands\n  fi\n}\n\n__rails_plugin_commands() {\n  _values 'plugin command' \\\n    install'[Install plugin(s) from known repositories or URLs]' \\\n    remove'[Uninstall plugins]' \\\n    new\n}\n\n_rails_plugin_install() {\n  _arguments \\\n    '(-x --externals)'{-x,--externals}'[Use svn:externals to grab the plugin. Enables plugin updates and plugin versioning]' \\\n    '(-o --checkout)'{-o,--checkout}'[Use svn checkout to grab the plugin. Enables updating but does not add a svn:externals entry]' \\\n    '(-e --export)'{-e,--export}'[Use svn export to grab the plugin. Exports the plugin, allowing you to check it into your local repository. Does not enable updates or add an svn:externals entry]' \\\n    '(-q --quiet)'{-q,--quiet}'[Suppresses the output from installation. Ignored if -v is passed (rails plugin -v install ...)]' \\\n    '(-r --revision)'{-r,--revision=}'[Checks out the given revision from subversion or git. Ignored if subversion/git is not used]:revision' \\\n    '(-f --force)'{-f,--force}\"[Reinstalls a plugin if it's already installed]\" \\\n    '*:plugin:_urls'\n}\n\n_rails_plugin_remove() {\n  local -a plugins\n\n  plugins=($(_call_program rails_plugins ls -1 vendor/plugins))\n\n  _describe -t plugins 'plugin' plugins\n}\n\n_rails_plugin_new() {\n  _rails_new\n}\n\n_rails_runner() {\n  local context state line curcontext=\"$curcontext\"\n\n  _arguments -C \\\n    '(- *)'{-h,--help}'[Show this help message]' \\\n    '(-e --environment)'{-e,--environment=}'[Specifies the environment for the runner to operate under (test/development/production)]:name:(test development production)' \\\n    ': :->code_or_path'\n\n  case \"$state\" in\n    code_or_path)\n      _alternative \\\n        'files:filename:_files -g \"*.rb\"' \\\n        'codes:ruby code:_guard \"^-*\" \"ruby code\"'\n      ;;\n  esac\n}\n\n_rails_r() {\n  _rails_runner\n}\n\n_rails_test() {\n  local context state line curcontext=\"$curcontext\"\n\n  _arguments -C \\\n    ': :->path'\n\n  case \"$state\" in\n    path)\n      _alternative \\\n        'files:filename:_files -g \"*.rb\"'\n      ;;\n  esac\n}\n\n_rails_t() {\n  _rails_test\n}\n\n_rails \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_ralio",
    "content": "#compdef ralio\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ralio (https://github.com/oesmith/ralio), a\n#  Rally client\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Peter Yates <pd.yates@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_ralio ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options' \\\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n        \"backlog:Show the product backlog\"\n        \"sprint:Show the current team iteration\"\n        \"show:Show related information for an individual story, defect or task\"\n        \"open:Open a story, defect or task in a web browser\"\n        \"start:Set a task, defect or story state to in-progress and assign it to you\"\n        \"finish:Set a task, defect or story state to completed and assign it to you\"\n        \"abandon:Set a task, defect or story state to defined and clear the owner\"\n        \"block:Set a task, defect or story state to blocked\"\n        \"unblock:Set a task, defect or story state to unblocked\"\n        \"current:Show your current tasks and stories\"\n        \"point:Set the points for a story or defect\"\n        \"task:Allow you to create and delete story tasks.\"\n        \"configure:Set your Rally configurations.\"\n\t\t\t)\n\t\t\t_describe -t commands 'ralio commands' subcommands\n\n      _arguments -C \\\n        {-V,--version}\"[display version information]\" \\\n        {-h,--help}\"[output usage information]\"\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\n        (sprint)\n          _arguments \\\n            \"-t[Show tasks]\" \\\n            \"-p[Project name]\" \\\n            \"-f[Filter results]\"\n        ;;\n\n\t\t\t\t(start | finish)\n\t\t\t\t\t_arguments \\\n            '--pair[Pair programming partner]' \\\n            \"--resolution[Resolution status]\" \\\n            \"--rootcause[Root cause]\"\n\t\t\t\t;;\n\n        (task)\n          __ralio-task\n\t\t    ;;\n\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n__ralio-task ()\n{\n\tlocal curcontext=\"$curcontext\" state line\n\ttypeset -A opt_args\n\n\t_arguments -C \\\n\t\t':command:->command' \\\n\t\t'*::options:->options'\n\n\tcase $state in\n\t\t(command)\n\n\t\t\tlocal -a subcommands\n\t\t\tsubcommands=(\n        \"create:Create a new task\" \n        \"delete:Delete a task\" \n\t\t\t)\n\t\t\t_describe -t commands 'ralio task' subcommands\n\t\t;;\n\n\t\t(options)\n\t\t\tcase $line[1] in\n\n\t\t\t\t(create|delete)\n\t\t\t\t\t_arguments \\\n            -n\"[Name of the new task]\" \\\n            -t\"[Name of the parent task]\"\n\t\t\t\t;;\n\n\t\t\tesac\n\t\t;;\n\tesac\n}\n\n_ralio \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_rclone",
    "content": "#compdef rclone\n\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for rclone (http://rclone.org/).\n#\n# ------------------------------------------------------------------------------\n# Author(s)\n# -------\n#\n#  * Rajat Roy <i3wm.debian@gmail.com>\n#\n# ------------------------------------------------------------------------------ \n\n_rclone() { \n\tlocal state\n\t\n\t_arguments \\\n\t\t'1: :->subcommand' \\\n\t\t'--bwlimit' \\\n\t\t'--checkers' \\\n\t\t'(-c --checksum)'{-c,--checksum}'[check the file hash and size to determine if files are equal]' \\\n\t\t'--config' \\\n\t\t'--contimeout' \\\n\t\t'--dedupe-mode' \\\n\t\t'(-n --dry-run)'{-n,--dry-run}'[Do a trial run with no permanent changes]' \\\n\t\t'--ignore-existing' \\\n\t\t'--ignore-size' \\\n\t\t'(-I --ignore-times)'{-I,--ignore-times}'[unconditionally upload all files regardless of the state of files on the destination]' \\\n\t\t'--log-file' \\\n\t\t'--low-level-retries' \\\n\t\t'--max-depth' \\\n\t\t'--modify-window' \\\n\t\t'--no-gzip-encoding' \\\n\t\t'--no-update-modtime' \\\n\t\t'(-q --quiet)'{-q,--quiet}'[as little output as possible]' \\\n\t\t'--retries' \\\n\t\t'--size-only' \\\n\t\t'--stats' \\\n\t\t'--delete-' \\\n\t\t'--timeout' \\\n\t\t'--transfers' \\\n\t\t'(-u --update)'{-u,--update}'[skip any files which exist on the destination and have a modified time that is newer than the source file]' \\\n\t\t'(-v --verbose)'{-v,--verbose}'[tells you about every file it considers and transfers]' \\\n\t\t'--delete-excluded' \\\n\t\t'--filter' \\\n\t\t'--filter-from' \\\n\t\t'-exclude' \\\n\t\t'--exclude-from' \\\n\t\t'--include' \\\n\t\t'--include-from' \\\n\t\t'--files-from' \\\n\t\t'--min-size' \\\n\t\t'--max-size' \\\n\t\t'--min-age' \\\n\t\t'--max-age' \\\n\t\t'--dump-filters' \\\n\t\t'*:files:_files'\n\t\t\n\tcase $state in\n\t\tsubcommand)\n\t\t\t_arguments '1: :(\n\t\t\t\tconfig\n\t\t\t\tcopy\n\t\t\t\tsync\n\t\t\t\tmove\n\t\t\t\tdelete\n\t\t\t\tpurge\n\t\t\t\tmkdir\n\t\t\t\trmdir\n\t\t\t\tcheck\n\t\t\t\tls\n\t\t\t\tlsd\n\t\t\t\tlsl\n\t\t\t\tmd5sum\n\t\t\t\tsha1sum\n\t\t\t\tsize\n\t\t\t\tversion\n\t\t\t\tcleanup\n\t\t\t\tdedupe\n\t\t\t\tauthorize\n\t\t\t\tcat\n\t\t\t\tgenautocomplete\n\t\t\t\tgendocs\n\t\t\t\tlistremotes\n\t\t\t\tmount\n\t\t\t\t--help)'\n\t\t;;\n\tesac\n}\n \n_rclone \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_redis-cli",
    "content": "#compdef redis-cli rec\n# ------------------------------------------------------------------------------\n# Copyright (c) 2009-2015 Robby Russell and contributors (see\n# https://github.com/robbyrussell/oh-my-zsh/contributors)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Redis (http://redis.io).\n#\n#  Source: https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/redis-cli\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Alexandru Totolici (https://github.com/totolici)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal -a _1st_arguments\n_1st_arguments=(\n  'append:append a value to a key'\n  'auth:authenticate to the server'\n  'bgrewriteeaof:asynchronously rewrite the append-only file'\n  'bgsave:asynchornously save the dataset to disk'\n  'blpop:remove and get the first element in a list, or block until one is available'\n  'brpop:remove and get the last element in a list, or block until one is available'\n  'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available'\n  # 'config get:get the value of a configuration parameter'\n  # 'config set:set a configuration parameter to the given value'\n  # 'config resetstat: reset the stats returned by INFO'\n  'dbsize:return the number of keys in the selected database'\n  # 'debug object:get debugging information about a key'\n  # 'debug setgfault:make the server crash'\n  'decr:decrement the integer value of a key by one'\n  'decrby:decrement the integer value of a key by the given number'\n  'del:delete a key'\n  'discard:discard all commands issued after MULTI'\n  'echo:echo the given string'\n  'exec:execute all commands issued after a MULTI'\n  'exists:determine if a key exists'\n  'expire:set the time to live for a key, in seconds'\n  'expireat:set the expiration for a key as a UNIX timestamp'\n  'flushall:remove all keys from all databases'\n  'flushdb:remove all keys from the current database'\n  'get:get the value of a key'\n  'getbit:returns the bit value at offset in the string value stored at key'\n  'getrange:get a substring of the string stored at a key'\n  'getset:set the string value of a key and return its old value'\n  'hdel:delete a hash field'\n  'hexists:determine if a hash field exists'\n  'hget:get the value of a hash field'\n  'hgetall:get all the fields and values in a hash'\n  'hincrby:increment the integer value of a hash field by the given number'\n  'hkeys:get all the fields in a hash'\n  'hlen:get the number of fields in a hash'\n  'hmget:get the values of all the given hash fields'\n  'hmset:set multiple hash fields to multiple values'\n  'hset:set the string value of a hash field'\n  'hsetnx:set the value of a hash field, only if the field does not exist'\n  'hvals:get all the values in a hash'\n  'incr:increment the integer value of a key by one'\n  'incrby:increment the integer value of a key by the given number'\n  'info:get information and statistics about the server'\n  'keys:find all keys matching the given pattern'\n  'lastsave:get the UNIX timestamp of the last successful save to disk'\n  'lindex:get an element from a list by its index'\n  'linsert:insert an element before or after another element in a list'\n  'llen:get the length of a list'\n  'lpop:remove and get the first element in a list'\n  'lpush:prepend a value to a list'\n  'lpushx:prepend a value to a list, only if the list exists'\n  'lrange:get a range of elements from a list'\n  'lrem:remove elements from a list'\n  'lset:set the value of an element in a list by its index'\n  'ltrim:trim a list to the specified range'\n  'mget:get the values of all the given keys'\n  'monitor:listen for all requests received by the server in real time'\n  'move:move a key to another database'\n  'mset:set multiple keys to multiple values'\n  'msetnx:set multiple keys to multiple values, only if none of the keys exist'\n  'multi:mark the start of a transaction block'\n  'object:inspect the internals of Redis objects'\n  'persist:remove the expiration from a key'\n  'ping:ping the server'\n  'psubscribe:listen for messages published to channels matching the given patterns'\n  'publish:post a message to a channel'\n  'punsubscribe:stop listening for messages posted to channels matching the given patterns'\n  'quit:close the connection'\n  'randomkey:return a random key from the keyspace'\n  'rename:rename a key'\n  'renamenx:rename a key, only if the new key does not exist'\n  'rpop:remove and get the last element in a list'\n  'rpoplpush:remove the last element in a list, append it to another list and return it'\n  'rpush:append a value to a list'\n  'rpushx:append a value to a list, only if the list exists'\n  'sadd:add a member to a set'\n  'save:synchronously save the dataset to disk'\n  'scard:get the number of members in a set'\n  'sdiff:subtract multiple sets'\n  'sdiffstore:subtract multiple sets and store the resulting set in a key'\n  'select:change the selected database for the current connection'\n  'set:set the string value of a key'\n  'setbit:sets or clears the bit at offset in the string value stored at key'\n  'setex:set the value and expiration of a key'\n  'setnx:set the value of a key, only if the key does not exist'\n  'setrange:overwrite part of a string at key starting at the specified offset'\n  'shutdown:synchronously save the dataset to disk and then shut down the server'\n  'sinter:intersect multiple sets'\n  'sinterstore:intersect multiple sets and store the resulting set in a key'\n  'sismember:determine if a given value is a member of a set'\n  'slaveof:make the server a slave of another instance, or promote it as master'\n  'smembers:get all the members in a set'\n  'smove:move a member from one set to another'\n  'sort:sort the elements in a list, set or sorted set'\n  'spop:remove and return a random member from a set'\n  'srandmember:get a random member from a set'\n  'srem:remove a member from a set'\n  'strlen:get the length of the value stored in a key'\n  'subscribe:listen for messages published to the given channels'\n  'sunion:add multiple sets'\n  'sunionstore:add multiple sets and store the resulting set in a key'\n  'ttl:get the time to live for a key'\n  'type:determine the type stored at key'\n  'unsubscribe:stop listening for messages posted to the given channels'\n  'unwatch:forget about all watched keys'\n  'watch:watch the given keys to determine execution of the MULTI/EXEC block'\n  'zadd:add a member to a sorted set, or update its score if it already exists'\n  'zcard:get the number of members in a sorted set'\n  'zcount:count the members in a sorted set with scores within the given values'\n  'zincrby:increment the score of a member in a sorted set'\n  'zinterstore:intersect multiple sorted sets and store the resulting sorted set in a new key'\n  'zrange:return a range of members in a sorted set, by index'\n  'zrangebyscore:return a range of members in a sorted set, by score'\n  'zrank:determine the index of a member in a sorted set'\n  'zrem:remove a member from a sorted set'\n  'zremrangebyrank:remove all members in a sorted set within the given indexes'\n  'zremrangebyscore:remove all members in a sorted set within the given scores'\n  'zrevrange:return a range of members in a sorted set, by index, with scores ordered from high to low'\n  'zrevrangebyscore:return a range of members in a sorted set, by score, with scores ordered from high to low'\n  'zrevrank:determine the index of a member in a sorted set, with scores ordered from high to low'\n  'zscore:get the score associated with the given member in a sorted set'\n  'zunionstore:add multiple sorted sets and store the resulting sorted set in a new key'\n)\n\nlocal expl\n\n_arguments \\\n  '(-v --version)'{-v,--version}'[show version]' \\\n  '(-h --help)'{-h,--help}'[show help]' \\\n  '*:: :->subcmds' && return 0\n\nif (( CURRENT == 1 )); then\n  _describe -t commands \"redis-cli subcommand\" _1st_arguments\n  return\nfi\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_rfkill",
    "content": "#compdef rfkill\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014 Vincent Bernat <bernat@luffy.cx>\n# Copyright (c) 2014 Github zsh-users - http://github.com/zsh-users\n#\n# Permission to use, copy, modify, and/or distribute this software for any\n# purpose with or without fee is hereby granted, provided that the above\n# copyright notice and this permission notice appear in all copies.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n# Completion script for rfkill (http://wireless.kernel.org/en/users/Documentation/rfkill)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Vincent Bernat <bernat@luffy.cx>\n#\n# ------------------------------------------------------------------------------\n\n_rfkill_types() {\n  declare -a devicetypes\n  devicetypes=(all\n    \"wifi:Wireless LAN\" \"wlan:Wireless LAN\"\n    \"bluetooth:Bluetooth\"\n    \"uwb:Ultrawide Band\"\n    \"ultrawideband:Ultrawide Band\"\n    \"wimax:Wimax\"\n    \"wwan:3G\"\n    \"gps:GPS\"\n    \"fm:FM Radio\"\n    \"nfc:NFC\")\n  _describe -t device-types \"device types\" devicetypes\n}\n\n_rfkill_devices() {\n  declare -a devices\n  devices=(${(M)${(f)\"$(rfkill list)\"}:#[0-9]*})\n  _rfkill_types\n  _describe -t devices \"devices\" devices\n}\n\n_rfkill_commands () {\n  declare -a subcommands\n  subcommands=(help event list block unblock)\n  _describe -t rfkill-commands \"rfkill command\" subcommands\n}\n\n_rfkill_subcommand () {\n  case \"$words[1]\" in\n    (help|event)\n      ;;\n    (list)\n      _arguments ':types:_rfkill_types'\n      ;;\n    (block|unblock)\n      _arguments ':device:_rfkill_devices'\n      ;;\n    (*)\n      _message 'Unknown subcommand'\n  esac\n}\n\n_rfkill () {\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  _arguments -C \\\n    '--version[get version]:' \\\n    '(-): :->command' \\\n    '(-)*:: :->arguments'\n\n  case $state in\n    (command)\n      _rfkill_commands\n      ;;\n    (arguments)\n      curcontext=${curcontext%:*:*}:rfkill-$words[1]:\n      _rfkill_subcommand\n      ;;\n  esac\n}\n\n_rfkill \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_rkt",
    "content": "#compdef rkt\n# ------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for rkt (https://coreos.com/rkt/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\ntypeset -A opt_args\nautoload -U regexp-replace\n\n_rkt() {\n  _arguments \\\n    '--debug[print out more debug information to stderr]' \\\n    '--dir=[rkt data directory]:data directory:_files -/' \\\n    '--insecure-options=[comma-separated list of security features to disable]:option:{_values -s , none image tls ondisk http all}' \\\n    '--local-config=[local configuration directory]:configuration directory:_files -/' \\\n    '--system-config=[system configuration directory]:configuration directory:_files -/' \\\n    '--trust-keys-from-https[automatically trust gpg keys fetched from https]' \\\n    '--user-config=[user configuration directory]:configuration directory:_files -/' \\\n    '--help' \\\n    '1: :_rkt_cmds' \\\n    '*:: :->rkt_cmd_args'\n\n  case $state in\n    rkt_cmd_args)\n      case $words[1] in\n        help)\n          _arguments \\\n            '1: :_rkt_cmds' \\\n            '*:: :->rkt_help_args' \\\n            ;;\n\n        api-service)\n          _arguments \\\n            '--listen=[address to listen for client API requests]:address' \\\n            ;;\n\n        cat-manifest)\n          _arguments \\\n            '--pretty-print[apply indent to format the output]' \\\n            '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \\\n            '1:POD:_rkt_pods' \\\n            ;;\n\n        config)\n          _arguments \\\n            '--pretty-print[apply indent to format the output]' \\\n            ;;\n\n        enter)\n          _arguments \\\n            '--app=:appname' \\\n            '1:POD:_rkt_pods' \\\n            ;;\n\n        export)\n          _arguments \\\n            '--app=:appname' \\\n            '--overwrite[overwrite output ACI]' \\\n            '1:POD:_rkt_pods' \\\n            '2:OUTPUT_ACI_FILE:_files' \\\n            ;;\n\n        fetch)\n          _arguments \\\n            '--full[print the full image hash after fetching]' \\\n            '--no-store[fetch images ignoring the local store]' \\\n            '--signature=[local signature file to use in validating the preceding image]:signature:_files' \\\n            '--store-only[use only available images in the store]' \\\n            ;;\n\n        gc)\n          _arguments \\\n            '--grace-period=[duration to wait before discarding inactive pods from garbage]:duration' \\\n            '--expire-prepared=[duration to wait before expiring prepared pods]:duration' \\\n            '--mark-only[move to the garbage directories without actually deleting]' \\\n            ;;\n\n        image)\n          _arguments \\\n            '1: :_rkt_image_cmds' \\\n            '*:: :->rkt_image_args'\n            ;;\n\n        list)\n          _arguments \\\n            '--full[use long output format]' \\\n            '--no-legend[suppress a legend with the list]' \\\n            ;;\n\n        metadata-service)\n          _arguments \\\n            '--listen-port=[listen port]:port' \\\n            ;;\n\n        prepare)\n          # TODO: autocomplete stage1 images\n          _arguments \\\n            '--caps-remove=[capability to remove]:capability' \\\n            '--caps-retain=[capability to retain]:capability' \\\n            '--cpu=[cpu limit for the preceding image]:cpu limit' \\\n            '--cpu-shares=[assign the specified CPU time share weight]:weight' \\\n            \"--environment=[set the app's environment variables]:variable key=value\" \\\n            '--exec=[override the exec command for the preceding image]:command' \\\n            '--group=[group override for the preceding image]:group' \\\n            '--inherit-env[inherit all environment variables not set by apps]' \\\n            '--memory=[memory limit for the preceding image]:memory' \\\n            '--mount=[mount point binding a volume to a path within an app]:mount point' \\\n            '--name=[set the name of the app]:name' \\\n            '--no-overlay[disable overlay filesystem]' \\\n            '--oom-score-adj=[oom-score-adj isolator override]:oom-score-adj' \\\n            '--pod-manifest=[the path to the pod manifest]:manifest:_files' \\\n            '--port=[ports to expose on the host]:NAME\\:HOSTPORT' \\\n            '--private-users[run within user namespaces]' \\\n            '--quiet[suppress superfluous output on stdout, print only the UUID on success]' \\\n            '--readonly-rootfs=[mount rootfs read-only]:fs' \\\n            '--set-env=[an environment variable to set for apps]:NAME=VALUE' \\\n            '--set-env-file=[the path to an environment variables file]:file:_files' \\\n            '--signature=[local signature file to use in validating the preceding image]:signature:_files' \\\n            '--stage1-from-dir=[a filename of an image in stage1 images directory to use as stage1]:image' \\\n            '--stage1-hash=[a hash of an image to use as stage1]:image hash' \\\n            '--stage1-name=[a name of an image to use as stage1]:image name' \\\n            '--stage1-path=[a path to an image to use as stage1]:image path:_files' \\\n            '--stage1-url=[a URL to an image to use as stage1]:image url' \\\n            '--supplementary-gids=[supplementary group IDs override for the preceding image]:group IDs' \\\n            '--user=[user override for the preceding image]:user' \\\n            \"--user-annotation=[set the app's annotations]:annotation key=value\" \\\n            \"--user-label=[set the app's labels]:label key=value\" \\\n            '--volume=[volumes to make available in the pod]:volume' \\\n            '--working-dir=[override the working directory of the preceding image]:working directory:_files -/' \\\n            '1:IMAGE:_rkt_images' \\\n            ;;\n\n        rm)\n          _arguments \\\n            '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \\\n            '1:POD:_rkt_pods' \\\n            ;;\n\n        run)\n          _arguments \\\n            '--caps-remove=[capability to remove]:capability' \\\n            '--caps-retain=[capability to retain]:capability' \\\n            '--cpu=[cpu limit for the preceding image]:cpu limit' \\\n            '--cpu-shares=[assign the specified CPU time share weight]:weight' \\\n            '--dns=[name servers to write in /etc/resolv.conf]:name servers' \\\n            '--dns-domain=[DNS domain to write in]:domain' \\\n            '--dns-opt=[DNS options to write in /etc/resolv.conf]:dns options' \\\n            '--dns-search=[DNS search domains to write in /etc/resolv.conf]:search domains' \\\n            \"--environment=[set the app's environment variables]:variable key=value\" \\\n            '--exec=[override the exec command for the preceding image]:command' \\\n            '--group=[group override for the preceding image]:group' \\\n            \"--hostname=[pod's hostname]:hostname\" \\\n            \"--hosts-entry=[entries to add to the pod-wide /etc/hosts. Pass 'host' to use the host's /etc/hosts]:hosts entry\" \\\n            '--inherit-env[inherit all environment variables not set by apps]' \\\n            '--interactive[run pod interactively]' \\\n            '--mds-register[register pod with metadata service]' \\\n            '--memory=[memory limit for the preceding image]:memory limit' \\\n            '--mount=[mount point binding a volume to a path within an app]:mount point' \\\n            '--name=[set the name of the app]:name' \\\n            \"--net=[configure the pod's networking]:networks\" \\\n            '--no-overlay[disable overlay filesystem]' \\\n            '--pod-manifest=[the path to the pod manifest]:manifest:_files' \\\n            '--port=[ports to expose on the host]:NAME\\:HOSTPORT' \\\n            '--private-users[run within user namespaces]' \\\n            '--set-env=[an environment variable to set for apps]:NAME=VALUE' \\\n            '--set-env-file=[the path to an environment variables file]:file:_files' \\\n            '--signature=[local signature file to use in validating the preceding image]:signature:_files' \\\n            '--stage1-from-dir=[a filename of an image in stage1 images directory to use as stage1]:image' \\\n            '--stage1-hash=[a hash of an image to use as stage1]:image hash' \\\n            '--stage1-name=[a name of an image to use as stage1]:image name' \\\n            '--stage1-path=[a path to an image to use as stage1]:image path:_files' \\\n            '--stage1-url=[a URL to an image to use as stage1]:image url' \\\n            '--supplementary-gids=[supplementary group IDs override for the preceding image]:group IDs' \\\n            '--user=[user override for the preceding image]:user' \\\n            \"--user-annotation=[set the app's annotations]:annotation key=value\" \\\n            \"--user-label=[set the app's labels]:label key=value\" \\\n            '--uuid-file-save=[write out pod UUID to specified file]:uuid file:_files' \\\n            '--volume=[volumes to make available in the pod]:volume' \\\n            '--working-dir=[override the working directory of the preceding image]:working directory:_files -/' \\\n            '1:IMAGE:_rkt_images' \\\n            ;;\n\n        run-prepared)\n          _arguments \\\n            '--dns=[name servers to write in /etc/resolv.conf]:name servers' \\\n            '--dns-domain=[DNS domain to write in]:domain' \\\n            '--dns-opt=[DNS options to write in /etc/resolv.conf]:dns options' \\\n            '--dns-search=[DNS search domains to write in /etc/resolv.conf]:search domains' \\\n            \"--hostname=[pod's hostname]:hostname\" \\\n            \"--hosts-entry=[entries to add to the pod-wide /etc/hosts. Pass 'host' to use the host's /etc/hosts]:hosts entry\" \\\n            '--interactive[run pod interactively]' \\\n            '--mds-register[register pod with metadata service]' \\\n            \"--net=[configure the pod's networking]:networks\" \\\n            '1:POD:_rkt_pods' \\\n            ;;\n\n        status)\n          _arguments \\\n            '--format=[choose the output format]:format:(json json-pretty)' \\\n            '--wait[toggles waiting for the pod to exit]' \\\n            '--wait-ready[toggles waiting until the pod is ready]' \\\n            '1:POD:_rkt_pods' \\\n            ;;\n\n        stop)\n          _arguments \\\n            '--force[forced stopping]' \\\n            '--uuid-file=[read pod UUID from file instead of argument]:uuid file:_files' \\\n            '1:POD:_rkt_pods' \\\n            ;;\n\n        trust)\n          _arguments \\\n            '--insecure-allow-http[allow HTTP use for key discovery and/or retrieval]' \\\n            '--prefix=[prefix to limit trust to]:prefix' \\\n            '--root[add root key from filesystem without a prefix]' \\\n            '--skip-fingerprint-review[accept key without fingerprint confirmation]' \\\n            ;;\n      esac\n      ;;\n  esac\n\n  case $state in\n    rkt_help_args)\n      case $words[1] in\n        image)\n          _arguments \\\n            '1: :_rkt_image_cmds'\n            ;;\n      esac\n      ;;\n\n    rkt_image_args)\n      case $words[1] in\n        cat-manifest)\n          _arguments \\\n            '--pretty-print[apply indent to format the output]' \\\n            '1:IMAGE:_rkt_images' \\\n            ;;\n\n        export)\n          _arguments \\\n            '--overwrite[overwrite output ACI]' \\\n            '1:IMAGE:_rkt_images' \\\n            '2:OUTPUT_ACI_FILE:_files' \\\n            ;;\n\n        extract|render)\n          _arguments \\\n            '--overwrite[overwrite output ACI]' \\\n            '--rootfs-only[extract rootfs only]' \\\n            '1:IMAGE:_rkt_images' \\\n            '2:OUTPUT_DIR:_files -/' \\\n            ;;\n\n        gc)\n          _arguments \\\n            '--grace-period=[duration to wait before discarding inactive pods from garbage]:duration' \\\n            ;;\n\n        list)\n          _arguments \\\n            '--fields=[comma-separated list of fields to display]:fields:{_values -s , id name importtime lastused size latest}' \\\n            '--full[use long output format]' \\\n            '--no-legend[suppress a legend with the list]' \\\n            ;;\n\n        rm)\n          _arguments \\\n            '*:IMAGE:_rkt_images' \\\n            ;;\n      esac\n      ;;\n  esac\n}\n\n_rkt_cmds() {\n  local -a commands\n  commands=(\n    'api-service:Run API service'\n    'cat-manifest:Inspect and print the pod manifest'\n    'config:Print configuration for each stage in JSON format'\n    'enter:Enter the namespaces of an app within a rkt pod'\n    'export:Export an app from an exited pod to an ACI file'\n    'fetch:Fetch image(s) and store them in the local store'\n    'gc:Garbage collect rkt pods no longer in use'\n    'image:Operate on image(s) in the local store'\n    'list:List pods'\n    'metadata-service:Run metadata service'\n    'prepare:Prepare to run image(s) in a pod in rkt'\n    'rm:Remove all files and resources associated with an exited pod'\n    'run:Run image(s) in a pod in rkt'\n    'run-prepared:Run a prepared application pod in rkt'\n    'status:Check the status of a rkt pod'\n    'stop:Stop a pod'\n    'trust:Trust a key for image verification'\n    'version:Print the version and exit'\n    'help:Help about any command'\n  )\n  _describe 'command' commands\n}\n\n_rkt_image_cmds() {\n  local -a commands\n  commands=(\n    'cat-manifest:Inspect and print the image manifest'\n    'export:Export a stored image to an ACI file'\n    'extract:Extract a stored image to a directory'\n    'gc:Garbage collect local store'\n    'list:List images in the local store'\n    'render:Render a stored image to a directory with all its dependencies'\n    'rm:Remove image(s) with the given ID(s) or name(s) from the local store'\n  )\n  _describe 'command' commands\n}\n\n_rkt_images() {\n  local -a images\n  images=($(rkt image list --fields id,name --no-legend | sed 's/\\t/\\n/;s/:/\\\\:/g' | sort | uniq))\n  _describe 'IMAGE' images\n}\n\n_rkt_pods() {\n  local -a pods\n  IFS=$'\\n'\n  pods=($(rkt list --full --no-legend | sed 's/:/\\\\:/g;s/\\t/:/;s/\\t/    /g'))\n  _describe 'POD' pods\n}\n\n_rkt \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_rslsync",
    "content": "#compdef rslsync\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for resilio sync (https://getsync.com/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Fabian Klötzl (https://github.com/kloetzl)\n#\n# ------------------------------------------------------------------------------\n\n_rslsync(){\n  integer ret=1\n  local -a args\n  args+=(\n    '(-)--help[Print help]'\n    '(--help)--config[Use a configuration file]:file:_files'\n    '(--help)--dump-sample-config[Print a sample configuration file]'\n    '(--help)--generate-secret[Generate a read/write key]::version:(2)'\n    '(--help)--get-ro-secret[Get the read-only key associated to a read/write key]:key:'\n    '(--help)--identity[Creates user identity]:name:'\n    '(--help)--license[Apply owner license]:file:_files'\n    '(--help)--log[Set log file]:file:_files'\n    '(--help)--nodaemon[Do not daemonize]'\n    '(--help)--storage[Storage path for identity and license]:path:_files -/'\n    '(--help)--webui.listen[Set the webui listening interface]:ip\\:port:'\n  )\n  _arguments $args[@] && ret=0\n  return ret\n}\n\n_rslsync\n"
  },
  {
    "path": ".config/zsh/completions/src/_rspec",
    "content": "#compdef rspec\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for RSpec (http://rspec.info/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Kazuya Takeshima (https://github.com/mitukiii)\n#\n# ------------------------------------------------------------------------------\n\n\n_rspec() {\n  local context state line curcontext=\"$curcontext\"\n\n  _arguments -C \\\n    -I'[Specify PATH to add to $LOAD_PATH (may be used more than once)]:PATH:_files' \\\n    '*'{-r,--require}'[Require a file]:PATH:_files' \\\n    '*'{-O,--options}'[Specify the path to a custom options file]:PATH:_files' \\\n    --order'[Run examples by the specified order type]: :->order' \\\n    --seed'[Equivalent of --order rand:SEED]: :_guard \"[[\\:digit\\:]]#\" \"SEED\"' \\\n    --only-failures'[Filter to just the examples that failed the last time they ran]' \\\n    --fail-fast'[Abort the run on first failure]' \\\n    --no-fail-fast'[Do not abort the run on first failure]' \\\n    --failure-exit-code'[Override the exit code used when there are failing specs]: :_guard \"[[\\:digit\\:]]#\" \"CODE\"' \\\n    --dry-run'[Print the formatter output of your suite without running any examples or hooks]' \\\n    '(-X --drb)'{-X,--drb}'[Run examples via DRb]' \\\n    --drb-port'[Port to connect to the DRb server]: :_guard \"[[\\:digit\\:]]#\" \"PORT\"' \\\n    '(-f --format)'{-f,--format}'[Choose a formatter]:FORMATTER:(progress documentation html json)' \\\n    '(-o --out)'{-o,--out}'[Write output to a file instead of $stdout]:FILE:_files' \\\n    --deprecation-out'[Write deprecation warnings to a file instead of $stderr]:FILE:_files' \\\n    '(-b --backtrace)'{-b,--backtrace}'[Enable full backtrace]' \\\n    '(-c --color)'{-c,--color}'[Enable color in the output]' \\\n    '(-p --profile)'{-p,--profile}'[Enable profiling of examples and list the slowest examples (default: 10)]: :_guard \"[[\\:digit\\:]]#\" \"COUNT\"' \\\n    '(-w --warnings)'{-w,--warnings}'[Enable ruby warnings]' \\\n    '(-P --pattern)'{-P,--pattern}'[Load files matching pattern (default: \"spec/**/*_spec.rb\")]:PATTERN:' \\\n    --exclude-pattern'[Load files except those matching pattern]:PATTERN:' \\\n    '(-e --example)'{-e,--example}'[Run examples whose full nested names include STRING (may be used more than once)]:STRING:' \\\n    '(-t --tag)'{-t,--tag}'[Run examples with the specified tag, or exclude examples by adding ~ before the tag]: :->tag' \\\n    --default-path'[Set the default path where RSpec looks for examples (can be a path to a file or a directory)]:PATH:_files' \\\n    '(- *)'--init'[Initialize your project with RSpec]' \\\n    '(- *)'{-h,--help}\"[You're looking at it]\" \\\n    '(- *)'{-v,--version}'[Display the version]' \\\n    '*:files or directories:_files'\n\n  case \"$state\" in\n    order)\n      if compset -P '*:'; then\n        _guard '[[:digit:]]#' 'SEED'\n      else\n        _values 'TYPE[:SEED]' \\\n          defined'[examples and groups are run in the order they are defined]' \\\n          rand'[randomize the order of groups and examples]' \\\n          random'[alias for rand]'\n      fi\n      ;;\n    tag)\n      if compset -P '*:'; then\n        _message 'VALUE'\n      else\n        _message 'TAG[:VALUE]'\n      fi\n      ;;\n  esac\n}\n\n_rspec \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_rsvm",
    "content": "#compdef rsvm\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for rsvm (https://github.com/sdepold/rsvm).\n#  Adapted from Docker Machine completion by hhatto (https://github.com/ilkka)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * michaelmior (https://github.com/michaelmior)\n#\n# ------------------------------------------------------------------------------\n\n# helper function for completing available rusts\n__rusts() {\n  declare -a rusts_cmd\n  rusts_cmd=($(ls \"$HOME/.rsvm/versions\"))\n  _describe 'rusts' rusts_cmd\n}\n\n# subcommands\nlocal -a _rsvm_cmds\n\n_rsvm_cmds=(\n   'help:Show a help message' \\\n   'install:Download and install a version' \\\n   'uninstall:Uninstall a version' \\\n   'use:Activate a version for now and the future' \\\n   'ls:List all installed versions of rust' \\\n   'ls-remote:List remote versions available for install' \\\n   'ls-channel:Print a channel version available for install' \\\n)\n\n# subcommand completion functions\n__uninstall() {\n  __rusts\n}\n\n__use() {\n  __rusts\n}\n\n# common args\n_arguments \\\n  '--help[show help]' \\\n  '--version[print the version]' \\\n  '*:: :->command'\n\n# start rusts!\nif (( CURRENT == 1 )); then\n  _describe -t commands 'rsvm command' _rsvm_cmds\nfi\n\nlocal -a _command_args\ncase \"$words[1]\" in\n  uninstall)\n    __uninstall ;;\n  use)\n    __use ;;\nesac\n"
  },
  {
    "path": ".config/zsh/completions/src/_rubocop",
    "content": "#compdef rubocop\n# ------------------------------------------------------------------------------\n# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for rubocop (https://github.com/bbatsov/rubocop)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Akira Maeda <https://github.com/glidenote>\n#\n# ------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line ret=1\ntypeset -A opt_args\n\n_rubocop_format_params() {\n  _values \\\n    'FORMATTER' \\\n    'progress' \\\n    'simple' \\\n    'clang' \\\n    'disabled' \\\n    'fuubar' \\\n    'emacs' \\\n    'json' \\\n    'files' \\\n    'offenses'\n}\n\n_arguments -C \\\n  '(--only)--only[Run only the given cop(s)]' \\\n  '(-c --config)'{-c,--config}'[Specify configuration file]' \\\n  '(--auto-gen-config)--auto-gen-config[Generate a configuration file acting as a TODO list]' \\\n  '(--force-exclusion)--force-exclusion[Force excluding files specified in the configuration `Exclude` even if they are explicitly passed as arguments]' \\\n  '(-f --format)'{-f,--format}'[Choose an output formatter.]:FORMATTER:_rubocop_format_params' \\\n  '(-o --out)'{-o,--out}'[Write output to a file instead of STDOUT]' \\\n  '(-r --require)'{-r,--require}'[Require Ruby file.]' \\\n  '(--fail-level)--fail-level[Minimum severity for exit with error code.]' \\\n  '(--show-cops)--show-cops[Shows the given cops, or all cops by default, and their configurations for the current directory.]' \\\n  '(-F --fail-fast)'{-f,--fail-fast}'[Inspect files in order of modification time ant stop after the first file containing offenses]' \\\n  '(-d --debug)'{-d,--debug}'[Display debug info]' \\\n  '(-D --display-cop-names)'{-D,--display-cop-names}'[Display cop names in offense messages.]' \\\n  '(-R --rails)'{-R,--rails}'[Run extra Rails cops.]' \\\n  '(-l --lint)'{-l,--lint}'[Run only lint cops.]' \\\n  '(-a --auto-correct)'{-a,--auto-correct}'[Auto-correct offenses.]' \\\n  '(-n --no-color)'{-n,--no-color}'[Disable color output.]' \\\n  '(-v --version)'{-v,--version}'[Disable version.]' \\\n  '(-V --verbose-version)'{-V,--verbose-version}'[Disable verbose version.]' \\\n  '(-h --help)'{-h,--help}'[Show help.]' \\\n  '*: :_files' && ret=0\n\nreturn ret\n"
  },
  {
    "path": ".config/zsh/completions/src/_rvm",
    "content": "#compdef rvm\n# ------------------------------------------------------------------------------\n# Copyright (c) 2009-2011 Wayne E. Seguin\n# Copyright (c) 2011-2015 Michal Papis\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for rvm (https://rvm.beginrescueend.com/).\n#\n#  Source: https://github.com/rvm/rvm/blob/master/scripts/extras/completion.zsh/_rvm\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Bruno Michel (https://github.com/nono)\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state line cmds ret=1\n\n_arguments -C \\\n  '(- 1 *)'{-v,--version}'[display version information]' \\\n  '(-l --level)'{-l,--level}'+[patch level to use with rvm use / install]:number' \\\n  '--bin[path for binaries to be placed (~/.rvm/bin/)]:path:_files' \\\n  '--source[src directory to use (~/.rvm/src/)]:path:_files' \\\n  '--archives[directory for downloaded files (~/.rvm/archives/)]:path:_files' \\\n  '-S[Specify a script file to attempt to load and run (rubydo)]:file:_files' \\\n  '-e[Execute code from the command line]:code' \\\n  '-G[root gem path to use]:path:_files' \\\n  '--gems[Used to set the gems_flag, use with remove to remove gems]' \\\n  '--archive[Used to set the archive_flag, use with remove to remove archive]' \\\n  '--patch[With MRI Rubies you may specify one or more full paths to patches]:paths:->patches' \\\n  '(-C --configure)'{-C,--configure}'=[custom configure options]' \\\n  '--nice[process niceness (for slow computers, default 0)]:number' \\\n  '--ree-options[Options passed directly to ree ./installer on the command line]:options' \\\n  '--head[with update, updates rvm to git head version]' \\\n  '--rubygems[with update, updates rubygems for selected ruby]' \\\n  '--default[with ruby select, sets a default ruby for new shells]' \\\n  '--debug[Toggle debug mode on for very verbose output]' \\\n  '--trace[Toggle trace mode on to see EVERYTHING rvm is doing]' \\\n  '--force[Force install, even given ruby is already install]' \\\n  '--summary[Used with rubydo to print out a summary of the commands run]' \\\n  '--latest[with gemset --dump skips version strings for latest gem]' \\\n  '--gems[with uninstall/remove removes gems with the interpreter]' \\\n  '--docs[with install, attempt to generate ri after installation]' \\\n  '--reconfigure[Force ./configure on install even if Makefile already exists]' \\\n  '1: :->cmds' \\\n  '*: :->args' && ret=0\n\ncase $state in\n\n  patches)\n    compset -P '*,'\n    compset -S ',*'\n    _files -q -S ,\n    ;;\n\n  cmds)\n\n    cmds=( ${(f)\"$(_call_program commands rvm help 2> /dev/null | __rvm_sed -e '/^== Action/,/^== Implementation/!d; / :: /!d; s/^[ *]*\\([^ ]*\\) *:: *\\(.*\\)/\\1:\\2/')\"} )\n    cmds+=( $(rvm list strings) )\n    _describe -t commands 'rvm command' cmds && ret=0\n    ;;\n\n  args)\n\n    case $line[1] in\n\n      (use|uninstall|remove|list)\n\n        if (( CURRENT == 3 )); then\n          # See if we’ve made it to the ‘@’; eg, 1.9.2@\n          if ! __rvm_grep '@' <<< \"${line[CURRENT-1]}\" >/dev/null ; then\n            _values -S , 'rubies' \\\n              $(rvm list strings | __rvm_sed -e 's/ruby-\\([^) ]*\\)-\\([^) ]*\\)/ruby-\\1-\\2 \\1-\\2 \\1/g') \\\n              default system $(rvm alias list names) && ret=0\n          else\n            # Construct a full version string for each of the gemsets.\n            # Eg, 1.9.2@min 1.9.2@rail3 …\n            _values -S , 'gemsets' \\\n              $(rvm ${line[CURRENT-1]%%@*} gemset list | __rvm_awk '/^[ -_[:alnum:]]+$/ {print \"'${line[CURRENT-1]%%@*}'@\"$1}')\n          fi\n        fi\n        ;;\n\n      (install|fetch)\n\n        _values -S , 'rubies' $(rvm list known_strings) && ret=0\n        ;;\n\n      gemset)\n\n        if (( CURRENT == 3 )); then\n          _values 'gemset_commands' $(rvm gemset help | __rvm_sed -e '/create/!d; s/^.*[{]\\(.*\\)[}].*$/\\1/; s/,/ /g')\n        else\n          #_values -S , 'gemsets' $(rvm gemset list | __rvm_grep -v gemset 2>/dev/null)\n          _values -S , 'gemsets' $(rvm gemset list | __rvm_grep -Ev '(gemset|info)' 2>/dev/null | __rvm_awk '/^[ -_[:alnum:]]+$/ {print '$1'}')\n        fi\n        ret=0\n        ;;\n\n      package)\n\n        if (( CURRENT == 3 )); then\n          _values 'package_commands' $(rvm package | __rvm_sed -e '/Usage/!d; s/^.*[{]\\(.*\\)[}] [{].*$/\\1/; s/,/ /g')\n        else\n          _values 'packages' $(rvm package | __rvm_sed -e '/Usage/!d; s/^.*[}] [{]\\(.*\\)[}].*$/\\1/; s/,/ /g')\n        fi\n        ret=0\n        ;;\n\n      *)\n        (( ret )) && _message 'no more arguments'\n        ;;\n\n    esac\n    ;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_sbt",
    "content": "#compdef sbt\n# ------------------------------------------------------------------------------\n# Copyright (c) 2013 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for sbt 0.12+ (http://scala-sbt.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Tony Sloane <inkytonik@gmail.com>\n#  * Mirko Caserta <mirko.caserta@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal -a _sbt_commands\n_sbt_commands=(\n  'clean:delete files produced by the build'\n  'compile:compile sources'\n  'console:start the Scala REPL with project classes on the classpath'\n  'console-quick:start the Scala REPL with project deps on the classpath'\n  'console-project:start the Scala REPL w/sbt+build-def on the classpath'\n  'dist:generate distribution artifacts'\n  'dist\\:clean:clean distribution artifacts'\n  'doc:generate API documentation'\n  'gen-idea:generate Intellij Idea project files'\n  'package:produce the main artifact, such as a binary jar'\n  'package-doc:produce a doc artifact, such as a jar containing API docs'\n  'package-src:produce a source artifact, such as a jar containing sources'\n  'publish:publish artifacts to a repository'\n  'publish-local:publish artifacts to the local repository'\n  'run:run a main class'\n  'run-main:run the main class selected by the first argument'\n  'test:execute all tests'\n  'test-only:execute the tests provided as arguments'\n  'test-quick:execute previously failed tests'\n  'update:resolve and optionally retrieve dependencies'\n)\n\nlocal expl\n\n_arguments \\\n  '(-help)-h[prints an help message]' \\\n  '(-h)-help[prints an help message]' \\\n  '(-verbose)-v[this runner is chattier]' \\\n  '(-v)-verbose[this runner is chattier]' \\\n  '(-debug)-d[set sbt log level to debug]' \\\n  '(-d)-debug[set sbt log level to debug]' \\\n  '-no-colors[disable ANSI color codes]' \\\n  '-sbt-create[start even if current dir contains no sbt project]' \\\n  '-sbt-dir[path to global settings/plugins dir (default: ~/.sbt)]' \\\n  '-sbt-boot[path to shared boot dir (default: ~/.sbt/boot)]' \\\n  '-ivy[path to local Ivy repository (default: ~/.ivy2)]' \\\n  '-mem[set memory options]' \\\n  '-no-share[use all local caches; no sharing]' \\\n  '-no-global[use global caches, but do not use global ~/.sbt dir]' \\\n  '-jvm-debug[turn on JVM debugging, open at the given port]' \\\n  '-batch[disable interactive mode]' \\\n  '-sbt-version[use the specified version of sbt]' \\\n  '-sbt-jar[use the specified jar as the sbt launcher]' \\\n  '(-sbt-snapshot)-sbt-rc[use an RC version of sbt]' \\\n  '(-sbt-rc)-sbt-snapshot[use a snapshot version of sbt]' \\\n  '-java-home[alternate JAVA_HOME]' \\\n  '*:: :->subcmds' && return 0\n\n_describe -t commands \"sbt subcommand\" _sbt_commands\nreturn 0\n"
  },
  {
    "path": ".config/zsh/completions/src/_scala",
    "content": "#compdef scala scalac\n# ------------------------------------------------------------------------------\n# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for scala and scalac (http://www.scala-lang.org/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Tony Sloane <inkytonik@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\ntypeset -A opt_args\nlocal context state line\n\n_scala_features () {\n   compadd \"postfixOps\" \"reflectiveCalls\" \"implicitConversions\" \"higherKinds\" \\\n     \"existentials\" \"experimental.macros\" \"_\"\n}\n\n_scala_phases () {\n   compadd \"parser\" \"namer\" \"packageobjects\" \"typer\" \"patmat\" \"superaccessors\" \\\n     \"extmethods\" \"pickler\" \"refchecks\" \"selectiveanf\" \"selectivecps\" \"uncurry\" \\\n     \"tailcalls\" \"specialize\" \"explicitouter\" \"erasure\" \"posterasure\" \"lazyvals\" \\\n     \"lambdalift\" \"constructors\" \"flatten\" \"mixin\" \"cleanup\" \"icode\" \"inliner\" \\\n     \"inlineExceptionHandlers\" \"closelim\" \"dce\" \"jvm\" \"terminal\"\n}\n\nlocal -a shared_opts\nshared_opts=(\n  \"-bootclasspath+[Override location of bootstrap class files]:bootstrap class directory:_files -/\"\n  \"-classpath+[Specify where to find user class files]:directory:_files -/\"\n  \"-D-[Pass -Dproperty=value directly to the runtime system]\"\n  \"-d+[Destination for generated classfiles]: directory or jar file:_files\"\n  \"-dependencyfile+[Set dependency tracking file]:dependency tracking file:_files\"\n  \"-deprecation[Emit warning and location for usages of deprecated APIs]\"\n  \"-encoding+[Specify character encoding used by source files]:encoding:\"\n  \"-explaintypes[Explain type errors in more detail]\"\n  \"-extdirs+[Override location of installed extensions]:extensions directory:_files -/\"\n  \"-g\\:-[Set level of generated debugging info (default\\: vars)]:debugging info level:(none source line vars notailcalls)\"\n  \"-help[Print a synopsis of standard options]\"\n  \"-J-[pass argument directly to Java runtime system]:JVM argument:\"\n  \"-javabootclasspath+[Override java boot classpath]:Java boot class path directory]:_files -/\"\n  \"-javaextdirs+[Override java extdirs classpath]:Java extdirs directory:_files -/\"\n  \"-language\\:-[Enable one or more language features]:feature:_scala_features\"\n  \"-no-specialization[Ignore @specialize annotations]\"\n  \"-nobootcp[Do not use the boot classpath for the scala jars]\"\n  \"-nowarn[Generate no warnings]\"\n  \"-optimise[Generate faster bytecode by applying optimisations to the program]\"\n  \"-P\\:-[Pass an option to a plugin (written plugin\\:opt)]:plugin option:\"\n  \"-print[Print program with Scala-specific features removed]\"\n  \"-sourcepath+[Specify location(s) of source files]:source file directory:_files -/\"\n  \"-target\\:-[Target platform for object files (default\\: jvm-1.5)]:platform name:(jvm-1.5 msil)\"\n  \"-toolcp+[Add to the runner classpath]:directory:_files -/\"\n  \"-unchecked[Enable detailed unchecked (erasure) warnings]\"\n  \"-uniqid[Uniquely tag all identifiers in debugging output]\"\n  \"-usejavacp[Utilize the java.class.path in classpath resolution]\"\n  \"-verbose[Output messages about what the compiler is doing]\"\n  \"-version[Print product version and exit]\"\n  \"-X[Print a synopsis of advanced options]\"\n  \"-Y[Print a synopsis of private options]\"\n)\n\nlocal -a X_opts\nX_opts=(\n  \"-Xcheck-null[Warn upon selection of nullable reference]\"\n  \"-Xcheckinit[Wrap field accessors to throw an exception on uninitialized access]\"\n  \"-Xdisable-assertions[Generate no assertions or assumptions]\"\n  \"-Xelide-below+[Calls to @elidable methods are omitted if method priority is lower than integer argument]\"\n  \"-Xexperimental[Enable experimental extensions]\"\n  \"-Xfatal-warnings[Fail the compilation if there are any warnings]\"\n  \"-Xfull-lubs[Retains pre 2.10 behavior of less aggressive truncation of least upper bounds]\"\n  \"-Xfuture[Turn on future language features]\"\n  \"-Xgenerate-phase-graph+[Generate the phase graphs (outputs .dot files) to fileX.dot]:output file:_files\"\n  \"-Xlint[Enable recommended additional warnings]\"\n  \"-Xlog-free-terms[Print a message when reification creates a free term]\"\n  \"-Xlog-free-types[Print a message when reification resorts to generating a free type]\"\n  \"-Xlog-implicits[Show more detail on why some implicits are not applicable]\"\n  \"-Xlog-implicit-conversions[Print a message whenever an implicit conversion is inserted]\"\n  \"-Xlog-reflective-calls[Print a message when a reflective method call is generated]\"\n  \"-Xmacro-settings\\:-[Custom settings for macros]:option\"\n  \"-Xmain-class+[Class for manifest's Main-Class entry (only useful with -d jar)]:path:\"\n  \"-Xmax-classfile-name+[Maximum filename length for generated classes]\"\n  \"-Xmigration[Warn about constructs whose behavior may have changed]\"\n  \"-Xno-forwarders[Do not generate static forwarders in mirror classes]\"\n  \"-Xno-patmat-analysis[Don't perform exhaustivity/unreachability analysis. Also, ignore @switch annotation]\"\n  \"-Xno-uescape[Disable handling of \\u unicode escapes]\"\n  \"-Xnojline[Do not use JLine for editing]\"\n  \"-Xoldpatmat[Use the pre-2.10 pattern matcher. Otherwise, the 'virtualizing' pattern matcher is used in 2.10]\"\n  \"-Xprint\\:-[Print out program after <phase>]:phase name:_scala_phases\"\n  \"-Xprint-icode\\:-[Log internal icode to *.icode files after phase (default\\: icode)]:phase name:_scala_phases\"\n  \"-Xprint-pos[Print tree positions, as offsets]\"\n  \"-Xprint-types[Print tree types (debugging option)]\"\n  \"-Xprompt[Display a prompt after each error (debugging option)]\"\n  \"-Xresident[Compiler stays resident: read source filenames from standard input]\"\n  \"-Xscript+[Treat the source file as a script and wrap it in a main method]:main object name\"\n  \"-Xshow-class+[Show internal representation of class]:class name\"\n  \"-Xshow-object+[Show internal representation of object]:object name\"\n  \"-Xshow-phases[Print a synopsis of compiler phases]\"\n  \"-Xsource-reader+[Specify a class name for a custom method of reading source files]:class name\"\n  \"-Xverify[Verify generic signatures in generated bytecode]\"\n\n  \"-Xassem-extdirs+[List of directories containing assemblies (requires -target:msil) (default\\: lib)]:assembly directory:_files -/\"\n  \"-Xassem-name+[Name of the output assembly (requires -target:msil)]:assembly name:_files\"\n  \"-Xassem-path+[List of assemblies referenced by the program (requires -target:msil)]:assembly path:_files\"\n  \"-Xsourcedir+[Mirror source folder structure in output directory (requires -target:msil)]:source directory:_files -/\"\n\n  \"-Xplugin\\:-[Load one or more plugins from file]:plugin file:_files\"\n  \"-Xpluginsdir+[Path to search compiler plugins]:plugin directory:_files -/\"\n  \"-Xplugin-list[Print a synopsis of loaded plugins]\"\n  \"-Xplugin-disable\\:-[Disable the given plugin(s)]\"\n  \"-Xplugin-require\\:-[Abort unless the given plugin(s) are available]\"\n)\n\nlocal -a Y_opts\nY_opts=(\n  \"-Y[Print a synopsis of private options]\"\n  \"-Ybuild-manager-debug[Generate debug information for the Refined Build Manager compiler]\"\n  \"-Ybuilder-debug\\:-[Compile using the specified build manager (default\\: none)]:build manager:(none refined simple)\"\n  \"-Yclosure-elim[Perform closure elimination]\"\n  \"-Ycompact-trees[Use compact tree printer when displaying trees]\"\n  \"-Ydead-code[Perform dead code elimination]\"\n  \"-Ydependent-method-types[Allow dependent method types]\"\n  \"-Ydump-classes+[Dump the generated bytecode to .class files (useful for reflective compilation that utilizes in-memory classloaders)]:output directory:_files -/\"\n  \"-Yeta-expand-keeps-star[Eta-expand varargs methods to T* rather than Seq[T].  This is a temporary option to ease transition.]\"\n  \"-Ygen-javap+[Generate a parallel output directory of .javap files]:output directory:_files -/\"\n  \"-Yinfer-argument-types[Infer types for arguments of overriden methods]\"\n  \"-Yinline[Perform inlining when possible]\"\n  \"-Yinline-handlers[Perform exception handler inlining when possible]\"\n  \"-Yinline-warnings[Emit inlining warnings (normally surpressed due to high volume)]\"\n  \"-Yinvalidate+[Invalidate classpath entry before run]:classpath entry\"\n  \"-Ylinearizer\\:-[Linearizer to use (default\\: rpo)]:linearizer:(normal dfs rpo dump)\"\n  \"-Ylog-classpath[Output information about what classpath is being applied]\"\n  \"-Yno-adapted-args[Do not adapt an argument list (either by inserting unit or creating a tuple) to match the receiver]\"\n  \"-Ymacro-debug-lite[Trace essential macro-related activities]\"\n  \"-Ymacro-debug-verbose[Trace all macro-related activities: compilation, generation of synthetics, classloading, expansion, exceptions]\"\n  \"-Yno-completion[Disable tab-completion in the REPL]\"\n  \"-Yno-generic-signatures[Suppress generation of generic signatures for Java]\"\n  \"-Yno-imports[Compile without any implicit imports]\"\n  \"-Yno-predef[Compile without importing Predef]\"\n  \"-Yno-self-type-checks[Suppress check for self-type conformance among inherited members]\"\n  \"-Yno-squeeze[Disable creation of compact code in matching]\"\n  \"-Ynotnull[Enable (experimental and incomplete) scala.NotNull]\"\n  \"-Yoverride-objects[Allow member objects to be overridden]\"\n  \"-Yoverride-vars[Allow vars to be overridden]\"\n  \"-Ypmat-naive[Desugar matches as naively as possible]\"\n  \"-Ypresentation-delay+[Wait number of ms after typing before starting typechecking]\"\n  \"-Ypresentation-log+[Log presentation compiler events into file]:log file:_files\"\n  \"-Ypresentation-replay+[Replay presentation compiler events from file]:log file:_files\"\n  \"-Ypresentation-strict[Do not report type errors in sources with syntax errors]\"\n  \"-Ypresentation-verbose[Print information about presentation compiler tasks]\"\n  \"-Yprofile-class+[Specify name of profiler class]:profiler class name\"\n  \"-Yprofile-memory[Heap snapshot after compiler run (requires jgpagent on JVM -agentpath)]\"\n  \"-Yrangepos[Use range positions for syntax trees]\"\n  \"-Yrecursion+[Set recursion depth used when locking symbols]\"\n  \"-Yreify-copypaste[Dump the reified trees in copypasteable representation]\"\n  \"-Yrepl-sync[Do not use asynchronous code for REPL startup]\"\n  \"-Yresolve-term-conflict\\:-[Resolve term conflicts (default\\: error)]:resolution strategy:(package object error)\"\n  \"-Yself-in-annots[Include a \\\"self\\\" identifier inside of annotations]\"\n  \"-Yshow\\:-[Show after <phase> (requires -Xshow-class or -Xshow-object)]:phase name:_scala_phases\"\n  \"-Yshow-syms[Print the AST symbol hierarchy after each phase]\"\n  \"-Yshow-symkinds[Print abbreviated symbol kinds next to symbol names]\"\n  \"-Yshow-trees[Print detailed ASTs (requires -Xprint\\:phase)]\"\n  \"-Yshow-trees-compact[Print detailed ASTs in compact form (requires -Xprint\\:)]\"\n  \"-Yshow-trees-stringified[Print stringifications along with detailed ASTs (requires -Xprint\\:)]\"\n  \"-Ystatistics[Print compiler statistics]\"\n  \"-Ystruct-dispatch\\:-[Structural method dispatch policy (default\\: poly-cache)]:policy name:(no-cache mono-cache poly-cache invoke-dynamic)\"\n\n  \"-Ybrowse\\:-[Browse the abstract syntax tree after <phase>]:phase name:_scala_phases\"\n  \"-Ycheck\\:-[Check the tree at the end of <phase>]:phase name:_scala_phases\"\n  \"-Ylog\\:-[Log operations during <phase>]:phase name:_scala_phases\"\n  \"-Yprofile\\:-[Profile CPU usage of given phases (requires jgpagent on JVM -agentpath)]:phase name:_scala_phases\"\n  \"-Yskip\\:-[Skip <phase>]:phase name:_scala_phases\"\n  \"-Ystop-after\\:-[Stop after given phase <phase>]:phase name:_scala_phases\"\n  \"-Ystop-before\\:-[Stop before given phase <phase>]:phase name:_scala_phases\"\n\n  \"-Ywarn-adapted-args[Warn if an argument list is modified to match the receiver]\"\n  \"-Ywarn-all[Enable all -Y warnings]\"\n  \"-Ywarn-dead-code[Warn when dead code is identified]\"\n  \"-Ywarn-inaccessible[Warn about inaccessible types in method signatures]\"\n  \"-Ywarn-nullary-override[Warn when non-nullary overrides nullary, e.g. def foo() over def foo]\"\n  \"-Ywarn-nullary-unit[Warn when nullary methods return Unit]\"\n  \"-Ywarn-numeric-widen[Warn when numerics are widened]\"\n  \"-Ywarn-value-discard[Warn when non-Unit expression results are unused]\"\n\n  \"-Ybuild-manager-debug[Generate debug information for the Refined Build Manager compiler]\"\n  \"-Ybuilder-debug\\:-[Compile using the specified build manager (default\\: none)]:manager:(none refined simple)\"\n  \"-Ycompletion-debug[Trace all tab completion activity]\"\n  \"-Ydebug[Increase the quantity of debugging output]\"\n  \"-Ydoc-debug[Trace all scaladoc activity]\"\n  \"-Yide-debug[Generate, validate and output trees using the interactive compiler]\"\n  \"-Yinfer-debug[Trace type inference and implicit search]\"\n  \"-Yissue-debug[Print stack traces when a context issues an error]\"\n  \"-Ypatmat-debug[Trace pattern matching translation]\"\n  \"-Ypmat-debug[Trace all pattern matcher activity]\"\n  \"-Ypos-debug[Trace position validation]\"\n  \"-Ypresentation-debug[Enable debugging output for the presentation compiler]\"\n  \"-Yreify-debug[Trace reification]\"\n  \"-Yrepl-debug[Trace all REPL activity]\"\n  \"-Ytyper-debug[Trace all type assignments]\"\n)\n\nlocal -a scala_opts\nscala_opts=(\n  \"-e+[execute <string> as if entered in the repl]:string\" \\\n  \"-howtorun+[what to run (default\\: guess)]:execution mode:(script object jar guess)\" \\\n  \"-i+[preload <file> before starting the repl]:file to preload:_files\" \\\n  \"-nc[no compilation daemon\\: do not use the fsc offline compiler]\" \\\n  \"-save[save the compiled script in a jar for future use]\"\n)\n\ncase $words[$CURRENT] in\n    -X*) _arguments $X_opts;;\n    -Y*) _arguments $Y_opts;;\n      *) case $service in\n           scala)  _arguments $scala_opts $shared_opts \"*::filename:_files\";;\n           scalac) _arguments $shared_opts \"*::filename:_files\";;\n         esac\nesac\n\nreturn 0\n"
  },
  {
    "path": ".config/zsh/completions/src/_scl",
    "content": "#compdef scl\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Software Collections (https://www.softwarecollections.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_scl() {\n  local context curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  local ret=1\n\n  _arguments -C \\\n    '1: :_scl_cmds' \\\n    \"(- : *)\"{-h,--help}'[display help information]' \\\n    \"(- : *)\"{-l,--list}'[list installed Software Collections or packages that belong to them]:installed collection:_scl_installed_collections' \\\n    '*::arg:->args' \\\n  && ret=0\n\n  case $state in\n    (args)\n      curcontext=\"${curcontext%:*:*}:scl-cmd-$words[1]:\"\n      case $line[1] in\n        (register)\n          _arguments '1:Software Collection path:_files -/' && ret=0\n        ;;\n        (deregister)\n          _arguments -C \\\n\t\t\t'1:: :_scl_installed_collections' \\\n\t\t\t'--force[force suppression of the collection]' \\\n\t\t && ret=0\n        ;;\n        (enable)\n          _arguments -C \\\n\t\t\t'1:: :_scl_installed_collections' \\\n\t\t\t'2:command: _command_names -e' \\\n\t\t && ret=0\n        ;;\n        *)\n          _call_function ret _scl_cmd_$words[1] && ret=0\n          (( ret )) && _message 'no more arguments'\n        ;;\n      esac\n    ;;\n  esac\n}\n\n(( $+functions[_scl_cmds] )) ||\n_scl_cmds() {\n  local commands; commands=(\n    'register:register a Software Collection'\n    'deregister:deregister a Software Collection'\n    'enable:enable a Software Collection'\n  )\n  _describe -t commands 'scl command' commands \"$@\"\n}\n\n(( $+functions[_scl_installed_collections] )) ||\n_scl_installed_collections() {\n  local installed_collections; installed_collections=($(_call_program installed_collections $service --list))\n  _describe -t collections 'Software Collection' installed_collections \"$@\"\n}\n\n_scl \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_scons",
    "content": "#compdef scons\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for SCons 2.5.1 (http://scons.org/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Oliver Kiddle <okiddle@yahoo.co.uk>\n#\n# ------------------------------------------------------------------------------\n\n_arguments -s -S \\\n  '(-c --clean --remove)-'{c,-clean,-remove}'[remove specified targets and dependencies]' \\\n  '(-C --directory)-'{C,-directory=}'[change to specified directory first]:directory:_directories' \\\n  '--cache-debug=[print CacheDir debug info to file]:file:_files' \\\n  '(--cache-disable --no-cache)--'{cache-disable,no-cache}\"[don't retrieve built targets from cache]\" \\\n  '(--cache-force --cache-populate)--'{cache-force,cache-populate}'[copy already-built targets into cache]' \\\n  \"--cache-readonly[don't update CacheDir with built targets]\" \\\n  '--cache-show[print build actions for files from cache]' \\\n  '--config=[set Configure mode]:mode:(auto force cache)' \\\n  '(-u --up --search-up -U)-D[search up for SConstruct; build default targets]' \\\n  '--debug=[print debugging information]:type:(\n      count duplicate explain findlibs includes memoizer memory objects pdb prepare presub stacktrace time)' \\\n  '--diskcheck=[enable specific on-disk checks]:check:(all none match rcs sccs)' \\\n  '--duplicate=[set preferred file duplication methods]:file duplication methods:(\n      hard-soft-copy soft-hard-copy hard-copy soft-copy copy)' \\\n  '(-f --file --makefile --sconstruct)-'{f,-file=,-makefile=,-sconstruct=}'[specify SConstruct file]:file:_files' \\\n  '(-)-'{h,-help}'[display defined usage information]' \\\n  '(-)-'{H,-help-options}'[display usage information]' \\\n  '(-i -ignore-errors)-'{i,-ignore-errors}'[ignore errors from build actions]' \\\n  \\*{-I,--include-dir=}'[add directory to search Python modules]:directories:_directories' \\\n  '(--implicit-deps-changed --implicit-deps-unchanged)--implicit-cache[cache scanned dependencies]' \\\n  '(--implicit-cache --implicit-deps-changed)--implicit-deps-changed[rescan dependencies]' \\\n  '(--implicit-cache --implicit-deps-unchanged)--implicit-deps-unchanged[ignore changes to scanned dependencies]' \\\n  '--interactive[start interactive mode]' \\\n  '(-j --jobs)-'{j,jobs=}'[specify no of jobs to run in parallel]' \\\n  '(-k --keep-going)-'{k,-keep-going}'[continue after an error]' \\\n  '--max-drift=[set the maximum clock drift]:drift (seconds)' \\\n  '--md5-chunksize=[set chunksize for MD5 signature computation]:size (kB)' \\\n  '(-n --just-print --dry-run --recon)-'{n,-just-print,-dry-run,-recon}\"[print commands but don't run them]\" \\\n  \"--no-site-dir[don't use the usual site_scons directory]\" \\\n  '--profile=[profile scons]:output file:_files' \\\n  '(-q --question)-'{q,question}'[query whether up-to-date]' \\\n  '-Q[suppress progress messages]' \\\n  '--random[build dependencies in random order]' \\\n  '(-s --silent --quiet)-'{s,-silent,-quiet}\"[don't print commands]\" \\\n  '--site-dir=[specify site_scons directory]:directory:_directories' \\\n  '--stack-size[set stacksize of threads]:size (kB)' \\\n  '--taskmastertrace=[trace node evaluation to file]:file' \\\n  '--tree=[print dependency tree]:format:(all derived prune status)' \\\n  '(-u --up --search-up -D -U)-'{u,-up,-search-up}'[search up for SConstruct; build current directory]' \\\n  '(-u --up --search-up -D)-U[search up for SConstruct; build Default targets]' \\\n  '(-)-'{v,-version}'[print version information]' \\\n  \\*{--warn=,--warning=}'[enable or disable warnings]:type:(\n      all cache-write-error corrupt-sconsign dependency deprecated\n      deprecated-copy deprecated-source-signatures deprecated-target-signatures\n      duplicate-environment fortran-cxx-mix link misleading-keywords\n      missing-sconscript no-md5-module no-metaclass-support no-object-count\n      no-parallel-support python-version reserved-variable stack-size no-all\n      no-cache-write-error no-corrupt-sconsign no-dependency no-deprecated\n      no-deprecated-copy no-deprecated-source-signatures\n      no-deprecated-target-signatures no-duplicate-environment\n      no-fortran-cxx-mix no-link no-misleading-keywords no-missing-sconscript\n      no-no-md5-module no-no-metaclass-support no-no-object-count\n      no-no-parallel-support no-python-version no-reserved-variable\n      no-stack-size)' \\\n  \\*{-Y,--repository}'[search specified repository for files]:repository:_files' \\\n  '*:target:_default' # Doesn't seem to be a simple way to get a list of targets\n"
  },
  {
    "path": ".config/zsh/completions/src/_scrub",
    "content": "#compdef scrub\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for scrub an utility which iteratively writes patterns on files or disk devices to make retrieving the data more difficult. (http://linux.die.net/man/1/scrub).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_scrub() {\n\nlocal patterns\npatterns=\"nnsa dod bsi gutmann schneier pfitzner7 pfitzner33 usarmy fillzero fillff random random2 old fastold\"\n\n_arguments -C \\\n   \"(- 1 *)\"{-v,--version}\"[Print scrub version and exit.]\" \\\n   {-r,--remove}\"[Remove the file after scrubbing.]\" \\\n   {-p,--pattern}\"[Select  the  patterns to write.]:pattern:($patterns)\" \\\n   {-b,--blocksize}\"[Perform read and write calls using the specified blocksize (in bytes).]:block size:\" \\\n   {-f,--force}\"[Scrub even if target contains signature indicating it has already been scrubbed.]\" \\\n   {-S,--no-signature}\"[Do not write scrub signature.]\" \\\n   {-X,--freespace}\"[Create  specified directory and fill it with files until write returns ENOSPC (file sys‐tem full), then scrub the files as usual.]:directory name:\" \\\n   {-D,--dirent}\"[After scrubbing the file, scrub its name in the directory entry, then rename it  to  the new name.]:new name:\" \\\n   {-s,--device-size}\"[Override the device size (in bytes).]:size:\" \\\n   {-L,--no-link}\"[If file is a symbolic link, do not scrub the link target.]\" \\\n   {-R,--no-hwrand}\"[Don't use a hardware random number generator even if one is available.]\" \\\n   {-t,--no-threads}\"[Don't generate random data in parallel with I/O.]\" \\\n   {-n,--dry-run}\"[Do everything but write to targets.]\" \\\n   {-h,--help}\"[Print a summary of command line options on stderr.]\" \\\n   '*:files:_files' \\\n}\n\n_scrub\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_sdd",
    "content": "#compdef sdd\n# ------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for sdd (http://freshmeat.net/projects/sdd/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_values -w 'option' \\\n  'if[specify input file]:input file:_tilde_files' \\\n  'of[specify output file]:output file:_tilde_files' \\\n  '(bs)ibs[input block size]:block size (bytes)' \\\n  '(bs)obs[output block size]:block size (bytes)' \\\n  '(ibs obs)bs[block size]:block size (bytes)' \\\n  'cbs[conversion buffer size]:buffer size (bytes)' \\\n  'skip[input/output initially skipped]:bytes' \\\n  'seek[input/output initially skipped]:bytes' \\\n  'count[number of input blocks to copy]:blocks' \\\n  '-notrunc[do not truncate existing output file]' \\\n  '-pg[print a dot on each write to indicate progress]' \\\n  '-noerror[do not stop on error]' \\\n  '-noerrwrite[do not write blocks not read correctly]' \\\n  \"-noseek[don't seek]\" \\\n  'try[error retry count]:number' \\\n  '-debug[print debugging messages]' \\\n  '-fill[fill each record with zeros up to obs]' \\\n  '-swab' '-block' '-unblock' '-lcase' '-ucase' '-ascii' '-ebcdic' '-ibm' \\\n  '-help[show help]' \\\n  '-version[show version]'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_setcap",
    "content": "#compdef setcap\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n# * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n# ------------------------------------------------------------------------------\n# Description\n# ------------------------------------------------------------------------------\n#  Completion script for libcap's setcap:\n#  - https://people.redhat.com/sgrubb/libcap-ng/\n#\n# ZSH provides the `zsh/cap` module that does not work on most modern systems,\n# in lieu of this I have written this zsh-completion modules.\n#\n# Written by\n#  - Zephyr Pellerin (https://github.com/zv)\n# ------------------------------------------------------------------------------\n\nlocal curcontext=$curcontext state line expl ret=1\nlocal -a args privs operators\n\nargs=( '*:file:->files'\n       '1:capability:->capability'\n       '-v[verify]' '-q[quiet]' )\n\n_arguments -C -s \"$args[@]\" && ret=0\n\noperators=(\"e:effective\" \"i:inheritable\" \"p:permitted\")\n\ncase \"$state\" in\n    capability)\n        if compset -P '*?[=+-]'; then\n            _describe -t operators \"operator\" operators && ret=0\n        else\n            _values -s , capability \\\n                    'cap_audit_control[Enable and disable kernel auditing]' \\\n                    'cap_audit_read[Allow reading the audit log]' \\\n                    'cap_audit_write[Write records to kernel auditing log.]' \\\n                    'cap_block_suspend[Employ features that can block system suspend]' \\\n                    'cap_chown[Make arbitrary changes to file UIDs and GIDs]' \\\n                    'cap_dac_override[Bypass file read, write, and execute permission checks.]' \\\n                    'cap_dac_read_search[Bypass file read permission checks]' \\\n                    'cap_fowner[Bypass filesystem UID checks, set extended attrs.]' \\\n                    \"cap_fsetid[Don't clear set-user-ID and set-group-ID permission bits when a file is modified]\" \\\n                    'cap_ipc_lock[Lock memory]' \\\n                    'cap_ipc_owner[Bypass checks on SySV IPC object operations.]' \\\n                    'cap_kill[Bypass permission checks for sending signals]' \\\n                    'cap_lease[Establish leases on arbitrary files]' \\\n                    'cap_linux_immutable[Set immutability or append only]' \\\n                    'cap_mac_admin[Override Mandatory Access Control]' \\\n                    'cap_mac_override[Allow MAC configuration or state changes.]' \\\n                    'cap_mknod[Create special files using mknod(2)]' \\\n                    'cap_net_admin[Perform various network-related operations]' \\\n                    'cap_net_bind_service[Bind a socket to a privileged ports.]' \\\n                    'cap_net_broadcast[Make socket broadcasts and listen to multicast.]' \\\n                    'cap_net_raw[Use raw sockets.]' \\\n                    'cap_setgid[Manipulate process GIDs.]' \\\n                    'cap_setfcap[Set file capabilities.]' \\\n                    \"cap_setpcap[Grant or remove any capability in the caller's permitted capability set to or from any other process.]\" \\\n                    'cap_setuid[Manipulate or forge process UIDs]' \\\n                    'cap_sys_admin[Perform numerous administrative tasks.]' \\\n                    'cap_sys_boot[Reboot]' \\\n                    'cap_sys_chroot[Use chroot]' \\\n                    'cap_sys_module[Load kernel module.]' \\\n                    'cap_sys_nice[Nice or renice processes.]' \\\n                    'cap_sys_pacct[Use acct(2).]' \\\n                    'cap_sys_ptrace[Inspect processes with ptrace or use process_vm_writev.]' \\\n                    'cap_sys_rawio[Numerous device IO functions, including performing raw IO and access x86 MSRs]' \\\n                    'cap_sys_resource[Set numerous resource limits]' \\\n                    'cap_sys_time[Set system clock]' \\\n                    'cap_sys_tty_config[Use vhangup(2)]' \\\n                    'cap_syslog[Perform privileged syslog(2) operations.]' \\\n                    'cap_wake_alarm[Trigger something that will wake up the system]' && ret=0\n        fi ;;\n    files) _files && ret=0 ;;\nesac\n\nreturn ret\n\n# Local variables:\n# mode: shell-script\n# sh-basic-offset: 2\n# sh-indent-comment: t\n# indent-tabs-mode: nil\n# End:\n# ex: sw=2 ts=2 et filetype=sh\n"
  },
  {
    "path": ".config/zsh/completions/src/_setup.py",
    "content": "#compdef setup.py\n# ------------------------------------------------------------------------------\n# Copyright (C) 2015 by Hideo Hattori <hhatto.jp@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for setup.py (http://docs.python.org/distutils/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Hideo Hattori (https://github.com/hhatto)\n#\n# ------------------------------------------------------------------------------\n\n_setup.py() {\n  typeset -A opt_args\n  local context state line\n\n  _arguments -s -S \\\n    \"--verbose[run verbosely (default)]\" \\\n    \"-v[run verbosely (default)]\" \\\n    \"--quiet[run quietly (turns verbosity off)]\" \\\n    \"-q[run quietly (turns verbosity off)]\" \\\n    \"--dry-run[don't actually do anything]\" \\\n    \"-n[don't actually do anything]\" \\\n    \"--help[show detailed help message]\" \\\n    \"-h[show detailed help message]\" \\\n    \"--no-user-cfg[ignore pydistutils.cfg in your home directory]\" \\\n    \"--command-packages=[list of packages that provide distutils commands]\" \\\n    \"--help-commands[list all available commands]\" \\\n    \"--name[print package name]\" \\\n    \"--version[print package version]\" \\\n    \"-V[print package version]\" \\\n    \"--fullname[print <package name>-<version>]\" \\\n    \"--author[print the author's name]\" \\\n    \"--author-email[print the author's email address]\" \\\n    \"--maintainer[print the maintainer's name]\" \\\n    \"--maintainer-email[print the maintainer's email address]\" \\\n    \"--contact[print the maintainer's name if known, else the author's]\" \\\n    \"--contact-email[print the maintainer's email address if known, else the author's]\" \\\n    \"--url[print the URL for this package]\" \\\n    \"--license[print the license of the package]\" \\\n    \"--licence[alias for --license]\" \\\n    \"--description[print the package description]\" \\\n    \"--long-description[print the long package description]\" \\\n    \"--platforms[print the list of platforms]\" \\\n    \"--classifiers[print the list of classifiers]\" \\\n    \"--keywords[print the list of keywords]\" \\\n    \"--provides[print the list of packages/modules provided]\" \\\n    \"--requires[print the list of packages/modules required]\" \\\n    \"--obsoletes[print the list of packages/modules made obsolete]\" \\\n    \"*::setup.py commands:_setuppy_command\"\n}\n\n(( $+functions[_setuppy_command] )) ||\n_setuppy_command() {\n  local cmd ret=1\n\n  (( $+setuppy_cmds )) || _setuppy_cmds=(\n    \"build:build everything needed to install\" \\\n    \"build_py:\\\"build\\\" pure Python modules (copy to build directory)\" \\\n    \"build_ext:build C/C++ extensions (compile/link to build directory)\" \\\n    \"build_clib:build C/C++ libraries used by Python extensions\" \\\n    \"build_scripts:\\\"build\\\" scripts (copy and fixup #! line)\" \\\n    \"clean:clean up temporary files from 'build' command\" \\\n    \"install:install everything from build directory\" \\\n    \"install_lib:install all Python modules (extensions and pure Python)\" \\\n    \"install_headers:install C/C++ header files\" \\\n    \"install_scripts:install scripts (Python or otherwise)\" \\\n    \"install_data:install data files\" \\\n    \"sdist:create a source distribution (tarball, zip file, etc.)\" \\\n    \"register:register the distribution with the Python package index\" \\\n    \"bdist:create a built (binary) distribution\" \\\n    \"bdist_dumb:create a \\\"dumb\\\" built distribution\" \\\n    \"bdist_rpm:create an RPM distribution\" \\\n    \"bdist_wininst:create an executable installer for MS Windows\" \\\n    \"upload:upload binary package to PyPI\" \\\n    \"check:perform some checks on the package\" \\\n    \"alias:define a shortcut to invoke one or more commands\" \\\n    \"bdist_egg:create an \\\"egg\\\" distribution\" \\\n    \"develop:install package in 'development mode'\" \\\n    \"easy_install:Find/get/install Python packages\" \\\n    \"egg_info:create a distribution's .egg-info directory\" \\\n    \"rotate:delete older distributions, keeping N newest files\" \\\n    \"saveopts:save supplied options to setup.cfg or other config file\" \\\n    \"setopt:set an option in setup.cfg or another config file\" \\\n    \"test:run unit tests after in-place build\" \\\n    \"install_egg_info:Install an .egg-info directory for the package\" \\\n    \"upload_docs:Upload documentation to PyPI\" \\\n    )\n\n  if (( CURRENT == 1 )); then\n    _describe -t commands 'setup.py subcommand' _setuppy_cmds || compadd \"$@\" - ${(s.:.)${(j.:.)_setuppy_syns}}\n  else\n    local curcontext=\"$curcontext\"\n\n    cmd=\"${${_setuppy_cmds[(r)$words[1]:*]%%:*}:-${(k)_setuppy_syns[(r)(*:|)$words[1](:*|)]}}\"\n    if (( $#cmd )); then\n      curcontext=\"${curcontext%:*:*}:setuppy-${cmd}:\"\n      _call_function ret _setuppy_$cmd || _message 'no more arguments'\n    else\n      _message \"unknown setup.py command: $words[1]\"\n      fi\n    return ret\n  fi\n}\n\n(( $+functions[_setuppy_build] )) ||\n_setuppy_build() {\n  _arguments -s \\\n    \"--build-base=[base directory for build library]\" \\\n    \"-b[base directory for build library]\" \\\n    \"--build-purelib=[build directory for platform-neutral distributions]\" \\\n    \"--build-platlib=[build directory for platform-specific distributions]\" \\\n    \"--build-lib=[build directory for all distribution (defaults to either build-purelib or build-platlib]\" \\\n    \"--build-scripts=[build directory for scripts]\" \\\n    \"--build-temp=[temporary build directory]\" \\\n    \"-t[temporary build directory]\" \\\n    \"--plat-name=[platform name to build for, if supported (default: linux-i686)]\" \\\n    \"-p[platform name to build for, if supported (default: linux-i686)]\" \\\n    \"--compiler=[specify the compiler type]\" \\\n    \"-c[specify the compiler type]\" \\\n    \"--debug[compile extensions and libraries with debugging information]\" \\\n    \"-g[compile extensions and libraries with debugging information]\" \\\n    \"--force[forcibly build everything (ignore file timestamps)]\" \\\n    \"-f[forcibly build everything (ignore file timestamps)]\" \\\n    \"--executable=[specify final destination interpreter path (build.py)]\" \\\n    \"-e[specify final destination interpreter path (build.py)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_build_py] )) ||\n_setuppy_build_py() {\n  _arguments -s \\\n    \"--build-lib=[directory to \\\"build\\\" (copy) to]\" \\\n    \"-d[directory to \\\"build\\\" (copy) to]\" \\\n    \"--compile[compile .py to .pyc]\" \\\n    \"-c[compile .py to .pyc]\" \\\n    \"--no-compile[don't compile .py files \\[default\\]]\" \\\n    \"--optimize=[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"-O[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"--force[forcibly build everything (ignore file timestamps)]\" \\\n    \"-f[forcibly build everything (ignore file timestamps)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_build_ext] )) ||\n_setuppy_build_ext() {\n  _arguments -s \\\n    \"--build-lib=[directory for compiled extension modules]\" \\\n    \"-b[directory for compiled extension modules]\" \\\n    \"--build-temp=[directory for temporary files (build by-products)]\" \\\n    \"-t[directory for temporary files (build by-products)]\" \\\n    \"--plat-name=[platform name to cross-compile for, if supported (default: linux-i686)]\" \\\n    \"-p[platform name to cross-compile for, if supported (default: linux-i686)]\" \\\n    \"--inplace[ignore build-lib and put compiled extensions into the source directory alongside your pure Python modules]\" \\\n    \"-i[ignore build-lib and put compiled extensions into the source directory alongside your pure Python modules]\" \\\n    \"--include-dirs=[list of directories to search for header files (separated by ':')]\" \\\n    \"-I[list of directories to search for header files (separated by ':')]\" \\\n    \"--define=[C preprocessor macros to define]\" \\\n    \"-D[C preprocessor macros to define]\" \\\n    \"--undef=[C preprocessor macros to undefine]\" \\\n    \"-U[C preprocessor macros to undefine]\" \\\n    \"--libraries=[external C libraries to link with]\" \\\n    \"-l[external C libraries to link with]\" \\\n    \"--library-dirs=[directories to search for external C libraries (separated by ':')]\" \\\n    \"-L[directories to search for external C libraries (separated by ':')]\" \\\n    \"--rpath=[directories to search for shared C libraries at runtime]\" \\\n    \"-R[directories to search for shared C libraries at runtime]\" \\\n    \"--link-objects=[extra explicit link objects to include in the link]\" \\\n    \"-O[extra explicit link objects to include in the link]\" \\\n    \"--debug[compile/link with debugging information]\" \\\n    \"-g[compile/link with debugging information]\" \\\n    \"--force[forcibly build everything (ignore file timestamps)]\" \\\n    \"-f[forcibly build everything (ignore file timestamps)]\" \\\n    \"--compiler=[specify the compiler type]\" \\\n    \"-c[specify the compiler type]\" \\\n    \"--swig-cpp[make SWIG create C++ files (default is C)]\" \\\n    \"--swig-opts=[list of SWIG command line options]\" \\\n    \"--swig=[path to the SWIG executable]\" \\\n    \"--user[add user include, library and rpath]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_build_clib] )) ||\n_setuppy_build_clib() {\n  _arguments -s \\\n    \"--build-clib=[directory to build C/C++ libraries to]\" \\\n    \"-b[directory to build C/C++ libraries to]\" \\\n    \"--build-temp=[directory to put temporary build by-products]\" \\\n    \"-t[directory to put temporary build by-products]\" \\\n    \"--debug[compile with debugging information]\" \\\n    \"-g[compile with debugging information]\" \\\n    \"--force[forcibly build everything (ignore file timestamps)]\" \\\n    \"-f[forcibly build everything (ignore file timestamps)]\" \\\n    \"--compiler=[specify the compiler type]\" \\\n    \"-c[specify the compiler type]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_build_scripts] )) ||\n_setuppy_build_scripts() {\n  _arguments -s \\\n    \"--build-dir=[directory to \\\"build\\\" (copy) to]\" \\\n    \"-d[directory to \\\"build\\\" (copy) to]\" \\\n    \"--force[forcibly build everything (ignore file timestamps]\" \\\n    \"-f[forcibly build everything (ignore file timestamps]\" \\\n    \"--executable=[specify final destination interpreter path]\" \\\n    \"-e[specify final destination interpreter path]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_clean] )) ||\n_setuppy_clean() {\n  _arguments -s \\\n    \"--build-base=[base build directory (default: 'build.build-base')]\" \\\n    \"-b[base build directory (default: 'build.build-base')]\" \\\n    \"--build-lib=[build directory for all modules (default: 'build.build-lib')]\" \\\n    \"--build-temp=[temporary build directory (default: 'build.build-temp')]\" \\\n    \"-t[temporary build directory (default: 'build.build-temp')]\" \\\n    \"--build-scripts=[build directory for scripts (default: 'build.build-scripts')]\" \\\n    \"--bdist-base=[temporary directory for built distributions]\" \\\n    \"--all[remove all build output, not just temporary by-products]\" \\\n    \"-a[remove all build output, not just temporary by-products]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_install] )) ||\n_setuppy_install() {\n  _arguments -s \\\n    \"--prefix=[installation prefix]\" \\\n    \"--exec-prefix=[(Unix only) prefix for platform-specific files]\" \\\n    \"--home=[(Unix only) home directory to install under]\" \\\n    \"--user[install in user site-package]\" \\\n    \"--install-base=[base installation directory (instead of --prefix or --home)]\" \\\n    \"--install-platbase=[base installation directory for platform-specific files (instead of --exec-prefix or --home)]\" \\\n    \"--root=[install everything relative to this alternate root directory]\" \\\n    \"--install-purelib=[installation directory for pure Python module distributions]\" \\\n    \"--install-platlib=[installation directory for non-pure module distributions]\" \\\n    \"--install-lib=[installation directory for all module distributions (overrides --install-purelib and --install-platlib)]\" \\\n    \"--install-headers=[installation directory for C/C++ headers]\" \\\n    \"--install-scripts=[installation directory for Python scripts]\" \\\n    \"--install-data=[installation directory for data files]\" \\\n    \"--compile[compile .py to .pyc \\[default\\]]\" \\\n    \"-c[compile .py to .pyc \\[default\\]]\" \\\n    \"--no-compile[don't compile .py files]\" \\\n    \"--optimize=[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"-O[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"--force[force installation (overwrite any existing files)]\" \\\n    \"-f[force installation (overwrite any existing files)]\" \\\n    \"--skip-build[skip rebuilding everything (for testing/debugging)]\" \\\n    \"--record=[filename in which to record list of installed files]\" \\\n    \"--old-and-unmanageable[Try not to use this!]\" \\\n    \"--single-version-externally-managed[used by system package builders to create 'flat' eggs]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_install_lib] )) ||\n_setuppy_install_lib() {\n  _arguments -s \\\n    \"--install-dir=[directory to install to]\" \\\n    \"-d[directory to install to]\" \\\n    \"--build-dir=[build directory (where to install from)]\" \\\n    \"-b[build directory (where to install from)]\" \\\n    \"--force[force installation (overwrite existing files)]\" \\\n    \"-f[force installation (overwrite existing files)]\" \\\n    \"--compile[compile .py to .pyc \\[default\\]]\" \\\n    \"-c[compile .py to .pyc \\[default\\]]\" \\\n    \"--no-compile[don't compile .py files]\" \\\n    \"--optimize=[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"-O[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"--skip-build[skip the build steps]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_install_headers] )) ||\n_setuppy_install_headers() {\n  _arguments -s \\\n    \"--install-dir=[directory to install header files to]\" \\\n    \"-d[directory to install header files to]\" \\\n    \"--force[force installation (overwrite existing files)]\" \\\n    \"-f[force installation (overwrite existing files)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_install_scripts] )) ||\n_setuppy_install_scripts() {\n  _arguments -s \\\n    \"--install-dir=[directory to install scripts to]\" \\\n    \"-d[directory to install scripts to]\" \\\n    \"--build-dir=[build directory (where to install from)]\" \\\n    \"-b[build directory (where to install from)]\" \\\n    \"--force[force installation (overwrite existing files)]\" \\\n    \"-f[force installation (overwrite existing files)]\" \\\n    \"--skip-build[skip the build steps]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_install_data] )) ||\n_setuppy_install_data() {\n  _arguments -s \\\n    \"--install-dir=[base directory for installing data files (default: installation base dir)]\" \\\n    \"-d[base directory for installing data files (default: installation base dir)]\" \\\n    \"--root=[install everything relative to this alternate root directory]\" \\\n    \"--force[force installation (overwrite existing files)]\" \\\n    \"-f[force installation (overwrite existing files)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_sdist] )) ||\n_setuppy_sdist() {\n  _arguments -s \\\n    \"--formats=[formats for source distribution (comma-separated list)]\" \\\n    \"--keep-temp[keep the distribution tree around after creating archive file(s)]\" \\\n    \"-k[keep the distribution tree around after creating archive file(s)]\" \\\n    \"--dist-dir=[directory to put the source distribution archive(s) in \\[default: dist\\]]\" \\\n    \"-d[directory to put the source distribution archive(s) in \\[default: dist\\]]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_register] )) ||\n_setuppy_register() {\n  _arguments -s \\\n    \"--repository=[url of repository \\[default: http://pypi.python.org/pypi\\]]\" \\\n    \"-r[url of repository \\[default: http://pypi.python.org/pypi\\]]\" \\\n    \"--show-response[display full response text from server]\" \\\n    \"--list-classifiers[list the valid Trove classifiers]\" \\\n    \"--strict[Will stop the registering if the meta-data are not fully compliant]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_bdist] )) ||\n_setuppy_bdist() {\n  _arguments -s \\\n    \"--bdist-base=[temporary directory for creating built distributions]\" \\\n    \"-b[temporary directory for creating built distributions]\" \\\n    \"--plat-name=[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"-p[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"--formats=[formats for distribution (comma-separated list)]\" \\\n    \"--dist-dir=[directory to put final built distributions in \\[default: dist\\]]\" \\\n    \"-d[directory to put final built distributions in \\[default: dist\\]]\" \\\n    \"--skip-build[skip rebuilding everything (for testing/debugging)]\" \\\n    \"--owner=[Owner name used when creating a tar file \\[default: current user\\]]\" \\\n    \"-u[Owner name used when creating a tar file \\[default: current user\\]]\" \\\n    \"--group=[Group name used when creating a tar file \\[default: current group\\]]\" \\\n    \"-g[Group name used when creating a tar file \\[default: current group\\]]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_bdist_dumb] )) ||\n_setuppy_bdist_dumb() {\n  _arguments -s \\\n    \"--bdist-dir=[temporary directory for creating the distribution]\" \\\n    \"-d[temporary directory for creating the distribution]\" \\\n    \"--plat-name=[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"-p[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"--format=[archive format to create (tar, ztar, gztar, zip)]\" \\\n    \"-f[archive format to create (tar, ztar, gztar, zip)]\" \\\n    \"--keep-temp[keep the pseudo-installation tree around after creating the distribution archive]\" \\\n    \"-k[keep the pseudo-installation tree around after creating the distribution archive]\" \\\n    \"--dist-dir=[directory to put final built distributions in]\" \\\n    \"-d[directory to put final built distributions in]\" \\\n    \"--skip-build[skip rebuilding everything (for testing/debugging)]\" \\\n    \"--relative[build the archive using relative paths(default: false)]\" \\\n    \"--owner=[Owner name used when creating a tar file \\[default: current user\\]]\" \\\n    \"-u[Owner name used when creating a tar file \\[default: current user\\]]\" \\\n    \"--group=[Group name used when creating a tar file \\[default: current group\\]]\" \\\n    \"-g[Group name used when creating a tar file \\[default: current group\\]]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_bdist_rpm] )) ||\n_setuppy_bdist_rpm() {\n  _arguments -s \\\n    \"--bdist-base=[base directory for creating built distributions]\" \\\n    \"--rpm-base=[base directory for creating RPMs (defaults to \\\"rpm\\\" under --bdist-base; must be specified for RPM 2)]\" \\\n    \"--dist-dir=[directory to put final RPM files in (and .spec files if --spec-only)]\" \\\n    \"-d[directory to put final RPM files in (and .spec files if --spec-only)]\" \\\n    \"--python=[path to Python interpreter to hard-code in the .spec file (default: \\\"python\\\")]\" \\\n    \"--fix-python[hard-code the exact path to the current Python interpreter in the .spec file]\" \\\n    \"--spec-only[only regenerate spec file]\" \\\n    \"--source-only[only generate source RPM]\" \\\n    \"--binary-only[only generate binary RPM]\" \\\n    \"--use-bzip2[use bzip2 instead of gzip to create source distribution]\" \\\n    \"--distribution-name=[name of the (Linux) distribution to which this RPM applies (*not* the name of the module distribution!)]\" \\\n    \"--group=[package classification \\[default: \\\"Development/Libraries\\\"\\]]\" \\\n    \"--release=[RPM release number]\" \\\n    \"--serial=[RPM serial number]\" \\\n    \"--vendor=[RPM \\\"vendor\\\" (eg. \\\"Joe Blow <joe@example.com>\\\") \\[default: maintainer or author from setup script\\]]\" \\\n    \"--packager=[RPM packager (eg. \\\"Jane Doe <jane@example.net>\\\")\\[default: vendor\\]]\" \\\n    \"--doc-files=[list of documentation files (space or comma-separated)]\" \\\n    \"--changelog=[RPM changelog]\" \\\n    \"--icon=[name of icon file]\" \\\n    \"--provides=[capabilities provided by this package]\" \\\n    \"--requires=[capabilities required by this package]\" \\\n    \"--conflicts=[capabilities which conflict with this package]\" \\\n    \"--build-requires=[capabilities required to build this package]\" \\\n    \"--obsoletes=[capabilities made obsolete by this package]\" \\\n    \"--no-autoreq[do not automatically calculate dependencies]\" \\\n    \"--keep-temp[don't clean up RPM build directory]\" \\\n    \"-k[don't clean up RPM build directory]\" \\\n    \"--no-keep-temp[clean up RPM build directory \\[default\\]]\" \\\n    \"--use-rpm-opt-flags[compile with RPM_OPT_FLAGS when building from source RPM]\" \\\n    \"--no-rpm-opt-flags[do not pass any RPM CFLAGS to compiler]\" \\\n    \"--rpm3-mode[RPM 3 compatibility mode (default)]\" \\\n    \"--rpm2-mode[RPM 2 compatibility mode]\" \\\n    \"--prep-script=[Specify a script for the PREP phase of RPM building]\" \\\n    \"--build-script=[Specify a script for the BUILD phase of RPM building]\" \\\n    \"--pre-install=[Specify a script for the pre-INSTALL phase of RPM building]\" \\\n    \"--install-script=[Specify a script for the INSTALL phase of RPM building]\" \\\n    \"--post-install=[Specify a script for the post-INSTALL phase of RPM building]\" \\\n    \"--pre-uninstall=[Specify a script for the pre-UNINSTALL phase of RPM building]\" \\\n    \"--post-uninstall=[Specify a script for the post-UNINSTALL phase of RPM building]\" \\\n    \"--clean-script=[Specify a script for the CLEAN phase of RPM building]\" \\\n    \"--verify-script=[Specify a script for the VERIFY phase of the RPM build]\" \\\n    \"--force-arch=[Force an architecture onto the RPM build process]\" \\\n    \"--quiet[Run the INSTALL phase of RPM building in quiet mode]\" \\\n    \"-q[Run the INSTALL phase of RPM building in quiet mode]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_bdist_wininst] )) ||\n_setuppy_bdist_wininst() {\n  _arguments -s \\\n    \"--bdist-dir=[temporary directory for creating the distribution]\" \\\n    \"--plat-name=[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"-p[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"--keep-temp[keep the pseudo-installation tree around after creating the distribution archive]\" \\\n    \"-k[keep the pseudo-installation tree around after creating the distribution archive]\" \\\n    \"--target-version=[require a specific python version on the target system]\" \\\n    \"--no-target-compile[do not compile .py to .pyc on the target system]\" \\\n    \"-c[do not compile .py to .pyc on the target system]\" \\\n    \"--no-target-optimize[do not compile .py to .pyo (optimized)on the target system]\" \\\n    \"-o[do not compile .py to .pyo (optimized)on the target system]\" \\\n    \"--dist-dir=[directory to put final built distributions in]\" \\\n    \"-d[directory to put final built distributions in]\" \\\n    \"--bitmap=[bitmap to use for the installer instead of python-powered logo]\" \\\n    \"-b[bitmap to use for the installer instead of python-powered logo]\" \\\n    \"--title=[title to display on the installer background instead of default]\" \\\n    \"-t[title to display on the installer background instead of default]\" \\\n    \"--skip-build[skip rebuilding everything (for testing/debugging)]\" \\\n    \"--install-script=[basename of installation script to be run afterinstallation or before deinstallation]\" \\\n    \"--pre-install-script=[Fully qualified filename of a script to be run before any files are installed.  This script need not be in the distribution]\" \\\n    \"--user-access-control=[specify Vista's UAC handling - 'none'/default=no handling, 'auto'=use UAC if target Python installed for all users, 'force'=always use UAC]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_upload] )) ||\n_setuppy_upload() {\n  _arguments -s \\\n    \"--repository=[url of repository \\[default: http://pypi.python.org/pypi\\]]\" \\\n    \"-r[url of repository \\[default: http://pypi.python.org/pypi\\]]\" \\\n    \"--show-response[display full response text from server]\" \\\n    \"--sign[sign files to upload using gpg]\" \\\n    \"-s[sign files to upload using gpg]\" \\\n    \"--identity=[GPG identity used to sign files]\" \\\n    \"-i[GPG identity used to sign files]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_check] )) ||\n_setuppy_check() {\n  _arguments -s \\\n    \"--metadata[Verify meta-data]\" \\\n    \"-m[Verify meta-data]\" \\\n    \"--restructuredtext[Checks if long string meta-data syntax are reStructuredText-compliant]\" \\\n    \"-r[Checks if long string meta-data syntax are reStructuredText-compliant]\" \\\n    \"--strict[Will exit with an error if a check fails]\" \\\n    \"-s[Will exit with an error if a check fails]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_alias] )) ||\n_setuppy_alias() {\n  _arguments -s \\\n    \"--remove[remove (unset) the alias]\" \\\n    \"-r[remove (unset) the alias]\" \\\n    \"--global-config[save options to the site-wide distutils.cfg file]\" \\\n    \"-g[save options to the site-wide distutils.cfg file]\" \\\n    \"--user-config[save options to the current user's pydistutils.cfg file]\" \\\n    \"-u[save options to the current user's pydistutils.cfg file]\" \\\n    \"--filename=[configuration file to use (default=setup.cfg)]\" \\\n    \"-f[configuration file to use (default=setup.cfg)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_bdist_egg] )) ||\n_setuppy_bdist_egg() {\n  _arguments -s \\\n    \"--bdist-dir=[temporary directory for creating the distribution]\" \\\n    \"-b[temporary directory for creating the distribution]\" \\\n    \"--plat-name=[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"-p[platform name to embed in generated filenames (default: linux-i686)]\" \\\n    \"--exclude-source-files[remove all .py files from the generated egg]\" \\\n    \"--keep-temp[keep the pseudo-installation tree around after creating the distribution archive]\" \\\n    \"-k[keep the pseudo-installation tree around after creating the distribution archive]\" \\\n    \"--dist-dir=[directory to put final built distributions in]\" \\\n    \"-d[directory to put final built distributions in]\" \\\n    \"--skip-build[skip rebuilding everything (for testing/debugging)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_develop] )) ||\n_setuppy_develop() {\n  _arguments -s \\\n    \"--prefix=[installation prefix]\" \\\n    \"--zip-ok[install package as a zipfile]\" \\\n    \"-z[install package as a zipfile]\" \\\n    \"--multi-version[make apps have to require() a version]\" \\\n    \"-m[make apps have to require() a version]\" \\\n    \"--upgrade[force upgrade (searches PyPI for latest versions)]\" \\\n    \"-U[force upgrade (searches PyPI for latest versions)]\" \\\n    \"--install-dir=[install package to DIR]\" \\\n    \"-d[install package to DIR]\" \\\n    \"--script-dir=[install scripts to DIR]\" \\\n    \"-s[install scripts to DIR]\" \\\n    \"--exclude-scripts[Don't install scripts]\" \\\n    \"-x[Don't install scripts]\" \\\n    \"--always-copy[Copy all needed packages to install dir]\" \\\n    \"-a[Copy all needed packages to install dir]\" \\\n    \"--index-url=[base URL of Python Package Index]\" \\\n    \"-i[base URL of Python Package Index]\" \\\n    \"--find-links=[additional URL(s) to search for packages]\" \\\n    \"-f[additional URL(s) to search for packages]\" \\\n    \"--build-directory=[download/extract/build in DIR; keep the results]\" \\\n    \"-b[download/extract/build in DIR; keep the results]\" \\\n    \"--optimize=[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"-O[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"--record=[filename in which to record list of installed files]\" \\\n    \"--always-unzip[don't install as a zipfile, no matter what]\" \\\n    \"-Z[don't install as a zipfile, no matter what]\" \\\n    \"--site-dirs=[list of directories where .pth files work]\" \\\n    \"-S[list of directories where .pth files work]\" \\\n    \"--editable[Install specified packages in editable form]\" \\\n    \"-e[Install specified packages in editable form]\" \\\n    \"--no-deps[don't install dependencies]\" \\\n    \"-N[don't install dependencies]\" \\\n    \"--allow-hosts=[pattern(s) that hostnames must match]\" \\\n    \"-H[pattern(s) that hostnames must match]\" \\\n    \"--local-snapshots-ok[allow building eggs from local checkouts]\" \\\n    \"-l[allow building eggs from local checkouts]\" \\\n    \"--version[print version information and exit]\" \\\n    \"--no-find-links[Don't load find-links defined in packages being installed]\" \\\n    \"--user[install in user site-package]\" \\\n    \"--uninstall[Uninstall this source package]\" \\\n    \"-u[Uninstall this source package]\" \\\n    \"--egg-path=[Set the path to be used in the .egg-link file]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_easy_install] )) ||\n_setuppy_easy_install() {\n  _arguments -s \\\n    \"--prefix=[installation prefix]\" \\\n    \"--zip-ok[install package as a zipfile]\" \\\n    \"-z[install package as a zipfile]\" \\\n    \"--multi-version[make apps have to require() a version]\" \\\n    \"-m[make apps have to require() a version]\" \\\n    \"--upgrade[force upgrade (searches PyPI for latest versions)]\" \\\n    \"-U[force upgrade (searches PyPI for latest versions)]\" \\\n    \"--install-dir=[install package to DIR]\" \\\n    \"-d[install package to DIR]\" \\\n    \"--script-dir=[install scripts to DIR]\" \\\n    \"-s[install scripts to DIR]\" \\\n    \"--exclude-scripts[Don't install scripts]\" \\\n    \"-x[Don't install scripts]\" \\\n    \"--always-copy[Copy all needed packages to install dir]\" \\\n    \"-a[Copy all needed packages to install dir]\" \\\n    \"--index-url=[base URL of Python Package Index]\" \\\n    \"-i[base URL of Python Package Index]\" \\\n    \"--find-links=[additional URL(s) to search for packages]\" \\\n    \"-f[additional URL(s) to search for packages]\" \\\n    \"--build-directory=[download/extract/build in DIR; keep the results]\" \\\n    \"-b[download/extract/build in DIR; keep the results]\" \\\n    \"--optimize=[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"-O[also compile with optimization: -O1 for \\\"python -O\\\", -O2 for \\\"python -OO\\\", and -O0 to disable \\[default: -O0\\]]\" \\\n    \"--record=[filename in which to record list of installed files]\" \\\n    \"--always-unzip[don't install as a zipfile, no matter what]\" \\\n    \"-Z[don't install as a zipfile, no matter what]\" \\\n    \"--site-dirs=[list of directories where .pth files work]\" \\\n    \"-S[list of directories where .pth files work]\" \\\n    \"--editable[Install specified packages in editable form]\" \\\n    \"-e[Install specified packages in editable form]\" \\\n    \"--no-deps[don't install dependencies]\" \\\n    \"-N[don't install dependencies]\" \\\n    \"--allow-hosts=[pattern(s) that hostnames must match]\" \\\n    \"-H[pattern(s) that hostnames must match]\" \\\n    \"--local-snapshots-ok[allow building eggs from local checkouts]\" \\\n    \"-l[allow building eggs from local checkouts]\" \\\n    \"--version[print version information and exit]\" \\\n    \"--no-find-links[Don't load find-links defined in packages being installed]\" \\\n    \"--user[install in user site-package]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_egg_info] )) ||\n_setuppy_egg_info() {\n  _arguments -s \\\n    \"--egg-base=[directory containing .egg-info directories (default: top of the source tree)]\" \\\n    \"-e[directory containing .egg-info directories (default: top of the source tree)]\" \\\n    \"--tag-svn-revision[Add subversion revision ID to version number]\" \\\n    \"-r[Add subversion revision ID to version number]\" \\\n    \"--tag-date[Add date stamp (e.g. 20050528) to version number]\" \\\n    \"-d[Add date stamp (e.g. 20050528) to version number]\" \\\n    \"--tag-build=[Specify explicit tag to add to version number]\" \\\n    \"-b[Specify explicit tag to add to version number]\" \\\n    \"--no-svn-revision[Don't add subversion revision ID \\[default\\]]\" \\\n    \"-R[Don't add subversion revision ID \\[default\\]]\" \\\n    \"--no-date[Don't include date stamp \\[default\\]]\" \\\n    \"-D[Don't include date stamp \\[default\\]]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_rotate] )) ||\n_setuppy_rotate() {\n  _arguments -s \\\n    \"--match=[patterns to match (required)]\" \\\n    \"-m[patterns to match (required)]\" \\\n    \"--dist-dir=[directory where the distributions are]\" \\\n    \"-d[directory where the distributions are]\" \\\n    \"--keep=[number of matching distributions to keep]\" \\\n    \"-k[number of matching distributions to keep]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_saveopts] )) ||\n_setuppy_saveopts() {\n  _arguments -s \\\n    \"--global-config[save options to the site-wide distutils.cfg file]\" \\\n    \"-g[save options to the site-wide distutils.cfg file]\" \\\n    \"--user-config[save options to the current user's pydistutils.cfg file]\" \\\n    \"-u[save options to the current user's pydistutils.cfg file]\" \\\n    \"--filename=[configuration file to use (default=setup.cfg)]\" \\\n    \"-f[configuration file to use (default=setup.cfg)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_setopt] )) ||\n_setuppy_setopt() {\n  _arguments -s \\\n    \"--command=[command to set an option for]\" \\\n    \"-c[command to set an option for]\" \\\n    \"--option=[option to set]\" \\\n    \"-o[option to set]\" \\\n    \"--set-value=[value of the option]\" \\\n    \"-s[value of the option]\" \\\n    \"--remove[remove (unset) the value]\" \\\n    \"-r[remove (unset) the value]\" \\\n    \"--global-config[save options to the site-wide distutils.cfg file]\" \\\n    \"-g[save options to the site-wide distutils.cfg file]\" \\\n    \"--user-config[save options to the current user's pydistutils.cfg file]\" \\\n    \"-u[save options to the current user's pydistutils.cfg file]\" \\\n    \"--filename=[configuration file to use (default=setup.cfg)]\" \\\n    \"-f[configuration file to use (default=setup.cfg)]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_test] )) ||\n_setuppy_test() {\n  _arguments -s \\\n    \"--test-module=[Run 'test_suite' in specified module]\" \\\n    \"-m[Run 'test_suite' in specified module]\" \\\n    \"--test-suite=[Test suite to run (e.g. 'some_module.test_suite')]\" \\\n    \"-s[Test suite to run (e.g. 'some_module.test_suite')]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_install_egg_info] )) ||\n_setuppy_install_egg_info() {\n  _arguments -s \\\n    \"--install-dir=[directory to install to]\" \\\n    \"-d[directory to install to]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n(( $+functions[_setuppy_upload_docs] )) ||\n_setuppy_upload_docs() {\n  _arguments -s \\\n    \"--repository=[url of repository \\[default: http://pypi.python.org/pypi\\]]\" \\\n    \"-r[url of repository \\[default: http://pypi.python.org/pypi\\]]\" \\\n    \"--show-response[display full response text from server]\" \\\n    \"--upload-dir=[directory to upload]\" \\\n    \"*::setup.py commands:_setup.py\"\n}\n\n_setup.py \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_showoff",
    "content": "#compdef showoff\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Showoff (https://github.com/schacon/showoff).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Bruno Michel (https://github.com/nono)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal curcontext=\"$curcontext\" state line cmds ret=1\n\n_arguments -C \\\n\t'1: :->cmds' \\\n\t'*: :->args' && ret=0\n\ncase $state in\n\tcmds)\n\t\tcmds=(\n\t\t'add:Add a new slide at the end in a given dir'\n\t\t'new:Add a new slide at the end in a given dir'\n\t\t'create:Create new showoff presentation'\n\t\t'init:Create new showoff presentation'\n\t\t'help:Shows list of commands or help for one command'\n\t\t'heroku:Setup your presentation to serve on Heroku'\n\t\t'serve:Serves the showoff presentation in the current directory'\n\t\t'static:Generate static version of presentation'\n\t\t)\n\t\t_describe -t commands 'showoff command' cmds && ret=0\n\t\t;;\n\targs)\n\t\tcase $line[1] in\n\t\t\t(add|new)\n\t\t\t\t_arguments \\\n\t\t\t\t\t'(-d --dir)'{-d,--dir}'=[Slide dir (where to put a new slide file)]:directory:_files' \\\n\t\t\t\t\t'(-n --name)'{-n,--name}'=[Slide name (name of the new slide file)]:basename' \\\n\t\t\t\t\t{-s,--source}'=[Include code from the given file as the slide body]:file:_files' \\\n\t\t\t\t\t'(-t --style --type)'{-t,--style,--type}'=[Slide Type/Style (default: title)]:style' \\\n\t\t\t\t\t'(-u --no-number)'{-u,--no-number}'[Dont number the slide, use the given name verbatim]' \\\n\t\t\t\t\t'1:title' && ret=0\n\t\t\t\t;;\n\t\t\t(create|init)\n\t\t\t\t_arguments \\\n\t\t\t\t\t'(-d --slidedir)'{-d,--slidedir}'=[Sample slide directory name (default: one)]:arg' \\\n\t\t\t\t\t'(-n --nosamples)'{-n,--nosamples}'=[Dont create sample slides]' \\\n\t\t\t\t\t'1:dir_name' && ret=0\n\t\t\t\t;;\n\t\t\thelp)\n\t\t\t\t_values 'commands' add new create init help heroku serve static && ret=0\n\t\t\t\t;;\n\t\t\theroku)\n\t\t\t\t_message 'please entrer an heroku_name' && ret=0\n\t\t\t\t;;\n\t\t\tserve)\n\t\t\t\t_arguments \\\n\t\t\t\t\t'(-h --host)'{-h,--host}'=[Host or ip to run on (default: localhost)]:host' \\\n\t\t\t\t\t'(-p --port)'{-p,--port}'=[Port on which to run (default: 9090)]:port' \\\n\t\t\t\t\t'1:title' && ret=0\n\t\t\t\t;;\n\t\t\tstatic)\n\t\t\t\t_message 'please entrer a name' && ret=0\n\t\t\t\t;;\n\t\t\t*)\n\t\t\t\t(( ret )) && _message 'no more arguments'\n\t\t\t\t;;\n\t\tesac\n\t\t;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_shutdown",
    "content": "#compdef shutdown\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for shutdown - Shut down the system\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Timofey Titovets <nefelim4ag@gmail.com>\n#\n# ------------------------------------------------------------------------------\n_shutdown(){\n\tlocal -a _1st_arguments\n\t_1st_arguments=(\n\t\t\"--help:Show help\"\n\t\t\"-H:Halt the machine\" \"--halt:Halt the machine\"\n\t\t\"-P:Power-off the machine\" \"--poweroff:Power-off the machine\"\n\t\t\"-r:Reboot the machine\" \"--reboot:Reboot the machine\"\n\t\t\"-h:Equivalent to --poweroff, overridden by --halt\"\n\t\t\"-k:Dont halt/power-off/reboot, just send warnings\"\n\t\t\"--no-wall:Dont send wall message before halt/power-off/reboot\"\n\t\t\"-c:Cancel a pending shutdown\"\n\t)\n\n\tlocal context state line expl\n\tlocal -A opt_args\n\n\t_arguments '*:: :->subcmds' && return 0\n\n\tif (( CURRENT == 1 )); then\n\t\t_describe -t commands \"shutdown commands\" _1st_arguments -V1\n\t\treturn\n\tfi\n\n\tcase \"$words[1]\" in\n\t\t*)\n\t\t\t_arguments \\\n\t\t\t\t':list option:(now +{0,5,10,15,30} hh:mm)'\n\t\t;;\n\tesac\n}\n\n_shutdown \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_smartmontools",
    "content": "#compdef smartctl smartd\n# ------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for smartmontools (http://smartmontools.sourceforge.net).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_smartctl() {\n\tlocal context state line expl\n\tlocal -A opt_args\n\n\t_arguments -A \"-*\" \\\n\t\t'(-h --help --usage)'{-h,--help,--usage}'[Show help message]' \\\n\t\t'(-V --version --copyright --license)'{-v,--version,--copyright,--license}'[Print license, copyright, and version information and exit]' \\\n\t\t'(-i --info)'{-i,--info}'[Show identity information for device]' \\\n\t\t'(-a --all)'{-a,--all}\"[Show all SMART information for device]\" \\\n\t\t'(-x --xall)'{-xa,--xall}\"[Show all information for device]\" \\\n\t\t'--scan[Scan for devices]' \\\n\t\t'--scan-open[Scan for devices and try to open each device]' \\\n\t\t\\\n\t\t'(-q --quietmode)'{-q,--quietmode}'[Set smartctl quiet mode]:TYPE:(errorsonly silent noserial)' \\\n\t\t'(-d --device)'{-d,--device}'[Specify device type]:TYPE:(ata scsi sat usbcypress usbjmicron usbsunplus marvell areca 3ware hpt megaraid cciss auto test)' \\\n\t\t'(-T --tolerance)'{-T,--tolerance}'[Set tolerance]:TOLERANCE:(normal conservative permissive verypermissive)' \\\n\t\t'(-b --badsum)'{-q,--badsum}'[Set action on bad checksum]:TYPE:(warn exit ignore)' \\\n\t\t'(-r --report)'{-r,--report}'[Report transactions]:TYPE:' \\\n\t\t'(-n --nocheck)'{-n,--nocheck}'[No check if MODE]:MODE:(never sleep standby idle)' \\\n\t\t\\\n\t\t'(-s --smart)'{-s,--smart}'[Enable/disable SMART on device]:VALUE:(on off)' \\\n\t\t'(-o --offlineauto)'{-o,--offlineauto}'[Enable/disable automatic offline testing on device]:VALUE:(on off)' \\\n\t\t'(-S --saveauto)'{-S,--saveauto}'[Enable/disable attribute autosave on device]:VALUE:(on off)' \\\n\t\t\\\n\t\t'(-H --health)'{-H,--health}'[Show device SMART health status]' \\\n\t\t'(-c --capabilities)'{-c,--capabilities}'[Show device SMART capabilities]' \\\n\t\t'(-A --attributes)'{-A,--attributes}'[Show device SMART vendor-specific attributes and values]' \\\n\t\t'(-f --format)'{-f,--format}'[Set output format for attributes]:FORMAT:(old brief)' \\\n\t\t'(-l --log)'{-l,--log}'[Show device log]:TYPE:(error selftest selective directory background sasphy sataphy scttemp scterc gplog smartlog xerror xselftest)' \\\n\t\t'(-v --vendorattribute)'{-v,--vendorattribute}'[Set display option for vendor attribute]:N,OPTION:' \\\n\t\t'(-F --firmwarebug)'{-F,--firmwarebug}'[Use firmware bug workaround]:TYPE:(none samsung samsung2 samsung3 swapid)' \\\n\t\t'(-P --presets)'{-P,--presets}'[Drive-specific presets]:TYPE:(use ignore show showall)' \\\n\t\t'(-B --drivedb)'{-B,--drivedb}'[Read and replace drive database from file]:FILE:_files' \\\n\t\t\\\n\t\t'(-t --test)'{-t,--test}'[Run test]:TEST:(offline short long conveyance vendor select pending afterselect,on afterselect,off scttempint)' \\\n\t\t'(-C --captive)'{-C,--captive}'[Do test in captive mode]' \\\n\t\t'(-X --abort)'{-X,--abort}'[Abort any non-captive test on device]' \\\n\t\t\\\n\t\t'1:Device:_files'\n}\n\n_smartd() {\n\tlocal context state line expl\n\tlocal -A opt_args\n\n\t_arguments -A \"-*\" \\\n\t\t'(-h --help --usage)'{-h,--help,--usage}'[Show help message]' \\\n\t\t'(-V --version --copyright --license)'{-v,--version,--copyright,--license}'[Print license, copyright, and version information and exit]' \\\n\t\t\\\n\t\t'(-A --attributelog)'{-A,--attributelog}'[Log ATA attribute information to {PREFIX}MODEL-SERIAL.ata.csv]:PREFIX:' \\\n\t\t'(-B --drivedb)'{-B,--drivedb}'[Read and replace drive database from file]:FILE:_files' \\\n\t\t'(-c --configfile)'{-c,--configfile}'[Read configuration file or stdin]:FILE:_files' \\\n\t\t'(-d --debug)'{-d,--debug}'[Start smartd in debug mode]' \\\n\t\t'(-D --showdirectives)'{-D,--showdirectives}'[Print the configuration file directives and exit]' \\\n\t\t'(-i --interval)'{-i,--interval}'[Set interval between disk checks to N seconds, where N >= 10]:Seconds >= 10:' \\\n\t\t'(-l --logfacility)'{-l,--logfacility}'[Use syslogfacility local0 - local7 or daemon]:FACILITY:(local0 local1 local2 local3 local4 local5 local6 local7)' \\\n\t\t'(-n --no-fork)'{-n,--no-fork}'[Do not fork into background]' \\\n\t\t'(-p --pidfile)'{-p,--pidfile}'[Write PID file]:FILE:_files' \\\n\t\t'(-q --quit)'{-q,--quit}'[Quit on...]:WHEN:(nodev errors nodevstartup never onecheck showtests)' \\\n\t\t'(-r --report)'{-r,--report}'[Report transactions for...]:TYPE:(ioctl ataioctl scsiioctl)' \\\n\t\t'(-s --savestates)'{-s,--savestates}'[Save disk states to {PREFIX}MODEL-SERIAL.TYPE.state]:TYPE:'\n}\n\n_smartmontools() {\n\tlocal ret=1\n\t_call_function ret _$service\n\treturn ret\n}\n\n_smartmontools \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_srm",
    "content": "#compdef srm\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be included\n# in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n# OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for srm.\n#\n#  It is based on the rm completion script from Zsh.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Sorin Ionescu <sorin.ionescu@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal -a opts args\nargs=(\n  '(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]'\n  '(-r --interactive)'{-i,--interactive}'[prompt before any removal]'\n  '(-r -R --recursive)'{-r,-R,--recursive}'[remove the contents of directories recursively]'\n  '(-s --simple)'{-s,--simple}'[only overwrite with a single pass of random data]'\n  '(-v --verbose)'{-v,--verbose}'[explain what is being done]'\n  '(- *)--help[display help message and exit]'\n  '(- *)--version[output version information and exit]'\n  '*::files:->file'\n)\n\nif _pick_variant gnu=gnu unix --help; then\n  args+=(\n    '(-x --one-file-system)'{-x,--one-file-system}'[stay within filesystems of files given as arguments]'\n    '(-P --openbsd)'{-P,--openbsd}'[overwrite the file 3 times (0xff, 0x00, 0xff)]'\n    '(-D --dod)'{-D,--dod}'[overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)]'\n    '(-E --doe)'{-E,--doe}'[overwrite the file with 3 US DoE compliant passes (random, random, DoE)]'\n  )\nelse\n  args+=(\n    '(-m --medium)'{-m,--medium}'[overwrite the file with 7 US DoD compliant passes (0xF6, 0x00, 0xFF, random, 0x00, 0xFF, random)]'\n    '(-z --zero)'{-z,--zero}'[after overwriting, zero blocks used by file]'\n    '(-n --nounlink)'{-n,--nounlink}'[overwrite file, but do not rename or unlink it]' \n  )\nfi\n\nlocal curcontext=$curcontext state line ret=1\nlocal -A opt_args\n\n_arguments -s -S -C $opts \\\n  $args && ret=0\n\ncase $state in\n  (file)\n    local -a ignored\n    ignored=()\n    ((CURRENT > 1)) &&\n      ignored+=(${line[1,CURRENT-1]//(#m)[\\[\\]()\\\\*?#<>~\\^]/\\\\$MATCH})\n    ((CURRENT < $#line)) &&\n      ignored+=(${line[CURRENT+1,-1]//(#m)[\\[\\]()\\\\*?#<>~\\^]/\\\\$MATCH})\n    _files -F ignored && ret=0\n    ;;\nesac\n\nreturn $ret\n"
  },
  {
    "path": ".config/zsh/completions/src/_ssh-copy-id",
    "content": "#compdef ssh-copy-id\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for ssh-copy-id.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n# FIXME This completes \"user@host\" and not \"[user@]host\" (\"user@\" is optional),\n#       should be merged in _ssh.\n\n_arguments -A \"-*\" \\\n  '-i+[use identity file]:SSH identity file:_files' \\\n  '-n+[do a dry-run]' \\\n  '-h+[print usage summary]' \\\n  '-p+[specify custom port]' \\\n  '-o+[additional ssh option]' \\\n  '1: :_user_at_host'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_stack",
    "content": "#compdef stack\n# ------------------------------------------------------------------------------\n# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for stack (https://github.com/commercialhaskell/stack).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Toshiki Teramura <toshiki.teramura@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_stack () {\n    _arguments \\\n        --version'[display version information]' \\\n        --help'[display usage information]' \\\n        '--docker*''[run \"stack --docker-help\" for details]' \\\n        --verbosity'[verbosity: silent, error, warn, info, debug]' \\\n        {-v,--verbose}'[enable verbose mode: verbosity level \"debug\"]' \\\n        --system-ghc'[enable using the system installed GHC (on the PATH) if available and a matching version]' \\\n        --no-system-ghc'[disable using the system installed GHC (on the PATH) if available and a matching version]' \\\n        --install-ghc'[enable downloading and installing GHC if necessary (can be done manually with stack setup)]' \\\n        --no-install-ghc'[disable downloading and installing GHC if necessary (can be done manually with stack setup)]' \\\n        --arch'[system architecture, e.g. i386, x86_64]' \\\n        --os'[operating system, e.g. linux, windows]' \\\n        {-j,--jobs}'[number of concurrent jobs to run]' \\\n        --extra-include-dirs'[extra directories to check for C header files]' \\\n        --extra-lib-dirs'[extra directories to check for libraries]' \\\n        --skip-ghc-check'[enable skipping the GHC version and architecture check]' \\\n        --no-skip-ghc-check'[disable skipping the GHC version and architecture check]' \\\n        --skip-msys'[enable skipping the local MSYS installation (Windows only)]' \\\n        --no-skip-msys'[disable skipping the local MSYS installation (Windows only)]' \\\n        --resolver'[override resolver in project file]' \\\n        --no-terminal'[override terminal detection in the case of running in a false terminal]' \\\n        --stack-yaml'[override project stack.yaml file (overrides any STACK_YAML environment variable)]' \\\n        '*: :__stack_modes'\n}\n\n__stack_modes () {\n    _values \\\n        'subcommand' \\\n        'build[build the project(s) in this directory/configuration]' \\\n        'install[build executables and install to a user path]' \\\n        'test[build and test the project(s) in this directory/configuration]' \\\n        'bench[build and benchmark the project(s) in this directory/configuration]' \\\n        'haddock[generate haddocks for the project(s) in this directory/configuration]' \\\n        'new[create a brand new project]' \\\n        'init[initialize a stack project based on one or more cabal packages]' \\\n        'solver[use a dependency solver to try and determine missing extra-deps]' \\\n        'setup[get the appropriate ghc for your project]' \\\n        'path[print out handy path information]' \\\n        'unpack[unpack one or more packages locally]' \\\n        'update[update the package index]' \\\n        'upgrade[upgrade to the latest stack (experimental)]' \\\n        'upload[upload a package to Hackage]' \\\n        'dot[visualize your projects dependency graph using Graphviz dot]' \\\n        'exec[execute a command]' \\\n        'ghc[run ghc]' \\\n        'ghci[run ghci in the context of project(s)]' \\\n        'ide[run ide-backend-client with the correct arguments]' \\\n        'runghc[run runghc]' \\\n        'clean[clean the local packages]' \\\n        'docker[subcommands specific to Docker use]'\n\n}\n\n_stack \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_subl",
    "content": "#compdef subl\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Sublime Text (https://www.sublimetext.com/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Fabian Klötzl (https://github.com/kloetzl)\n#\n# ------------------------------------------------------------------------------\n\n\nlocal I=\"-h --help -v --version\"\nlocal -a args\nargs+=(\n  \"(- *)\"{-h,--help}'[display usage information]'\n  \"(- *)\"{-v,--version}'[display version information]'\n  \"($I)--project[load the given project]:project\"\n  \"($I)--command[run the given command]:command\"\n  \"($I -n --new-window)\"{-n,--new-window}'[open a new window]'\n  \"($I -a --add)\"{-a,--add}'[add folders to the current window]'\n  \"($I -w --wait)\"{-w,--wait}'[wait for the files to be closed before returning]'\n  \"($I -b --background)\"{-b,--background}\"[don't activate the application]\"\n)\n_arguments \"$args[@]\" '*:file:_files'\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_subliminal",
    "content": "#compdef subliminal\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Subliminal (https://github.com/Diaoul/subliminal).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n  '(- : *)'{-h,--help}'[show help message and exit]' \\\n  '(- : *)--version[show version number and exit]' \\\n  '*'{-l,--language}'[wanted language]: :_language_codes ISO-639-1' \\\n  '*'{-p,--plugin}'[plugin to use]:plugin name:((OpenSubtitles BierDopje TheSubDB SubsWiki Subtitulos))' \\\n  '(-m --multi)'{-m,--multi}'[download multiple subtitle languages]' \\\n  '(-f --force)'{-f,--force}'[replace existing subtitle file]' \\\n  '(-w --workers)'{-w,--workers}'[number of threads to use]:number' \\\n  '(-c --compatibility)'{-c,--compatibility}'[try not to use unicode]' \\\n  '(-q --quiet -v --verbose)'{-q,--quiet}'[disable output]' \\\n  '(-v --verbose -q --quiet)'{-v,--verbose}'[verbose output]' \\\n  '(--no-cache-dir)--cache-dir[cache directory to use]: :_files -/' \\\n  '(--cache-dir)--no-cache-dir[do not use cache directory]' \\\n  '*: :_files'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_supervisorctl",
    "content": "#compdef supervisorctl\n# ------------------------------------------------------------------------------\n# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for supervisorctl from Supervisord (http://supervisord.org)\n#\n#  Sources:\n#  https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/supervisor\n#  https://github.com/zsh-users/zsh-completions/blob/master/src/_brew\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Matt Black (https://github.com/mafrosis)\n#  * dongweiming (https://github.com/dongweiming)\n#\n# ------------------------------------------------------------------------------\n\n\n_supervisorctl_list_procs() {\n  procs=(${(f)\"$(_call_program supervisor_procs supervisorctl avail | awk '{print $1}')\"})\n}\n_supervisorctl_list_groups() {\n  groups=(${(f)\"$(_call_program supervisor_procs supervisorctl avail | awk '$1 ~ /:/ { print substr($1,1,index($1,\":\")) }' | uniq)\"})\n}\n\n_supervisorctl_list_procs_stopped() {\n  procs=(${(f)\"$(_call_program supervisor_procs supervisorctl status | awk '/STOPPED/ {print $1}')\"})\n}\n_supervisorctl_list_groups_stopped() {\n  groups=(${(f)\"$(_call_program supervisor_procs supervisorctl status | awk '$1$2 ~ /:(.*)STOPPED/ { print substr($1,1,index($1,\":\")) }' | uniq)\"})\n}\n\n_supervisorctl_list_procs_running() {\n  procs=(${(f)\"$(_call_program supervisor_procs supervisorctl status | awk '/RUNNING/ {print $1}')\"})\n}\n_supervisorctl_list_groups_running() {\n  groups=(${(f)\"$(_call_program supervisor_procs supervisorctl status | awk '$1$2 ~ /:(.*)RUNNING/ { print substr($1,1,index($1,\":\")) }' | uniq)\"})\n}\n\nlocal -a _1st_arguments\n_1st_arguments=(\n  'add:Activates any updates in config for process/group'\n  'avail:Display all configured processes'\n  'clear:Clear single/multiple/all process log files'\n  'exit:Exit the supervisor shell'\n  'fg:Connect to a process in foreground mode'\n  'maintail:tail of supervisor main log file'\n  'open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)'\n  'pid:Get the PID of process/supervisord'\n  'quit:Exit the supervisor shell'\n  'reload:Restart the remote supervisord'\n  'remove:Removes process/group from active config'\n  \"reread:Reload the daemon's configuration files\"\n  'restart:Restart process, group or all'\n  'shutdown:Shut the remote supervisord down'\n  'start:Start process, group or all'\n  'status:Get process/group status info'\n  'stop:Stop process, group or all'\n  'tail:tail of process stdout'\n  'update:Reload config and add/remove as necessary'\n  'version:Show the version of the remote supervisord process'\n  'help:Show help'\n)\n\nlocal expl\nlocal -a procs\n\n_arguments \\\n  {--configuration,-c}='[configuration file path (default /etc/supervisor.conf)]:filename:_files' \\\n  {--help,-h}'[print usage message and exit]:' \\\n  {--interactive,-i}'[start an interactive shell after executing commands]' \\\n  {--serverurl,-s}='[URL on which supervisord server is listening (default \"http://localhost:9001\")]' \\\n  {--username,-u}='[username to use for authentication with server]:username:_users' \\\n  {--password,-p}='[password to use for authentication with server]:password:' \\\n  {--history-file,-r}'[keep a readline history (if readline is available)]:filename:_files' \\\n  '*:: :->subcmds' && return 0\n\nif (( CURRENT == 1 )); then\n  _describe -t commands 'supervisorctl subcommand' _1st_arguments\n  return\nfi\n\ncase \"$words[1]\" in\n  help)\n    tasks=(add avail clear exit fg maintail open pid quit reload remove \\\n           reread restart shutdown start status stop tail update version)\n\n    _wanted tasks expl 'help' compadd $tasks ;;\n\n  add|fg|remove)\n    # commands that only operate on processes\n    _supervisorctl_list_procs\n    _wanted procs expl 'process' compadd -a procs ;;\n\n  clear|pid)\n    # commands that operate on processes and \"all\"\n    _supervisorctl_list_procs\n    procs+=('all')\n    _wanted procs expl 'process' compadd -a procs ;;\n\n  status|update)\n    # commands that operate on processes, groups & \"all\"\n    _supervisorctl_list_procs\n    procs+=('all')\n    _wanted procs expl 'process' compadd -a procs\n\n    _supervisorctl_list_groups\n    _wanted groups expl 'group' compadd -a groups ;;\n\n  stop)\n    # commands that operate on RUNNING processes, groups & \"all\"\n    _supervisorctl_list_procs_running\n    procs+=('all')\n    _wanted procs expl 'process' compadd -a procs\n\n    _supervisorctl_list_groups_running\n    _wanted groups expl 'group' compadd -a groups ;;\n\n  restart|start)\n    # commands that operate on STOPPED processes, groups & \"all\"\n    _supervisorctl_list_procs_stopped\n    procs+=('all')\n    _wanted procs expl 'process' compadd -a procs\n\n    _supervisorctl_list_groups_stopped\n    _wanted groups expl 'group' compadd -a groups ;;\n\n  tail|maintail)\n    _arguments \\\n      '-f[Continuous tail of named process stdout]' \\\n      '-[last N *bytes* of process stdout]:number' \\\n      '1: :->forms' && return 0\n\n      if [[ $state == forms ]]; then\n        _supervisorctl_list_procs\n        _wanted procs expl 'processes' compadd -a procs\n      fi ;;\nesac\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_svm",
    "content": "#compdef svm\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for svm (https://github.com/yuroyoro/svm)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Hideaki Miyake (https://github.com/mollifier)\n#\n# ------------------------------------------------------------------------------\n\nlocal context curcontext=\"$curcontext\" state line ret=1\ntypeset -A opt_args\n\n\nlocal -a _1st_arguments\n_1st_arguments=(\n  'help:show this usage information'\n  'current:show the currently use scala version'\n  \"list:show the scala version installed in svm_path(default is ${HOME}/.svm)\"\n  \"versions:show the available scala version not installed\"\n  'install:install specific scala version'\n  'remove:uninstall specific scala version and remove their sources'\n  'switch:setup to use a specific scala version'\n  'update-latest:install or update nightly build scala version'\n  'latest:setup to use nightly build scala version'\n  'stable:setup to use stable(x.x.x.final) scala version'\n)\n\n_arguments -C \\\n  '(-)-h[show this usage information]' \\\n  '-c[show the currently use scala version]' \\\n  \"-l[show the scala version installed in svm_path(default is ${HOME}/.svm)]\" \\\n  '-v[show the abalabe scala version not installed]' \\\n  '-i[install specific scala version]: :_svm_completion_not_installed_scala_versions' \\\n  '-r[uninstall specific scala version and remove their sources]: :_svm_completion_installed_scala_versions' \\\n  '(-s -u)'{-s,-u}'[setup to use a specific scala version]: :_svm_completion_not_selected_scala_versions' \\\n  '1: :->cmds' \\\n  '*:: :->args' && ret=0\n\n\n# installed scala versions\n(( $+functions[_svm_completion_installed_scala_versions] )) ||\n_svm_completion_installed_scala_versions() {\n  local -a _installed_versions\n  _current_version=\"${$(_call_program installed svm current)#currently version is[[:space:]]*}\"\n\n  # collect lines starts with digit\n  _installed_versions=( ${(M)${(@f)\"$(_call_program installed svm list)\"}:#[[:digit:]]*} )\n\n  _describe -t installed \"installed versions\" _installed_versions\n}\n\n# installed and not selected scala versions\n(( $+functions[_svm_completion_not_selected_scala_versions] )) ||\n_svm_completion_not_selected_scala_versions() {\n  local _current_version\n  local -a _not_selected_versions\n\n  _current_version=\"${$(_call_program installed svm current)#currently version is[[:space:]]*}\"\n\n  # collect lines starts with digit\n  _not_selected_versions=( ${(M)${(@f)\"$(_call_program installed svm list)\"}:#[[:digit:]]*} )\n\n  # remove current version\n  _not_selected_versions=( ${_not_selected_versions:#$_current_version})\n  _describe -t installed \"not selected versions\" _not_selected_versions\n}\n\n# not installed scala versions\n(( $+functions[_svm_completion_not_installed_scala_versions] )) ||\n_svm_completion_not_installed_scala_versions() {\n  local -a _not_installed_versions\n  # collect lines starts with digit\n  _not_installed_versions=( ${(M)${(@f)\"$(_call_program installed svm versions)\"}:#[[:digit:]]*} )\n\n  _describe -t notinstalled \"not installed versions\" _not_installed_versions\n}\n\n\ncase $state in\n  cmds)\n    # action\n    case $PREFIX in\n      u*)\n        # complete command synonyms\n        local -a _synonym_arguments\n        _synonym_arguments=(\n          'uninstall:uninstall specific scala version and remove their sources'\n          'use:setup to use a specific scala version'\n          'update-latest:install or update nightly build scala version'\n        )\n        _describe -t actions 'svm actions' _synonym_arguments && ret=0\n        ;;\n\n      *)\n        _describe -t actions 'svm actions' _1st_arguments\n        _svm_completion_not_selected_scala_versions && ret=0\n        ;;\n    esac\n    ;;  # end action\n\n  args)\n    # scala version number\n    case $words[1] in\n      install)\n        # install not installed version\n        _arguments \\\n          '1: :_svm_completion_not_installed_scala_versions' \\\n          '--docs[with install, update-latest download scala-devel-docs.]' \\\n          '--sources[with install, update-latest download scala-sources.]' && ret=0\n        ;;\n\n      remove|uninstall)\n        # remove installed version\n        _arguments \\\n          '1: :_svm_completion_installed_scala_versions' && ret=0\n        ;;\n\n      switch|use)\n        # use installed version\n        _arguments \\\n          '1: :_svm_completion_not_selected_scala_versions' && ret=0\n        ;;\n\n    esac\n\n    ;;  # end args\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_tarsnap",
    "content": "#compdef tarsnap\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014-2017 Daniel Teunis - https://github.com/danteu\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for tarsnap 1.0.39 (http://tarsnap.com).\n#\n# ------------------------------------------------------------------------------\n# Author\n# -------\n#\n#  * Daniel Teunis <daniel@teunis.cc>\n#\n# ------------------------------------------------------------------------------\n\n_arguments \\\n  '(- 1 *)--help[prints tarsnap help]' \\\n  '(- 1 *)--version[prints tarsnap version number]' \\\n  '(- 1 *)--verify-config[checks configuration files for syntactic errors]' \\\n  '--fsck[performs integrity checks on the stored archives]' \\\n  '--fsck-prune[performs integrity checks and prunes broken data]' \\\n  '--list-archives[prints names of stored archives]' \\\n  '--nuke[deletes all stored archives]' \\\n  '--print-stats[prints archive statistics]' \\\n  '--recover[recovers partial archive]' \\\n  '-c[creates archive]' \\\n  '-d[deletes specified archive]' \\\n  '-r[prints content of specified archive]' \\\n  '-t[lists archive content]' \\\n  '-x[extracts specified archive]' \\\n  '--lowmem[reduces memory usage by not caching small files]' \\\n  '--quiet[silences some warnings]' \\\n  '--keyfile[specifies keyfile]:keyfile:->file' \\\n  '--cachedir[specifies cache directory]:cachedir:->directory' \\\n  '-f[specifies archive name]:archivename:->file'\n\ncase \"$state\" in\n  file)\n    _files\n    ;;\n  directory)\n    _path_files -/\n    ;;\nesac\n"
  },
  {
    "path": ".config/zsh/completions/src/_teamocil",
    "content": "#compdef teamocil\n# ------------------------------------------------------------------------------\n# Copyright (c) 2014 Github zsh-users - https://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Teamocil 0.4.5 (https://github.com/remiprev/teamocil).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Petr Zelenin <petr.zelenin@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_arguments \\\n    '--here[set up the first window in the current window]' \\\n    '--edit[edit the YAML layout file instead of using it]' \\\n    '--layout [use a specific layout file, instead of \\`~/.teamocil/<layout>.yml\\`]' \\\n    '--list[list all available layouts in \\`~/.teamocil/\\`]' \\\n    '--show[show the content of the layout file instead of executing it]' \\\n    '*:teamocil layouts:_files -W ~/.teamocil -g \"*.yml(:r)\"'\n"
  },
  {
    "path": ".config/zsh/completions/src/_thor",
    "content": "#compdef thor\n# ------------------------------------------------------------------------------\n# Copyright (c) 2009-2015 Robby Russell and contributors (see\n# https://github.com/robbyrussell/oh-my-zsh/contributors)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for thor (https://github.com/wycats/thor).\n#\n#  Source: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/thor\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Andrew Hodges (https://github.com/betawaffle)\n#\n# ------------------------------------------------------------------------------\n\n\n# FIXME This should be rewritten using up-to-date ZSH completion API.\ncompadd `thor list | grep thor | cut -d \" \" -f 2`\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_tmuxinator",
    "content": "#compdef tmuxinator mux\n# ------------------------------------------------------------------------------\n# Copyright (c) 2010-2016 Christopher Chow\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the Software, and to\n# permit persons to whom the Software is furnished to do so, subject to\n# the following conditions:\n#\n# The above copyright notice and this permission notice shall be\n# included in all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n# ------------------------------------------------------------------------------\n#\n# Description\n# -----------\n#\n#  Completion script for tmuxinator (https://github.com/tmuxinator/tmuxinator)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Christopher Chow (https://github.com/Soliah)\n#\n# ------------------------------------------------------------------------------\n\n_tmuxinator() {\n  local commands projects\n  commands=(${(f)\"$(tmuxinator commands zsh)\"})\n  projects=(${(f)\"$(tmuxinator completions start)\"})\n\n  if (( CURRENT == 2 )); then\n    _describe -t commands \"tmuxinator subcommands\" commands\n    _describe -t projects \"tmuxinator projects\" projects\n  elif (( CURRENT == 3)); then\n    case $words[2] in\n      copy|debug|delete|open|start)\n        _arguments '*:projects:($projects)'\n      ;;\n    esac\n  fi\n\n  return\n}\n\n_tmuxinator\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_tmuxp",
    "content": "#compdef tmuxp\n\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for tmuxp (https://tmuxp.git-pull.com/en/latest/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Bez Hermoso <bezalelhermoso@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_tmuxp() {\n\n  local curcontext=\"$curcontext\" state line\n  typeset -A opt_args\n\n  _arguments -C \\\n    \":command:->command\" \\\n    \"*::options:->options\" \\\n    \"--log_level:log level:(DEBUG INFO WARNING ERROR CRITICAL)\" \\\n    \"--help[display usage information]\"\n\n    case $state in\n      (command)\n        local -a subcommands\n        subcommands=(\n        'convert:Convert a tmuxp config between JSON and YAML.'\n        'freeze:Snapshot a session into a config.'\n        'import:Import a teamocil/tmuxinator config.'\n        'load:Load tmuxp workspaces.'\n        )\n        _describe -t commands 'commands' subcommands\n        ;;\n      (options)\n        case $line[1] in\n          (load)\n            __tmuxp_load\n            ;;\n          (import)\n            __tmuxp_import\n            ;;\n          (freeze)\n            local sessions=\"$(__tmux_sessions)\"\n            _arguments -C \\\n              \"1::session name:compadd $sessions\"\n            ;;\n          (convert)\n            _arguments -C \\\n              '1:: :_files -g \"*.(json|yaml|yml)\"'\n            ;;\n        esac\n    esac\n\n}\n\n__tmuxp_load() {\n  local state line\n  typeset -A opt_args\n  _arguments -C \\\n    '*:sessions:->sessions' \\\n    '--yes:yes' \\\n    '-d[Load the session without attaching it]' \\\n    '-2[Force tmux to assume the terminal supports 256 colors]' \\\n    '-8[Like -2, but indicates that the terminal supports 88 colors]'\n\n  # Cant get the options to be recognized when there are sessions that has\n  # a dash.\n\n  case $state in\n    (sessions)\n      local s\n      _alternative \\\n        'sessions-user:user session:compadd -F line - ~/.tmuxp/*.(json|yml|yaml)(:r:t)' \\\n        'sessions-other:session in current directory:_path_files -g \"**/*.(json|yaml|yml)(-.)\"'\n      ;;\n  esac\n}\n\n__tmuxp_import() {\n  local state line\n  typeset -A opt_args\n  _arguments -C \\\n    '1::program:(tmuxinator teamocil)' \\\n    '2::project:->project'\n\n  case $state in\n    (project)\n      if [[ $line[1] == 'tmuxinator' ]]\n      then\n        _wanted tmuxinator-projects exp 'tmuxinator projects' compadd $(tmuxinator completions start)\n      fi\n      ;;\n  esac\n}\n\n__tmux_sessions () {\n  local tmux_sessions\n  tmux_sessions=($(_call_program tmux_sessions 'tmux ls -F \"#{session_name}\"'))\n  echo $tmux_sessions\n}\n\n_tmuxp \"$@\"\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_trash-empty",
    "content": "#compdef trash-empty\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for trash-empty a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_trash-empty() {\n\n  _arguments -C \\\n    '--version[Show programs version number and exit]' \\\n    {-h,--help}'[Show help message and exit]' \\\n    '*: :' \\\n\n}\n\n_trash-empty\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_trash-list",
    "content": "#compdef trash-list\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for trash-list a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments \\\n  '--version[show programs version number and exit]' \\\n  {-h,--help}'[show help message and exit]' \\\n  '*: :'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_trash-put",
    "content": "#compdef trash-put trash\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for trash-put a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_arguments -C \\\n  '--version[display version information]' \\\n  {-h,--help}'[display usage information]' \\\n  {-d,--directory}'[remove empty directories - ignored (for GNU rm compabilty)]' \\\n  {-f,--force}'[ignore nonexistent arguments and never prompt - ignored (for GNU rm compabilty)]' \\\n  {-i,--interactive}'[prompt before every removal - ignored (for GNU rm compabilty)]' \\\n  {-r,-R,--recursive}'[remove directories and their content recursively - ignored (for GNU rm compabilty)]' \\\n  {-v,--verbose}'[explain what is being done]' \\\n  '*: :_files'\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_trash-restore",
    "content": "#compdef trash-restore\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for trash-restore a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_trash-restore() {\n\n  _arguments -C \\\n    '--version[Show programs version number and exit]' \\\n    '*: :' \\\n\n}\n\n_trash-restore\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_udisksctl",
    "content": "#compdef udisksctl\n#\n# ------------------------------------------------------------------------------\n# The MIT License\n#\n# Copyright 2014 Damir Jelić\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n# \n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n#\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for udisksctl\n#   (https://cgit.freedesktop.org/udisks/tree/tools)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Damir Jelić <poljarinho at gmail.com> [1]\n#  * Ole Jørgen Brønner <olejorgenb at yahoo.no> (minor additions)\n#\n# [1] https://lists.freedesktop.org/archives/devkit-devel/2014-February/001554.html\n#\n# ------------------------------------------------------------------------------\n# Notes\n# -----\n#\n# udisksctl actually provide built-in support for completion: It accepts an\n# special command 'complete' that returns completeions. That is what drives the\n# upstream bash completion. In the future one might condsider rewriting using\n# that. (but not sure how straight forward it would be to provide descriptions?)\n#\n\n_paths() {\n    local -a _path_list\n\n    for _path in $(_call_program paths \"udisksctl complete \\\"udisksctl $words\\\" $CURSOR\"); do\n        _path_list+=$_path\n    done\n\n    _describe 'path' _path_list\n}\n\n_filesystems() {\n    _fs_types=(\n        'adfs' 'affs' 'autofs' 'cifs' 'coda' 'coherent' 'cramfs' 'debugfs' 'devpts'\n        'efs' 'ext' 'ext2' 'ext3' 'ext4' 'hfs' 'hfsplus' 'hpfs' 'iso9660' 'jfs' 'minix'\n        'msdos' 'ncpfs' 'nfs' 'nfs4' 'ntfs' 'proc' 'qnx4' 'ramfs' 'reiserfs' 'romfs'\n        'squashfs' 'smbfs' 'sysv' 'tmpfs' 'ubifs' 'udf' 'ufs' 'umsdos' 'usbfs' 'vfat'\n        'xenix' 'xfs' 'xiafs'\n    )\n\n    _describe 'file system type' _fs_types\n}\n\n_udisksctl() {\n    typeset -A opt_args\n    local curcontext=\"$curcontext\" state line ret=1\n\n    _arguments -C \\\n        '1:udisksctl commands:->cmds' \\\n        '*:: :->cmd_args' && ret=0\n\n    case $state in\n        cmds)\n            local commands; commands=(\n                'help:show help'\n                'info:show info about an object'\n                'dump:show info about all object'\n                'status:shows high-level status'\n                'monitor:monitor changes to objects'\n                'mount:mount a filesystem'\n                'unmount:unmount a filesystem'\n                'unlock:unlock an encrypted device'\n                'lock:lock an encrypted device'\n                'loop-setup:set-up a loop device'\n                'loop-delete:delete a loop device'\n                'power-off:safely power off a drive'\n                'smart-simulate:set SMART data for a drive'\n            )\n            _describe -t commands 'udisksctl command' commands && ret=0\n        ;;\n\n        cmd_args)\n            case $words[1] in\n                info)\n                    _arguments \\\n                        {-p,--object-path}'[specify object to get information about]:object path:_paths' \\\n                        {-b,--block-device}'[specify block device to get information about]:block device:_paths' \\\n                        {-d,--drive}'[specify drive to get information about]:drive:_paths' && ret=0\n                ;;\n                mount)\n                    _arguments \\\n                        {-p,--object-path}'[specify object to mount]:object path:_paths' \\\n                        {-b,--block-device}'[specify block device to mount]:block device:_paths' \\\n                        {-t,--filesystem-type}'[specify filesystem type to use]:fs type:_filesystems' \\\n                        {-o,--options}'[mount options]' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]\" && ret=0\n                ;;\n                unmount)\n                    _arguments \\\n                        {-p,--object-path}'[object to unmount]:object path:_paths' \\\n                        {-b,--block-device}'[block device to unmount]:block device:_paths' \\\n                        {-f,--force}'[force/lazy unmount]' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't auhenticate the user if needed]\" && ret=0\n                ;;\n                unlock|lock)\n                    _arguments \\\n                        {-p,--object-path}'[object to lock/unlock]:object path:_paths' \\\n                        {-b,--block-device}'[block device to lock/unlock]:block device:_paths' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]\" && ret=0\n                ;;\n                loop-setup)\n                    _arguments \\\n                        {-f,--file}'[specify file to set-up a loop device for]:files:_files' \\\n                        {-r,--read-only}'[setup read-only device]' \\\n                        {-o,--offset}'[start at specified offset into file]:offset (bytes)' \\\n                        {-s,--size}'[limit size]:limit (bytes)' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]\" && ret=0\n                ;;\n                loop-delete)\n                    _arguments \\\n                        {-p,--object-path}'[object for loop device to delete]:object path:_paths' \\\n                        {-b,--block-device}'[loop device to delete]:block device:_paths' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]\" && ret=0\n                ;;\n                power-off)\n                    _arguments \\\n                        {-p,--object-path}'[object path for ATA device]:object path:_paths' \\\n                        {-b,--block-device}'[device file for ATA devic]:block device:_paths' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]\" && ret=0\n                ;;\n                smart-simulate)\n                    _arguments \\\n                        {-f,--file}'[file with libatasmart blob]:files:_files' \\\n                        {-p,--object-path}'[object to get information about]:object path:_paths' \\\n                        {-b,--block-device}'[block device to get information about]:block device:_paths' \\\n                        \"(--no-user-interaction)--no-user-interaction[don't authenticate the user if needed]\" && ret=0\n                ;;\n            esac\n        ;;\n    esac\n    return ret\n}\n\n_udisksctl \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_ufw",
    "content": "#compdef ufw\n# ------------------------------------------------------------------------------\n# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for The Uncomplicated Firewall (ufw). (https://launchpad.net/ufw).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jindřich Pilař (https://github.com/JindrichPilar)\n#\n# ------------------------------------------------------------------------------\n\n\n_ufw_logging() {\n\n    local params additional second\n    second=$words[2]\n\n    if [ ! -z $second ]; then\n        return\n    fi\n\n    params=(\n      \"on\"\n      \"off\"\n    )\n\n    additional=(\n      \"low\"\n      \"medium\"\n      \"high\"\n      \"full\"\n    )\n\n    _describe -t params 'on/off' params\n    _describe -t additional 'level' additional\n}\n\n\n_ufw_delete() {\n    local rules complrules second\n\n    second=$words[2]\n\n    if [ ! -z $second ]; then\n        return\n    fi\n\n    complrules=()\n    rules=(\"${(f)$(ufw status | tr -s ' ' | tail -n +5 | tr -s '\\n')}\")\n\n    for ((i=1; i<=${#rules[@]}; i++)); do\n        complrules+=(\"$i:$rules[i]\");\n    done\n\n    _describe -t complrules 'Rules' complrules\n}\n\n_ufw() {\n    local curcontext=\"$curcontext\" ret=1\n    local -a state line commands\n\n    commands=(\n      \"enable:enable the firewall\"\n      \"disable:disable the firewall\"\n      \"default:set default policy\"\n      \"logging:set logging level\"\n      \"allow:add allow rule\"\n      \"deny:add deny rule\"\n      \"reject:add reject rule\"\n      \"limit:add limit rule\"\n      \"delete:delete rule\"\n      \"insert:insert rule at position\"\n      \"route:add route rule\"\n      \"reload:reload firewall\"\n      \"reset:reset firewall\"\n      \"status:show firewall status\"\n      \"show:show firewall report\"\n      \"version:display version information\"\n    )\n\n    _arguments -C -s -S -n \\\n        '(- 1 *)'--version\"[display version information]: :->full\" \\\n        '(- 1 *)'{-h,--help}'[display usage information]: :->full' \\\n        '(- 1 *)'--dry-run\"[don't modify anything, just show the changes]: :->cmds\" \\\n        '1:cmd:->cmds' \\\n        '*:: :->args' && ret=0\n\n    case \"$state\" in\n      (cmds)\n          _describe -t commands 'commands' commands\n      ;;\n      (args)\n         local cmd\n         cmd=$words[1]\n         case \"$cmd\" in\n             (logging)\n                 _ufw_logging && ret=0\n             ;;\n             (delete)\n                 _ufw_delete && ret=0\n             ;;\n             (*)\n                 _default && ret=0\n             ;;\n         esac\n      ;;\n      (*)\n      ;;\n    esac\n\n    return ret\n}\n\n_ufw\n\n"
  },
  {
    "path": ".config/zsh/completions/src/_vagrant",
    "content": "#compdef vagrant\n# ------------------------------------------------------------------------------\n# Copyright (c) 2009-2015 Robby Russell and contributors (see\n# https://github.com/robbyrussell/oh-my-zsh/contributors)\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for Vagrant (http://vagrantup.com).\n#\n#  Source: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/vagrant\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Nikita Fedyashev (https://github.com/nfedyashev)\n#  * Mark Cornick (https://github.com/markcornick)\n#\n# ------------------------------------------------------------------------------\n\n# vagrant zsh completion\n\nlocal -a _1st_arguments\n_1st_arguments=(\n    'box:Box commands'\n    'connect:Connects to a shared, remote Vagrant environment'\n    'destroy:Destroys the vagrant environment'\n    'docker-logs:Shows Docker logs'\n    'docker-run:Run one-off commands against a Docker container'\n    'global-status:Reports the status of all active Vagrant environments on the system'\n    'halt:Halts the currently running vagrant environment'\n    'help:[TASK] Describe available tasks or one specific task'\n    'init:[box_name] [box_url] Initializes current folder for Vagrant usage'\n    'list-commands:Outputs all available Vagrant subcommands'\n    'login:Authenticates against a Vagrant Cloud server to access protected boxes'\n    'package:Packages a vagrant environment for distribution'\n    'plugin:Manage plugins'\n    'provision:Run the provisioner'\n    'push:Deploys code in this environment to a configured destination'\n    'rdp:Connects to machine via RDP'\n    'reload:Reload the vagrant environment'\n    'resume:Resumes a suspend vagrant environment'\n    'rsync:Syncs rsync synced folders to remote machine'\n    'rsync-auto:Syncs rsync synced folders automatically when files change'\n    'share:Shares the Vagrant environment and allows remote access'\n    'ssh:SSH into the currently running environment'\n    'ssh-config:Outputs .ssh/config valid syntax for connecting to this environment via ssh'\n    'status:Shows the status of the current Vagrant environment'\n    'suspend:Suspends the currently running vagrant environment'\n    'up:Creates the vagrant environment'\n    'version:Prints the currently installed Vagrant version and checks for new updates'\n    '--version:Prints the Vagrant version information'\n)\n\nlocal -a _box_arguments\n_box_arguments=(\n    'add:NAME URI Add a box to the system'\n    'help:COMMAND Describe subcommands or one specific subcommand'\n    'list:Lists all installed boxes'\n    'outdated:Checks if there is a new version available for the box'\n    'remove:NAME Remove a box from the system'\n    'repackage:NAME Repackage an installed box into a `.box` file.'\n    'update:Updates the box, if there any updates available'\n)\n\nlocal -a _plugin_arguments\n_plugin_arguments=(\n    'install:NAME Install a plugin to the system'\n    'license:NAME LICENSE_FILE Add a license for an installed plugin'\n    'list:Lists all installed plugins'\n    'uninstall:NAME Uninstall a plugin from the system'\n    'update:[NAMES...] Update all or specified plugins'\n)\n\n__task_list ()\n{\n    local expl\n    declare -a tasks\n\n    tasks=(box destroy global-status halt init package plugin provision \\\n           reload resume ssh ssh_config status suspend up version)\n\n    _wanted tasks expl 'help' compadd $tasks\n}\n\n__box_list ()\n{\n    _wanted application expl 'command' compadd $(command vagrant box list | \\\n                                                 awk '{print $1}' | \\\n                                                 sed -e 's/ /\\\\ /g')\n}\n\n__plugin_list ()\n{\n    _wanted application expl 'command' compadd $(command vagrant plugin list \\\n                                                 2>/dev/null| cut -d' ' -f1)\n}\n\n_vagrant_caching_policy()\n{\n    local reg_time comp_time check_file\n\n    case \"${1##*/}\" in\n        VAGRANT_VMS)\n            if [[ -z $VAGRANT_CWD ]]; then\n                check_file=./Vagrantfile\n            else\n                check_file=$VAGRANT_CWD/Vagrantfile\n            fi\n            ;;\n        *)\n            echo \"unknown type: $1\"\n            return -1\n            ;;\n    esac\n\n    case $(uname -s) in\n        Darwin) STATCMD=\"stat -f '%c'\" ;;\n        *)      STATCMD=\"stat -c '%Z'\" ;;\n    esac\n    reg_time=${$(${(z)STATCMD} $check_file):Q}\n    comp_time=${$(${(z)STATCMD} $1):Q}\n\n    return $(( reg_time < comp_time ))\n}\n\n__vm_list ()\n{\n    local cache_policy\n    zstyle -s \":completion:${curcontext}:\" cache-policy cache_policy\n    zstyle \":completion:${curcontext}:\" cache-policy \\\n        ${cache_policy:-_vagrant_caching_policy}\n\n    # Cache the list of VMs available\n    if ( [[ ${+_vagrant_vms} -eq 0 ]] || _cache_invalid VAGRANT_VMS ) &&\n        ! _retrieve_cache VAGRANT_VMS;\n    then\n      _vagrant_vms=( $(_call_program path-all \"vagrant status | \\\n                       awk '{print \\$1}' | \\\n                       egrep -v '^$|^(Current|This|above|VM,)$'\" ) )\n      _store_cache VAGRANT_VMS _vagrant_vms\n    fi\n\n    _wanted application expl 'command' compadd $_vagrant_vms\n}\n\n__vagrant-box ()\n{\n    local curcontext=\"$curcontext\" state line\n    typeset -A opt_args\n\n    _arguments -C \\\n        ':command:->command' \\\n        '*::options:->options'\n\n   case $state in\n       (command)\n           _describe -t commands \"gem subcommand\" _box_arguments\n           return\n       ;;\n\n       (options)\n           case $line[1] in\n               (repackage|remove)\n                   _arguments ':feature:__box_list'\n               ;;\n           esac\n       ;;\n    esac\n}\n\n__vagrant-plugin ()\n{\n    local curcontext=\"$curcontext\" state line\n    local -A opt_args\n\n    _arguments -C \\\n        ':command:->command' \\\n        '*::options:->options'\n\n   case $state in\n       (command)\n           _describe -t commands \"gem subcommand\" _plugin_arguments\n           return\n       ;;\n\n       (options)\n           case $line[1] in\n               (license)\n                   _arguments ':feature:__plugin_list' '*:file:_files'\n               ;;\n               (uninstall)\n                   _arguments ':feature:__plugin_list'\n               ;;\n           esac\n       ;;\n    esac\n}\n\nlocal expl\nlocal -a boxes installed_boxes\n\nlocal curcontext=\"$curcontext\" state line\nlocal -A opt_args\n\n_arguments -C \\\n    ':command:->command' \\\n    '*::options:->options'\n\ncase $state in\n  (command)\n      _describe -t commands \"gem subcommand\" _1st_arguments\n      return\n  ;;\n\n  (options)\n    case $line[1] in\n      (help)\n         _arguments ':feature:__task_list'\n      ;;\n\n      (box)\n          __vagrant-box\n      ;;\n\n      (plugin)\n          __vagrant-plugin\n      ;;\n      (up|provision|package|destroy|reload|ssh|halt|resume|status|suspend)\n          _arguments ':feature:__vm_list'\n    esac\n  ;;\nesac\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_virsh",
    "content": "#compdef virsh\n# ------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for LibVirt's Shell (virsh) (http://libvirt.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jan-Philipp Litza <janphilipp@litza.de>\n#  * Vadim A. Misbakh-Soloviov <mva@mva.name>\n#\n# ------------------------------------------------------------------------------\n\nlocal -a args reply\n\nfunction _virsh-domains() {\n  local -a out\n  out=( ${${${${(f)\"$(virsh list \"$@\")\"}:#(---| Id)*}## #[0-9-]## ##}%% *} )\n  _describe -t domains \"${${1#--}:-running} domains\" out\n  return $?\n}\n\nlocal -a expand_files\nexpand_files=(/$'[^\\0]##\\0'/ ':file:file name:_files')\n\nlocal -a expand_dirs\nexpand_dirs=(/$'[^\\0]##\\0'/ \":dir:dir name:_files -/\")\n\nlocal -a expand_domains\nexpand_domains=(\n  /$'[^\\0]##\\0'/\n  \":domains:domains:{_virsh-domains --all}\"\n)\n\nlocal -a expand_domains_running\nexpand_domains_running=(\n  /$'[^\\0]##\\0'/\n  \":domains:running domains:{_virsh-domains}\"\n)\n\nlocal -a expand_domains_inactive\nexpand_domains_inactive=(\n  /$'[^\\0]##\\0'/\n  \":domains:inactive domains:{_virsh-domains --inactive}\"\n)\n\nlocal -a expand_kilobytes\nexpand_kilobytes=(\n  /'\\d+'/\n  \":kilobytes:kilobytes:\"\n)\n\nlocal -a expand_count\nexpand_count=(\n  /'\\d+'/\n  \":count:count:\"\n)\n\nlocal -a subcmd_help\nsubcmd_help=(\n  /$'[^\\0]##\\0'/\n  \":command:virsh command:\"\n)\n\nlocal -a subcmd_list\n_regex_words \\\n  list-options 'list options' \\\n  '--all:list all domains, not only active' \\\n  '--inactive:list only inactive domains'\nsubcmd_list=(\"$reply[@]\")\n\nlocal -a subcmd_freecell\nsubcmd_freecell=(\n  /'\\d*'/\n  \":numa-cell:NUMA cell:\"\n)\n\nlocal -a subcmd_autostart\n_regex_words \\\n  autostart-options 'autostart options' \\\n  '--disable:disables autostart instead of enabling'\nsubcmd_autostart=(\"(\" \"$reply[@]\" \"|\" \")\" $expand_domains)\n\nlocal -a subcmd_create\n_regex_words \\\n  create-options 'create options' \\\n  '--console:attach to the console after creation' \\\n  '--paused:pause domain after creation (if supported by driver)'\nsubcmd_create=(\"(\" \"$reply[@]\" \"|\" \")\" $expand_files)\n\nlocal -a subcmd_dumpxml\n_regex_words \\\n  dumpxml-options 'dumpxml options' \\\n  '--inactive:use the config for next reboot instead of current' \\\n  '--security-info:include security sensitive information' \\\n  '--update-cpu:update CPU requirements according to host CPU'\nsubcmd_dumpxml=(\"(\" \"$reply[@]\" \"|\" \")\" $expand_domains)\n\nlocal -a subcmd_start\n_regex_words \\\n  start-options 'start options' \\\n  '--console:attach to console after start' \\\n  '--paused: pause after start (if supported by driver)'\nsubcmd_start=(\"(\" \"$reply[@]\" \"|\" \")\" $expand_domains_inactive)\n\nargs=( /$'[^\\0]#\\0'/ )\n\n_regex_words \\\n  commands \"virsh command\" \\\n    'help:print help:$subcmd_help' \\\n    'attach-device:attach device from an XML file:$expand_domains $expand_files' \\\n    'attach-disk:attach disk device' \\\n    'attach-interface:attach network interface' \\\n    'autostart:autostart a domain:$subcmd_autostart' \\\n    'capabilities:capabilities:' \\\n    'cd:change the current directory:$expand_dirs' \\\n    'connect:(re)connect to hypervisor' \\\n    'console:connect to the guest console:$expand_domains_running' \\\n    'cpu-baseline:compute baseline CPU:$expand_files' \\\n    'cpu-compare:compare host CPU with a CPU described by an XML file:$expand_files' \\\n    'create:create a domain from an XML file:$subcmd_create' \\\n    'start:start a (previously defined) inactive domain:$subcmd_start' \\\n    'destroy:destroy a domain:$expand_domains_running' \\\n    'detach-device:detach device from an XML file:$expand_domains $expand_files' \\\n    'detach-disk:detach disk device' \\\n    'detach-interface:detach network interface' \\\n    'define:define (but don'\"\\'\"'t start) a domain from an XML file:$expand_files' \\\n    'domid:convert a domain name or UUID to domain id:$expand_domains' \\\n    'domuuid:convert a domain name or id to domain UUID:$expand_domains' \\\n    'dominfo:domain information:$expand_domains' \\\n    'domjobinfo:domain job information:$expand_domains' \\\n    'domjobabort:abort active domain job:$expand_domains' \\\n    'domname:convert a domain id or UUID to domain name:$expand_domains' \\\n    'domstate:domain state:$expand_domains' \\\n    'domblkstat:get device block stats for a domain' \\\n    'domifstat:get network interface stats for a domain' \\\n    'dommemstat:get memory statistics for a domain:$expand_domains_running' \\\n    'domblkinfo:domain block device size information' \\\n    'domxml-from-native:Convert native config to domain XML' \\\n    'domxml-to-native:Convert domain XML to native config' \\\n    'dumpxml:domain information in XML:$subcmd_dumpxml' \\\n    'edit:edit XML configuration for a domain:$expand_domains' \\\n    'find-storage-pool-sources:discover potential storage pool sources' \\\n    'find-storage-pool-sources-as:find potential storage pool sources' \\\n    'freecell:NUMA free memory:$subcmd_freecell' \\\n    'hostname:print the hypervisor hostname:' \\\n    'list:list domains:$subcmd_list' \\\n    'migrate:migrate domain to another host' \\\n    'migrate-setmaxdowntime:set maximum tolerable downtime' \\\n    'net-autostart:autostart a network' \\\n    'net-create:create a network from an XML file:$expand_files' \\\n    'net-define:define (but don'\"\\'\"'t start) a network from an XML file:$expand_files' \\\n    'net-destroy:destroy a network' \\\n    'net-dumpxml:network information in XML' \\\n    'net-edit:edit XML configuration for a network' \\\n    'net-list:list networks' \\\n    'net-name:convert a network UUID to network name' \\\n    'net-start:start a (previously defined) inactive network' \\\n    'net-undefine:undefine an inactive network' \\\n    'net-uuid:convert a network name to network UUID' \\\n    'iface-list:list physical host interfaces' \\\n    'iface-name:convert an interface MAC address to interface name' \\\n    'iface-mac:convert an interface name to interface MAC address' \\\n    'iface-dumpxml:interface information in XML' \\\n    'iface-define:define (but don'\"\\'\"'t start) a physical host interface from an XML file' \\\n    'iface-undefine:undefine a physical host interface (remove it from configuration)' \\\n    'iface-edit:edit XML configuration for a physical host interface' \\\n    'iface-start:start a physical host interface (enable it / \"if-up\")' \\\n    'iface-destroy:destroy a physical host interface (disable it / \"if-down\")' \\\n    'managedsave:managed save of a domain state:$expand_domains_running' \\\n    'managedsave-remove:Remove managed save of a domain:$expand_domains' \\\n    'nodeinfo:node information:' \\\n    'nodedev-list:enumerate devices on this host' \\\n    'nodedev-dumpxml:node device details in XML' \\\n    'nodedev-dettach:dettach node device from its device driver' \\\n    'nodedev-reattach:reattach node device to its device driver' \\\n    'nodedev-reset:reset node device' \\\n    'nodedev-create:create a device defined by an XML file on the node' \\\n    'nodedev-destroy:destroy a device on the node' \\\n    'nwfilter-define:define or update a network filter from an XML file:$expand_files' \\\n    'nwfilter-undefine:undefine a network filter' \\\n    'nwfilter-dumpxml:network filter information in XML' \\\n    'nwfilter-list:list network filters' \\\n    'nwfilter-edit:edit XML configuration for a network filter' \\\n    'pool-autostart:autostart a pool' \\\n    'pool-build:build a pool' \\\n    'pool-create:create a pool from an XML file:$expand_files' \\\n    'pool-create-as:create a pool from a set of args' \\\n    'pool-define:define (but don'\"\\'\"'t start) a pool from an XML file:$expand_files' \\\n    'pool-define-as:define a pool from a set of args' \\\n    'pool-destroy:destroy a pool' \\\n    'pool-delete:delete a pool' \\\n    'pool-dumpxml:pool information in XML' \\\n    'pool-edit:edit XML configuration for a storage pool' \\\n    'pool-info:storage pool information' \\\n    'pool-list:list pools' \\\n    'pool-name:convert a pool UUID to pool name' \\\n    'pool-refresh:refresh a pool' \\\n    'pool-start:start a (previously defined) inactive pool' \\\n    'pool-undefine:undefine an inactive pool' \\\n    'pool-uuid:convert a pool name to pool UUID' \\\n    'secret-define:define or modify a secret from an XML file:$expand_files' \\\n    'secret-dumpxml:secret attributes in XML' \\\n    'secret-set-value:set a secret value' \\\n    'secret-get-value:Output a secret value' \\\n    'secret-undefine:undefine a secret' \\\n    'secret-list:list secrets' \\\n    'pwd:print the current directory:' \\\n    'quit:quit this interactive terminal:' \\\n    'exit:quit this interactive terminal:' \\\n    'reboot:reboot a domain:$expand_domains' \\\n    'restore:restore a domain from a saved state in a file:$expand_files' \\\n    'resume:resume a domain:$expand_domains_running' \\\n    'save:save a domain state to a file:$expand_domains $expand_files' \\\n    'schedinfo:show/set scheduler parameters' \\\n    'dump:dump the core of a domain to a file for analysis:$expand_domains $expand_files' \\\n    'shutdown:gracefully shutdown a domain:$expand_domains_running' \\\n    'setmem:change memory allocation:$expand_domains $expand_kilobytes' \\\n    'setmaxmem:change maximum memory limit:$expand_domains $expand_kilobytes' \\\n    'setvcpus:change number of virtual CPUs:$expand_domains $expand_count' \\\n    'suspend:suspend a domain:$expand_domains_running' \\\n    'ttyconsole:tty console:$expand_domains_running' \\\n    'undefine:undefine an inactive domain:$expand_domains_inactive' \\\n    'update-device:update device from an XML file' \\\n    'uri:print the hypervisor canonical URI:' \\\n    'vol-create:create a vol from an XML file' \\\n    'vol-create-from:create a vol, using another volume as input' \\\n    'vol-create-as:create a volume from a set of args' \\\n    'vol-clone:clone a volume.' \\\n    'vol-delete:delete a vol' \\\n    'vol-wipe:wipe a vol' \\\n    'vol-dumpxml:vol information in XML' \\\n    'vol-info:storage vol information' \\\n    'vol-list:list vols' \\\n    'vol-pool:returns the storage pool for a given volume key or path' \\\n    'vol-path:returns the volume path for a given volume name or key' \\\n    'vol-name:returns the volume name for a given volume key or path' \\\n    'vol-key:returns the volume key for a given volume name or path' \\\n    'vcpuinfo:domain vcpu information:$expand_domains_running' \\\n    'vcpupin:control domain vcpu affinity' \\\n    'version:show version:' \\\n    'vncdisplay:vnc display:$expand_domains_running' \\\n    'snapshot-create:Create a snapshot:$expand_domains $expand_files' \\\n    'snapshot-current:Get the current snapshot:$expand_domains' \\\n    'snapshot-delete:Delete a domain snapshot' \\\n    'snapshot-dumpxml:Dump XML for a domain snapshot' \\\n    'snapshot-list:List snapshots for a domain:$expand_domains' \\\n    'snapshot-revert:Revert a domain to a snapshot'\nargs+=(\"$reply[@]\")\n\n_regex_arguments _virsh \"${args[@]}\"\n\n_virsh \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_virtualbox",
    "content": "#compdef VBoxManage=vboxmanage VBoxHeadless=vboxheadless\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for VirtualBox (http://www.virtualbox.org).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n_vboxmachines() {\n\tVBoxManage list vms | egrep -o '^\"[^\"]+\"' 2>/dev/null | sed -e 's|\"||g' | while read machine; do\n\t\t_wanted 'machine' expl 'machine' compadd $machine\n\tdone\n}\n\n# Roughly guess command options\n_vboxcommandoptions() {\n\tcmd=\"$1\"\n\tcmdoutput=$(VBoxManage \"$cmd\" 2>/dev/null | tail -n +2 | grep -v 'Syntax error:' | grep -v '<uuid>|<name>' | sed 's|<[^>]\\+>||g' | sed 's|VBoxManage [^ ]\\+ |  |')\n\n\toptcount=0\n\toption=\"\"\n\toptlines=()\n\techo \"$cmdoutput\" | egrep -o '  [\\[A-Za-z0-9\\-\\<].*' | while read line; do\n\t\toption=\"${option}${line}\"\n\t\tif [[ $line[-1] != '|' ]]; then\n\t\t\toptcount=$(($optcount+1))\n\t\t\toptlines[$optcount]=\"$option\"\n\t\t\toption=\"\"\n\t\tfi\n\tdone\n\n\t# optionals ([abc])\n\tfor line in $optlines; do\n\t\techo \"$line\" | egrep -o '\\[[^]]+\\]' | while read option; do\n\t\t\toption=$(echo $option | sed 's|[]\\[]||g' | cut -d ' ' -f 1)\n\t\t\t_options=(${(s:|:)option})\n\t\t\tfor option in $_options; do\n\t\t\t\t_wanted \"${cmd}_option\" expl \"${cmd} option\" compadd -- $option\n\t\t\tdone\n\t\tdone\n\tdone\n\n\t# mandatory\n\tfor line in $optlines; do\n\t\techo \"$line\" | sed 's|\\[[^]]\\+\\]|\\n|g' | while read option; do\n\t\t\tif [[ \"$option\" != \"\" ]]; then\n\t\t\t\t_option=$(echo $option | cut -d ' ' -f 1)\n\t\t\t\t_options=(${(s:|:)option})\n\t\t\t\tfor option in $_options; do\n\t\t\t\t\t_wanted \"${cmd}_option\" expl \"${cmd} option\" compadd -- $option\n\t\t\t\tdone\n\t\t\tfi\n\t\tdone\n\tdone\n}\n\n# List possible mediums\n_vboxmediums() {\n\t_wanted \"mediums\" expl \"mediums\" compadd -- \"none\"\n\t_wanted \"mediums\" expl \"mediums\" compadd -- \"emptydrive\"\n\t_wanted \"mediums\" expl \"mediums\" compadd -- \"iscsi\"\n\n\t_files -g '*.{iso,vmdk,vdi}'\n\n\tfor CD in /dev/cd/*; do\n\t\treadlink -f $CD\n\tdone | uniq | while read CD; do\n\t\t_wanted \"host drives\" expl \"host drives\" compadd -- \"host:$CD\"\n\tdone\n}\n\n# List available os types\n_vboxostypes() {\n\tVBoxManage list ostypes | grep '^ID' | awk '{print $2}' | while read OSTYPE; do\n\t\t_wanted 'ostype' expl 'os type' compadd -- $OSTYPE\n\tdone\n}\n\n# Guess options for this commands\n_vboxopts_controlvm() { _vboxcommandoptions controlvm }\n_vboxopts_modifyvm() { _vboxcommandoptions modifyvm }\n_vboxopts_export() { _vboxcommandoptions export }\n\n_vboxmanage() {\n\tlocal -a _1st_arguments\n\t_1st_arguments=(\n\t\t\"list:gives information about VirtualBox's current settings\"\n\t\t'showvminfo:shows information about a particular virtual machine'\n\t\t'registervm:import a virtual machine definition in an XML file into VirtualBox'\n\t\t'unregistervm:unregisters a virtual machine'\n\t\t'createvm:creates a new XML virtual machine definition file'\n\t\t'modifyvm:changes the properties of a registered virtual machine which is not running'\n\t\t'import:imports a virtual appliance in OVF format by copying the virtual disk images and creating virtual machines in VirtualBox'\n\t\t'export:exports one or more virtual machines from VirtualBox into a virtual appliance in OVF format'\n\t\t'startvm:starts a virtual machine that is currently in the \"Powered off\" or \"Saved\" states'\n\t\t'controlvm:change the state of a virtual machine that is currently running'\n\t\t'discardstate:discards the saved state of a virtual machine which is not currently running'\n\t\t'adoptstate:adopt a saved state file (.sav)'\n\t\t'snapshot:control snapshots'\n\t\t'closemedium:removes a hard disk, DVD or floppy image from a VirtualBox media registry'\n\t\t'storageattach:attaches/modifies/removes a storage medium connected to a storage controller'\n\t\t'storagectl:attaches/modifies/removes a storage controller'\n\t\t'bandwidthctl:creates/deletes/modifies bandwidth groups'\n\t\t'showhdinfo:shows information about a virtual hard disk image'\n\t\t'createhd:creates a new virtual hard disk image'\n\t\t'modifyhd:change the characteristics of a disk image after it has been created'\n\t\t'clonehd:duplicates a registered virtual hard disk image to a new image file with a new unique identifier'\n\t\t'convertfromraw:converts a raw disk image to a VirtualBox Disk Image (VDI) file'\n\t\t'getextradata:retrieve string data to a virtual machine or to a VirtualBox configuration'\n\t\t'setextradata:attach string data to a virtual machine or to a VirtualBox configuration'\n\t\t'setproperty:change global settings which affect the entire VirtualBox installation'\n\t\t'usbfilter:used for working with USB filters in virtual machines, or global filters'\n\t\t'sharedfolder:share folders on the host computer with guest operating systems'\n\t\t'guestproperty:get or set properties of a running virtual machine'\n\t\t'guestcontrol:control certain things inside a guest from the host'\n\t\t'debugvm:for experts who want to tinker with the exact details of virtual machine execution'\n\t\t'metrics:monitor the usage of system resources'\n\t\t'hostonlyif:change the IP configuration of a host-only network interface'\n\t\t'dhcpserver:control the DHCP server that is built into VirtualBox'\n\t\t'extpack:add or remove VirtualBox extension packs'\n\t)\n\n\tlocal context state line expl\n\tlocal -A opt_args\n\n\t_arguments '*:: :->subcmds' && return 0\n\n\tif (( CURRENT == 1 )); then\n\t\t_describe -t commands \"VBoxManage commands\" _1st_arguments -V1\n\t\treturn\n\tfi\n\n\tcase \"$words[1]\" in\n\t\tlist)\n\t\t\t_arguments \\\n\t\t\t\t'--long' \\\n\t\t\t\t':list option:(vms runningvms ostypes hostdvds hostfloppies bridgedifs hostonlyifs dhcpservers hostinfo hostcpuids hddbackends hdds dvds floppies usbhost usbfilters systemproperties extpacks)'\n\t\t;;\n\t\tshowvminfo)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t'--details' \\\n\t\t\t\t'--machinereadable' \\\n\t\t\t\t'--log: :'\n\t\t;;\n\t\tunregistervm)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t'--delete'\n\t\t;;\n\t\tcreatevm)\n\t\t\t_arguments \\\n\t\t\t\t'--name: :' \\\n\t\t\t\t'--ostype:os type:_vboxostypes' \\\n\t\t\t\t'--register' \\\n\t\t\t\t'--basefolder:folder:_files -/' \\\n\t\t\t\t'--settingsfile:file:_files' \\\n\t\t\t\t'--uuid: :'\n\t\t;;\n\t\tmodifyvm)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t:modifyvm_option:_vboxopts_modifyvm\n\t\t;;\n\t\tmodifyhd)\n\t\t\t_arguments \\\n\t\t\t\t:filename:_files \\\n\t\t\t\t'--type:hd type:(normal writethrough immutable shareable readonly multiattach)' \\\n\t\t\t\t'--autoreset:on off:(on off)' \\\n\t\t\t\t'--property: :' \\\n\t\t\t\t'--compact' \\\n\t\t\t\t'--resize:megabytes:' \\\n\t\t\t\t'--resizebyte:bytes:'\n\t\t;;\n\t\timport)\n\t\t\t_arguments \\\n\t\t\t\t':ovf file:_files -g \\*.{ovf,ova}' \\\n\t\t\t\t'--dry-run'\n\t\t;;\n\t\texport)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t:export_option:_vboxopts_export\n\t\t;;\n\t\tstartvm)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t'--type:running mode:(gui sdl headless)'\n\t\t;;\n\t\tcontrolvm)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t:controlvm_option:_vboxopts_controlvm\n\t\t;;\n\t\tadoptstate)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t':sav file:_files -g \\*.sav'\n\t\t;;\n\t\tclosemedium)\n\t\t\t_arguments \\\n\t\t\t\t':type:(disk dvd floppy)' \\\n\t\t\t\t':file:_files' \\\n\t\t\t\t'--delete'\n\t\t;;\n\t\tdiscardstate|bandwidthctl|getextradata|setextradata|debugvm)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines\n\t\t;;\n\t\tstoragectl)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t'--name: :' \\\n\t\t\t\t'--add:type:(ide scsi floppy sas)' \\\n\t\t\t\t'--controller:type:(LSILogic|LSILogicSAS|BusLogic|IntelAHCI|PIIX3|PIIX4|ICH6|I82078)' \\\n\t\t\t\t--sataideemulation{1..4}\":port:({1..30})\" \\\n\t\t\t\t\"--sataportcount:num:({1..30})\" \\\n\t\t\t\t'--hostiocache:bool:(on off)' \\\n\t\t\t\t'--bootable:bool:(on off)' \\\n\t\t\t\t'--remove' #\"\n\t\t;;\n\t\tstorageattach)\n\t\t\t_arguments \\\n\t\t\t\t:machine:_vboxmachines\\\n\t\t\t\t'--storagectl:storage ctl:(\"IDE Controller\" \"SATA Controller\")' \\\n\t\t\t\t'--port: :' \\\n\t\t\t\t'--device: :' \\\n\t\t\t\t'--type:drive type:(dvddrive hdd fdd)' \\\n\t\t\t\t'--medium:mediums:_vboxmediums' \\\n\t\t\t\t'--mtype:behaviour:(normal writethrough immutable shareable)' \\\n\t\t\t\t'--comment: :' \\\n\t\t\t\t'--passthrough:enabled?:(on off)' \\\n\t\t\t\t'--bandwidthgroup: :' \\\n\t\t\t\t'--forceunmount' '--server: :' \\\n\t\t\t\t'--target: :' \\\n\t\t\t\t'--lun: :' \\\n\t\t\t\t'--encodedlun: :' \\\n\t\t\t\t'--username: :' \\\n\t\t\t\t'--password: :' \\\n\t\t\t\t'--intnet: :'\n\t\t;;\n\t\tcreatehd)\n\t\t\t_arguments \\\n\t\t\t\t'--filename:filename:_files -g \\*.{vdi,vmdk,vhd}' \\\n\t\t\t\t'--size:megabytes:' \\\n\t\t\t\t'--sizebyte:bytes:' \\\n\t\t\t\t'--format:type:(VDI VMDK VHD)' \\\n\t\t\t\t'--variant:type:(Standard Fixed Split2G Stream ESX)'\n\t\t;;\n\t\tsharedfolder)\n\t\t\t_arguments \\\n\t\t\t\t':action:(add remove)' \\\n\t\t\t\t:machine:_vboxmachines \\\n\t\t\t\t'--name: :' \\\n\t\t\t\t'--hostpath:path:_files -/' \\\n\t\t\t\t'--transient' \\\n\t\t\t\t'--readonly' \\\n\t\t\t\t'--automount'\n\t\t;;\n\tesac\n\treturn 1\n}\n\n_vboxheadless() {\n\tlocal context state line expl\n\tlocal -A opt_args\n\n\t_arguments \\\n\t\t'(-s -startvm --startvm)'{-s,-startvm,--startvm}'[Start given VM]:machine:_vboxmachines' \\\n\t\t'(-n --vnc)'{-n,--vnc}'[Enable the built in VNC server]' \\\n\t\t'(-m --vncport)'{-m,--vncport}'[TCP port number to use for the VNC server]:port:' \\\n\t\t'(-o --vncpass)'{-o,--vncpass}'[Set the VNC server password]:pw:' \\\n\t\t'(-v -vrde --vrde)'{-v,-vrde,--vrde}\"[Enable (default) or disable the VRDE server or don't change the setting]::(on off config)\" \\\n\t\t'(-e -vrdeproperty --vrdeproperty)'{-e,-vrdeproperty,--vrdeproperty}'[Set a VRDE property]: :' \\\n\t\t'(-c -capture --capture)'{-c,-capture,--capture}'[Record the VM screen output to a file]' \\\n\t\t'(-w --width)'{-w,--width}'[Frame width when recording]:width:' \\\n\t\t'(-h --height)'{-h,--height}'[Frame height when recording]:height:' \\\n\t\t'(-r --bitrate)'{-r,--bitrate}'[Recording bit rate when recording]:bitrate:' \\\n\t\t'(-f --filename)'{-f,--filename}'[File name when recording.  The codec used will be chosen based on the file extension]:filename:_files'\n}\n\n_virtualbox() {\n  local ret=1\n  _call_function ret _$service\n  return ret\n}\n\n_virtualbox \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_vnstat",
    "content": "#compdef vnstat\n# ------------------------------------------------------------------------------\n# Copyright (c) 2012 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for vnstat 1.10\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Aaron Schrab <aaron@schrab.com>\n#\n# ------------------------------------------------------------------------------\n\nlocal curcontext=\"$curcontext\" state state_descr line ret=1\ntypeset -A opt_args\n\nlocal period=\"-d --days -h --hours -m --months -w --weeks\"\n\n_arguments -C : \\\n  '--cleartop[remove all top 10 entries]' \\\n  '--config[specify alternate configuration file]:file:_files' \\\n  \"($period)\"{-d,--days}'[show traffic for days]' \\\n  \"($period)\"{-h,--hours}'[show trafic for last 24 hours]' \\\n  \"($period)\"{-m,--months}'[show traffic for months]' \\\n  \"($period)\"{-w,--weeks}'[show traffic for 7 days]' \\\n  '--dbdir[specify database directory]:directory:_files -/' \\\n  '(-D --debug)'{-D,--debug}'[show additional debug output]' \\\n  '--delete[delete database and stop monitoring selected interface]' \\\n  '--dumpdb[dump database in parseable format]' \\\n  '(--disable)--enable[enable updates for selected interface]' \\\n  '(--enable)--disable[disable updates for selected interface]' \\\n  '(-i --iface)'{-i,--iface}'[specify interface for actions]:interface:->interface' \\\n  '--iflist[list available interfaces]' \\\n  '(-l --live)'{-l,--live}'[display current transfer rate]:mode:->live' \\\n  '--locale[specify locale]:locale:' \\\n  '--nick[set nickname for alias]:nickname:' \\\n  '--oneline[traffic summary in one-line, parseable format]' \\\n  '(-q --query)'{-q,--query}'[force database query mode]' \\\n  '(-r --reset)'{-r,--reset}'[reset internal counters]' \\\n  '--rebuildtotal[reset total trafic counters]' \\\n  '(-ru --rateunit)'{-ru,--rateunit}'[swap configured rate unit]' \\\n  '--savemerged[write result of database merge]'  \\\n  '(-s --short)'{-s,--short}'[use short output mode]' \\\n  '--style[modify content and style of output]:style:->style' \\\n  '--sync[synchronize internal counters]' \\\n  '--testkernel[test kernel boot time information]' \\\n  '(-t --top10)'{-t,--top10}'[show all time top 10 traffic days]' \\\n  '-tr[calculate amount of traffic in given time]:seconds:' \\\n  '(-u --update)'{-u,--update}'[update databases]' \\\n  '--xml[show database content in XML format]' \\\n  '(-)'{-v,--version}'[show current version]' \\\n  '(-)'{-\\?,--help}'[show command summary]' \\\n  '(-)--longhelp[show complete options list]' \\\n  && ret=0\n\ncase \"$state\" in\n\n  (live)\n    _values 'live mode' \\\n      '0[packets per second]' \\\n      '1[traffic counters]' && ret=0\n    ;;\n\n  (style)\n    _values 'output style' \\\n      '0[narrow output]' \\\n      '1[enable bar column]' \\\n      '2[bar column with average traffic rate]' \\\n      '3[enable average traffic rate]' \\\n      '4[disable use of terminal control characters]' && ret=0\n    ;;\n\n  (interface)\n    local interfaces=\"$(_call_program interfaces 'vnstat --iflist')\"\n    interfaces=\"${interfaces#*:}\"\n    _values -s + 'interface' ${(z)interfaces} && ret=0\n    ;;\n\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: filetype=zsh shiftwidth=2 tabstop=2 expandtab\n"
  },
  {
    "path": ".config/zsh/completions/src/_vpnc",
    "content": "#compdef vpnc vpnc-connect vpnc-disconnect\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for vpnc.\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Julien Nicoulaud <julien.nicoulaud@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n\n(( $+functions[_vpnc-connect] )) ||\n_vpnc-connect() {\n  _arguments \\\n    '(- : *)--version[display version information]' \\\n    '(- : *)--'{,long-}'help[display help information]' \\\n    '--gateway[IP/name of your IPSec gateway]: :_hosts' \\\n    '--id[your group name]: :_groups' \\\n    '--username[your username]: :_users' \\\n    '--domain[domain name for authentication]: :_domains' \\\n    '--xauth-inter[enable interactive extended authentication]' \\\n    '--vendor[vendor of your IPSec gateway]: :_vpnc_gateway_vendors' \\\n    '--natt-mode[NAT-Traversal method]: :_vpnc_nat_traversal_methods' \\\n    '--script[command executed using system() to configure the interface, routing and so on]:command path:_files' \\\n    '--dh[name of the IKE DH Group]: :_vpnc_ike_diffie_hellman_groups' \\\n    '--pfs[Diffie-Hellman group to use for PFS]: :_vpnc_pfs_diffie_hellman_groups' \\\n    '--enable-1des[enable weak single DES encryption]' \\\n    '--enable-no-encryption[enable using no encryption for data traffic (key exchanged must be encrypted)]' \\\n    '--application-version[application version to report]:application version' \\\n    '--ifname[visible name of the TUN/TAP interface]:name' \\\n    '--ifmode[mode of TUN/TAP interface]: :_vpnc_tun_tap_modes' \\\n    '--debug[show verbose debug messages]: :_vpnc_debug_levels' \\\n    \"--no-detach[don't detach from the console after login]\" \\\n    '--pid-file[store the pid of background process in the file]:pid file:_files' \\\n    '--local-addr[local IP to use for ISAKMP/ESP/...]: :_hosts' \\\n    '--local-port[local ISAKMP port number to use]: :_vpnc_isakmp_port_numbers' \\\n    '--udp-port[local UDP port number to use]: :_vpnc_udp_port_numbers' \\\n    '--dpd-idle[send DPD packet after not receiving anything for X seconds]: :_vpnc_dpd_idle_times' \\\n    \"--non-inter[don't ask anything, exit on missing options]\" \\\n    '--auth-mode[authentication mode]: :_vpnc_authentication_modes' \\\n    '--ca-file[filename and path to the CA-PEM-File]:CA-PEM file:_files' \\\n    '--ca-dir[path of the trusted CA-Directory]:CA directory:_files -/' \\\n    '--target-network[target network in dotted decimal or CIDR notation]:target network/netmask' \\\n    '--print-config[print your configuration; output can be used as vpnc.conf]' \\\n    '*: :_vpnc_confs'\n}\n\n(( $+functions[_vpnc-disconnect] )) ||\n_vpnc-disconnect() {\n  _message 'no more arguments'\n}\n\n(( $+functions[_vpnc_confs] )) ||\n_vpnc_confs() {\n  # FIXME /etc/vpnc/ is only accessible to root, how do we deal with this ?\n  local confs; confs=(/etc/vpnc/*.conf(:t:s/\\.conf/))\n  _describe -t confs 'VPNC conf' confs \"$@\"\n}\n\n(( $+functions[_vpnc_gateway_vendors] )) ||\n_vpnc_gateway_vendors() {\n  local vendors; vendors=(\n    'cisco'\n    'netscreen'\n  )\n  _describe -t vendors 'vendor' vendors \"$@\"\n}\n\n(( $+functions[_vpnc_nat_traversal_methods] )) ||\n_vpnc_nat_traversal_methods() {\n  local methods; methods=(\n    'natt:NAT-T as defined in RFC3947 (default)'\n    'none:disable use of any NAT-T method'\n    'force-natt:always use NAT-T encapsulation even without presence of a NAT device'\n    'cisco-udp:Cisco proprietary UDP encapsulation, commonly over Port 10000'\n  )\n  _describe -t methods 'NAT traversal method' methods \"$@\"\n}\n\n(( $+functions[_vpnc_ike_diffie_hellman_groups] )) ||\n_vpnc_ike_diffie_hellman_groups() {\n  local groups; groups=(\n    'dh1'\n    'dh2'\n    'dh5'\n  )\n  _describe -t groups 'IKE Diffie Hellman group' groups \"$@\"\n}\n\n(( $+functions[_vpnc_pfs_diffie_hellman_groups] )) ||\n_vpnc_pfs_diffie_hellman_groups() {\n  local groups; groups=(\n    'nopfs'\n    'dh1'\n    'dh2'\n    'dh5'\n    'server'\n  )\n  _describe -t groups 'PFS Diffie Hellman group' groups \"$@\"\n}\n\n(( $+functions[_vpnc_tun_tap_modes] )) ||\n_vpnc_tun_tap_modes() {\n  local modes; modes=(\n    'tun:virtual point to point interface (default)'\n    'tap:virtual ethernet interface'\n  )\n  _describe -t modes 'TUN/TAP interface mode' modes \"$@\"\n}\n\n(( $+functions[_vpnc_debug_levels] )) ||\n_vpnc_debug_levels() {\n  local levels; levels=(\n    \"0:don't print debug information\"\n    '1:print minimal debug information'\n    '2:show statemachine and packet/payload type information'\n    '3:dump everything excluding authentication data'\n    '99:dump everything INCLUDING AUTHENTICATION data (e.g. PASSWORDS)'\n  )\n  _describe -t levels 'debug level' levels \"$@\"\n}\n\n(( $+functions[_vpnc_isakmp_port_numbers] )) ||\n_vpnc_isakmp_port_numbers() {\n  local ports; ports=(\n    '0:use random port'\n    '1:minimum port number'\n    '500:default port number'\n    '65535:maximum port number'\n  )\n  _describe -t ports 'ISAKMP port number' ports \"$@\"\n}\n\n(( $+functions[_vpnc_udp_port_numbers] )) ||\n_vpnc_udp_port_numbers() {\n  local ports; ports=(\n    '0:use random port'\n    '1:minimum port number'\n    '10000:default port number'\n    '65535:maximum port number'\n  )\n  _describe -t ports 'UDP port number' ports \"$@\"\n}\n\n(( $+functions[_vpnc_dpd_idle_times] )) ||\n_vpnc_dpd_idle_times() {\n  local times; times=(\n    '0:completely disable DPD'\n    '10:minimum value'\n    '300:default value'\n    '86400:maximum value'\n  )\n  _describe -t times 'DPD idle wait time (seconds)' times \"$@\"\n}\n\n(( $+functions[_vpnc_authentication_modes] )) ||\n_vpnc_authentication_modes() {\n  local modes; modes=(\n    'psk:pre-shared key (default)'\n    'cert:server + client certificate'\n    'hybrid:server certificate + xauth'\n  )\n  _describe -t modes 'authentication mode' modes \"$@\"\n}\n\ncase $service in\n  vpnc|vpnc-connect) _call_function ret _vpnc-connect && return ret ;;\n  vpnc-disconnect)   _call_function ret _vpnc-disconnect && return ret ;;\nesac\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_wemux",
    "content": "#compdef wemux\n# ------------------------------------------------------------------------------\n# Copyright (c) 2015 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for wemux (https://github.com/zolrath/wemux)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Akira Maeda <https://github.com/glidenote>\n#\n# ------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# ------------------------------------------------------------------------------\n\n_wemux() {\n\n  local -a host_commands client_commands multi_host_commands\n\n  host_commands=(\n    'start:Start the wemux server/attach to an existing wemux server.'\n    'attach:Attach to an existing wemux server.'\n    'stop:Kill the wemux server '\\''wemux'\\'', delete its socket.'\n    'users:List all users currently attached to '\\''wemux'\\'''\n    'kick:Disconnect an SSH user, remove their wemux server.'\n    'config:Open the wemux configuration file in your $EDITOR.'\n    'help:Display this screen.'\n    'version:shows wemux version number'\n  )\n\n  client_commands=(\n    'mirror:Attach to Host in read-only mode.'\n    'pair:Attach to Host in pair mode, which allows editing.'\n    'rogue:Attach to Host in rogue mode, which allows editing and switching to windows independently from the host.'\n    'logout:Log out of the wemux rogueing session.'\n    'users:List the currently attached wemux users.'\n  )\n\n  multi_host_commands=(\n    'join:Join wemux server with supplied name.'\n    'reset:Join default wemux server: wemux'\n    'list:List all currently active wemux servers.'\n  )\n\n  if (( CURRENT == 2 )); then\n    _describe -t host_commands 'HOST COMMANDS' host_commands\n    _describe -t client_commands 'CLIENT COMMANDS' client_commands\n    _describe -t multi_host_commands 'MULTI-HOST COMMANDS' multi_host_commands\n  fi\n\n  return 0\n}\n\n_wemux\n"
  },
  {
    "path": ".config/zsh/completions/src/_xinput",
    "content": "#compdef xinput\n# ------------------------------------------------------------------------------\n# Copyright (c) 2011 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in the\n# documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n# names of its contributors may be used to endorse or promote products\n# derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for xinput\n#  TODO: Add property handler\n#  TODO: Add buttons handler\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Timofey Titovets <nefelim4ag@gmail.com>\n#\n# ------------------------------------------------------------------------------\n_xinput(){\n\t# list of xinput arguments\n\tlocal -a _1st_arguments\n\t_1st_arguments=(\n\t\t'version:show version' '--version:show version'\n\t\t'help:show help options' '--help:show help options'\n\t\tget-feedbacks\n\t\tset-ptr-feedback \n\t\tset-integer-feedback \n\t\tget-button-map \n\t\tset-button-map \n\t\tset-pointer\n\t\t'set-mode:change the mode of device' '--set-mode:change the mode of device'\n\t\t'list:show devices' '--list:show devices'\n\t\tquery-state \n\t\ttest --test\n\t\tcreate-master \n\t\tremove-master \n\t\treattach \n\t\tfloat \n\t\tset-cp \n\t\ttest-xi2 \n\t\tmap-to-output \n\t\tlist-props \n\t\tset-int-prop \n\t\tset-float-prop \n\t\tset-atom-prop \n\t\twatch-props \n\t\tdelete-prop \n\t\tset-prop \n\t\t'disable:disable the device' '--disable:disable the device' \n\t\t'enable:enable the device'  '--enable:enable the device'\n\t\t--get-feedbacks\n\t\t--set-ptr-feedback \n\t\t--set-integer-feedback \n\t\t--get-button-map \n\t\t--set-button-map \n\t\t--set-pointer\n\t\t--query-state  \n\t\t--create-master \n\t\t--remove-master \n\t\t--reattach \n\t\t--float \n\t\t--set-cp \n\t\t--test-xi2 \n\t\t--map-to-output \n\t\t--list-props \n\t\t--set-int-prop \n\t\t--set-float-prop \n\t\t--set-atom-prop \n\t\t--watch-props \n\t\t--delete-prop \n\t\t--set-prop \n\t)\n\n\tlocal context state line\n\tlocal -A opt_args\n\t# Used with \"-O expl\" for unsorted.\n\tlocal -a expl\n\texpl=(-Vx)\n\n\t_arguments '*:: :->subcmds' && return 0\n\n\tif (( CURRENT == 1 )); then\n\t\t_describe -t commands \"xinput commands\" _1st_arguments -V1\n\t\treturn\n\tfi\n\n\ttypeset -a xinput_devices_id xinput_devices xinput_devices_name\n\tlocal i name\n\tfor i in ${(on)$(xinput list --id-only)}; do\n\t\t# Removing prefixes, e.g. from \"∼ 7\" (floating slave).\n\t\ti=${i##[^[:digit:]]#}\n\t\t[[ -n \"$i\" ]] || continue\n\t\txinput_devices_id+=($i)\n\t\tname=\"$(xinput list --name-only $i)\"\n\t\txinput_devices_name+=($name)\n\t\txinput_devices+=($i\\:$name)\n\tdone\n\txinput_devices+=($xinput_devices_name)\n\n\t# xinput arguments handler\n\tcase \"$words[1]\" in\n\t\t--get-feedbacks|--set-ptr-feedback|--get-button-map|--query-state|--list-props|--watch-props|get-feedbacks|set-ptr-feedback|get-button-map|query-state|list-props|watch-props|--enable|enable|--map-to-output|map-to-output|--disable|disable)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))'\n\t\t;;\n\t\t--list|list)\n\t\t\t_arguments -O expl \\\n\t\t\t\t'--short' \\\n\t\t\t\t'--long' \\\n\t\t\t\t'--name-only' \\\n\t\t\t\t'--id-only' \\\n\t\t\t\t':list option:(($xinput_devices))' \\\n\t\t;;\n\t\t--set-integer-feedback|set-integer-feedback)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' \\\n\t\t\t\t':list option:( feedback )' \\\n\t\t\t\t':list option:( $xinput_devices_id )'\n\t\t;;\n\t\t--set-button-map|set-button-map)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' #map button 1 [map button 2 [...]]\n\t\t;;\n\t\t--set-pointer|set-pointer)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' # [x index y index]\n\t\t;;\n\t\t--set-mode|set-mode)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' \\\n\t\t\t\t':list option:(ABSOLUTE RELATIVE)'\n\t\t;;\n\t\t--test|test)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(-proximity ($xinput_devices ))' \\\n\t\t\t\t':list option:(($xinput_devices))'\n\t\t;; \n\t\t--reattach|reattach)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' \\\n\t\t\t\t':list option:(master slave)'\n\t\t;; \n\t\t--float|float)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))'\n\t\t;; \n\t\t--test-xi2|test-xi2)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices --root))' \\\n\t\t\t\t':list option:(($xinput_devices))'\n\t\t;;\n\t\t--delete-prop|delete-prop)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' #property\n\t\t;;\n\t\t--create-master|create-master)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' # [sendCore (dflt:1)] [enable (dflt:1)]\n\t\t;; \n\t\t--remove-master|remove-master)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:($xinput_devices_id)' # [Floating|AttachToMaster (dflt:Floating)] [returnPointer] [returnKeyboard]\n\t\t;; \n\t\t# --set-cp|set-cp); window device;; \n\t\t--set-prop|set-prop)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' \\\n\t\t\t\t':list option:(--type={atom,float,int} --format={8,16,32})' \\\n\t\t\t\t':list option:(--type={atom,float,int} --format={8,16,32})' # property val [val ...]\n\t\t;;\n\t\t--set-int-prop|set-int-prop)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' # property format (8, 16, 32) val [val ...]\n\t\t;;\n\t\t--set-float-prop|set-float-prop)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' # property val [val ...]\n\t\t;; \n\t\t--set-atom-prop|set-atom-prop)\n\t\t\t_arguments -O expl \\\n\t\t\t\t':list option:(($xinput_devices))' # property val [val ...]\n\t\t;;\n\tesac\n}\n\n_xinput \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_xsel",
    "content": "#compdef xsel\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for xsel (http://www.vergenet.net/~conrad/software/xsel/).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Tomo Kazahaya (https://github.com/tomonacci)\n#\n# ------------------------------------------------------------------------------\n\nlocal input='(-a --append -f --follow -i --input)'\nlocal operation='(-c --clear -d --delete -k --keep -x --exchange)' \nlocal selection='(-p --primary -s --secondary -b --clipboard)'\n\n_arguments -s \\\n  $input{-a,--append}'[append standard input to the selection]' \\\n  $input{-f,--follow}'[append to selection as standard input grows]' \\\n  $input{-i,--input}'[read standard input into the selection]' \\\n  {-o,--output}'[write the selection to standard output]' \\\n  $operation{-c,--clear}'[clear the selection]' \\\n  $operation{-d,--delete}'[request that the current selection be deleted]' \\\n  $selection{-p,--primary}'[operate on the PRIMARY selection (default)]' \\\n  $selection{-s,--secondary}'[operate on the SECONDARY selection]' \\\n  $selection{-b,--clipboard}'[operate on the CLIPBOARD selection]' \\\n  $operation{-k,--keep}'[do not modify the selections, but make the PRIMARY and SECONDARY selections persist even after the programs they were selected in exit]' \\\n  $operation{-x,--exchange}'[exchange the PRIMARY and SECONDARY selections]' \\\n  '--display[specify the server to use; see X(1)]:X display:_x_display' \\\n  {-t,--selectionTimeout}'[specify the timeout in milliseconds within which the selection must be retrieved]:number' \\\n  {-l,--logfile}'[specify the file to log errors to when detached (default $HOME/.xsel.log)]:log file:_files' \\\n  {-n,--nodetach}'[do not detach from the controlling terminal]' \\\n  {-h,--help}'[display usage information and exit]' \\\n  {-v,--verbose}'[print informative messages; additional instances of -v raise the debugging level]' \\\n  '--version[output version information and exit]'\n"
  },
  {
    "path": ".config/zsh/completions/src/_yaourt",
    "content": "#compdef yaourt yaourt.static=yaourt\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for yaourt (https://archlinux.fr/yaourt-en)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * zsh-users mailing list\n#\n# ------------------------------------------------------------------------------\n\n# handles --help subcommand\n_yaourt_action_help() {\n    _arguments -s : \\\n        \"$_yaourt_opts_commands[@]\"\n}\n\n# handles cases where no subcommand has yet been given\n_yaourt_action_none() {\n    _arguments -s : \\\n        \"$_yaourt_opts_commands[@]\"\n}\n\n# handles --query subcommand\n_yaourt_action_query() {\n    local context state line\n    typeset -A opt_args\n    \n#   _arguments -s : \\\n#       \"$_yaourt_opts_common[@]\" \\\n#       \"$_yaourt_opts_query_actions[@]\" \\\n#       \"$_yaourt_opts_query_modifiers[@]\"\n    \n    case $state in\n        query_file)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:package file:_files -g \"*.pkg.tar*\"'\n            ;;\n        query_group)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:groups:_yaourt_completions_installed_groups'\n            ;;\n        query_owner)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:file:_files'\n            ;;\n        query_search)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:search text: '\n            ;;\n        *)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_actions[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:package:_yaourt_completions_installed_packages'\n            ;;\n    esac\n}\n\n# handles --remove subcommand\n_yaourt_action_remove() {\n    _arguments -s : \\\n        \"$_yaourt_opts_common[@]\" \\\n        \"$_yaourt_opts_remove[@]\"\n}\n\n# handles --sync subcommand\n_yaourt_action_sync() {\n    local context state line\n    typeset -A opt_args\n    \n#   _arguments -s : \\\n#       \"$_yaourt_opts_common[@]\" \\\n#       \"$_yaourt_opts_sync_actions[@]\" #\\\n#       #\"$_yaourt_opts_sync_modifiers[@]\"\n    \n    case $state in\n        sync_clean)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_sync_modifiers[@]\" \\\n                '*-c[remove old packages from cache]' \\\n                ;;\n        sync_group)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_sync_modifiers[@]\" \\\n                '*:package group:_yaourt_completions_all_groups'\n            ;;\n        sync_search)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_sync_modifiers[@]\" \\\n                '*:search text: '\n            ;;\n        *)\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_sync_modifiers[@]\" \\\n                '*:package:_yaourt_completions_all_packages'\n            ;;\n    esac\n}\n\n# handles --upgrade subcommand\n_yaourt_action_upgrade() {\n    _arguments -s : \\\n        \"$_yaourt_opts_common[@]\" \\\n        \"$_yaourt_opts_pkgfile[@]\"\n}\n\n# handles --version subcommand\n_yaourt_action_version() {\n    # no further arguments\n    return 0\n}\n\n# provides completions for package groups\n_yaourt_completions_all_groups() {\n    local -a cmd groups\n    _yaourt_get_command\n    groups=( $(_call_program groups $cmd[@] -Sg) )\n    typeset -U groups\n    compadd \"$@\" -a groups\n}\n\n# provides completions for packages available from repositories\n# these can be specified as either 'package' or 'repository/package'\n_yaourt_completions_all_packages() {\n    local -a cmd packages repositories packages_long\n    _yaourt_get_command\n\n    if compset -P1 '*/*'; then\n        packages=( $(_call_program packages $cmd[@] -Sql ${words[CURRENT]%/*}) )\n        typeset -U packages\n        if [[ -d /var/aur ]]; then\n            packages=( $packages $(ls /var/aur) )\n        fi\n        _wanted repo_packages expl \"repository/package\" compadd ${(@)packages}\n    else\n        packages=( $(_call_program packages $cmd[@] -Sql) )\n        typeset -U packages\n        if [[ -d /var/aur ]]; then\n            packages=( $packages $(ls /var/aur) )\n        fi\n        _wanted packages expl \"packages\" compadd - \"${(@)packages}\"\n\n        repositories=(${(o)${${${(M)${(f)\"$(</etc/pacman.conf)\"}:#\\[*}/\\[/}/\\]/}:#options})\n        typeset -U repositories\n        _wanted repo_packages expl \"repository/package\" compadd -S \"/\" $repositories\n    fi\n}\n\n# provides completions for package groups\n_yaourt_completions_installed_groups() {\n    local -a cmd groups\n    _yaourt_get_command\n    groups=(${(o)${(f)\"$(_call_program groups $cmd[@] -Qg)\"}% *})\n    typeset -U groups\n    compadd \"$@\" -a groups\n}\n\n# provides completions for installed packages\n_yaourt_completions_installed_packages() {\n    local -a cmd packages packages_long\n    packages_long=(/var/lib/pacman/local/*(/))\n    packages=( ${${packages_long#/var/lib/pacman/local/}%-*-*} )\n    compadd \"$@\" -a packages\n}\n\n# provides completions for repository names\n_yaourt_completions_repositories() {\n    local -a cmd repositories\n    repositories=(${(o)${${${(M)${(f)\"$(</etc/pacman.conf)\"}:#\\[*}/\\[/}/\\]/}:#options})\n    # Uniq the array\n    typeset -U repositories\n    compadd \"$@\" -a repositories\n}\n\n# builds command for invoking pacman in a _call_program command - extracts\n# relevant options already specified (config file, etc)\n# $cmd must be declared by calling function\n_yaourt_get_command() {\n    # this is mostly nicked from _perforce\n    cmd=$( grep \"^PACMAN=\" \"/etc/yaourtrc\" \\\n           && grep \"^PACMAN=\" \"/etc/yaourtrc\" | cut -c8- \\\n           || echo \"pacman\" )\n    integer i\n    for (( i = 2; i < CURRENT - 1; i++ )); do\n        if [[ ${words[i]} = \"--config\" || ${words[i]} = \"--root\" ]]; then\n            cmd+=( ${words[i,i+1]} )\n        fi\n    done\n}\n\n# main dispatcher\n_yaourt() {\n    typeset -A opt_args\n\n    # options for passing to _arguments: main pacman commands\n    typeset -a _yaourt_opts_commands\n    _yaourt_opts_commands=(\n        '-Q[query the package database]'\n        '-R[remove a package from the system]'\n        '-S[synchronize packages]'\n        '-U[upgrade a package]'\n        '-V[display version and exit]'\n        '-h[display usage information]'\n        '-B[backup pacman database]'\n        '-G[get PKGBUILD]'\n        '-C[clean backup files]'\n        '--stats[package statistics]'\n    )\n\n    # options for passing to _arguments: options common to all commands\n    typeset -a _yaourt_opts_common\n    _yaourt_opts_common=(\n        '-b[alternate database location]:database_location:_files -/'\n        '-h[display syntax for the given operation]'\n        '-r[alternate installation root]:installation root:_files -/'\n        '-v[be more verbose]'\n        '--cachedir[specify alternate package cache location]:cache_location:_files -/'\n        '--config[specify alternate configuration file]:config file:_files'\n        '--debug[display debug messages]'\n        '--gpgdir[specify alternate GnuPG home directory]:gpg_directory:_files -/'\n        '--logfile[specify alternate log file]:config file:_files'\n        \"--noconfirm[don't ask for confirmation]\"\n        \"--noprogressbar[don't show a progress bar when downloading files]\"\n        \"--noscriptlet[don't execute the install scriptlet if one exists]\"\n        '--print[only print the targets instead of performing the operation]'\n    )\n\n    # options for passing to _arguments: options for --upgrade commands\n    typeset -a _yaourt_opts_pkgfile\n    _yaourt_opts_pkgfile=(\n        '-d[skip dependency checks]'\n        '-f[overwrite conflicting files]'\n        '*:package file:_files -g \"*.pkg.tar*(.)\"'\n    )\n\n    # options for passing to _arguments: subactions for --query command\n    typeset -a _yaourt_opts_query_actions\n    _yaourt_opts_query_actions=(\n        '-g[view all members of a package group]:*:package groups:->query_group'\n        '-o[query the package that owns a file]:file:_files'\n        '-p[package file to query]:*:package file:->query_file'\n        '-s[search package names and descriptions]:*:search text:->query_search'\n    )\n\n    # options for passing to _arguments: options for --query and subcommands\n    typeset -a _yaourt_opts_query_modifiers\n    _yaourt_opts_query_modifiers=(\n        '-c[list package changelog]'\n        '-d[list packages installed as dependencies]'\n        '-e[list packages explicitly installed]'\n        '-i[view package information]'\n        '-ii[view package information including backup files]'\n        '-k[check package files]'\n        '-l[list package contents]'\n        '-m[list installed packages not found in sync db(s)]'\n        '-t[list packages not required by any package]'\n        '-u[list packages that can be upgraded]'\n        '--aur[install packages from aur, even if they are in community, or, with the -u option, update packages installed from aur]'\n        '--devel[used with -u updates all cvs/svn/git/hg/bzr packages]'\n        '--date[list packages sorted in ascending order (oldest first) by installation date]'\n    )\n\n    # options for passing to _arguments: options for --remove command\n    typeset -a _yaourt_opts_remove\n    _yaourt_opts_remove=(\n        '-c[remove all dependent packages]'\n        '-d[skip dependency checks]'\n        \"-k[only remove database entry, don't remove files]\"\n        '-n[remove protected configuration files]'\n        '-s[remove dependencies not required by other packages]'\n        '*:installed package:_yaourt_completions_installed_packages'\n    )\n\n    # options for passing to _arguments: options for --sync command\n    typeset -a _yaourt_opts_sync_actions\n    _yaourt_opts_sync_actions=(\n        '*-c[remove old packages from cache]:*:clean:->sync_clean'\n        '*-cc[remove all packages from cache]:*:clean:->sync_clean'\n        '-g[view all members of a package group]:*:package group:->sync_group'\n        '-s[search package names and descriptions]:*:search text:->sync_search'\n    )\n\n    # options for passing to _arguments: options for --sync command\n    typeset -a _yaourt_opts_sync_modifiers\n    _yaourt_opts_sync_modifiers=(\n        '-d[skip dependency checks]'\n        '-f[overwrite conflicting files]'\n        '-i[view package information]'\n        '-l[list all packages in a repository]'\n        '-p[print download URIs for each package to be installed]'\n        '-u[upgrade all out-of-date packages]'\n        '-w[download packages only]'\n        '-y[download fresh package databases]'\n        '*--ignore[ignore a package upgrade]:package:\n            _yaourt_completions_all_packages'\n        '*--ignoregroup[ignore a group upgrade]:package group:\n            _yaourt_completions_all_groups'\n        '--asdeps[install packages as non-explicitly installed]'\n        '--asexplicit[install packages as explicitly installed]'\n        \"--needed[don't reinstall up to date packages]\"\n        '--devel[used with -u updates all cvs/svn/git/hg/bzr packages]'\n    )\n\n    case $words[2] in\n        -Q*g*) # ipkg groups\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:groups:_yaourt_completions_installed_groups'\n            ;;\n        -Q*o*) # file\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:package file:_files'\n            ;;\n        -Q*p*) # file *.pkg.tar*\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_query_modifiers[@]\" \\\n                '*:package file:_files -g \"*.pkg.tar*\"'\n            ;;\n        -Q*)  _yaourt_action_query    ;;\n        -R*)  _yaourt_action_remove   ;;\n        -S*c*) # no completion\n            return 0\n            ;;\n        -S*l*) # repos\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_sync_modifiers[@]\" \\\n                '*:package repo:_yaourt_completions_repositories' \\\n                ;;\n        -S*g*) # pkg groups\n            _arguments -s : \\\n                \"$_yaourt_opts_common[@]\" \\\n                \"$_yaourt_opts_sync_modifiers[@]\" \\\n                '*:package group:_yaourt_completions_all_groups'\n            ;;\n        -S*)  _yaourt_action_sync     ;;\n        -U*)  _yaourt_action_upgrade  ;;\n        -V*)  _yaourt_action_version  ;;\n        -h*)  _yaourt_action_help     ;;\n        -  )  _yaourt_action_none     ;;\n        *  )  return 1                ;;\n    esac\n}\n\n# run the main dispatcher\n_yaourt \"$@\"\n"
  },
  {
    "path": ".config/zsh/completions/src/_yarn",
    "content": "#compdef yarn\n# ------------------------------------------------------------------------------\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for yarn (https://yarnpkg.com/)\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Massimiliano Torromeo <massimiliano.torromeo@gmail.com>\n#\n# ------------------------------------------------------------------------------\n\n_commands=(\n  'access'\n  'autoclean:Clean and remove unnecessary files from package dependencies'\n  'cache:List or clean every cached package'\n  \"check:Verify package dependencies agains yarn's lock file\"\n  'config:Manages the yarn configuration files'\n  'generate-lock-entry:Generates a lock file entry'\n  'global:Install packages globally on your operating system'\n  'help:Show information about a command'\n  'import:Generate yarn.lock from an existing npm-installed node_modules folder'\n  'info:Show information about a package'\n  'init:Interactively creates or updates a package.json file'\n  'install:Install all the dependencies listed within package.json'\n  'licenses:List licenses for installed packages'\n  'link:Symlink a package folder during development'\n  'list:List installed packages'\n  'login:Store registry username and email'\n  'logout:Clear registry username and email'\n  'outdated:Check for outdated package dependencies'\n  'owner:Manage package owners'\n  'pack:Create a compressed gzip archive of package dependencies'\n  'publish:Publish a package to the npm registry'\n  'run:Run a defined package script'\n  'tag:Add, remove, or list tags on a package'\n  'team:Maintain team memberships'\n  'unlink:Unlink a previously created symlink for a package'\n  'version:Update the package version'\n  'versions:Display version information of currently installed Yarn, Node.js, and its dependencies'\n  'why:Show information about why a package is installed'\n)\n\n_global_commands=(\n  'add:Installs a package and any packages that it depends on'\n  'bin:Displays the location of the yarn bin folder'\n  'remove:Remove installed package from dependencies updating package.json'\n  'upgrade:Upgrades packages to their latest version based on the specified range'\n  'upgrade-interactive'\n)\n\n_yarn_commands_scripts() {\n  local -a scripts\n  scripts=($(yarn run --json 2>/dev/null | sed -E '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^\"]+)\".*/\\1/;s/.*\"items\":\\[([^]]+).*/\\1/;s/[\" ]//g' | tr , '\\n' | sed -e 's/:/\\\\:/g'))\n  _describe 'command or script' _commands -- _global_commands -- scripts\n}\n\n_yarn_scripts() {\n  local -a scripts\n  scripts=($(yarn run --json 2>/dev/null | sed -E '/Commands available|possibleCommands/!d;s/.*Commands available from binary scripts: ([^\"]+)\".*/\\1/;s/.*\"items\":\\[([^]]+).*/\\1/;s/[\" ]//g' | tr , '\\n' | sed -e 's/:/\\\\:/g'))\n  _describe 'script' scripts\n}\n\n_yarn_global_commands() {\n  local -a cmds\n  cmds=('ls:List installed packages')\n  _describe 'command' _global_commands\n}\n\n_yarn_commands() {\n  _describe 'command' _commands -- _global_commands\n}\n\n_yarn() {\n  local context state state_descr line\n  typeset -A opt_args\n\n  _arguments \\\n    '(-h --help)'{-h,--help}'[output usage information]' \\\n    '(-V --version)'{-V,--version}'[output the version number]' \\\n    '--verbose[output verbose messages on internal operations]' \\\n    '--offline[trigger an error if any required dependencies are not available in local cache]' \\\n    '--prefer-offline[use network only if dependencies are not available in local cache]' \\\n    '--strict-semver' \\\n    '--json' \\\n    \"--ignore-scripts[don't run lifecycle scripts]\" \\\n    '--har[save HAR output of network traffic]' \\\n    '--ignore-platform[ignore platform checks]' \\\n    '--ignore-engines[ignore engines check]' \\\n    '--ignore-optional[ignore optional dependencies]' \\\n    '--force[install and build packages even if they were built before, overwrite lockfile]' \\\n    '--skip-integrity-check[run install without checking if node_modules is installed]' \\\n    '--check-files[install will verify file tree of packages for consistency]' \\\n    \"--no-bin-links[don't generate bin links when setting up packages]\" \\\n    '--flat[only allow one version of a package]' \\\n    '(--prod --production)'{--prod,--production} \\\n    \"--no-lockfile[don't read or generate a lockfile]\" \\\n    \"--pure-lockfile[don't generate a lockfile]\" \\\n    \"--frozen-lockfile[don't generate a lockfile and fail if an update is needed]\" \\\n    '--link-duplicates[create hardlinks to the repeated modules in node_modules]' \\\n    '--global-folder=[modules folder]:folder:_files -/' \\\n    '--modules-folder=[rather than installing modules into the node_modules folder relative to the cwd, output them here]:folder:_files -/' \\\n    '--cache-folder=[specify a custom folder to store the yarn cache]:folder:_files -/' \\\n    '--mutex=[use a mutex to ensure only one yarn instance is executing]:type[\\:specifier]' \\\n    '--no-emoji[disable emoji in output]' \\\n    '(-s --silent)'{-s,--silent}'[skip Yarn console logs, other types of logs (script output) will be printed]' \\\n    '--proxy=:host:_hosts' \\\n    '--https-proxy=:host:_hosts' \\\n    '--no-progress[disable progress bar]' \\\n    '--network-concurrency=[maximum number of concurrent network requests]:number' \\\n    '--network-timeout=[TCP timeout for network requests]:milliseconds' \\\n    '--non-interactive[do not show interactive prompts]' \\\n    '1: :_yarn_commands_scripts' \\\n    '*:: :->command_args'\n\n\n  case $state in\n    command_args)\n      case $words[1] in\n        help)\n          _arguments \\\n            '1: :_yarn_commands' \\\n        ;;\n\n        access)\n          _arguments \\\n            '1: :(public restricted grant revoke ls-packages ls-collaborators edit)'\n        ;;\n\n        add)\n          _arguments \\\n            '(-D --dev)'{-D,--dev}'[install packages in devDependencies]' \\\n            '(-P --peer)'{-P,--peer}'[install packages in peerDependencies]' \\\n            '(-O --optional)'{-O,--optional}'[install packages in optionalDependencies]' \\\n            '(-E --exact)'{-E,--exact}'[install packages as exact versions]' \\\n            '(-T --tilde)'{-T,--tilde}'[install the most recent release of the packages that have the same minor version]' \\\n            '*:package-name:'\n        ;;\n\n        cache)\n          _arguments \\\n            '1: :(ls dir clean)'\n        ;;\n\n        check)\n          _arguments \\\n            '--integrity' \\\n            '--verify-tree'\n        ;;\n\n        config)\n          _arguments \\\n            '1: :(set get delete list)' \\\n            '*:: :->config_args'\n        ;;\n\n        global)\n          _arguments \\\n            '--prefix=[bin prefix to use to install binaries]' \\\n            '1: :_yarn_global_commands' \\\n            '*:: :->command_args'\n        ;;\n\n        info)\n          _arguments \\\n            '1:package:' \\\n            '2:field'\n        ;;\n\n        init)\n          _arguments \\\n            '(-y --yes)'{-y,--yes}'[install packages in devDependencies]'\n        ;;\n\n        licenses)\n          _arguments \\\n            '1: :(ls generate-disclaimer)' \\\n        ;;\n\n        link|unlink|outdated)\n          _arguments \\\n            '1:package' \\\n        ;;\n\n        list)\n          _arguments \\\n            '--depth[Limit the depth of the shown dependencies]:depth'\n        ;;\n\n        owner)\n          _arguments \\\n            '1: :(ls add rm)' \\\n            '*:: :->owner_args'\n        ;;\n\n        pack)\n          _arguments \\\n            '(-f --filename)'{-f,--filename}':filename:_files'\n        ;;\n\n        publish)\n          _arguments \\\n            '--new-version:version:' \\\n            '--message:message:' \\\n            '--no-git-tag-version' \\\n            '--access:access:' \\\n            '--tag:tag:' \\\n            '1: :_files'\n        ;;\n\n        remove|upgrade)\n          _arguments \\\n            '*:package:'\n        ;;\n\n        run)\n          _arguments \\\n            '1: :_yarn_scripts'\n        ;;\n\n        tag)\n          _arguments \\\n            '1: :(ls add rm)' \\\n            '*:: :->tag_args'\n        ;;\n\n        team)\n          _arguments \\\n            '1: :(create destroy add rm ls)' \\\n            '*:: :->team_args'\n        ;;\n\n        version)\n          _arguments \\\n            '--new-version:version:' \\\n            '--message:message:' \\\n            '--no-git-tag-version'\n        ;;\n\n        why)\n          _arguments \\\n            '1:query:_files'\n        ;;\n      esac\n    ;;\n  esac\n\n  case $state in\n    config_args)\n      case $words[1] in\n        get|delete)\n          _arguments \\\n            '1:key:'\n        ;;\n\n        set)\n          _arguments \\\n            '(-g --global)'{-g,--global} \\\n            '1:key:' \\\n            '2:value:'\n        ;;\n      esac\n    ;;\n\n    owner_args)\n      case $words[1] in\n        ls)\n          _arguments \\\n            '1:package:'\n        ;;\n\n        add|rm)\n          _arguments \\\n            '1:user:' \\\n            '2:package:'\n        ;;\n      esac\n    ;;\n\n    tag_args)\n      case $words[1] in\n        ls)\n          _arguments \\\n            '1:package'\n        ;;\n\n        add|rm)\n          _arguments \\\n            '1:package:' \\\n            '2:tag:'\n        ;;\n      esac\n    ;;\n\n    team_args)\n      case $words[1] in\n        create|destroy|ls)\n          _arguments \\\n            '1:scope\\:team:'\n        ;;\n\n        add|rm)\n          _arguments \\\n            '1:scope\\:team:' \\\n            '2:user:'\n        ;;\n      esac\n    ;;\n  esac\n}\n\n_yarn \"$@\"\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/src/_zcash-cli",
    "content": "#compdef zcash-cli\n# ------------------------------------------------------------------------------\n# Copyright (c) 2017 Github zsh-users - http://github.com/zsh-users\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#     * Redistributions of source code must retain the above copyright\n#       notice, this list of conditions and the following disclaimer.\n#     * Redistributions in binary form must reproduce the above copyright\n#       notice, this list of conditions and the following disclaimer in the\n#       documentation and/or other materials provided with the distribution.\n#     * Neither the name of the zsh-users nor the\n#       names of its contributors may be used to endorse or promote products\n#       derived from this software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY\n# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# ------------------------------------------------------------------------------\n# Description\n# -----------\n#\n#  Completion script for zcash-cli (https://z.cash).\n#\n# ------------------------------------------------------------------------------\n# Authors\n# -------\n#\n#  * Jordy van Wolferen (https://github.com/jvwdev)\n#\n# ------------------------------------------------------------------------------\n\nlocal state line curcontext=\"$curcontext\" ret=1\n\n_arguments -C \\\n  '-?[display usage information]' \\\n  -conf='[specify configuration file]:file [zcash.conf]:_files' \\\n  -datadir='[specify data directory]:directory:_directories' \\\n  -testnet'[use the test network]' \\\n  -regtest'[enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.]' \\\n  -rpcconnect='[send commands to node running on specified ip]:rpcconnect [127.0.0.1]:_hosts' \\\n  -rpcport='[connect to JSON-RPC on specified port]: :_guard \"[[\\:digit\\:]]#\" \"port [8232 or testnet\\: 18232]\"' \\\n  -rpcwait'[wait for RPC server to start]' \\\n  -rpcuser='[username for JSON-RPC connections]:rpcuser' \\\n  -rpcpassword='[password for JSON-RPC connections]:rpcpassword' \\\n  -rpcclienttimeout='[specify timeout during HTTP requests, or 0 for no timeout]: :_guard \"[[\\:digit\\:]]#\" \"timeout (seconds) [900]\"' \\\n  ':subcommand:->subcommand' && ret=0\n\ncase $state in\n  subcommand)\n    subcommands=(\n      'getbestblockhash'\n      'getblock'\n      'getblockchaininfo'\n      'getblockcount'\n      'getblockhash'\n      'getblockheader'\n      'getchaintips'\n      'getdifficulty'\n      'getmempoolinfo'\n      'getrawmempool'\n      'gettxout'\n      'gettxoutproof'\n      'gettxoutsetinfo'\n      'verifychain'\n      'verifytxoutproof'\n      'getinfo'\n      'help'\n      'stop'\n      'generate'\n      'getgenerate'\n      'setgenerate'\n      'getblocksubsidy'\n      'getblocktemplate'\n      'getlocalsolps'\n      'getmininginfo'\n      'getnetworkhashps'\n      'getnetworksolps'\n      'prioritisetransaction'\n      'submitblock'\n      'addnode'\n      'clearbanned'\n      'disconnectnode'\n      'getaddednodeinfo'\n      'getconnectioncount'\n      'getnettotals'\n      'getnetworkinfo'\n      'getpeerinfo'\n      'listbanned'\n      'ping'\n      'setban'\n      'createrawtransaction'\n      'decoderawtransaction'\n      'decodescript'\n      'fundrawtransaction'\n      'getrawtransaction'\n      'sendrawtransaction'\n      'signrawtransaction'\n      'createmultisig'\n      'estimatefee'\n      'estimatepriority'\n      'validateaddress'\n      'verifymessage'\n      'z_validateaddress'\n      'addmultisigaddress'\n      'backupwallet'\n      'dumpprivkey'\n      'dumpwallet'\n      'encryptwallet'\n      'getaccount'\n      'getaccountaddress'\n      'getaddressesbyaccount'\n      'getbalance'\n      'getnewaddress'\n      'getrawchangeaddress'\n      'getreceivedbyaccount'\n      'getreceivedbyaddress'\n      'gettransaction'\n      'getunconfirmedbalance'\n      'getwalletinfo'\n      'importaddress'\n      'importprivkey'\n      'importwallet'\n      'keypoolrefill'\n      'listaccounts'\n      'listaddressgroupings'\n      'listlockunspent'\n      'listreceivedbyaccount'\n      'listreceivedbyaddress'\n      'listsinceblock'\n      'listtransactions'\n      'listunspent'\n      'lockunspent'\n      'move'\n      'sendfrom'\n      'sendmany'\n      'sendtoaddress'\n      'setaccount'\n      'settxfee'\n      'signmessage'\n      'z_exportkey'\n      'z_exportwallet'\n      'z_getbalance'\n      'z_getnewaddress'\n      'z_getoperationresult'\n      'z_getoperationstatus'\n      'z_gettotalbalance'\n      'z_importkey'\n      'z_importwallet'\n      'z_listaddresses'\n      'z_listoperationids'\n      'z_listreceivedbyaddress'\n      'z_sendmany'\n      'zcbenchmark'\n      'zcrawjoinsplit'\n      'zcrawkeygen'\n      'zcrawreceive'\n      'zcsamplejoinsplit'\n    )\n\n    _describe -t subcommands 'zcash-cli subcommand' subcommands && ret=0\n  ;;\nesac\n\nreturn ret\n\n# Local Variables:\n# mode: Shell-Script\n# sh-indentation: 2\n# indent-tabs-mode: nil\n# sh-basic-offset: 2\n# End:\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/completions/zsh-completions.zsh",
    "content": "fpath+=\"${0:h}/src\"\n"
  },
  {
    "path": ".config/zsh/enhancd/enhancd.log",
    "content": "/usr/share/backgrounds/xfce\n/usr/share/backgrounds/contest\n/home/bresilla/VirtualBox VMs\n/home/bresilla/wmutils\n/usr/share/bcc/man\n/usr/share/bcc/introspection\n/usr/share\n/usr/share/bcc/tools/doc\n/usr/share/bcc/tools/lib\n/media/bresilla/indrive1/Code/Linux/LFCS/src\n/media/bresilla/indrive1/Code/Linux\n/home/bresilla/.scripts\n/home/bresilla/Dots/.scripts\n/home/bresilla/Downloads/cambria\n/media/bresilla/indrive1/Code/YouTube/UniBonn/test\n/media/bresilla/indrive1/Code/Vagrant\n/media/bresilla/indrive1/Code/ALL\n/home/bresilla/.config/rofi\n/tmp/pscircle/include\n/tmp/pscircle/examples\n/tmp/pscircle/src\n/tmp/pscircle/tests\n/tmp/pscircle/docs\n/tmp/systemd-private-662006cd08274547b05fd480d816e173-colord.service-V1kjJg\n/tmp/systemd-private-662006cd08274547b05fd480d816e173-systemd-timesyncd.service-JzuPHL\n/tmp/systemd-private-662006cd08274547b05fd480d816e173-rtkit-daemon.service-XeeMb6\n/tmp/systemd-private-662006cd08274547b05fd480d816e173-systemd-resolved.service-z3hRqm\n/tmp/nvimTtpM5E\n/tmp/systemd-private-662006cd08274547b05fd480d816e173-bolt.service-XP5w0s\n/tmp/nvimNjspFL\n/tmp/ssh-tRDjPO4IAl7z\n/home/bresilla/OneDrive\n/home/bresilla/Sync\n/media/bresilla/indrive1/Code/Udacity/ROBO/tmp/RoboND-HomeServiceRobot/src\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_final\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/lua\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/utils\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/docs\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/cuda\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/tools\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/c\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/samples\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/python\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/gazebo\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/img\n/media/bresilla/indrive1/Code/Docker/devenv/robo/deep\n/tmp/onedrived-dev/onedrived\n/tmp/onedrived-dev/tests\n/tmp/systemd-private-6da69f68e76d494793b3676287baa944-colord.service-GutwPD\n/tmp/systemd-private-6da69f68e76d494793b3676287baa944-systemd-timesyncd.service-qRntX8\n/tmp/nvimge1QHB\n/tmp/ssh-jH0iiOgDhIVq\n/tmp/systemd-private-6da69f68e76d494793b3676287baa944-bolt.service-URTexz\n/tmp/systemd-private-6da69f68e76d494793b3676287baa944-systemd-resolved.service-SkduCs\n/tmp/systemd-private-6da69f68e76d494793b3676287baa944-rtkit-daemon.service-0pIBqw\n/tmp/nvimFt5PrH\n/media/bresilla/indrive1/Code/Udacity/ROBO/part_13\n/media/bresilla/indrive1/Code/Udacity/ROBO/part_14\n/media/bresilla/indrive1/Code/Udacity/ROBO/part_12\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_7\n/media/bresilla/indrive1/Code/Udacity/ROBO/part_21\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_6\n/media/bresilla/indrive1/Code/Udacity/ROBO/part_11\n/tmp/systemd-private-13a5c1d2f1cd4c46bc3ca87d7bc81826-rtkit-daemon.service-8nqDiz\n/tmp/ssh-9jM7duzSwodN\n/tmp/systemd-private-13a5c1d2f1cd4c46bc3ca87d7bc81826-systemd-timesyncd.service-oUwqXn\n/tmp/nvimEXfD2n\n/tmp/systemd-private-13a5c1d2f1cd4c46bc3ca87d7bc81826-bolt.service-gVp2Qa\n/tmp/nvimgXA78f\n/tmp/systemd-private-13a5c1d2f1cd4c46bc3ca87d7bc81826-systemd-resolved.service-OggUx4\n/tmp/systemd-private-13a5c1d2f1cd4c46bc3ca87d7bc81826-colord.service-gedICy\n/tmp/xdo/doc\n/tmp/core\n/tmp/systemd-private-8d666381092342d59bcf30d09cc2302c-bolt.service-QgsPnz\n/tmp/systemd-private-8d666381092342d59bcf30d09cc2302c-systemd-timesyncd.service-ANmRcE\n/tmp/ssh-smNsPH9Or4hk\n/tmp/systemd-private-8d666381092342d59bcf30d09cc2302c-systemd-resolved.service-WkHLrV\n/tmp/nvimKFVYZX\n/tmp/nvimqTpKvR\n/tmp/systemd-private-8d666381092342d59bcf30d09cc2302c-colord.service-63zwtu\n/tmp/systemd-private-8d666381092342d59bcf30d09cc2302c-rtkit-daemon.service-G7clwP\n/home/bresilla/test\n/home/bresilla/Documents/bspwm\n/home/bresilla/Documents/student-award\n/usr/lib\n/usr/lib/x86_64-linux-gnu\n/usr/lib/x86_64-linux-gnu/nvidia/xorg\n/tmp/cuda-sample\n/tmp/appInsights-nodeAIF-d9b70cd4-b9f9-4d70-929b-a071c400b217\n/tmp/systemd-private-a54814fa1c0947f69fd7ffc90caa5056-systemd-timesyncd.service-0AWb9b\n/tmp/systemd-private-a54814fa1c0947f69fd7ffc90caa5056-bolt.service-6ZYjVm\n/tmp/nvim4jPa1F\n/tmp/snap.1000_spotify_j44Obo\n/tmp/systemd-private-a54814fa1c0947f69fd7ffc90caa5056-colord.service-SvNo2r\n/tmp/nvim2od08I\n/tmp/systemd-private-a54814fa1c0947f69fd7ffc90caa5056-rtkit-daemon.service-OkYUUi\n/tmp/tmppe82_40f\n/tmp/ssh-X0xc55S1y03H\n/tmp/systemd-private-a54814fa1c0947f69fd7ffc90caa5056-systemd-resolved.service-qyuunQ\n/media/bresilla/indrive1/Code/Docker/devenv/base\n/home/bresilla/Downloads/LibreOffice_6.0.4_Linux_x86-64_deb\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/assets\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/__pycache__\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8/MNIST_data\n/media/bresilla/indrive1/Code/Docker/guienv\n/tmp/ssh-XLcL185ejWaU\n/tmp/nvimstgnuq\n/tmp/systemd-private-2629f0bbedb245f59fd51a1f9c4864f3-colord.service-VsDZXJ\n/tmp/appInsights-node\n/tmp/nvimRT9guq\n/tmp/emacs1000\n/tmp/mozilla_bresilla0\n/tmp/systemd-private-2629f0bbedb245f59fd51a1f9c4864f3-rtkit-daemon.service-XG2Q0e\n/tmp/systemd-private-2629f0bbedb245f59fd51a1f9c4864f3-systemd-timesyncd.service-NK6XJJ\n/tmp/snap.1000_spotify_18xZPr\n/tmp/systemd-private-2629f0bbedb245f59fd51a1f9c4864f3-bolt.service-DIVMrx\n/tmp/systemd-private-2629f0bbedb245f59fd51a1f9c4864f3-systemd-resolved.service-9fh209\n/tmp/tmux-0\n/media/bresilla/indrive1/Code/Docker/cudann\n/media/bresilla/indrive1/Code/Docker/kinetic\n/media/bresilla/indrive1/Code/Docker/vuedev\n/media/bresilla/indrive1/Code/Docker/latex\n/media/bresilla/indrive1/Code/YouTube/UniBonn/lib\n/media/bresilla/indrive1/Code/YouTube/UniBonn/tests\n/tmp/snap.1000_spotify_u1ol7B\n/tmp/systemd-private-f87e4259d1bc4ee0a032cd9f9df2c12e-bolt.service-nS28c8\n/tmp/systemd-private-f87e4259d1bc4ee0a032cd9f9df2c12e-systemd-resolved.service-T3rprj\n/tmp/systemd-private-f87e4259d1bc4ee0a032cd9f9df2c12e-rtkit-daemon.service-BW92IS\n/tmp/nvimdd56Dz\n/tmp/systemd-private-f87e4259d1bc4ee0a032cd9f9df2c12e-colord.service-Bp0QQi\n/tmp/nvimnHLsOx\n/tmp/systemd-private-f87e4259d1bc4ee0a032cd9f9df2c12e-systemd-timesyncd.service-Fy54AG\n/tmp/ssh-Ob0Gr3j0fQWP\n/tmp/VSCode Crashes\n/tmp/gnome-pomodoro\n/home/bresilla/Documents/slam_project\n/home/bresilla/Documents/QGroundControl\n/tmp/systemd-private-44b07c1956034d9382122d4d96704d9d-bolt.service-1011Zp\n/tmp/systemd-private-44b07c1956034d9382122d4d96704d9d-systemd-resolved.service-ZMWYUD\n/tmp/systemd-private-44b07c1956034d9382122d4d96704d9d-systemd-timesyncd.service-blJpKU\n/tmp/nvimZYxt8R\n/tmp/kdeconnect_bresilla\n/tmp/nvimorBMdW\n/tmp/Temp-e13a259f-170e-450c-b56f-8ded56decc92\n/tmp/snap.1000_spotify_wqVkV1\n/tmp/tmux-1000\n/tmp/firefox_bresilla\n/tmp/systemd-private-44b07c1956034d9382122d4d96704d9d-rtkit-daemon.service-1SYUQw\n/tmp/ssh-57vitIimUFKW\n/tmp/systemd-private-44b07c1956034d9382122d4d96704d9d-colord.service-FvKTfU\n/proc/1/task\n/proc/1/fd\n/proc/1/map_files\n/proc/1/fdinfo\n/proc/1/ns\n/proc/1/net\n/proc/1/attr\n/home/bresilla/Downloads/Scans2\n/home/bresilla/Downloads/CANADA\n/home/bresilla/Downloads/go1.10.2.src\n/home/bresilla/Downloads/go1.10.2.src/go\n/home/bresilla/Downloads/go1.10.2.src/go/src\n/media/bresilla/indrive1/Code/Drone/DroneKit\n/home/bresilla/Templates\n/home/bresilla/Desktop\n/home/bresilla/Public\n/home/bresilla/snap\n/home/bresilla/Music\n/home/bresilla/Pictures\n/home/linuxbrew\n/lost+found\n/dev\n/proc\n/sbin\n/lib64\n/run\n/cdrom\n/srv\n/snap\n/lib32\n/boot\n/bin\n/sys\n/root\n/var\n/mnt\n/lib\n/opt\n/usr\n/etc\n/media\n/media/bresilla\n/media/bresilla/indrive1\n/media/bresilla/indrive1/Code/Udacity\n/media/bresilla/indrive1/Code/VueWeb\n/media/bresilla/indrive1/Code/ROBO\n/media/bresilla/indrive1/Code/University\n/media/bresilla/indrive1/Code/Papers\n/media/bresilla/indrive1/Code/Website\n/media/bresilla/indrive1/Code/Cursera\n/media/bresilla/indrive1/Code/Books\n/media/bresilla/indrive1/Code/Dardan\n/media/bresilla/indrive1/Code/LIFX\n/media/bresilla/indrive1/Code/YouTube\n/media/bresilla/indrive1/Code/Raspi\n/media/bresilla/indrive1/Code/Drone\n/home/bresilla/Downloads/go1.10.2.src/go/src/build\n/proc/1\n/home/bresilla/.config/mpv\n/home/bresilla/.config\n/media/bresilla/indrive1/Code/YouTube/UniBonn/build\n/tmp/dropop_bresilla\n/tmp/testing\n/home/bresilla/Dots/.func\n/media/bresilla/indrive1/Code/Docker/opengym\n/media/bresilla/indrive1/Code/Docker/devenv\n/etc/docker\n/media/bresilla/indrive1/Code/Docker/devenv/base/basegui\n/usr/lib/x86_64-linux-gnu/nvidia\n/media/bresilla/indrive1/Code/Docker\n/home/bresilla/Dots/.config\n/home/bresilla/Documents\n/tmp/xdo\n/media/bresilla/indrive1/Code/Docker/devenv/deepenv\n/media/bresilla/indrive1/Code/Docker/devenv/roboenv\n/tmp/onedrived-dev\n/home/bresilla/Downloads/ngrok-stable-linux-amd64\n/home/bresilla/.config/xfce4\n/home/bresilla/Remote\n/media/bresilla/indrive1/Code/Docker/devenv/robo\n/media/bresilla/indrive1/Code/Udacity/ROBO/robond_project_8\n/media/bresilla/indrive1/Code/Udacity/ROBO\n/media/bresilla/indrive1/Code/Udacity/ROBO/tmp\n/media/bresilla/indrive1/Code/Udacity/ROBO/tmp/RoboND-HomeServiceRobot\n/media/bresilla/indrive1/Code/Docker/devenv/robo/robo\n/tmp\n/tmp/pscircle\n/tmp/pscircle/build\n/home/bresilla/.config/rofi/menu\n/media/bresilla/indrive1/Code/YouTube/UniBonn/src\n/media/bresilla/indrive1/Code/YouTube/UniBonn/lib/bin\n/media/bresilla/indrive1/Code/YouTube/UniBonn/thrd\n/media/bresilla/indrive1/Code/YouTube/UniBonn\n/media/bresilla/indrive1/Code/YouTube/UniBonn/bin\n/home/bresilla/Downloads\n/home/bresilla/.scripts/perf-tools\n/home/bresilla/Videos\n/home/bresilla/Remote/Code\n/media/bresilla/indrive1/Code\n/media/bresilla/indrive1/Code/Linux/LFCS\n/home/bresilla/Dots/.scripts/perf-tools\n/usr/share/bcc/tools/old\n/usr/share/bcc\n/home/bresilla/Dots\n/home/bresilla/Temp\n/home/bresilla/Temp/OneSu\n/home/bresilla/Sets\n/usr/share/backgrounds\n/usr/share/bcc/tools\n/home/bresilla/.local\n/home/bresilla/.local/bin\n/\n/home\n/home/bresilla/Dots/.sbin\n/home/bresilla\n/home/bresilla/Music\n"
  },
  {
    "path": ".config/zsh/enhancd/init.sh",
    "content": "#!/bin/bash\n\nexport ENHANCD_ROOT\nexport ENHANCD_COMMAND\nexport ENHANCD_FILTER\nexport ENHANCD_DIR=\"${ENHANCD_DIR:-$HOME/.zsh/enhancd}\"\nexport ENHANCD_DISABLE_DOT=\"${ENHANCD_DISABLE_DOT:-0}\"\nexport ENHANCD_DISABLE_HYPHEN=\"${ENHANCD_DISABLE_HYPHEN:-0}\"\nexport ENHANCD_DISABLE_HOME=\"${ENHANCD_DISABLE_HOME:-0}\"\nexport ENHANCD_DOT_ARG=\"${ENHANCD_DOT_ARG:-..}\"\nexport ENHANCD_HYPHEN_ARG=\"${ENHANCD_HYPHEN_ARG:--}\"\nexport ENHANCD_HOME_ARG=\"${ENHANCD_HOME_ARG:-}\"\nexport ENHANCD_DOT_SHOW_FULLPATH=\"${ENHANCD_DOT_SHOW_FULLPATH:-0}\"\nexport ENHANCD_USE_FUZZY_MATCH=\"${ENHANCD_USE_FUZZY_MATCH:-1}\"\n\n_ENHANCD_VERSION=\"2.2.2\"\n_ENHANCD_SUCCESS=0\n_ENHANCD_FAILURE=60\n\nif [[ -n $BASH_VERSION ]]; then\n    # BASH\n    ENHANCD_ROOT=\"$(builtin cd \"$(dirname \"$BASH_SOURCE\")\" && pwd)\"\nelif [[ -n $ZSH_VERSION ]]; then\n    # ZSH\n    ENHANCD_ROOT=\"${${(%):-%x}:A:h}\"\nelse\n    return 1\nfi\n\n__enhancd::init::init()\n{\n    # core files\n    for src in \"$ENHANCD_ROOT/src\"/*.sh\n    do\n        source \"$src\"\n    done\n\n    # custom files\n    for src in \"$ENHANCD_ROOT/src/custom/\"{sources,options}/*.sh\n    do\n        source \"$src\"\n    done\n\n    unset src\n\n    # make a log file and a root directory\n    if [ ! -d \"$ENHANCD_DIR\" ]; then\n      mkdir -p \"$ENHANCD_DIR\"\n    fi\n    if [ ! -f \"$ENHANCD_DIR/enhancd.log\" ]; then\n      touch \"$ENHANCD_DIR/enhancd.log\"\n    fi\n\n    # alias to cd\n    eval \"alias ${ENHANCD_COMMAND:=cd}=__enhancd::cd\"\n\n    # Set the filter if empty\n    if [[ -z $ENHANCD_FILTER ]]; then\n        ENHANCD_FILTER=\"fzy:fzf-tmux:fzf:peco:percol:gof:pick:icepick:sentaku:selecta\"\n    fi\n}\n\n__enhancd::init::init\n"
  },
  {
    "path": ".config/zsh/enhancd/src/arguments.sh",
    "content": "__enhancd::arguments::option()\n{\n    local opt=\"$1\" action\n\n    cat \"$ENHANCD_ROOT/src/custom/config.ltsv\" \\\n        | __enhancd::utils::grep -v '^(//|#)' \\\n        | awk -F$'\\t' '/:'\"$opt\"'\\t/{print $4}' \\\n        | cut -d: -f2 \\\n        | read action\n\n    if [[ -z $action ]]; then\n        __enhancd::utils::die \\\n            \"$opt: no such option\\n\"\n        return 1\n    fi\n\n    if __enhancd::utils::has __enhancd::custom::sources::$action; then\n        __enhancd::custom::sources::$action \"$@\"\n    elif __enhancd::utils::has __enhancd::custom::options::$action; then\n        __enhancd::custom::options::$action \"$@\"\n    else\n        __enhancd::utils::die \"$action: no such action defined\\n\"\n        return 1\n    fi\n}\n\n__enhancd::arguments::hyphen()\n{\n    if [[ $ENHANCD_DISABLE_HYPHEN == 1 ]]; then\n        echo \"$OLDPWD\"\n        return 0\n    fi\n\n    __enhancd::history::list \"$1\" \\\n        | __enhancd::utils::grep -vx \"$HOME\" \\\n        | head \\\n        | __enhancd::filter::interactive\n}\n\n__enhancd::arguments::dot()\n{\n    if [[ $ENHANCD_DISABLE_DOT == 1 ]]; then\n        echo \"..\"\n        return 0\n    fi\n\n    __enhancd::path::go_upstairs \"$PWD\" \\\n        | __enhancd::filter::reverse \\\n        | __enhancd::utils::grep \"$1\" \\\n        | __enhancd::filter::interactive \\\n        | __enhancd::path::to_abspath\n\n    # Returns false if __enhancd::path::to_abspath fails\n    # __enhancd::path::to_abspath returns false\n    # if __enhancd::filter::interactive doesn't output anything\n    if [[ $? -eq 1 ]]; then\n        if [[ -n $1 ]]; then\n            # Returns false if an argument is given\n            return $_ENHANCD_FAILURE\n        else\n            # Returns true when detecting to press Ctrl-C in selection\n            return $_ENHANCD_SUCCESS\n        fi\n    fi\n}\n\n__enhancd::arguments::none()\n{\n    if [[ $ENHANCD_DISABLE_HOME == 1 ]]; then\n        echo \"$HOME\"\n        return 0\n    fi\n\n    __enhancd::history::list | __enhancd::filter::interactive\n}\n\n__enhancd::arguments::empty()\n{\n    echo \"$HOME\"\n    return 0\n}\n\n__enhancd::arguments::given()\n{\n    if [[ -d $1 ]]; then\n        echo \"$1\"\n        return 0\n    fi\n\n    __enhancd::history::list \"$1\" | __enhancd::filter::interactive\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/cd.sh",
    "content": "__enhancd::cd()\n{\n    # t is an argument of the list for __enhancd::interface\n    local    t arg=\"$1\"\n    local -i ret=0\n\n    if ! __enhancd::utils::available; then\n        __enhancd::cd::builtin \"${@:-$HOME}\"\n        return $?\n    fi\n\n    # Read from standard input\n    if [[ -p /dev/stdin ]]; then\n        t=\"$(cat <&0)\"\n        arg=\":stdin:\"\n    fi\n\n    case \"$arg\" in\n        \":stdin:\")\n            ;;\n        \"$ENHANCD_HYPHEN_ARG\")\n            # If a hyphen is passed as the argument,\n            # searchs from the last 10 directory items in the log\n            t=\"$(__enhancd::arguments::hyphen \"$2\")\"\n            ret=$?\n            ;;\n        \"$ENHANCD_DOT_ARG\")\n            # If a double-dot is passed as the argument,\n            # it behaves like a zsh-bd plugin\n            # In short, you can jump back to a specific directory,\n            # without doing `cd ../../..`\n            t=\"$(__enhancd::arguments::dot \"$2\")\"\n            ret=$?\n            ;;\n        \"-\")\n            # When $ENHANCD_HYPHEN_ARG is configured,\n            # this behaves like `cd -`\n            t=\"$OLDPWD\"\n            ;;\n        \"..\")\n            # When $ENHANCD_DOT_ARG is configured,\n            # \"..\" is passed to builtin cd\n            t=\"..\"\n            ;;\n        -* | --*)\n            __enhancd::arguments::option \"$@\"\n            return $?\n            ;;\n        \"$ENHANCD_HOME_ARG\")\n            t=\"$(__enhancd::arguments::none \"$@\")\"\n            ret=$?\n            ;;\n        \"\")\n            t=\"$(__enhancd::arguments::empty)\"\n            ret=$?\n            ;;\n        *)\n            t=\"$(__enhancd::arguments::given \"$@\")\"\n            ret=$?\n            ;;\n    esac\n\n    case $ret in\n        $_ENHANCD_SUCCESS)\n            __enhancd::cd::builtin \"$t\"\n            ret=$?\n            ;;\n        $_ENHANCD_FAILURE)\n            __enhancd::utils::die \\\n                \"${t:-${2:-$1}}: no such file or directory\\n\"\n            ;;\n        *)\n            ;;\n    esac\n\n    return $ret\n}\n\n__enhancd::cd::builtin()\n{\n    local -i ret=0\n\n    # Case of pressing Ctrl-C in selecting\n    if [[ -z $1 ]]; then\n        return 0\n    fi\n\n    if [[ ! -d $1 ]]; then\n        __enhancd::utils::die \\\n            \"$1: no such file or directory\\n\"\n        return 1\n    fi\n\n    __enhancd::cd::before\n    builtin cd \"$1\"\n    ret=$?\n    __enhancd::cd::after\n\n    return $ret\n}\n\n__enhancd::cd::before()\n{\n    :\n}\n\n__enhancd::cd::after()\n{\n    local list\n    list=\"$(__enhancd::history::update)\"\n\n    if [[ -n $list ]]; then\n        echo \"$list\" >| \"$ENHANCD_DIR/enhancd.log\"\n    fi\n\n    if [[ -n $ENHANCD_HOOK_AFTER_CD ]]; then\n        eval \"$ENHANCD_HOOK_AFTER_CD\"\n    fi\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/custom/config.ltsv",
    "content": "short:-h\tlong:--help\tdesc:Show help message\taction:help\nshort:-V\tlong:--version\tdesc:Show version information\taction:version\nshort:-g\tlong:\tdesc:[DEPRECATED] List ghq list\taction:ghq\nshort:-G\tlong:--ghq\tdesc:List ghq list\taction:ghq_smart\n#short:-1\tlong:\tdesc:Back to previous directory\taction:number\n#short:-2\tlong:\tdesc:Back to previous directory\taction:number\n#short:-3\tlong:\tdesc:Back to previous directory\taction:number\n#short:-4\tlong:\tdesc:Back to previous directory\taction:number\n#short:-5\tlong:\tdesc:Back to previous directory\taction:number\n#short:-6\tlong:\tdesc:Back to previous directory\taction:number\n#short:-7\tlong:\tdesc:Back to previous directory\taction:number\n#short:-8\tlong:\tdesc:Back to previous directory\taction:number\n#short:-9\tlong:\tdesc:Back to previous directory\taction:number\n"
  },
  {
    "path": ".config/zsh/enhancd/src/custom/options/help.sh",
    "content": "#!/bin/bash\n\n__enhancd::custom::options::help()\n{\n    local config=\"$ENHANCD_ROOT/src/custom/config.ltsv\"\n\ncat <<HELP\nusage: cd [OPTIONS] [dir]\n\nOPTIONS:\nHELP\n\nif [[ -f $config ]]; then\n    cat \"$config\" \\\n        | __enhancd::utils::grep -v '^(//|#)' \\\n        |\n    while IFS=$'\\t' read short long desc action\n    do\n        if [[ -z ${short#*:} ]]; then\n            command printf \"  %s  %-15s %s\\n\" \"  \"          \"${long#*:}\" \"${desc#*:}\"\n        elif [[ -z ${long#*:} ]]; then\n            command printf \"  %s  %-15s %s\\n\" \"${short#*:}\" \"\"           \"${desc#*:}\"\n        else\n            command printf \"  %s, %-15s %s\\n\" \"${short#*:}\" \"${long#*:}\" \"${desc#*:}\"\n        fi\n    done\nelse\n    printf \"  nothing yet\\n\"\nfi\n\ncat <<HELP\n\nAuthor:  b4b4r07\nVersion: $_ENHANCD_VERSION\nLICENSE: MIT\nHELP\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/custom/options/number.sh",
    "content": "__enhancd::custom::options::number()\n{\n    local num=\"${1#-}\"\n\n    if [[ ! $num =~ ^[0-9]+$ ]]; then\n        __enhancd::utils::die \\\n            \"$num: Is not numeric\\n\"\n        return 1\n    fi\n\n    __enhancd::history::list \\\n        | head \\\n        | sed -n \"$num\"p \\\n        | __enhancd::cd\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/custom/options/version.sh",
    "content": "#!/bin/bash\n\n__enhancd::custom::options::version()\n{\n    echo \"$_ENHANCD_VERSION\"\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/custom/sources/ghq.sh",
    "content": "#!/bin/bash\n\n__enhancd::custom::sources::ghq()\n{\n    # Shift first arguments (-g/--ghq)\n    shift\n\n    if ! __enhancd::utils::has \"ghq\"; then\n        __enhancd::utils::die \"ghq: not found\\n\"\n        return 1\n    fi\n\n    local dir ghq_root\n    ghq_root=\"$(ghq root 2>/dev/null)\"\n\n    {\n        cat \"$ENHANCD_DIR/enhancd.log\" \\\n            | __enhancd::utils::grep \"^$ghq_root\" \\\n            | __enhancd::filter::reverse\n        ghq list\n    } 2>/dev/null \\\n        | __enhancd::utils::grep -vx \"$ghq_root\" \\\n        | __enhancd::utils::grep -vx \"$PWD\" \\\n        | __enhancd::utils::sed \"$ghq_root/\" \\\n        | __enhancd::filter::unique \\\n        | __enhancd::filter::fuzzy \"$@\" \\\n        | __enhancd::filter::interactive \\\n        | read dir\n\n    if [[ -z $dir ]]; then\n        # Press Ctrl-C\n        return 0\n    fi\n\n    if [[ ! -d $ghq_root/$dir ]]; then\n        __enhancd::utils::die \"$dir: no such directory\\n\"\n        return 1\n    fi\n\n    __enhancd::cd \"$ghq_root/$dir\"\n}\n\n__enhancd::custom::sources::ghq_smart()\n{\n    shift\n    local dir ret\n\n    if ! __enhancd::utils::has \"ghq\"; then\n        __enhancd::utils::die \"ghq: not found\\n\"\n        return 1\n    fi\n\n    dir=\"$(\n    {\n        ghq list --full-path\n        {\n            ghq list --full-path\n            __enhancd::history::origin\n        } \\\n            | __enhancd::filter::join\n    } \\\n        | __enhancd::utils::grep -vx \"$PWD\" \\\n        | __enhancd::filter::reverse \\\n        | __enhancd::filter::unique \\\n        | __enhancd::filter::fuzzy \"$@\" \\\n        | __enhancd::filter::interactive\n    )\"\n\n    ret=$?\n    if [[ -z $dir ]]; then\n        if [[ $ret == $_ENHANCD_FAILURE ]]; then\n            __enhancd::utils::die \\\n                \"$@: no such file or directory\\n\"\n            return 1\n        else\n            # Press Ctrl-C\n            return 0\n        fi\n    fi\n\n    __enhancd::cd \"$dir\"\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/filter.sh",
    "content": "__enhancd::filter::exists()\n{\n    local line\n\n    while read line\n    do\n        if [[ -d $line ]]; then\n            echo \"$line\"\n        fi\n    done\n}\n\n__enhancd::filter::join()\n{\n    if [[ -n $1 ]] && [[ -f $1 ]]; then\n        cat \"$1\"\n    else\n        cat <&0\n    fi | awk 'a[$0]++' 2>/dev/null\n}\n\n# __enhancd::filter::unique uniques a stdin contents\n__enhancd::filter::unique()\n{\n    if [[ -n $1 ]] && [[ -f $1 ]]; then\n        cat \"$1\"\n    else\n        cat <&0\n    fi | awk '!a[$0]++' 2>/dev/null\n}\n\n# __enhancd::filter::reverse reverses a stdin contents\n__enhancd::filter::reverse()\n{\n    if [[ -n $1 ]] && [[ -f $1 ]]; then\n        cat \"$1\"\n    else\n        cat <&0\n    fi \\\n        | awk -f \"$ENHANCD_ROOT/src/share/reverse.awk\" \\\n        2>/dev/null\n}\n\n__enhancd::filter::fuzzy()\n{\n    if [[ -z $1 ]]; then\n        cat <&0\n    else\n        if [[ $ENHANCD_USE_FUZZY_MATCH == 1 ]]; then\n            awk \\\n                -f \"$ENHANCD_ROOT/src/share/fuzzy.awk\" \\\n                -v search_string=\"$1\"\n        else\n            # Case-insensitive (don't use fuzzy searhing)\n            awk '$0 ~ /\\/.?'\"$1\"'[^\\/]*$/{print $0}' 2>/dev/null\n        fi\n    fi\n}\n\n__enhancd::filter::interactive()\n{\n    # Narrows the ENHANCD_FILTER environment variables down to one\n    # and sets it to the variables filter\n    local list=\"$1\" filter\n\n    # If no argument is given to __enhancd::interface\n    if [[ -z $list ]] || [[ -p /dev/stdin ]]; then\n        #__enhancd::utils::die \"__enhancd::interface requires an argument at least\\n\"\n        list=\"$(cat <&0)\"\n    fi\n\n    filter=\"$(__enhancd::utils::filter \"$ENHANCD_FILTER\")\"\n\n    # Count lines in the list\n    local wc\n    wc=\"$(echo \"$list\" | __enhancd::utils::grep -c \"\")\"\n\n    case \"$wc\" in\n        1 )\n            if [[ -n $list ]]; then\n                echo \"$list\"\n            else\n                return $_ENHANCD_FAILURE\n            fi\n            ;;\n        * )\n            local t\n            t=\"$(echo \"$list\" | eval $filter)\"\n            if [[ -z $t ]]; then\n                # No selection\n                return 0\n            fi\n            echo \"$t\"\n            ;;\n    esac\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/history.sh",
    "content": "__enhancd::history::origin()\n{\n    local is_home=false\n\n    # Shift arguments in advance if given\n    # because it's on subshell beyond a pipe\n    if [[ $1 == '--home' ]]; then\n        is_home=true\n        shift\n    fi\n\n    if [[ -f $ENHANCD_DIR/enhancd.log ]]; then\n        cat \"$ENHANCD_DIR/enhancd.log\"\n        $is_home && echo \"$HOME\"\n    fi\n}\n\n__enhancd::history::list()\n{\n    __enhancd::history::origin \\\n        | __enhancd::filter::reverse \\\n        | __enhancd::filter::unique \\\n        | __enhancd::filter::exists \\\n        | __enhancd::filter::fuzzy \"$@\" \\\n        | __enhancd::utils::grep -vx \"$PWD\"\n}\n\n__enhancd::history::update()\n{\n    {\n        __enhancd::path::step_by_step | __enhancd::filter::reverse\n        __enhancd::path::scan_cwd\n        __enhancd::history::origin --home\n    } \\\n        | __enhancd::filter::reverse \\\n        | __enhancd::filter::unique \\\n        | __enhancd::filter::reverse\n    __enhancd::path::pwd\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/path.sh",
    "content": "# __enhancd::path::to_abspath regains the path from the divided directory name with a slash\n__enhancd::path::to_abspath()\n{\n    local cwd dir num\n    cwd=\"${PWD%/*}\"\n    dir=\"$(cat <&0)\"\n    if [[ -z $dir ]]; then\n        return 1\n    fi\n\n    # It searches the directory name from the rear of the PWD,\n    # and returns the path to where it was found\n    if echo \"$dir\" | __enhancd::utils::grep -q \"[0-9]: \"; then\n        # When decomposing the PWD with a slash,\n        # put the number to it if there is the same directory name.\n\n        # num is a number for identification\n        num=\"$(echo \"$dir\" | cut -d: -f1)\"\n\n        if [ -n \"$num\" ]; then\n            # It is listed path stepwise\n            __enhancd::path::step_by_step \"$1\" \\\n                | __enhancd::filter::reverse \\\n                | __enhancd::utils::nl \":\" \\\n                | __enhancd::utils::grep \"^$num\" \\\n                | cut -d: -f2\n        fi\n    else\n        # If there are no duplicate directory name\n        awk \\\n            -f \"$ENHANCD_ROOT/src/share/to_abspath.awk\" \\\n            -v cwd=\"$cwd\" \\\n            -v dir=\"$dir\"\n    fi\n}\n\n# __enhancd::path::split decomposes the path with a slash as a delimiter\n__enhancd::path::split()\n{\n    awk \\\n        -f \"$ENHANCD_ROOT/src/share/split.awk\" \\\n        -v arg=\"${1:-$PWD}\" #-v show_fullpath=\"$ENHANCD_DOT_SHOW_FULLPATH\"\n}\n\n# __enhancd::path::step_by_step returns a list of stepwise path\n__enhancd::path::step_by_step()\n{\n    awk \\\n        -f \"$ENHANCD_ROOT/src/share/step_by_step.awk\" \\\n        -v dir=\"${1:-$PWD}\"\n}\n\n__enhancd::path::go_upstairs()\n{\n    local dir\n\n    # dir is a target directory that defaults to the PWD\n    dir=\"${1:-$PWD}\"\n\n    if [[ $ENHANCD_DOT_SHOW_FULLPATH == 1 ]]; then\n        __enhancd::path::step_by_step \\\n            | __enhancd::filter::reverse\n        return 0\n    fi\n\n    # uniq is the variable that checks whether there is\n    # the duplicate directory in the PWD environment variable\n    if __enhancd::path::split \"$dir\" | awk -f \"$ENHANCD_ROOT/src/share/has_dup_lines.awk\"; then\n        __enhancd::path::split \"$dir\" \\\n            | awk '{ printf(\"%d: %s\\n\", NR, $0); }'\n    else\n        __enhancd::path::split \"$dir\"\n    fi\n}\n\n__enhancd::path::scan_cwd()\n{\n    find \"${1:-$PWD}\" -maxdepth 1 -type d \\\n        | __enhancd::utils::grep -v \"\\/\\.\"\n}\n\n__enhancd::path::pwd()\n{\n    command pwd\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/share/fuzzy.awk",
    "content": "BEGIN {\n    FS = \"/\";\n}\n\n{\n    # calculates the degree of similarity\n    if ( (1 - leven_dist($NF, search_string) / (length($NF) + length(search_string))) * 100 >= 70 ) {\n        # When the degree of similarity of search_string is greater than or equal to 70%,\n        # to display the candidate path\n        print $0\n    }\n}\n\n# leven_dist returns the Levenshtein distance two text string\nfunction leven_dist(a, b) {\n    lena = length(a);\n    lenb = length(b);\n\n    if (lena == 0) {\n        return lenb;\n    }\n    if (lenb == 0) {\n        return lena;\n    }\n\n    for (row = 1; row <= lena; row++) {\n        m[row,0] = row\n    }\n    for (col = 1; col <= lenb; col++) {\n        m[0,col] = col\n    }\n\n    for (row = 1; row <= lena; row++) {\n        ai = substr(a, row, 1)\n        for (col = 1; col <= lenb; col++) {\n            bi = substr(b, col, 1)\n            if (ai == bi) {\n                cost = 0\n            } else {\n                cost = 1\n            }\n            m[row,col] = min(m[row-1,col]+1, m[row,col-1]+1, m[row-1,col-1]+cost)\n        }\n    }\n\n    return m[lena,lenb]\n}\n\n# min returns the smaller of x, y or z\nfunction min(a, b, c) {\n    result = a\n\n    if (b < result) {\n        result = b\n    }\n\n    if (c < result) {\n        result = c\n    }\n\n    return result\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/share/has_dup_lines.awk",
    "content": "BEGIN {\n    flag = 0;\n}\n\n{\n    ++a[$0];\n    if (a[$0] > 1)\n        flag = 1;\n}\n\nEND {\n    exit flag == 1 ? 0 : 1;\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/share/reverse.awk",
    "content": "{\n    line[NR] = $0\n}\n\nEND {\n    for (i = NR; i > 0; i--) {\n        print line[i]\n    }\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/share/split.awk",
    "content": "BEGIN {\n    # check if arg is an valid path\n    if (!isabs(arg)) {\n        print \"split_path requires an absolute path begins with a slash\" >\"/dev/stderr\"\n        exit 1\n    }\n\n    # except for the beginning of the slash\n    s = substr(arg, 2)\n    num = split(s, arr, \"/\")\n\n    # display the beginning of the path\n    print substr(arg, 1, 1)\n\n    if (show_fullpath == 1) {\n        # get dirname from /\n        num = split(s, dirname, \"/\")\n        for (i = 1; i < num; i++) {\n            pre_dir = \"\"\n            for (ii = 1; ii <= i; ii++) {\n                pre_dir = pre_dir \"/\" dirname[ii]\n            }\n            print pre_dir\n        }\n    } else {\n        # decompose the path by a slash\n        for (i = 1; i < num; i++) {\n            print arr[i]\n        }\n    }\n}\n\n# has_prefix tests whether the string s begins with pre.\nfunction has_prefix(s, pre,        pre_len, s_len) {\n    pre_len = length(pre)\n    s_len   = length(s)\n\n    return pre_len <= s_len && substr(s, 1, pre_len) == pre\n}\n\n# isabs returns true if the path is absolute.\nfunction isabs(pathname) {\n    return length(pathname) > 0 && has_prefix(pathname, \"/\")\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/share/step_by_step.awk",
    "content": "BEGIN {\n    count = gsub(/\\//, \"/\", dir);\n    for (i = 0; i < count; i++) {\n        gsub(/\\/[^\\/]*$/, \"\", dir);\n        if (dir == \"\")\n            print \"/\";\n        else\n            print dir;\n    }\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/share/to_abspath.awk",
    "content": "BEGIN {\n    # If dir is a slash, return a slash and exit\n    if (dir == \"/\") {\n        print \"/\"\n        exit\n    }\n    if (cwd !~ dir) {\n        exit\n    }\n\n    # pos is a position of dir in cwd\n    pos = rindex(cwd, dir)\n\n    # If it is not find the dir in the cwd, then exit\n    if (pos == 0) {\n        print cwd\n        exit\n    }\n\n    # convert the divided directory name to the absolute path\n    # that the directory name is contained\n    print erase(cwd, pos+length(dir))\n}\n\n# erase erases the part of the path\nfunction erase(str, pos) {\n    return substr(str, 1, pos-1)\n}\n\n# rindex returns the index of the last instance of find in string,\n# or 0 if find is not present\nfunction rindex(string, find, k, ns, nf) {\n    ns = length(string)\n    nf = length(find)\n    for (k = ns+1-nf; k >= 1; k--) {\n        if (substr(string, k, nf) == find) {\n            if (k > 1 && substr(string, k-1, 1) == \"/\")\n                return k\n            else if (k == 1)\n                return k\n        }\n    }\n}\n"
  },
  {
    "path": ".config/zsh/enhancd/src/utils.sh",
    "content": "#!/bin/bash\n\n__enhancd::utils::available()\n{\n    __enhancd::utils::filter \"$ENHANCD_FILTER\" &>/dev/null &&\n        [[ -s $ENHANCD_DIR/enhancd.log ]]\n}\n\n# __enhancd::utils::die puts a string to stderr\n__enhancd::utils::die()\n{\n    printf -- \"$@\" >&2\n}\n\n# __enhancd::utils::grep prints in regular expression\n__enhancd::utils::grep()\n{\n    if [[ -n $1 ]] && [[ -f $1 ]]; then\n        cat \"$1\"\n        shift\n    else\n        cat <&0\n    fi \\\n        | command grep -E \"$@\" 2>/dev/null\n}\n\n# __enhancd::utils::sed replaces 1st arg with 2nd arg\n# Use blank char instead if no argument is given\n__enhancd::utils::sed()\n{\n    local g='' sep='!'\n\n    while (( $# > 0 ))\n    do\n        case \"$1\" in\n            -g)\n                g='g'\n                shift\n                ;;\n            -d)\n                sep=\"${2:?}\"\n                shift\n                shift\n                ;;\n            -* | --*)\n                shift\n                ;;\n            *)\n                break\n                ;;\n        esac\n    done\n\n    cat <&0 \\\n        | command sed -E \"s$sep$1$sep$2$sep$g\" 2>/dev/null\n}\n\n# __enhancd::utils::filter fuzzys list down to one\n__enhancd::utils::filter()\n{\n    local x candidates\n\n    if [[ -z $1 ]]; then\n        return 1\n    fi\n\n    # candidates should be list like \"a:b:c\" concatenated by a colon\n    candidates=\"$1:\"\n\n    while [[ -n $candidates ]]; do\n        # the first remaining entry\n        x=${candidates%%:*}\n        # reset candidates\n        candidates=${candidates#*:}\n\n        # check if x is __enhancd::utils::filter\n        if __enhancd::utils::has \"${x%% *}\"; then\n            echo \"$x\"\n            return 0\n        else\n            continue\n        fi\n    done\n\n    return 1\n}\n\n# __enhancd::utils::has returns true if $1 exists in the PATH environment variable\n__enhancd::utils::has()\n{\n    if [[ -z $1 ]]; then\n        return 1\n    fi\n\n    type \"$1\" >/dev/null 2>&1\n    return $?\n}\n\n# __enhancd::utils::nl reads lines from the named file or the standard input\n# if the file argument is ommitted, applies a configurable line numbering filter operation\n# and writes the result to the standard output\n__enhancd::utils::nl()\n{\n    # d in awk's argument is a delimiter\n    awk -v d=\"${1:-\": \"}\" '\n    BEGIN {\n        i = 1\n    }\n    {\n        print i d $0\n        i++\n    }' 2>/dev/null\n}\n"
  },
  {
    "path": ".config/zsh/fz/fz.zsh",
    "content": "[[ -n \"$FZ_CMD\" ]] || FZ_CMD=z\n[[ -n \"$FZ_SUBDIR_CMD\" ]] || FZ_SUBDIR_CMD=zz\n\n[[ -n \"$FZ_HISTORY_CD_CMD\" ]] || FZ_HISTORY_CD_CMD=_z\n[[ -n \"$FZ_SUBDIR_HISTORY_CD_CMD\" ]] || FZ_SUBDIR_HISTORY_CD_CMD=\"_z -c\"\n\n[[ -n \"$FZ_HISTORY_LIST_GENERATOR\" ]] \\\n  || FZ_HISTORY_LIST_GENERATOR=__fz_generate_matched_history_list\n[[ -n \"$FZ_SUBDIR_HISTORY_LIST_GENERATOR\" ]] \\\n  || FZ_SUBDIR_HISTORY_LIST_GENERATOR=__fz_generate_matched_subdir_history_list\n\n[[ -n \"$FZ_SUBDIR_TRAVERSAL\" ]] || FZ_SUBDIR_TRAVERSAL=1\n[[ -n \"$FZ_CASE_INSENSITIVE\" ]] || FZ_CASE_INSENSITIVE=1\n[[ -n \"$FZ_ABBREVIATE_HOME\" ]] || FZ_ABBREVIATE_HOME=1\n\nalias ${FZ_CMD}='_fz'\nalias ${FZ_SUBDIR_CMD}='_fzz'\n\n__fz_generate_matched_subdir_list() {\n  local dir seg starts_with_dir\n  if [[ \"$1\" == */ ]]; then\n    dir=\"$1\"\n    find -L \"$(cd \"$dir\" 2>/dev/null && pwd)\" -mindepth 1 -maxdepth 1 -type d \\\n        2>/dev/null | while read -r line; do\n      base=\"${line##*/}\"\n      if [[ \"$base\" == .* ]]; then\n        continue\n      fi\n      echo \"$line\"\n    done\n  else\n    dir=$(dirname -- \"$1\")\n    seg=$(basename -- \"$1\")\n    if [[ \"$FZ_CASE_INSENSITIVE\" == \"1\" ]]; then\n      seg=$(echo \"$seg\" | tr '[:upper:]' '[:lower:]')\n    fi\n    starts_with_dir=$( \\\n      find -L \"$(cd \"$dir\" 2>/dev/null && pwd)\" -mindepth 1 -maxdepth 1 \\\n          -type d 2>/dev/null | while read -r line; do \\\n        base=\"${line##*/}\"\n        if [[ \"$seg\" != .* && \"$base\" == .* ]]; then\n          continue\n        fi\n        if [[ \"$FZ_CASE_INSENSITIVE\" != \"1\" ]]; then\n          if [[ \"$base\" == \"$seg\"* ]]; then\n            echo \"$line\"\n          fi\n        else\n          if [[ -n \"$BASH_VERSION\" ]]; then\n            if [[ \"${base,,}\" == \"${seg,,}\"* ]]; then\n              echo \"$line\"\n            fi\n          elif [[ -n \"$ZSH_VERSION\" ]]; then\n            if [[ \"${base:l}\" == \"${seg:l}\"* ]]; then\n              echo \"$line\"\n            fi\n          fi\n        fi\n      done\n    )\n    if [ -n \"$starts_with_dir\" ]; then\n      echo \"$starts_with_dir\"\n    else\n      find -L \"$(cd \"$dir\" 2>/dev/null && pwd)\" -mindepth 1 -maxdepth 1 \\\n          -type d 2>/dev/null | while read -r line; do \\\n        base=\"${line##*/}\"\n        if [[ \"$seg\" != .* && \"$base\" == .* ]]; then\n          continue\n        fi\n        if [[ \"$FZ_CASE_INSENSITIVE\" != \"1\" ]]; then\n          if [[ \"$base\" == *\"$seg\"* ]]; then\n            echo \"$line\"\n          fi\n        else\n          if [[ -n \"$BASH_VERSION\" ]]; then\n            if [[ \"${base,,}\" == *\"${seg,,}\"* ]]; then\n              echo \"$line\"\n            fi\n          elif [[ -n \"$ZSH_VERSION\" ]]; then\n            if [[ \"${base:l}\" == *\"${seg:l}\"* ]]; then\n              echo \"$line\"\n            fi\n          fi\n        fi\n      done\n    fi\n  fi\n}\n\n__fz_generate_matched_history_list() {\n  _z -l $@ 2>&1 | while read -r line; do\n    if [[ \"$line\" == common:* ]]; then continue; fi\n    # Reverse the order and cut off the scores\n    echo \"$line\"\n  done | sed '1!G;h;$!d' | cut -b 12-\n}\n\n__fz_generate_matched_subdir_history_list() {\n  __fz_generate_matched_history_list -c \"$@\"\n}\n\n__fz_generate_matches() {\n  local cmd histories subdirs\n\n  if [[ -n \"$BASH_VERSION\" ]]; then\n    cmd=$([[ \"${COMP_WORDS[0]}\" =~ [[:space:]]*([^[:space:]]|[^[:space:]].*[^[:space:]])[[:space:]]* ]]; \\\n      echo -n \"${BASH_REMATCH[1]}\")\n  elif [[ -n \"$ZSH_VERSION\" ]]; then\n    cmd=(${(z)LBUFFER})\n    cmd=${cmd[1]}\n  fi\n\n  if [[ \"$cmd\" == \"$FZ_CMD\" ]]; then\n    if [[ \"$FZ_ABBREVIATE_HOME\" == \"1\" ]]; then\n      if [ \"$FZ_SUBDIR_TRAVERSAL\" == \"1\" ]; then\n        cat <(\"$FZ_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          <(__fz_generate_matched_subdir_list \"$@\") \\\n          | sed '/^$/d' | sed -e \"s,^$HOME,~,\" | awk '!seen[$0]++'\n      else\n        cat <(\"$FZ_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          | sed '/^$/d' | sed -e \"s,^$HOME,~,\" | awk '!seen[$0]++'\n      fi\n    else\n      if [ \"$FZ_SUBDIR_TRAVERSAL\" == \"1\" ]; then\n        cat <(\"$FZ_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          <(__fz_generate_matched_subdir_list \"$@\") \\\n          | sed '/^$/d' | awk '!seen[$0]++'\n      else\n        cat <(\"$FZ_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          | sed '/^$/d' | awk '!seen[$0]++'\n      fi\n    fi\n  elif [[ \"$cmd\" == \"$FZ_SUBDIR_CMD\" ]]; then\n    histories=$(\"$FZ_SUBDIR_HISTORY_LIST_GENERATOR\" \"$@\")\n    if [[ \"$FZ_ABBREVIATE_HOME\" == \"1\" ]]; then\n      if [ \"$FZ_SUBDIR_TRAVERSAL\" == \"1\" ]; then\n        cat <(\"$FZ_SUBDIR_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          <(__fz_generate_matched_subdir_list \"$@\") \\\n          | sed '/^$/d' | sed -e \"s,^$HOME,~,\" | awk '!seen[$0]++'\n      else\n        cat <(\"$FZ_SUBDIR_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          | sed '/^$/d' | sed -e \"s,^$HOME,~,\" | awk '!seen[$0]++'\n      fi\n    else\n      if [ \"$FZ_SUBDIR_TRAVERSAL\" == \"1\" ]; then\n        cat <(\"$FZ_SUBDIR_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          <(__fz_generate_matched_subdir_list \"$@\") \\\n          | sed '/^$/d' | awk '!seen[$0]++'\n      else\n        cat <(\"$FZ_SUBDIR_HISTORY_LIST_GENERATOR\" \"$@\") \\\n          | sed '/^$/d' | awk '!seen[$0]++'\n      fi\n    fi\n  fi\n}\n\n__fz_bash_completion() {\n  COMPREPLY=()\n\n  local selected slug\n  eval \"slug=${COMP_WORDS[@]:(-1)}\"\n\n  if [[ \"$(__fz_generate_matches \"$slug\" | head | wc -l)\" -gt 1 ]]; then\n    selected=$(__fz_generate_matches \"$slug\" \\\n      | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse \\\n      --bind 'shift-tab:up,tab:down' $FZF_DEFAULT_OPTS\" fzf)\n  elif [[ \"$(__fz_generate_matches \"$slug\" | head | wc -l)\" -eq 1 ]]; then\n    selected=$(__fz_generate_matches \"$slug\")\n  else\n    return\n  fi\n\n  if [[ -n \"$selected\" ]]; then\n    if [[ \"$FZ_ABBREVIATE_HOME\" == \"1\" ]]; then\n      selected=${selected/#\\~/$HOME}\n    fi\n    selected=$(printf %q \"$selected\")\n    if [[ \"$selected\" != */ ]]; then\n      selected=\"${selected}/\"\n    fi\n    if [[ \"$FZ_ABBREVIATE_HOME\" == \"1\" ]]; then\n      selected=${selected/#$HOME/\\~}\n    fi\n    COMPREPLY=( \"$selected\" )\n  fi\n\n  printf '\\e[5n'\n}\n\n__fz_zsh_completion() {\n  setopt localoptions noshwordsplit noksh_arrays noposixbuiltins nonomatch\n  local args cmd selected slug\n\n  args=(${(z)LBUFFER})\n  cmd=${args[1]}\n\n  if [[ \"$cmd\" != \"$FZ_CMD\" && \"$cmd\" != \"$FZ_SUBDIR_CMD\" ]] \\\n      || [[ \"$cmd\" == \"$FZ_CMD\" && \"$LBUFFER\" =~ \"^\\s*$FZ_CMD$\" ]] \\\n      || [[ \"$cmd\" == \"$FZ_SUBDIR_CMD\" && \"$LBUFFER\" =~ \"^\\s*$FZ_SUBDIR_CMD$\" ]]; then\n    zle ${__fz_zsh_default_completion:-expand-or-complete}\n    return\n  fi\n\n  if [[ \"${#args}\" -gt 1 ]]; then\n    eval \"slug=${args[-1]}\"\n  fi\n\n  if [[ \"$(__fz_generate_matches \"$slug\" | head | wc -l)\" -gt 1 ]]; then\n    selected=$(__fz_generate_matches \"$slug\" \\\n      | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse \\\n      --bind 'shift-tab:up,tab:down' $FZF_DEFAULT_OPTS\" fzf)\n  elif [[ \"$(__fz_generate_matches \"$slug\" | head | wc -l)\" -eq 1 ]]; then\n    selected=$(__fz_generate_matches \"$slug\")\n  else\n    return\n  fi\n\n  if [[ -n \"$selected\" ]]; then\n    if [[ \"$FZ_ABBREVIATE_HOME\" == \"1\" ]]; then\n      selected=${selected/#\\~/$HOME}\n    fi\n    selected=\"${(q)selected}\"\n    if [[ \"$selected\" != */ ]]; then\n      selected=\"${selected}/\"\n    fi\n    if [[ \"$FZ_ABBREVIATE_HOME\" == \"1\" ]]; then\n      selected=${selected/#$HOME/\\~}\n    fi\n    LBUFFER=\"$cmd $selected\"\n  fi\n\n  zle redisplay\n  typeset -f zle-line-init >/dev/null && zle zle-line-init\n}\n\n__fz_init_bash_completion() {\n  # Enable redrawing line by printf '\\e[5n'\n  bind '\"\\e[0n\": redraw-current-line'\n\n  complete -o nospace -F __fz_bash_completion \"$FZ_CMD\"\n  complete -o nospace -F __fz_bash_completion \"$FZ_SUBDIR_CMD\"\n}\n\n__fz_init_zsh_completion() {\n  [ -n \"$__fz_zsh_default_completion\" ] || {\n    binding=$(bindkey '^I')\n    # $binding[(s: :w)2]\n    # The command substitution and following word splitting to determine the\n    # default zle widget for ^I formerly only works if the IFS parameter contains\n    # a space via $binding[(w)2]. Now it specifically splits at spaces, regardless\n    # of IFS.\n    # It’s not compatitable with bash so use awk instead.\n    [[ $binding =~ 'undefined-key' ]] \\\n      || __fz_zsh_default_completion=$(echo \"$binding\" | awk '{print $2}')\n    unset binding\n  }\n  zle -N __fz_zsh_completion\n  bindkey '^I' __fz_zsh_completion\n}\n\n_fz() {\n  local rc\n  if [[ \"$($FZ_HISTORY_LIST_GENERATOR \"$@\" | head | wc -l)\" -gt 0 ]]; then\n    \"$FZ_HISTORY_CD_CMD\" \"$@\"\n  elif [[ \"$FZ_SUBDIR_TRAVERSAL\" -ne 0 ]]; then\n    err=$(cd \"${@: -1}\" 2>&1)\n    rc=$?\n    if ! cd \"${@: -1}\" 2>/dev/null; then\n      echo ${err#* } >&2\n      return $rc\n    fi\n  fi\n}\n\n_fzz() {\n  local rc\n  if [[ \"$($FZ_SUBDIR_HISTORY_LIST_GENERATOR \"$@\" | head | wc -l)\" -gt 0 ]]; then\n    if [[ -n \"$BASH_VERSION\" ]]; then\n      $FZ_SUBDIR_HISTORY_CD_CMD \"$@\"\n    elif [[ -n \"$ZSH_VERSION\" ]]; then\n      ${=FZ_SUBDIR_HISTORY_CD_CMD} \"$@\"\n    fi\n  elif [[ \"$FZ_SUBDIR_TRAVERSAL\" -ne 0 ]]; then\n    err=$(cd \"${@: -1}\" 2>&1)\n    rc=$?\n    if ! cd \"${@: -1}\" 2>/dev/null; then\n      echo ${err#* } >&2\n      return $rc\n    fi\n  fi\n}\n\nif [[ -n \"$BASH_VERSION\" ]]; then\n  __fz_init_bash_completion\nelif [[ -n \"$ZSH_VERSION\" ]]; then\n  __fz_init_zsh_completion\nfi\n\n"
  },
  {
    "path": ".config/zsh/fz/icd.zsh",
    "content": "#!/usr/bin/env zsh\n\n__zic_fzf_prog() {\n  [ -n \"$TMUX_PANE\" ] && [ \"${FZF_TMUX:-0}\" != 0 ] && [ ${LINES:-40} -gt 15 ] \\\n    && echo \"fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}\" || echo \"fzf\"\n}\n\n__zic_matched_subdir_list() {\n  local dir length seg starts_with_dir\n  if [[ \"$1\" == */ ]]; then\n    dir=\"$1\"\n    if [[ \"$dir\" != / ]]; then\n      dir=\"${dir: : -1}\"\n    fi\n    length=$(echo -n \"$dir\" | wc -c)\n    if [ \"$dir\" = \"/\" ]; then\n      length=0\n    fi\n    find -L \"$dir\" -mindepth 1 -maxdepth 1 -type d 2>/dev/null \\\n        | cut -b $(( ${length} + 2 ))- | sed '/^$/d' | while read -r line; do\n      if [[ \"${line[1]}\" == \".\" ]]; then\n        continue\n      fi\n      echo \"$line\"\n    done\n  else\n    dir=$(dirname -- \"$1\")\n    length=$(echo -n \"$dir\" | wc -c)\n    if [ \"$dir\" = \"/\" ]; then\n      length=0\n    fi\n    seg=$(basename -- \"$1\")\n    starts_with_dir=$( \\\n      find -L \"$dir\" -mindepth 1 -maxdepth 1 -type d \\\n          2>/dev/null | cut -b $(( ${length} + 2 ))- | sed '/^$/d' \\\n          | while read -r line; do\n        if [[ \"${seg[1]}\" != \".\" && \"${line[1]}\" == \".\" ]]; then\n          continue\n        fi\n        if [[ \"$line\" == \"$seg\"* ]]; then\n          echo \"$line\"\n        fi\n      done\n    )\n    if [ -n \"$starts_with_dir\" ]; then\n      echo \"$starts_with_dir\"\n    else\n      find -L \"$dir\" -mindepth 1 -maxdepth 1 -type d \\\n          2>/dev/null | cut -b $(( ${length} + 2 ))- | sed '/^$/d' \\\n          | while read -r line; do\n        if [[ \"${seg[1]}\" != \".\" && \"${line[1]}\" == \".\" ]]; then\n          continue\n        fi\n        if [[ \"$line\" == *\"$seg\"* ]]; then\n          echo \"$line\"\n        fi\n      done\n    fi\n  fi\n}\n\n_zic_list_generator() {\n  __zic_matched_subdir_list \"${(Q)@[-1]}\" | sort\n}\n\n_zic_complete() {\n  setopt localoptions nonomatch\n  local l matches fzf tokens base\n\n  l=$(_zic_list_generator $@)\n\n  if [ -z \"$l\" ]; then\n    zle ${__zic_default_completion:-expand-or-complete}\n    return\n  fi\n\n  fzf=$(__zic_fzf_prog)\n\n  if [ $(echo $l | wc -l) -eq 1 ]; then\n    matches=${(q)l}\n  else\n    matches=$(echo $l \\\n        | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} \\\n          --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS \\\n          --bind 'shift-tab:up,tab:down'\" ${=fzf} \\\n        | while read -r item; do\n      echo -n \"${(q)item} \"\n    done)\n  fi\n\n  matches=${matches% }\n  if [ -n \"$matches\" ]; then\n    tokens=(${(z)LBUFFER})\n    base=\"${(Q)@[-1]}\"\n    if [[ \"$base\" != */ ]]; then\n      if [[ \"$base\" == */* ]]; then\n        base=\"$(dirname -- \"$base\")\"\n        if [[ ${base[-1]} != / ]]; then\n          base=\"$base/\"\n        fi\n      else\n        base=\"\"\n      fi\n    fi\n    LBUFFER=\"${tokens[1]} \"\n    if [ -n \"$base\" ]; then\n      base=\"${(q)base}\"\n      if [ \"${tokens[2][1]}\" = \"~\" ]; then\n        base=\"${base/#$HOME/~}\"\n      fi\n      LBUFFER=\"${LBUFFER}${base}\"\n    fi\n    LBUFFER=\"${LBUFFER}${matches}/\"\n  fi\n  zle redisplay\n  typeset -f zle-line-init >/dev/null && zle zle-line-init\n}\n\nzic-completion() {\n  setopt localoptions noshwordsplit noksh_arrays noposixbuiltins\n  local tokens cmd\n\n  tokens=(${(z)LBUFFER})\n  cmd=${tokens[1]}\n\n  if [[ \"$LBUFFER\" =~ \"^\\ *cd$\" ]]; then\n    zle ${__zic_default_completion:-expand-or-complete}\n  elif [ \"$cmd\" = cd ]; then\n    _zic_complete ${tokens[2,${#tokens}]/#\\~/$HOME}\n  else\n    zle ${__zic_default_completion:-expand-or-complete}\n  fi\n}\n\n[ -z \"$__zic_default_completion\" ] && {\n  binding=$(bindkey '^I')\n  # $binding[(s: :w)2]\n  # The command substitution and following word splitting to determine the\n  # default zle widget for ^I formerly only works if the IFS parameter contains\n  # a space via $binding[(w)2]. Now it specifically splits at spaces, regardless\n  # of IFS.\n  [[ $binding =~ 'undefined-key' ]] || __zic_default_completion=$binding[(s: :w)2]\n  unset binding\n}\n\nzle -N zic-completion\nbindkey '^I' zic-completion\n\n"
  },
  {
    "path": ".config/zsh/fz/z.zsh",
    "content": "# Copyright (c) 2009 rupa deadwyler. Licensed under the WTFPL license, Version 2\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#         set $_Z_OWNER to your username if you want use z while sudo with $HOME kept\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 -e foo  # echo the best match, don't 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    # if symlink, dereference\n    [ -h \"$datafile\" ] && datafile=$(readlink \"$datafile\")\n\n    # bail if we don't own ~/.z and $_Z_OWNER not set\n    [ -z \"$_Z_OWNER\" -a -f \"$datafile\" -a ! -O \"$datafile\" ] && return\n\n    _z_dirs () {\n        local line\n        while read line; do\n            # only count directories\n            [ -d \"${line%%\\|*}\" ] && echo \"$line\"\n        done < \"$datafile\"\n        return 0\n    }\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 directory trees\n        local exclude\n        for exclude in \"${_Z_EXCLUDE_DIRS[@]}\"; do\n            case \"$*\" in \"$exclude*\") return;; esac\n        done\n\n        # maintain the data file\n        local tempfile=\"$datafile.$RANDOM\"\n        _z_dirs | 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 > 9000 ) {\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            [ \"$_Z_OWNER\" ] && chown $_Z_OWNER:$(id -ng $_Z_OWNER) \"$tempfile\"\n            env mv -f \"$tempfile\" \"$datafile\" || env rm -f \"$tempfile\"\n        fi\n\n    # tab completion\n    elif [ \"$1\" = \"--complete\" -a -s \"$datafile\" ]; then\n        _z_dirs | awk -v q=\"$2\" -F\"|\" '\n            BEGIN {\n                q = substr(q, 3)\n                if( q == tolower(q) ) imatch = 1\n                gsub(/ /, \".*\", q)\n            }\n            {\n                if( imatch ) {\n                    if( tolower($1) ~ q ) print $1\n                } else if( $1 ~ q ) 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                    e) local echo=1;;\n                    h) echo \"${_Z_CMD:-z} [-cehlrtx] args\" >&2; return;;\n                    l) local list=1;;\n                    r) local typ=\"rank\";;\n                    t) local typ=\"recent\";;\n                    x) sed -i -e \"\\:^${PWD}|.*:d\" \"$datafile\";;\n                esac; opt=${opt:1}; done;;\n             *) local fnd=\"$fnd${fnd:+ }$1\";;\n        esac; local last=$1; [ \"$#\" -gt 0 ] && 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\" ] && builtin cd \"$last\" && return;;\n        esac\n\n        # no file yet\n        [ -f \"$datafile\" ] || return\n\n        local cd\n        cd=\"$( < <( _z_dirs ) 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(matches, best_match, common) {\n                # list or return the desired directory\n                if( list ) {\n                    cmd = \"sort -n >&2\"\n                    for( x in matches ) {\n                        if( matches[x] ) {\n                            printf \"%-10s %s\\n\", matches[x], x | cmd\n                        }\n                    }\n                    if( common ) {\n                        printf \"%-10s %s\\n\", \"common:\", common > \"/dev/stderr\"\n                    }\n                } else {\n                    if( common ) best_match = common\n                    print best_match\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                for( x in matches ) if( matches[x] && index(x, short) != 1 ) {\n                    return\n                }\n                return short\n            }\n            BEGIN {\n                gsub(\" \", \".*\", q)\n                hi_rank = ihi_rank = -9999999999\n            }\n            {\n                if( typ == \"rank\" ) {\n                    rank = $2\n                } else if( typ == \"recent\" ) {\n                    rank = $3 - t\n                } else rank = frecent($2, $3)\n                if( $1 ~ q ) {\n                    matches[$1] = rank\n                } else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank\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\n        [ $? -eq 0 ] && [ \"$cd\" ] && {\n          if [ \"$echo\" ]; then echo \"$cd\"; else builtin cd \"$cd\"; fi\n        }\n    fi\n}\n\nalias ${_Z_CMD:-z}='_z 2>&1'\n\n[ \"$_Z_NO_RESOLVE_SYMLINKS\" ] || _Z_RESOLVE_SYMLINKS=\"-P\"\n\nif type 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 type 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 \"$(command pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)\" 2>/dev/null &);'\n        }\n    }\nfi\n\n"
  },
  {
    "path": ".config/zsh/fzf/completion.bash",
    "content": "#     ____      ____\n#    / __/___  / __/\n#   / /_/_  / / /_\n#  / __/ / /_/ __/\n# /_/   /___/_/-completion.bash\n#\n# - $FZF_TMUX               (default: 0)\n# - $FZF_TMUX_HEIGHT        (default: '40%')\n# - $FZF_COMPLETION_TRIGGER (default: '**')\n# - $FZF_COMPLETION_OPTS    (default: empty)\n\n# To use custom commands instead of find, override _fzf_compgen_{path,dir}\nif ! declare -f _fzf_compgen_path > /dev/null; then\n  _fzf_compgen_path() {\n    echo \"$1\"\n    command find -L \"$1\" \\\n      -name .git -prune -o -name .svn -prune -o \\( -type d -o -type f -o -type l \\) \\\n      -a -not -path \"$1\" -print 2> /dev/null | sed 's@^\\./@@'\n  }\nfi\n\nif ! declare -f _fzf_compgen_dir > /dev/null; then\n  _fzf_compgen_dir() {\n    command find -L \"$1\" \\\n      -name .git -prune -o -name .svn -prune -o -type d \\\n      -a -not -path \"$1\" -print 2> /dev/null | sed 's@^\\./@@'\n  }\nfi\n\n###########################################################\n\n# To redraw line after fzf closes (printf '\\e[5n')\nbind '\"\\e[0n\": redraw-current-line'\n\n__fzfcmd_complete() {\n  [ -n \"$TMUX_PANE\" ] && [ \"${FZF_TMUX:-0}\" != 0 ] && [ ${LINES:-40} -gt 15 ] &&\n    echo \"fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}\" || echo \"fzf\"\n}\n\n__fzf_orig_completion_filter() {\n  sed 's/^\\(.*-F\\) *\\([^ ]*\\).* \\([^ ]*\\)$/export _fzf_orig_completion_\\3=\"\\1 %s \\3 #\\2\"; [[ \"\\1\" = *\" -o nospace \"* ]] \\&\\& [[ ! \"$__fzf_nospace_commands\" = *\" \\3 \"* ]] \\&\\& __fzf_nospace_commands=\"$__fzf_nospace_commands \\3 \";/' |\n  awk -F= '{OFS = FS} {gsub(/[^A-Za-z0-9_= ;]/, \"_\", $1);}1'\n}\n\n_fzf_opts_completion() {\n  local cur prev opts\n  COMPREPLY=()\n  cur=\"${COMP_WORDS[COMP_CWORD]}\"\n  prev=\"${COMP_WORDS[COMP_CWORD-1]}\"\n  opts=\"\n    -x --extended\n    -e --exact\n    --algo\n    -i +i\n    -n --nth\n    --with-nth\n    -d --delimiter\n    +s --no-sort\n    --tac\n    --tiebreak\n    -m --multi\n    --no-mouse\n    --bind\n    --cycle\n    --no-hscroll\n    --jump-labels\n    --height\n    --literal\n    --reverse\n    --margin\n    --inline-info\n    --prompt\n    --header\n    --header-lines\n    --ansi\n    --tabstop\n    --color\n    --no-bold\n    --history\n    --history-size\n    --preview\n    --preview-window\n    -q --query\n    -1 --select-1\n    -0 --exit-0\n    -f --filter\n    --print-query\n    --expect\n    --sync\"\n\n  case \"${prev}\" in\n  --tiebreak)\n    COMPREPLY=( $(compgen -W \"length begin end index\" -- \"$cur\") )\n    return 0\n    ;;\n  --color)\n    COMPREPLY=( $(compgen -W \"dark light 16 bw\" -- \"$cur\") )\n    return 0\n    ;;\n  --history)\n    COMPREPLY=()\n    return 0\n    ;;\n  esac\n\n  if [[ \"$cur\" =~ ^-|\\+ ]]; then\n    COMPREPLY=( $(compgen -W \"${opts}\" -- \"$cur\") )\n    return 0\n  fi\n\n  return 0\n}\n\n_fzf_handle_dynamic_completion() {\n  local cmd orig_var orig ret orig_cmd orig_complete\n  cmd=\"$1\"\n  shift\n  orig_cmd=\"$1\"\n  orig_var=\"_fzf_orig_completion_$cmd\"\n  orig=\"${!orig_var##*#}\"\n  if [ -n \"$orig\" ] && type \"$orig\" > /dev/null 2>&1; then\n    $orig \"$@\"\n  elif [ -n \"$_fzf_completion_loader\" ]; then\n    orig_complete=$(complete -p \"$cmd\" 2> /dev/null)\n    _completion_loader \"$@\"\n    ret=$?\n    # _completion_loader may not have updated completion for the command\n    if [ \"$(complete -p \"$cmd\" 2> /dev/null)\" != \"$orig_complete\" ]; then\n      eval \"$(complete | command grep \" -F.* $orig_cmd$\" | __fzf_orig_completion_filter)\"\n      if [[ \"$__fzf_nospace_commands\" = *\" $orig_cmd \"* ]]; then\n        eval \"${orig_complete/ -F / -o nospace -F }\"\n      else\n        eval \"$orig_complete\"\n      fi\n    fi\n    return $ret\n  fi\n}\n\n__fzf_generic_path_completion() {\n  local cur base dir leftover matches trigger cmd fzf\n  fzf=\"$(__fzfcmd_complete)\"\n  cmd=\"${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}\"\n  COMPREPLY=()\n  trigger=${FZF_COMPLETION_TRIGGER-'**'}\n  cur=\"${COMP_WORDS[COMP_CWORD]}\"\n  if [[ \"$cur\" == *\"$trigger\" ]]; then\n    base=${cur:0:${#cur}-${#trigger}}\n    eval \"base=$base\"\n\n    dir=\"$base\"\n    while true; do\n      if [ -z \"$dir\" ] || [ -d \"$dir\" ]; then\n        leftover=${base/#\"$dir\"}\n        leftover=${leftover/#\\/}\n        [ -z \"$dir\" ] && dir='.'\n        [ \"$dir\" != \"/\" ] && dir=\"${dir/%\\//}\"\n        matches=$(eval \"$1 $(printf %q \"$dir\")\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS\" $fzf $2 -q \"$leftover\" | while read -r item; do\n          printf \"%q$3 \" \"$item\"\n        done)\n        matches=${matches% }\n        [[ -z \"$3\" ]] && [[ \"$__fzf_nospace_commands\" = *\" ${COMP_WORDS[0]} \"* ]] && matches=\"$matches \"\n        if [ -n \"$matches\" ]; then\n          COMPREPLY=( \"$matches\" )\n        else\n          COMPREPLY=( \"$cur\" )\n        fi\n        printf '\\e[5n'\n        return 0\n      fi\n      dir=$(dirname \"$dir\")\n      [[ \"$dir\" =~ /$ ]] || dir=\"$dir\"/\n    done\n  else\n    shift\n    shift\n    shift\n    _fzf_handle_dynamic_completion \"$cmd\" \"$@\"\n  fi\n}\n\n_fzf_complete() {\n  local cur selected trigger cmd fzf post\n  post=\"$(caller 0 | awk '{print $2}')_post\"\n  type -t \"$post\" > /dev/null 2>&1 || post=cat\n  fzf=\"$(__fzfcmd_complete)\"\n\n  cmd=\"${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}\"\n  trigger=${FZF_COMPLETION_TRIGGER-'**'}\n  cur=\"${COMP_WORDS[COMP_CWORD]}\"\n  if [[ \"$cur\" == *\"$trigger\" ]]; then\n    cur=${cur:0:${#cur}-${#trigger}}\n\n    selected=$(cat | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS\" $fzf $1 -q \"$cur\" | $post | tr '\\n' ' ')\n    selected=${selected% } # Strip trailing space not to repeat \"-o nospace\"\n    printf '\\e[5n'\n\n    if [ -n \"$selected\" ]; then\n      COMPREPLY=(\"$selected\")\n      return 0\n    fi\n  else\n    shift\n    _fzf_handle_dynamic_completion \"$cmd\" \"$@\"\n  fi\n}\n\n_fzf_path_completion() {\n  __fzf_generic_path_completion _fzf_compgen_path \"-m\" \"\" \"$@\"\n}\n\n# Deprecated. No file only completion.\n_fzf_file_completion() {\n  _fzf_path_completion \"$@\"\n}\n\n_fzf_dir_completion() {\n  __fzf_generic_path_completion _fzf_compgen_dir \"\" \"/\" \"$@\"\n}\n\n_fzf_complete_kill() {\n  [ -n \"${COMP_WORDS[COMP_CWORD]}\" ] && return 1\n\n  local selected fzf\n  fzf=\"$(__fzfcmd_complete)\"\n  selected=$(command ps -ef | sed 1d | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS\" $fzf -m | awk '{print $2}' | tr '\\n' ' ')\n  printf '\\e[5n'\n\n  if [ -n \"$selected\" ]; then\n    COMPREPLY=( \"$selected\" )\n    return 0\n  fi\n}\n\n_fzf_complete_telnet() {\n  _fzf_complete '+m' \"$@\" < <(\n    command grep -v '^\\s*\\(#\\|$\\)' /etc/hosts | command grep -Fv '0.0.0.0' |\n        awk '{if (length($2) > 0) {print $2}}' | sort -u\n  )\n}\n\n_fzf_complete_ssh() {\n  _fzf_complete '+m' \"$@\" < <(\n    cat <(cat ~/.ssh/config /etc/ssh/ssh_config 2> /dev/null | command grep -i '^host' | command grep -v '*' | awk '{for (i = 2; i <= NF; i++) print $1 \" \" $i}') \\\n        <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\\n' | tr -d '[' | awk '{ print $1 \" \" $1 }') \\\n        <(command grep -v '^\\s*\\(#\\|$\\)' /etc/hosts | command grep -Fv '0.0.0.0') |\n        awk '{if (length($2) > 0) {print $2}}' | sort -u\n  )\n}\n\n_fzf_complete_unset() {\n  _fzf_complete '-m' \"$@\" < <(\n    declare -xp | sed 's/=.*//' | sed 's/.* //'\n  )\n}\n\n_fzf_complete_export() {\n  _fzf_complete '-m' \"$@\" < <(\n    declare -xp | sed 's/=.*//' | sed 's/.* //'\n  )\n}\n\n_fzf_complete_unalias() {\n  _fzf_complete '-m' \"$@\" < <(\n    alias | sed 's/=.*//' | sed 's/.* //'\n  )\n}\n\n# fzf options\ncomplete -o default -F _fzf_opts_completion fzf\n\nd_cmds=\"${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}\"\na_cmds=\"\n  awk cat diff diff3\n  emacs emacsclient ex file ftp g++ gcc gvim head hg java\n  javac ld less more mvim nvim patch perl python ruby\n  sed sftp sort source tail tee uniq vi view vim wc xdg-open\n  basename bunzip2 bzip2 chmod chown curl cp dirname du\n  find git grep gunzip gzip hg jar\n  ln ls mv open rm rsync scp\n  svn tar unzip zip\"\nx_cmds=\"kill ssh telnet unset unalias export\"\n\n# Preserve existing completion\neval \"$(complete |\n  sed -E '/-F/!d; / _fzf/d; '\"/ ($(echo $d_cmds $a_cmds $x_cmds | sed 's/ /|/g; s/+/\\\\+/g'))$/\"'!d' |\n  __fzf_orig_completion_filter)\"\n\nif type _completion_loader > /dev/null 2>&1; then\n  _fzf_completion_loader=1\nfi\n\n_fzf_defc() {\n  local cmd func opts orig_var orig def\n  cmd=\"$1\"\n  func=\"$2\"\n  opts=\"$3\"\n  orig_var=\"_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}\"\n  orig=\"${!orig_var}\"\n  if [ -n \"$orig\" ]; then\n    printf -v def \"$orig\" \"$func\"\n    eval \"$def\"\n  else\n    complete -F \"$func\" $opts \"$cmd\"\n  fi\n}\n\n# Anything\nfor cmd in $a_cmds; do\n  _fzf_defc \"$cmd\" _fzf_path_completion \"-o default -o bashdefault\"\ndone\n\n# Directory\nfor cmd in $d_cmds; do\n  _fzf_defc \"$cmd\" _fzf_dir_completion \"-o nospace -o dirnames\"\ndone\n\nunset _fzf_defc\n\n# Kill completion\ncomplete -F _fzf_complete_kill -o nospace -o default -o bashdefault kill\n\n# Host completion\ncomplete -F _fzf_complete_ssh -o default -o bashdefault ssh\ncomplete -F _fzf_complete_telnet -o default -o bashdefault telnet\n\n# Environment variables / Aliases\ncomplete -F _fzf_complete_unset -o default -o bashdefault unset\ncomplete -F _fzf_complete_export -o default -o bashdefault export\ncomplete -F _fzf_complete_unalias -o default -o bashdefault unalias\n\nunset cmd d_cmds a_cmds x_cmds\n"
  },
  {
    "path": ".config/zsh/fzf/completion.zsh",
    "content": "#     ____      ____\n#    / __/___  / __/\n#   / /_/_  / / /_\n#  / __/ / /_/ __/\n# /_/   /___/_/-completion.zsh\n#\n# - $FZF_TMUX               (default: 0)\n# - $FZF_TMUX_HEIGHT        (default: '40%')\n# - $FZF_COMPLETION_TRIGGER (default: '**')\n# - $FZF_COMPLETION_OPTS    (default: empty)\n\n# To use custom commands instead of find, override _fzf_compgen_{path,dir}\nif ! declare -f _fzf_compgen_path > /dev/null; then\n  _fzf_compgen_path() {\n    echo \"$1\"\n    command find -L \"$1\" \\\n      -name .git -prune -o -name .svn -prune -o \\( -type d -o -type f -o -type l \\) \\\n      -a -not -path \"$1\" -print 2> /dev/null | sed 's@^\\./@@'\n  }\nfi\n\nif ! declare -f _fzf_compgen_dir > /dev/null; then\n  _fzf_compgen_dir() {\n    command find -L \"$1\" \\\n      -name .git -prune -o -name .svn -prune -o -type d \\\n      -a -not -path \"$1\" -print 2> /dev/null | sed 's@^\\./@@'\n  }\nfi\n\n###########################################################\n\n__fzfcmd_complete() {\n  [ -n \"$TMUX_PANE\" ] && [ \"${FZF_TMUX:-0}\" != 0 ] && [ ${LINES:-40} -gt 15 ] &&\n    echo \"fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}\" || echo \"fzf\"\n}\n\n__fzf_generic_path_completion() {\n  local base lbuf compgen fzf_opts suffix tail fzf dir leftover matches\n  # (Q) flag removes a quoting level: \"foo\\ bar\" => \"foo bar\"\n  base=${(Q)1}\n  lbuf=$2\n  compgen=$3\n  fzf_opts=$4\n  suffix=$5\n  tail=$6\n  fzf=\"$(__fzfcmd_complete)\"\n\n  setopt localoptions nonomatch\n  dir=\"$base\"\n  while [ 1 ]; do\n    if [[ -z \"$dir\" || -d ${~dir} ]]; then\n      leftover=${base/#\"$dir\"}\n      leftover=${leftover/#\\/}\n      [ -z \"$dir\" ] && dir='.'\n      [ \"$dir\" != \"/\" ] && dir=\"${dir/%\\//}\"\n      dir=${~dir}\n      matches=$(eval \"$compgen $(printf %q \"$dir\")\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS\" ${=fzf} ${=fzf_opts} -q \"$leftover\" | while read item; do\n        echo -n \"${(q)item}$suffix \"\n      done)\n      matches=${matches% }\n      if [ -n \"$matches\" ]; then\n        LBUFFER=\"$lbuf$matches$tail\"\n      fi\n      zle redisplay\n      typeset -f zle-line-init >/dev/null && zle zle-line-init\n      break\n    fi\n    dir=$(dirname \"$dir\")\n    dir=${dir%/}/\n  done\n}\n\n_fzf_path_completion() {\n  __fzf_generic_path_completion \"$1\" \"$2\" _fzf_compgen_path \\\n    \"-m\" \"\" \" \"\n}\n\n_fzf_dir_completion() {\n  __fzf_generic_path_completion \"$1\" \"$2\" _fzf_compgen_dir \\\n    \"\" \"/\" \"\"\n}\n\n_fzf_feed_fifo() (\n  command rm -f \"$1\"\n  mkfifo \"$1\"\n  cat <&0 > \"$1\" &\n)\n\n_fzf_complete() {\n  local fifo fzf_opts lbuf fzf matches post\n  fifo=\"${TMPDIR:-/tmp}/fzf-complete-fifo-$$\"\n  fzf_opts=$1\n  lbuf=$2\n  post=\"${funcstack[2]}_post\"\n  type $post > /dev/null 2>&1 || post=cat\n\n  fzf=\"$(__fzfcmd_complete)\"\n\n  _fzf_feed_fifo \"$fifo\"\n  matches=$(cat \"$fifo\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_COMPLETION_OPTS\" ${=fzf} ${=fzf_opts} -q \"${(Q)prefix}\" | $post | tr '\\n' ' ')\n  if [ -n \"$matches\" ]; then\n    LBUFFER=\"$lbuf$matches\"\n  fi\n  zle redisplay\n  typeset -f zle-line-init >/dev/null && zle zle-line-init\n  command rm -f \"$fifo\"\n}\n\n_fzf_complete_telnet() {\n  _fzf_complete '+m' \"$@\" < <(\n    command grep -v '^\\s*\\(#\\|$\\)' /etc/hosts | command grep -Fv '0.0.0.0' |\n        awk '{if (length($2) > 0) {print $2}}' | sort -u\n  )\n}\n\n_fzf_complete_ssh() {\n  _fzf_complete '+m' \"$@\" < <(\n    command cat <(cat ~/.ssh/config /etc/ssh/ssh_config 2> /dev/null | command grep -i '^host' | command grep -v '*' | awk '{for (i = 2; i <= NF; i++) print $1 \" \" $i}') \\\n        <(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\\n' | tr -d '[' | awk '{ print $1 \" \" $1 }') \\\n        <(command grep -v '^\\s*\\(#\\|$\\)' /etc/hosts | command grep -Fv '0.0.0.0') |\n        awk '{if (length($2) > 0) {print $2}}' | sort -u\n  )\n}\n\n_fzf_complete_export() {\n  _fzf_complete '-m' \"$@\" < <(\n    declare -xp | sed 's/=.*//' | sed 's/.* //'\n  )\n}\n\n_fzf_complete_unset() {\n  _fzf_complete '-m' \"$@\" < <(\n    declare -xp | sed 's/=.*//' | sed 's/.* //'\n  )\n}\n\n_fzf_complete_unalias() {\n  _fzf_complete '+m' \"$@\" < <(\n    alias | sed 's/=.*//'\n  )\n}\n\nfzf-completion() {\n  local tokens cmd prefix trigger tail fzf matches lbuf d_cmds\n  setopt localoptions noshwordsplit noksh_arrays noposixbuiltins\n\n  # http://zsh.sourceforge.net/FAQ/zshfaq03.html\n  # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags\n  tokens=(${(z)LBUFFER})\n  if [ ${#tokens} -lt 1 ]; then\n    zle ${fzf_default_completion:-expand-or-complete}\n    return\n  fi\n\n  cmd=${tokens[1]}\n\n  # Explicitly allow for empty trigger.\n  trigger=${FZF_COMPLETION_TRIGGER-'**'}\n  [ -z \"$trigger\" -a ${LBUFFER[-1]} = ' ' ] && tokens+=(\"\")\n\n  tail=${LBUFFER:$(( ${#LBUFFER} - ${#trigger} ))}\n  # Kill completion (do not require trigger sequence)\n  if [ $cmd = kill -a ${LBUFFER[-1]} = ' ' ]; then\n    fzf=\"$(__fzfcmd_complete)\"\n    matches=$(command ps -ef | sed 1d | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-50%} --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS\" ${=fzf} -m | awk '{print $2}' | tr '\\n' ' ')\n    if [ -n \"$matches\" ]; then\n      LBUFFER=\"$LBUFFER$matches\"\n    fi\n    zle redisplay\n    typeset -f zle-line-init >/dev/null && zle zle-line-init\n  # Trigger sequence given\n  elif [ ${#tokens} -gt 1 -a \"$tail\" = \"$trigger\" ]; then\n    d_cmds=(${=FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir})\n\n    [ -z \"$trigger\"      ] && prefix=${tokens[-1]} || prefix=${tokens[-1]:0:-${#trigger}}\n    [ -z \"${tokens[-1]}\" ] && lbuf=$LBUFFER        || lbuf=${LBUFFER:0:-${#tokens[-1]}}\n\n    if eval \"type _fzf_complete_${cmd} > /dev/null\"; then\n      eval \"prefix=\\\"$prefix\\\" _fzf_complete_${cmd} \\\"$lbuf\\\"\"\n    elif [ ${d_cmds[(i)$cmd]} -le ${#d_cmds} ]; then\n      _fzf_dir_completion \"$prefix\" \"$lbuf\"\n    else\n      _fzf_path_completion \"$prefix\" \"$lbuf\"\n    fi\n  # Fall back to default completion\n  else\n    zle ${fzf_default_completion:-expand-or-complete}\n  fi\n}\n\n[ -z \"$fzf_default_completion\" ] && {\n  binding=$(bindkey '^I')\n  [[ $binding =~ 'undefined-key' ]] || fzf_default_completion=$binding[(s: :w)2]\n  unset binding\n}\n\nzle     -N   fzf-completion\nbindkey '^I' fzf-completion\n"
  },
  {
    "path": ".config/zsh/fzf/key-bindings.bash",
    "content": "# Key bindings\n# ------------\n__fzf_select__() {\n  local cmd=\"${FZF_CTRL_T_COMMAND:-\"command find -L . -mindepth 1 \\\\( -path '*/\\\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\\\) -prune \\\n    -o -type f -print \\\n    -o -type d -print \\\n    -o -type l -print 2> /dev/null | cut -b3-\"}\"\n  eval \"$cmd\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS\" fzf -m \"$@\" | while read -r item; do\n    printf '%q ' \"$item\"\n  done\n  echo\n}\n\nif [[ $- =~ i ]]; then\n\n__fzf_use_tmux__() {\n  [ -n \"$TMUX_PANE\" ] && [ \"${FZF_TMUX:-0}\" != 0 ] && [ ${LINES:-40} -gt 15 ]\n}\n\n__fzfcmd() {\n  __fzf_use_tmux__ &&\n    echo \"fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}\" || echo \"fzf\"\n}\n\n__fzf_select_tmux__() {\n  local height\n  height=${FZF_TMUX_HEIGHT:-40%}\n  if [[ $height =~ %$ ]]; then\n    height=\"-p ${height%\\%}\"\n  else\n    height=\"-l $height\"\n  fi\n\n  tmux split-window $height \"cd $(printf %q \"$PWD\"); FZF_DEFAULT_OPTS=$(printf %q \"$FZF_DEFAULT_OPTS\") PATH=$(printf %q \"$PATH\") FZF_CTRL_T_COMMAND=$(printf %q \"$FZF_CTRL_T_COMMAND\") FZF_CTRL_T_OPTS=$(printf %q \"$FZF_CTRL_T_OPTS\") bash -c 'source \\\"${BASH_SOURCE[0]}\\\"; RESULT=\\\"\\$(__fzf_select__ --no-height)\\\"; tmux setb -b fzf \\\"\\$RESULT\\\" \\\\; pasteb -b fzf -t $TMUX_PANE \\\\; deleteb -b fzf || tmux send-keys -t $TMUX_PANE \\\"\\$RESULT\\\"'\"\n}\n\nfzf-file-widget() {\n  if __fzf_use_tmux__; then\n    __fzf_select_tmux__\n  else\n    local selected=\"$(__fzf_select__)\"\n    READLINE_LINE=\"${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}\"\n    READLINE_POINT=$(( READLINE_POINT + ${#selected} ))\n  fi\n}\n\n__fzf_cd__() {\n  local cmd dir\n  cmd=\"${FZF_ALT_C_COMMAND:-\"command find -L . -mindepth 1 \\\\( -path '*/\\\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\\\) -prune \\\n    -o -type d -print 2> /dev/null | cut -b3-\"}\"\n  dir=$(eval \"$cmd\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS\" $(__fzfcmd) +m) && printf 'cd %q' \"$dir\"\n}\n\n__fzf_history__() (\n  local line\n  shopt -u nocaseglob nocasematch\n  line=$(\n    HISTTIMEFORMAT= history |\n    FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS --tac --sync -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m\" $(__fzfcmd) |\n    command grep '^ *[0-9]') &&\n    if [[ $- =~ H ]]; then\n      sed 's/^ *\\([0-9]*\\)\\** .*/!\\1/' <<< \"$line\"\n    else\n      sed 's/^ *\\([0-9]*\\)\\** *//' <<< \"$line\"\n    fi\n)\n\nif [[ ! -o vi ]]; then\n  # Required to refresh the prompt after fzf\n  bind '\"\\er\": redraw-current-line'\n  bind '\"\\e^\": history-expand-line'\n\n  # CTRL-T - Paste the selected file path into the command line\n  if [ $BASH_VERSINFO -gt 3 ]; then\n    bind -x '\"\\C-t\": \"fzf-file-widget\"'\n  elif __fzf_use_tmux__; then\n    bind '\"\\C-t\": \" \\C-u \\C-a\\C-k`__fzf_select_tmux__`\\e\\C-e\\C-y\\C-a\\C-d\\C-y\\ey\\C-h\"'\n  else\n    bind '\"\\C-t\": \" \\C-u \\C-a\\C-k`__fzf_select__`\\e\\C-e\\C-y\\C-a\\C-y\\ey\\C-h\\C-e\\er \\C-h\"'\n  fi\n\n  # CTRL-R - Paste the selected command from history into the command line\n  bind '\"\\C-r\": \" \\C-e\\C-u\\C-y\\ey\\C-u`__fzf_history__`\\e\\C-e\\er\\e^\"'\n\n  # ALT-C - cd into the selected directory\n  bind '\"\\ec\": \" \\C-e\\C-u`__fzf_cd__`\\e\\C-e\\er\\C-m\"'\nelse\n  # We'd usually use \"\\e\" to enter vi-movement-mode so we can do our magic,\n  # but this incurs a very noticeable delay of a half second or so,\n  # because many other commands start with \"\\e\".\n  # Instead, we bind an unused key, \"\\C-x\\C-a\",\n  # to also enter vi-movement-mode,\n  # and then use that thereafter.\n  # (We imagine that \"\\C-x\\C-a\" is relatively unlikely to be in use.)\n  bind '\"\\C-x\\C-a\": vi-movement-mode'\n\n  bind '\"\\C-x\\C-e\": shell-expand-line'\n  bind '\"\\C-x\\C-r\": redraw-current-line'\n  bind '\"\\C-x^\": history-expand-line'\n\n  # CTRL-T - Paste the selected file path into the command line\n  # - FIXME: Selected items are attached to the end regardless of cursor position\n  if [ $BASH_VERSINFO -gt 3 ]; then\n    bind -x '\"\\C-t\": \"fzf-file-widget\"'\n  elif __fzf_use_tmux__; then\n    bind '\"\\C-t\": \"\\C-x\\C-a$a \\C-x\\C-addi`__fzf_select_tmux__`\\C-x\\C-e\\C-x\\C-a0P$xa\"'\n  else\n    bind '\"\\C-t\": \"\\C-x\\C-a$a \\C-x\\C-addi`__fzf_select__`\\C-x\\C-e\\C-x\\C-a0Px$a \\C-x\\C-r\\C-x\\C-axa \"'\n  fi\n  bind -m vi-command '\"\\C-t\": \"i\\C-t\"'\n\n  # CTRL-R - Paste the selected command from history into the command line\n  bind '\"\\C-r\": \"\\C-x\\C-addi`__fzf_history__`\\C-x\\C-e\\C-x\\C-r\\C-x^\\C-x\\C-a$a\"'\n  bind -m vi-command '\"\\C-r\": \"i\\C-r\"'\n\n  # ALT-C - cd into the selected directory\n  bind '\"\\ec\": \"\\C-x\\C-addi`__fzf_cd__`\\C-x\\C-e\\C-x\\C-r\\C-m\"'\n  bind -m vi-command '\"\\ec\": \"ddi`__fzf_cd__`\\C-x\\C-e\\C-x\\C-r\\C-m\"'\nfi\n\nfi\n"
  },
  {
    "path": ".config/zsh/fzf/key-bindings.fish",
    "content": "# Key bindings\n# ------------\nfunction fzf_key_bindings\n\n  # Store current token in $dir as root for the 'find' command\n  function fzf-file-widget -d \"List files and folders\"\n    set -l commandline (__fzf_parse_commandline)\n    set -l dir $commandline[1]\n    set -l fzf_query $commandline[2]\n\n    # \"-path \\$dir'*/\\\\.*'\" matches hidden files/folders inside $dir but not\n    # $dir itself, even if hidden.\n    set -q FZF_CTRL_T_COMMAND; or set -l FZF_CTRL_T_COMMAND \"\n    command find -L \\$dir -mindepth 1 \\\\( -path \\$dir'*/\\\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\\\) -prune \\\n    -o -type f -print \\\n    -o -type d -print \\\n    -o -type l -print 2> /dev/null | sed 's@^\\./@@'\"\n\n    set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%\n    begin\n      set -lx FZF_DEFAULT_OPTS \"--height $FZF_TMUX_HEIGHT --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS\"\n      eval \"$FZF_CTRL_T_COMMAND | \"(__fzfcmd)' -m --query \"'$fzf_query'\"' | while read -l r; set result $result $r; end\n    end\n    if [ -z \"$result\" ]\n      commandline -f repaint\n      return\n    else\n      # Remove last token from commandline.\n      commandline -t \"\"\n    end\n    for i in $result\n      commandline -it -- (string escape $i)\n      commandline -it -- ' '\n    end\n    commandline -f repaint\n  end\n\n  function fzf-history-widget -d \"Show command history\"\n    set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%\n    begin\n      set -lx FZF_DEFAULT_OPTS \"--height $FZF_TMUX_HEIGHT $FZF_DEFAULT_OPTS --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m\"\n\n      set -l FISH_MAJOR (echo $FISH_VERSION | cut -f1 -d.)\n      set -l FISH_MINOR (echo $FISH_VERSION | cut -f2 -d.)\n\n      # history's -z flag is needed for multi-line support.\n      # history's -z flag was added in fish 2.4.0, so don't use it for versions\n      # before 2.4.0.\n      if [ \"$FISH_MAJOR\" -gt 2 -o \\( \"$FISH_MAJOR\" -eq 2 -a \"$FISH_MINOR\" -ge 4 \\) ];\n        history -z | eval (__fzfcmd) --read0 -q '(commandline)' | perl -pe 'chomp if eof' | read -lz result\n        and commandline -- $result\n      else\n        history | eval (__fzfcmd) -q '(commandline)' | read -l result\n        and commandline -- $result\n      end\n    end\n    commandline -f repaint\n  end\n\n  function fzf-cd-widget -d \"Change directory\"\n    set -l commandline (__fzf_parse_commandline)\n    set -l dir $commandline[1]\n    set -l fzf_query $commandline[2]\n\n    set -q FZF_ALT_C_COMMAND; or set -l FZF_ALT_C_COMMAND \"\n    command find -L \\$dir -mindepth 1 \\\\( -path \\$dir'*/\\\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' \\\\) -prune \\\n    -o -type d -print 2> /dev/null | sed 's@^\\./@@'\"\n    set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%\n    begin\n      set -lx FZF_DEFAULT_OPTS \"--height $FZF_TMUX_HEIGHT --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS\"\n      eval \"$FZF_ALT_C_COMMAND | \"(__fzfcmd)' +m --query \"'$fzf_query'\"' | read -l result\n\n      if [ -n \"$result\" ]\n        cd $result\n\n        # Remove last token from commandline.\n        commandline -t \"\"\n      end\n    end\n\n    commandline -f repaint\n  end\n\n  function __fzfcmd\n    set -q FZF_TMUX; or set FZF_TMUX 0\n    set -q FZF_TMUX_HEIGHT; or set FZF_TMUX_HEIGHT 40%\n    if [ $FZF_TMUX -eq 1 ]\n      echo \"fzf-tmux -d$FZF_TMUX_HEIGHT\"\n    else\n      echo \"fzf\"\n    end\n  end\n\n  bind \\ct fzf-file-widget\n  bind \\cr fzf-history-widget\n  bind \\ec fzf-cd-widget\n\n  if bind -M insert > /dev/null 2>&1\n    bind -M insert \\ct fzf-file-widget\n    bind -M insert \\cr fzf-history-widget\n    bind -M insert \\ec fzf-cd-widget\n  end\n\n  function __fzf_parse_commandline -d 'Parse the current command line token and return split of existing filepath and rest of token'\n    # eval is used to do shell expansion on paths\n    set -l commandline (eval \"printf '%s' \"(commandline -t))\n\n    if [ -z $commandline ]\n      # Default to current directory with no --query\n      set dir '.'\n      set fzf_query ''\n    else\n      set dir (__fzf_get_dir $commandline)\n\n      if [ \"$dir\" = \".\" -a (string sub -l 1 $commandline) != '.' ]\n        # if $dir is \".\" but commandline is not a relative path, this means no file path found\n        set fzf_query $commandline\n      else\n        # Also remove trailing slash after dir, to \"split\" input properly\n        set fzf_query (string replace -r \"^$dir/?\" '' \"$commandline\")\n      end\n    end\n\n    echo $dir\n    echo $fzf_query\n  end\n\n  function __fzf_get_dir -d 'Find the longest existing filepath from input string'\n    set dir $argv\n\n    # Strip all trailing slashes. Ignore if $dir is root dir (/)\n    if [ (string length $dir) -gt 1 ]\n      set dir (string replace -r '/*$' '' $dir)\n    end\n\n    # Iteratively check if dir exists and strip tail end of path\n    while [ ! -d \"$dir\" ]\n      # If path is absolute, this can keep going until ends up at /\n      # If path is relative, this can keep going until entire input is consumed, dirname returns \".\"\n      set dir (dirname \"$dir\")\n    end\n\n    echo $dir\n  end\n\nend\n"
  },
  {
    "path": ".config/zsh/fzf/key-bindings.zsh",
    "content": "# Key bindings\n# ------------\nif [[ $- == *i* ]]; then\n\n# CTRL-T - Paste the selected file path(s) into the command line\n__fsel() {\n  local cmd=\"${FZF_CTRL_T_COMMAND:-\"command find -L . -mindepth 1 \\\\( -path '*/\\\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\\\) -prune \\\n    -o -type f -print \\\n    -o -type d -print \\\n    -o -type l -print 2> /dev/null | cut -b3-\"}\"\n  setopt localoptions pipefail 2> /dev/null\n  eval \"$cmd\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_CTRL_T_OPTS\" $(__fzfcmd) -m \"$@\" | while read item; do\n    echo -n \"${(q)item} \"\n  done\n  local ret=$?\n  echo\n  return $ret\n}\n\n__fzf_use_tmux__() {\n  [ -n \"$TMUX_PANE\" ] && [ \"${FZF_TMUX:-0}\" != 0 ] && [ ${LINES:-40} -gt 15 ]\n}\n\n__fzfcmd() {\n  __fzf_use_tmux__ &&\n    echo \"fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}\" || echo \"fzf\"\n}\n\nfzf-file-widget() {\n  LBUFFER=\"${LBUFFER}$(__fsel)\"\n  local ret=$?\n  zle redisplay\n  typeset -f zle-line-init >/dev/null && zle zle-line-init\n  return $ret\n}\nzle     -N   fzf-file-widget\nbindkey '^T' fzf-file-widget\n\n# Ensure precmds are run after cd\nfzf-redraw-prompt() {\n  local precmd\n  for precmd in $precmd_functions; do\n    $precmd\n  done\n  zle reset-prompt\n}\nzle -N fzf-redraw-prompt\n\n# ALT-C - cd into the selected directory\nfzf-cd-widget() {\n  local cmd=\"${FZF_ALT_C_COMMAND:-\"command find -L . -mindepth 1 \\\\( -path '*/\\\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\\\) -prune \\\n    -o -type d -print 2> /dev/null | cut -b3-\"}\"\n  setopt localoptions pipefail 2> /dev/null\n  local dir=\"$(eval \"$cmd\" | FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} --reverse $FZF_DEFAULT_OPTS $FZF_ALT_C_OPTS\" $(__fzfcmd) +m)\"\n  if [[ -z \"$dir\" ]]; then\n    zle redisplay\n    return 0\n  fi\n  cd \"$dir\"\n  local ret=$?\n  zle fzf-redraw-prompt\n  typeset -f zle-line-init >/dev/null && zle zle-line-init\n  return $ret\n}\nzle     -N    fzf-cd-widget\nbindkey '\\ec' fzf-cd-widget\n\n# CTRL-R - Paste the selected command from history into the command line\nfzf-history-widget() {\n  local selected num\n  setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null\n  selected=( $(fc -rl 1 |\n    FZF_DEFAULT_OPTS=\"--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS --query=${(qqq)LBUFFER} +m\" $(__fzfcmd)) )\n  local ret=$?\n  if [ -n \"$selected\" ]; then\n    num=$selected[1]\n    if [ -n \"$num\" ]; then\n      zle vi-fetch-history -n $num\n    fi\n  fi\n  zle redisplay\n  typeset -f zle-line-init >/dev/null && zle zle-line-init\n  return $ret\n}\nzle     -N   fzf-history-widget\nbindkey '^R' fzf-history-widget\n\nfi\n"
  },
  {
    "path": ".config/zsh/goto/goto.sh",
    "content": "# shellcheck shell=bash\n# shellcheck disable=SC2039\n# MIT License\n#\n# Copyright (c) 2018 Lazarus Lazaridis\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in all\n# copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n# Changes to the given alias directory\n# or executes a command based on the arguments.\ngoto()\n{\n  local target\n  _goto_resolve_db\n\n  if [ -z \"$1\" ]; then\n    # display usage and exit when no args\n    _goto_usage\n    return\n  fi\n\n  subcommand=\"$1\"\n  shift\n  case \"$subcommand\" in\n    -c|--cleanup)\n      _goto_cleanup \"$@\"\n      ;;\n    -r|--register) # Register an alias\n      _goto_register_alias \"$@\"\n      ;;\n    -u|--unregister) # Unregister an alias\n      _goto_unregister_alias \"$@\"\n      ;;\n    -p|--push) # Push the current directory onto the pushd stack, then goto\n      _goto_directory_push \"$@\"\n      ;;\n    -o|--pop) # Pop the top directory off of the pushd stack, then change that directory\n      _goto_directory_pop\n      ;;\n    -l|--list)\n      _goto_list_aliases\n      ;;\n    -x|--expand) # Expand an alias\n      _goto_expand_alias \"$@\"\n      ;;\n    -h|--help)\n      _goto_usage\n      ;;\n    -v|--version)\n      _goto_version\n      ;;\n    *)\n      _goto_directory \"$subcommand\"\n      ;;\n  esac\n  return $?\n}\n\n_goto_resolve_db()\n{\n  GOTO_DB=\"${GOTO_DB:-$HOME/Dots/.config/zsh/goto/gotodb}\"\n  touch -a \"$GOTO_DB\"\n}\n\n_goto_usage()\n{\n  cat <<\\USAGE\nusage: goto [<option>] <alias> [<directory>]\n\ndefault usage:\n  goto <alias> - changes to the directory registered for the given alias\n\nOPTIONS:\n  -r, --register: registers an alias\n    goto -r|--register <alias> <directory>\n  -u, --unregister: unregisters an alias\n    goto -u|--unregister <alias>\n  -p, --push: pushes the current directory onto the stack, then performs goto\n    goto -p|--push <alias>\n  -o, --pop: pops the top directory from the stack, then changes to that directory\n    goto -o|--pop\n  -l, --list: lists aliases\n    goto -l|--list\n  -x, --expand: expands an alias\n    goto -x|--expand <alias>\n  -c, --cleanup: cleans up non existent directory aliases\n    goto -c|--cleanup\n  -h, --help: prints this help\n    goto -h|--help\n  -v, --version: displays the version of the goto script\n    goto -v|--version\nUSAGE\n}\n\n# Displays version\n_goto_version()\n{\n  echo \"goto version 1.2.3\"\n}\n\n# Expands directory.\n# Helpful for ~, ., .. paths\n_goto_expand_directory()\n{\n  cd \"$1\" 2>/dev/null && pwd\n}\n\n# Lists registered aliases.\n_goto_list_aliases()\n{\n  local IFS=$' '\n  if [ -f \"$GOTO_DB\" ]; then\n    while read -r name directory; do\n      printf '\\e[1;36m%20s  \\e[0m%s\\n' \"$name\" \"$directory\"\n    done < \"$GOTO_DB\"\n  else\n    echo \"You haven't configured any directory aliases yet.\"\n  fi\n}\n\n# Expands a registered alias.\n_goto_expand_alias()\n{\n  if [ \"$#\" -ne \"1\" ]; then\n    _goto_error \"usage: goto -x|--expand <alias>\"\n    return\n  fi\n\n  local resolved\n\n  resolved=$(_goto_find_alias_directory \"$1\")\n  if [ -z \"$resolved\" ]; then\n    _goto_error \"alias '$1' does not exist\"\n    return\n  fi\n\n  echo \"$resolved\"\n}\n\n# Lists duplicate directory aliases\n_goto_find_duplicate()\n{\n  local duplicates=\n\n  duplicates=$(sed -n 's:[^ ]* '\"$1\"'$:&:p' \"$GOTO_DB\" 2>/dev/null)\n  echo \"$duplicates\"\n}\n\n# Registers and alias.\n_goto_register_alias()\n{\n  if [ \"$#\" -ne \"2\" ]; then\n    _goto_error \"usage: goto -r|--register <alias> <directory>\"\n    return 1\n  fi\n\n  if ! [[ $1 =~ ^[[:alnum:]]+[a-zA-Z0-9_-]*$ ]]; then\n    _goto_error \"invalid alias - can start with letters or digits followed by letters, digits, hyphens or underscores\"\n    return 1\n  fi\n\n  local resolved\n  resolved=$(_goto_find_alias_directory \"$1\")\n\n  if [ -n \"$resolved\" ]; then\n    _goto_error \"alias '$1' exists\"\n    return 1\n  fi\n\n  local directory\n  directory=$(_goto_expand_directory \"$2\")\n  if [ -z \"$directory\" ]; then\n    _goto_error \"failed to register '$1' to '$2' - can't cd to directory\"\n    return 1\n  fi\n\n  local duplicate\n  duplicate=$(_goto_find_duplicate \"$directory\")\n  if [ -n \"$duplicate\" ]; then\n    _goto_warning \"duplicate alias(es) found: \\\\n$duplicate\"\n  fi\n\n  # Append entry to file.\n  echo \"$1 $directory\" >> \"$GOTO_DB\"\n  echo \"Alias '$1' registered successfully.\"\n}\n\n# Unregisters the given alias.\n_goto_unregister_alias()\n{\n  if [ \"$#\" -ne \"1\" ]; then\n    _goto_error \"usage: goto -u|--unregister <alias>\"\n    return 1\n  fi\n\n  local resolved\n  resolved=$(_goto_find_alias_directory \"$1\")\n  if [ -z \"$resolved\" ]; then\n    _goto_error \"alias '$1' does not exist\"\n    return 1\n  fi\n\n  # shellcheck disable=SC2034\n  local readonly GOTO_DB_TMP=\"$HOME/.goto_\"\n  # Delete entry from file.\n  sed \"/^$1 /d\" \"$GOTO_DB\" > \"$GOTO_DB_TMP\" && mv \"$GOTO_DB_TMP\" \"$GOTO_DB\"\n  echo \"Alias '$1' unregistered successfully.\"\n}\n\n# Pushes the current directory onto the stack, then goto\n_goto_directory_push()\n{\n  if [ \"$#\" -ne \"1\" ]; then\n    _goto_error \"usage: goto -p|--push <alias>\"\n    return\n  fi\n\n  { pushd . || return; } 1>/dev/null 2>&1\n\n  _goto_directory \"$@\"\n}\n\n# Pops the top directory from the stack, then goto\n_goto_directory_pop()\n{\n  { popd || return; } 1>/dev/null 2>&1\n}\n\n# Unregisters aliases whose directories no longer exist.\n_goto_cleanup()\n{\n  if ! [ -f \"$GOTO_DB\" ]; then\n    return\n  fi\n\n  while IFS= read -r i && [ -n \"$i\" ]; do\n    echo \"Cleaning up: $i\"\n    _goto_unregister_alias \"$i\"\n  done <<< \"$(awk '{al=$1; $1=\"\"; dir=substr($0,2);\n                    system(\"[ ! -d \\\"\" dir \"\\\" ] && echo \" al)}' \"$GOTO_DB\")\"\n}\n\n# Changes to the given alias' directory\n_goto_directory()\n{\n  local target\n\n  target=$(_goto_resolve_alias \"$1\") || return 1\n\n  cd \"$target\" 2> /dev/null || \\\n    { _goto_error \"Failed to goto '$target'\" && return 1; }\n}\n\n# Fetches the alias directory.\n_goto_find_alias_directory()\n{\n  local resolved\n\n  resolved=$(sed -n \"s/^$1 \\\\(.*\\\\)/\\\\1/p\" \"$GOTO_DB\" 2>/dev/null)\n  echo \"$resolved\"\n}\n\n# Displays the given error.\n# Used for common error output.\n_goto_error()\n{\n  (>&2 echo -e \"goto error: $1\")\n}\n\n# Displays the given warning.\n# Used for common warning output.\n_goto_warning()\n{\n  (>&2 echo -e \"goto warning: $1\")\n}\n\n# Displays entries with aliases starting as the given one.\n_goto_print_similar()\n{\n  local similar\n\n  similar=$(sed -n \"/^$1[^ ]* .*/p\" \"$GOTO_DB\" 2>/dev/null)\n  if [ -n \"$similar\" ]; then\n    (>&2 echo \"Did you mean:\")\n    (>&2 column -t <<< \"$similar\")\n  fi\n}\n\n# Fetches alias directory, errors if it doesn't exist.\n_goto_resolve_alias()\n{\n  local resolved\n\n  resolved=$(_goto_find_alias_directory \"$1\")\n\n  if [ -z \"$resolved\" ]; then\n    _goto_error \"unregistered alias $1\"\n    _goto_print_similar \"$1\"\n    return 1\n  else\n    echo \"${resolved}\"\n  fi\n}\n\n# Completes the goto function with the available commands\n_complete_goto_commands()\n{\n  local IFS=$' \\t\\n'\n\n  # shellcheck disable=SC2207\n  COMPREPLY=($(compgen -W \"-r --register -u --unregister -p --push -o --pop -l --list -x --expand -c --cleanup -v --version\" -- \"$1\"))\n}\n\n# Completes the goto function with the available aliases\n_complete_goto_aliases()\n{\n  local IFS=$'\\n' matches\n  _goto_resolve_db\n\n  # shellcheck disable=SC2207\n  matches=($(sed -n \"/^$1/p\" \"$GOTO_DB\" 2>/dev/null))\n\n  if [ \"${#matches[@]}\" -eq \"1\" ]; then\n    # remove the filenames attribute from the completion method\n    compopt +o filenames 2>/dev/null\n\n    # if you find only one alias don't append the directory\n    COMPREPLY=(\"${matches[0]// *}\")\n  else\n    for i in \"${!matches[@]}\"; do\n      # remove the filenames attribute from the completion method\n      compopt +o filenames 2>/dev/null\n\n      if ! [[ $(uname -s) =~ Darwin* ]]; then\n        matches[$i]=$(printf '%*s' \"-$COLUMNS\" \"${matches[$i]}\")\n\n        COMPREPLY+=(\"$(compgen -W \"${matches[$i]}\")\")\n      else\n        COMPREPLY+=(\"${matches[$i]// */}\")\n      fi\n    done\n  fi\n}\n\n# Bash programmable completion for the goto function\n_complete_goto_bash()\n{\n  local cur=\"${COMP_WORDS[$COMP_CWORD]}\" prev\n\n  if [ \"$COMP_CWORD\" -eq \"1\" ]; then\n    # if we are on the first argument\n    if [[ $cur == -* ]]; then\n      # and starts like a command, prompt commands\n      _complete_goto_commands \"$cur\"\n    else\n      # and doesn't start as a command, prompt aliases\n      _complete_goto_aliases \"$cur\"\n    fi\n  elif [ \"$COMP_CWORD\" -eq \"2\" ]; then\n    # if we are on the second argument\n    prev=\"${COMP_WORDS[1]}\"\n\n    if [[ $prev = \"-u\" ]] || [[ $prev = \"--unregister\" ]]; then\n      # prompt with aliases if user tries to unregister one\n      _complete_goto_aliases \"$cur\"\n    elif [[ $prev = \"-x\" ]] || [[ $prev = \"--expand\" ]]; then\n      # prompt with aliases if user tries to expand one\n      _complete_goto_aliases \"$cur\"\n    elif [[ $prev = \"-p\" ]] || [[ $prev = \"--push\" ]]; then\n      # prompt with aliases only if user tries to push\n      _complete_goto_aliases \"$cur\"\n    fi\n  elif [ \"$COMP_CWORD\" -eq \"3\" ]; then\n    # if we are on the third argument\n    prev=\"${COMP_WORDS[1]}\"\n\n    if [[ $prev = \"-r\" ]] || [[ $prev = \"--register\" ]]; then\n      # prompt with directories only if user tries to register an alias\n      local IFS=$' \\t\\n'\n\n      # shellcheck disable=SC2207\n      COMPREPLY=($(compgen -d -- \"$cur\"))\n    fi\n  fi\n}\n\n# Zsh programmable completion for the goto function\n_complete_goto_zsh()\n{\n  local all_aliases=()\n  while IFS= read -r line; do\n    all_aliases+=(\"$line\")\n  done <<< \"$(sed -e 's/ /:/g' ~/.goto 2>/dev/null)\"\n\n  local state\n  local -a options=(\n    '(1)'{-r,--register}'[registers an alias]:register:->register'\n    '(- 1 2)'{-u,--unregister}'[unregisters an alias]:unregister:->unregister'\n    '(: -)'{-l,--list}'[lists aliases]'\n    '(*)'{-c,--cleanup}'[cleans up non existent directory aliases]'\n    '(1 2)'{-x,--expand}'[expands an alias]:expand:->aliases'\n    '(1 2)'{-p,--push}'[pushes the current directory onto the stack, then performs goto]:push:->aliases'\n    '(*)'{-o,--pop}'[pops the top directory from stack, then changes to that directory]'\n    '(: -)'{-h,--help}'[prints this help]'\n    '(* -)'{-v,--version}'[displays the version of the goto script]'\n  )\n\n  _arguments -C \\\n    \"${options[@]}\" \\\n    '1:alias:->aliases' \\\n    '2:dir:_files' \\\n  && ret=0\n\n  case ${state} in\n    (aliases)\n      _describe -t aliases 'goto aliases:' all_aliases && ret=0\n    ;;\n    (unregister)\n      _describe -t aliases 'unregister alias:' all_aliases && ret=0\n    ;;\n  esac\n  return $ret\n}\n\n# Register the goto completions.\nif [ -n \"${BASH_VERSION}\" ]; then\n  if ! [[ $(uname -s) =~ Darwin* ]]; then\n    complete -o filenames -F _complete_goto_bash goto\n  else\n    complete -F _complete_goto_bash goto\n  fi\nelif [ -n \"${ZSH_VERSION}\" ]; then\n  compdef _complete_goto_zsh goto\nelse\n  echo \"Unsupported shell.\"\n  exit 1\nfi\n\n"
  },
  {
    "path": ".config/zsh/goto/gotodb",
    "content": "code /home/bresilla/DATA/CODE\ngo /home/bresilla/DATA/CODE/LANGUAGE/GO\nmso /home/bresilla/DATA/CODE/PROJECTS/mso\nnote /home/bresilla/DATA/CODE/PROJECTS/note\ndots /home/bresilla/Dots\ngopath /home/bresilla/.go\nai_agro /home/bresilla/DATA/UNIVERSITY/PAPERS/AI_AGRO\ndown /home/bresilla/Downloads\ncast /home/bresilla/DATA/CASTS\nspejt /home/bresilla/DATA/CODE/PROJECTS/spejt\ntmp /tmp\n"
  },
  {
    "path": ".config/zsh/insult",
    "content": "print_message () {\n\n    local messages\n    local message\n\n    messages=(\n        \"Boooo!\"\n        \"Don't you know anything?\"\n        \"RTFM!\"\n        \"Haha, n00b!\"\n        \"Wow! That was impressively wrong!\"\n        \"Pathetic\"\n        \"The worst one today!\"\n        \"n00b alert!\"\n        \"Your application for reduced salary has been sent!\"\n        \"lol\"\n        \"u suk\"\n        \"lol... plz\"\n        \"plz uninstall\"\n        \"And the Darwin Award goes to.... ${USER}!\"\n        \"ERROR_INCOMPETENT_USER\"\n        \"Incompetence is also a form of competence\"\n        \"Bad.\"\n        \"Fake it till you make it!\"\n        \"What is this...? Amateur hour!?\"\n        \"Come on! You can do it!\"\n        \"Nice try.\"\n        \"What if... you type an actual command the next time!\"\n        \"What if I told you... it is possible to type valid commands.\"\n        \"Y u no speak computer???\"\n        \"This is not Windows\"\n        \"Perhaps you should leave the command line alone...\"\n        \"Please step away from the keyboard!\"\n        \"error code: 1D10T\"\n        \"ACHTUNG! ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS! DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKEN. IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS. ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN.\"\n        \"Pro tip: type a valid command!\"\n        \"Go outside.\"\n        \"This is not a search engine.\"\n        \"(╯°□°）╯︵ ┻━┻\"\n        \"¯\\_(ツ)_/¯\"\n        \"So, I'm just going to go ahead and run rm -rf / for you.\"\n        \"Why are you so stupid?!\"\n        \"Perhaps computers is not for you...\"\n        \"Why are you doing this to me?!\"\n        \"Don't you have anything better to do?!\"\n        \"I am _seriously_ considering 'rm -rf /'-ing myself...\"\n        \"This is why you get to see your children only once a month.\"\n        \"This is why nobody likes you.\"\n        \"Are you even trying?!\"\n        \"Try using your brain the next time!\"\n        \"My keyboard is not a touch screen!\"\n        \"Commands, random gibberish, who cares!\"\n        \"Typing incorrect commands, eh?\"\n        \"Are you always this stupid or are you making a special effort today?!\"\n        \"Dropped on your head as a baby, eh?\"\n        \"Brains aren't everything. In your case they're nothing.\"\n        \"I don't know what makes you so stupid, but it really works.\"\n        \"You are not as bad as people say, you are much, much worse.\"\n        \"Two wrongs don't make a right, take your parents as an example.\"\n        \"You must have been born on a highway because that's where most accidents happen.\"\n        \"If what you don't know can't hurt you, you're invulnerable.\"\n        \"If ignorance is bliss, you must be the happiest person on earth.\"\n        \"You're proof that god has a sense of humor.\"\n        \"Keep trying, someday you'll do something intelligent!\"\n        \"If shit was music, you'd be an orchestra.\"\n        \"How many times do I have to flush before you go away?\"\n    )\n\n    # If CMD_NOT_FOUND_MSGS array is populated use those messages instead of the defaults\n    [[ -n ${CMD_NOT_FOUND_MSGS} ]] && messages=( \"${CMD_NOT_FOUND_MSGS[@]}\" )\n\n    # If CMD_NOT_FOUND_MSGS_APPEND array is populated append those to the existing messages\n    [[ -n ${CMD_NOT_FOUND_MSGS_APPEND} ]] && messages+=( \"${CMD_NOT_FOUND_MSGS_APPEND[@]}\" )\n\n    # Seed RANDOM with an integer of some length\n    RANDOM=$(od -vAn -N4 -tu < /dev/urandom)\n\n    # Print a randomly selected message, but only about half the time to annoy the user a\n    # little bit less.\n    if [[ $((${RANDOM} % 2)) -lt 1 ]]; then\n        message=${messages[${RANDOM} % ${#messages[@]}]}\n        printf \"\\n  $(tput bold)$(tput setaf 1)${message}$(tput sgr0)\\n\\n\"\n    fi\n}\n\nfunction_exists () {\n    # Zsh returns 0 even on non existing functions with -F so use -f\n    declare -f $1 > /dev/null\n    return $?\n}\n\n#\n# The idea below is to copy any existing handlers to another function\n# name and insert the message in front of the old handler in the\n# new handler. By default, neither bash or zsh has has a handler function\n# defined, so the default behaviour is replicated.\n#\n# Also, ensure the handler is only copied once. If we do not ensure this\n# the handler would add itself recursively if this file happens to be\n# sourced multiple times in the same shell, resulting in a neverending\n# stream of messages.\n#\n\nif function_exists command_not_found_handler; then\n    if ! function_exists orig_command_not_found_handler; then\n        eval \"orig_$(declare -f command_not_found_handler)\"\n    fi\nelse\n    orig_command_not_found_handler () {\n        echo \"zsh: command not found: $1\"\n        return 127\n    }\nfi\n\ncommand_not_found_handler () {\n    print_message\n    orig_command_not_found_handler \"$@\"\n}\n\ni\n\ncommand_not_found_handle () {\n    print_message\n    orig_command_not_found_handle \"$@\"\n}\n\n"
  },
  {
    "path": ".config/zsh/notfound/notfound",
    "content": "# Uses the command-not-found package zsh support\n# as seen in https://www.porcheron.info/command-not-found-for-zsh/\n# this is installed in Ubuntu\n\n[[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found\n\n# Arch Linux command-not-found support, you must have package pkgfile installed\n# https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook\n[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh\n\n# Fedora command-not-found support\nif [ -f /usr/libexec/pk-command-not-found ]; then\n    command_not_found_handler () {\n        runcnf=1\n        retval=127\n        [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0\n        [ ! -x /usr/libexec/packagekitd ] && runcnf=0\n        if [ $runcnf -eq 1 ]\n            then\n            /usr/libexec/pk-command-not-found $@\n            retval=$?\n        fi\n        return $retval\n    }\nfi\n\n# OSX command-not-found support\n# https://github.com/Homebrew/homebrew-command-not-found\nif type brew &> /dev/null; then\n  if brew command command-not-found-init > /dev/null 2>&1; then\n    eval \"$(brew command-not-found-init)\";\n  fi\nfi\n"
  },
  {
    "path": ".config/zsh/notfound/notfound.zsh",
    "content": "# Uses the command-not-found package zsh support\n# as seen in https://www.porcheron.info/command-not-found-for-zsh/\n# this is installed in Ubuntu\n\n[[ -e /etc/zsh_command_not_found ]] && source /etc/zsh_command_not_found\n\n# Arch Linux command-not-found support, you must have package pkgfile installed\n# https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook\n[[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh\n\n# Fedora command-not-found support\nif [ -f /usr/libexec/pk-command-not-found ]; then\n    command_not_found_handler () {\n        runcnf=1\n        retval=127\n        [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0\n        [ ! -x /usr/libexec/packagekitd ] && runcnf=0\n        if [ $runcnf -eq 1 ]\n            then\n            /usr/libexec/pk-command-not-found $@\n            retval=$?\n        fi\n        return $retval\n    }\nfi\n\n# OSX command-not-found support\n# https://github.com/Homebrew/homebrew-command-not-found\nif type brew &> /dev/null; then\n  if brew command command-not-found-init > /dev/null 2>&1; then\n    eval \"$(brew command-not-found-init)\";\n  fi\nfi\n"
  },
  {
    "path": ".config/zsh/syntax/.revision-hash",
    "content": ""
  },
  {
    "path": ".config/zsh/syntax/.version",
    "content": ""
  },
  {
    "path": ".config/zsh/syntax/highlighters/brackets/brackets-highlighter.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2016 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n\n# Define default styles.\n: ${ZSH_HIGHLIGHT_STYLES[bracket-error]:=fg=red,bold}\n: ${ZSH_HIGHLIGHT_STYLES[bracket-level-1]:=fg=blue,bold}\n: ${ZSH_HIGHLIGHT_STYLES[bracket-level-2]:=fg=green,bold}\n: ${ZSH_HIGHLIGHT_STYLES[bracket-level-3]:=fg=magenta,bold}\n: ${ZSH_HIGHLIGHT_STYLES[bracket-level-4]:=fg=yellow,bold}\n: ${ZSH_HIGHLIGHT_STYLES[bracket-level-5]:=fg=cyan,bold}\n: ${ZSH_HIGHLIGHT_STYLES[cursor-matchingbracket]:=standout}\n\n# Whether the brackets highlighter should be called or not.\n_zsh_highlight_highlighter_brackets_predicate()\n{\n  [[ $WIDGET == zle-line-finish ]] || _zsh_highlight_cursor_moved || _zsh_highlight_buffer_modified\n}\n\n# Brackets highlighting function.\n_zsh_highlight_highlighter_brackets_paint()\n{\n  local char style\n  local -i bracket_color_size=${#ZSH_HIGHLIGHT_STYLES[(I)bracket-level-*]} buflen=${#BUFFER} level=0 matchingpos pos\n  local -A levelpos lastoflevel matching\n\n  # Find all brackets and remember which one is matching\n  for (( pos = 1; pos <= buflen; pos++ )) ; do\n    char=$BUFFER[pos]\n    case $char in\n      [\"([{\"])\n        levelpos[$pos]=$((++level))\n        lastoflevel[$level]=$pos\n        ;;\n      [\")]}\"])\n        matchingpos=$lastoflevel[$level]\n        levelpos[$pos]=$((level--))\n\tif _zsh_highlight_brackets_match $matchingpos $pos; then\n          matching[$matchingpos]=$pos\n          matching[$pos]=$matchingpos\n        fi\n        ;;\n      ['\"'\\'])\n        # Skip everything inside quotes\n\tpos=$BUFFER[(ib:pos+1:)$char]\n        ;;\n    esac\n  done\n\n  # Now highlight all found brackets\n  for pos in ${(k)levelpos}; do\n    if (( $+matching[$pos] )); then\n      if (( bracket_color_size )); then\n        style=bracket-level-$(( (levelpos[$pos] - 1) % bracket_color_size + 1 ))\n      fi\n    else\n      style=bracket-error\n    fi\n    _zsh_highlight_add_highlight $((pos - 1)) $pos $style\n  done\n\n  # If cursor is on a bracket, then highlight corresponding bracket, if any.\n  if [[ $WIDGET != zle-line-finish ]]; then\n    pos=$((CURSOR + 1))\n    if [[ -n $levelpos[$pos] ]] && [[ -n $matching[$pos] ]]; then\n      local -i otherpos=$matching[$pos]\n      _zsh_highlight_add_highlight $((otherpos - 1)) $otherpos cursor-matchingbracket\n    fi\n  fi\n}\n\n# Helper function to differentiate type \n_zsh_highlight_brackets_match()\n{\n  case $BUFFER[$1] in\n    \\() [[ $BUFFER[$2] == \\) ]];;\n    \\[) [[ $BUFFER[$2] == \\] ]];;\n    \\{) [[ $BUFFER[$2] == \\} ]];;\n    *) false;;\n  esac\n}\n"
  },
  {
    "path": ".config/zsh/syntax/highlighters/cursor/cursor-highlighter.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n\n# Define default styles.\n: ${ZSH_HIGHLIGHT_STYLES[cursor]:=standout}\n\n# Whether the cursor highlighter should be called or not.\n_zsh_highlight_highlighter_cursor_predicate()\n{\n  # remove cursor highlighting when the line is finished\n  [[ $WIDGET == zle-line-finish ]] || _zsh_highlight_cursor_moved\n}\n\n# Cursor highlighting function.\n_zsh_highlight_highlighter_cursor_paint()\n{\n  [[ $WIDGET == zle-line-finish ]] && return\n  \n  _zsh_highlight_add_highlight $CURSOR $(( $CURSOR + 1 )) cursor\n}\n"
  },
  {
    "path": ".config/zsh/syntax/highlighters/line/line-highlighter.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n\n# Define default styles.\n: ${ZSH_HIGHLIGHT_STYLES[line]:=}\n\n# Whether the root highlighter should be called or not.\n_zsh_highlight_highlighter_line_predicate()\n{\n  _zsh_highlight_buffer_modified\n}\n\n# root highlighting function.\n_zsh_highlight_highlighter_line_paint()\n{\n  _zsh_highlight_add_highlight 0 $#BUFFER line\n}\n"
  },
  {
    "path": ".config/zsh/syntax/highlighters/main/main-highlighter.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2016 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n\n# Define default styles.\n: ${ZSH_HIGHLIGHT_STYLES[default]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[unknown-token]:=fg=red,bold}\n: ${ZSH_HIGHLIGHT_STYLES[reserved-word]:=fg=yellow}\n: ${ZSH_HIGHLIGHT_STYLES[suffix-alias]:=fg=green,underline}\n: ${ZSH_HIGHLIGHT_STYLES[precommand]:=fg=green,underline}\n: ${ZSH_HIGHLIGHT_STYLES[commandseparator]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[path]:=underline}\n: ${ZSH_HIGHLIGHT_STYLES[path_pathseparator]:=}\n: ${ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]:=}\n: ${ZSH_HIGHLIGHT_STYLES[globbing]:=fg=blue}\n: ${ZSH_HIGHLIGHT_STYLES[history-expansion]:=fg=blue}\n: ${ZSH_HIGHLIGHT_STYLES[single-hyphen-option]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[double-hyphen-option]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[back-quoted-argument]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[single-quoted-argument]:=fg=yellow}\n: ${ZSH_HIGHLIGHT_STYLES[double-quoted-argument]:=fg=yellow}\n: ${ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]:=fg=yellow}\n: ${ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]:=fg=cyan}\n: ${ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]:=fg=cyan}\n: ${ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]:=fg=cyan}\n: ${ZSH_HIGHLIGHT_STYLES[assign]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[redirection]:=none}\n: ${ZSH_HIGHLIGHT_STYLES[comment]:=fg=black,bold}\n: ${ZSH_HIGHLIGHT_STYLES[arg0]:=fg=green}\n\n# Whether the highlighter should be called or not.\n_zsh_highlight_highlighter_main_predicate()\n{\n  # may need to remove path_prefix highlighting when the line ends\n  [[ $WIDGET == zle-line-finish ]] || _zsh_highlight_buffer_modified\n}\n\n# Helper to deal with tokens crossing line boundaries.\n_zsh_highlight_main_add_region_highlight() {\n  integer start=$1 end=$2\n  shift 2\n\n  if (( $+argv[2] )); then\n    # Caller specified inheritance explicitly.\n  else\n    # Automate inheritance.\n    typeset -A fallback_of; fallback_of=(\n        alias arg0\n        suffix-alias arg0\n        builtin arg0\n        function arg0\n        command arg0\n        precommand arg0\n        hashed-command arg0\n        \n        path_prefix path\n        # The path separator fallback won't ever be used, due to the optimisation\n        # in _zsh_highlight_main_highlighter_highlight_path_separators().\n        path_pathseparator path\n        path_prefix_pathseparator path_prefix\n    )\n    local needle=$1 value\n    while [[ -n ${value::=$fallback_of[$needle]} ]]; do\n      unset \"fallback_of[$needle]\" # paranoia against infinite loops\n      argv+=($value)\n      needle=$value\n    done\n  fi\n\n  # The calculation was relative to $PREBUFFER$BUFFER, but region_highlight is\n  # relative to $BUFFER.\n  (( start -= $#PREBUFFER ))\n  (( end -= $#PREBUFFER ))\n\n  (( end < 0 )) && return # having end<0 would be a bug\n  (( start < 0 )) && start=0 # having start<0 is normal with e.g. multiline strings\n  _zsh_highlight_add_highlight $start $end \"$@\"\n}\n\n# Get the type of a command.\n#\n# Uses the zsh/parameter module if available to avoid forks, and a\n# wrapper around 'type -w' as fallback.\n#\n# Takes a single argument.\n#\n# The result will be stored in REPLY.\n_zsh_highlight_main__type() {\n  if (( $+_zsh_highlight_main__command_type_cache )); then\n    REPLY=$_zsh_highlight_main__command_type_cache[(e)$1]\n    if [[ -n \"$REPLY\" ]]; then\n      return\n    fi\n  fi\n  if (( $#options_to_set )); then\n    setopt localoptions $options_to_set;\n  fi\n  unset REPLY\n  if zmodload -e zsh/parameter; then\n    if (( $+aliases[(e)$1] )); then\n      REPLY=alias\n    elif (( $+saliases[(e)${1##*.}] )); then\n      REPLY='suffix alias'\n    elif (( $reswords[(Ie)$1] )); then\n      REPLY=reserved\n    elif (( $+functions[(e)$1] )); then\n      REPLY=function\n    elif (( $+builtins[(e)$1] )); then\n      REPLY=builtin\n    elif (( $+commands[(e)$1] )); then\n      REPLY=command\n    # zsh 5.2 and older have a bug whereby running 'type -w ./sudo' implicitly\n    # runs 'hash ./sudo=/usr/local/bin/./sudo' (assuming /usr/local/bin/sudo\n    # exists and is in $PATH).  Avoid triggering the bug, at the expense of\n    # falling through to the $() below, incurring a fork.  (Issue #354.)\n    #\n    # The first disjunct mimics the isrelative() C call from the zsh bug.\n    elif {  [[ $1 != */* ]] || is-at-least 5.3 } &&\n         ! builtin type -w -- $1 >/dev/null 2>&1; then\n      REPLY=none\n    fi\n  fi\n  if ! (( $+REPLY )); then\n    REPLY=\"${$(LC_ALL=C builtin type -w -- $1 2>/dev/null)##*: }\"\n  fi\n  if (( $+_zsh_highlight_main__command_type_cache )); then\n    _zsh_highlight_main__command_type_cache[(e)$1]=$REPLY\n  fi\n}\n\n# Check whether the first argument is a redirection operator token.\n# Report result via the exit code.\n_zsh_highlight_main__is_redirection() {\n  # A redirection operator token:\n  # - starts with an optional single-digit number;\n  # - then, has a '<' or '>' character;\n  # - is not a process substitution [<(...) or >(...)].\n  [[ $1 == (<0-9>|)(\\<|\\>)* ]] && [[ $1 != (\\<|\\>)$'\\x28'* ]]\n}\n\n# Resolve alias.\n#\n# Takes a single argument.\n#\n# The result will be stored in REPLY.\n_zsh_highlight_main__resolve_alias() {\n  if zmodload -e zsh/parameter; then\n    REPLY=${aliases[$arg]}\n  else\n    REPLY=\"${\"$(alias -- $arg)\"#*=}\"\n  fi\n}\n\n# Check that the top of $braces_stack has the expected value.  If it does, set\n# the style according to $2; otherwise, set style=unknown-token.\n#\n# $1: character expected to be at the top of $braces_stack\n# $2: assignment to execute it if matches\n_zsh_highlight_main__stack_pop() {\n  if [[ $braces_stack[1] == $1 ]]; then\n    braces_stack=${braces_stack:1}\n    eval \"$2\"\n  else\n    style=unknown-token\n  fi\n}\n\n# Main syntax highlighting function.\n_zsh_highlight_highlighter_main_paint()\n{\n  ## Before we even 'emulate -L', we must test a few options that would reset.\n  if [[ -o interactive_comments ]]; then\n    local interactive_comments= # set to empty\n  fi\n  if [[ -o ignore_braces ]] || eval '[[ -o ignore_close_braces ]] 2>/dev/null'; then\n    local right_brace_is_recognised_everywhere=false\n  else\n    local right_brace_is_recognised_everywhere=true\n  fi\n  if [[ -o path_dirs ]]; then\n    integer path_dirs_was_set=1\n  else\n    integer path_dirs_was_set=0\n  fi\n  if [[ -o multi_func_def ]]; then\n    integer multi_func_def=1\n  else\n    integer multi_func_def=0\n  fi\n  emulate -L zsh\n  setopt localoptions extendedglob bareglobqual\n\n  # At the PS3 prompt and in vared, highlight nothing.\n  #\n  # (We can't check this in _zsh_highlight_highlighter_main_predicate because\n  # if the predicate returns false, the previous value of region_highlight\n  # would be reused.)\n  if [[ $CONTEXT == (select|vared) ]]; then\n    return\n  fi\n\n  ## Variable declarations and initializations\n  local start_pos=0 end_pos highlight_glob=true arg style\n  local in_array_assignment=false # true between 'a=(' and the matching ')'\n  typeset -a ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR\n  typeset -a ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS\n  typeset -a ZSH_HIGHLIGHT_TOKENS_CONTROL_FLOW\n  local -a options_to_set # used in callees\n  local buf=\"$PREBUFFER$BUFFER\"\n  integer len=\"${#buf}\"\n  integer pure_buf_len=$(( len - ${#PREBUFFER} ))   # == $#BUFFER, used e.g. in *_check_path\n\n  # \"R\" for round\n  # \"Q\" for square\n  # \"Y\" for curly\n  # \"D\" for do/done\n  # \"$\" for 'end' (matches 'foreach' always; also used with cshjunkiequotes in repeat/while)\n  # \"?\" for 'if'/'fi'; also checked by 'elif'/'else'\n  # \":\" for 'then'\n  local braces_stack\n\n  if (( path_dirs_was_set )); then\n    options_to_set+=( PATH_DIRS )\n  fi\n  unset path_dirs_was_set\n\n  ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR=(\n    '|' '||' ';' '&' '&&'\n    '|&'\n    '&!' '&|'\n    # ### 'case' syntax, but followed by a pattern, not by a command\n    # ';;' ';&' ';|'\n  )\n  ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS=(\n    'builtin' 'command' 'exec' 'nocorrect' 'noglob'\n    'pkexec' # immune to #121 because it's usually not passed --option flags\n  )\n\n  # Tokens that, at (naively-determined) \"command position\", are followed by\n  # a de jure command position.  All of these are reserved words.\n  ZSH_HIGHLIGHT_TOKENS_CONTROL_FLOW=(\n    $'\\x7b' # block\n    $'\\x28' # subshell\n    '()' # anonymous function\n    'while'\n    'until'\n    'if'\n    'then'\n    'elif'\n    'else'\n    'do'\n    'time'\n    'coproc'\n    '!' # reserved word; unrelated to $histchars[1]\n  )\n\n  local -a match mbegin mend\n\n  # State machine\n  #\n  # The states are:\n  # - :start:      Command word\n  # - :sudo_opt:   A leading-dash option to sudo (such as \"-u\" or \"-i\")\n  # - :sudo_arg:   The argument to a sudo leading-dash option that takes one,\n  #                when given as a separate word; i.e., \"foo\" in \"-u foo\" (two\n  #                words) but not in \"-ufoo\" (one word).\n  # - :regular:    \"Not a command word\", and command delimiters are permitted.\n  #                Mainly used to detect premature termination of commands.\n  # - :always:     The word 'always' in the «{ foo } always { bar }» syntax.\n  #\n  # When the kind of a word is not yet known, $this_word / $next_word may contain\n  # multiple states.  For example, after \"sudo -i\", the next word may be either\n  # another --flag or a command name, hence the state would include both :start:\n  # and :sudo_opt:.\n  #\n  # The tokens are always added with both leading and trailing colons to serve as\n  # word delimiters (an improvised array); [[ $x == *:foo:* ]] and x=${x//:foo:/} \n  # will DTRT regardless of how many elements or repetitions $x has..\n  #\n  # Handling of redirections: upon seeing a redirection token, we must stall\n  # the current state --- that is, the value of $this_word --- for two iterations\n  # (one for the redirection operator, one for the word following it representing\n  # the redirection target).  Therefore, we set $in_redirection to 2 upon seeing a\n  # redirection operator, decrement it each iteration, and stall the current state\n  # when it is non-zero.  Thus, upon reaching the next word (the one that follows\n  # the redirection operator and target), $this_word will still contain values\n  # appropriate for the word immediately following the word that preceded the\n  # redirection operator.\n  #\n  # The \"the previous word was a redirection operator\" state is not communicated\n  # to the next iteration via $next_word/$this_word as usual, but via\n  # $in_redirection.  The value of $next_word from the iteration that processed\n  # the operator is discarded.\n  #\n  local this_word=':start:' next_word\n  integer in_redirection\n  # Processing buffer\n  local proc_buf=\"$buf\"\n  for arg in ${interactive_comments-${(z)buf}} \\\n             ${interactive_comments+${(zZ+c+)buf}}; do\n    # Initialize $next_word.\n    if (( in_redirection )); then\n      (( --in_redirection ))\n    fi\n    if (( in_redirection == 0 )); then\n      # Initialize $next_word to its default value.\n      next_word=':regular:'\n    else\n      # Stall $next_word.\n    fi\n\n    # Initialize per-\"simple command\" [zshmisc(1)] variables:\n    #\n    #   $already_added       (see next paragraph)\n    #   $style               how to highlight $arg\n    #   $in_array_assignment boolean flag for \"between '(' and ')' of array assignment\"\n    #   $highlight_glob      boolean flag for \"'noglob' is in effect\"\n    #\n    # $already_added is set to 1 to disable adding an entry to region_highlight\n    # for this iteration.  Currently, that is done for \"\" and $'' strings,\n    # which add the entry early so escape sequences within the string override\n    # the string's color.\n    integer already_added=0\n    style=unknown-token\n    if [[ $this_word == *':start:'* ]]; then\n      in_array_assignment=false\n      if [[ $arg == 'noglob' ]]; then\n        highlight_glob=false\n      fi\n    fi\n\n    # Compute the new $start_pos and $end_pos, skipping over whitespace in $buf.\n    if [[ $arg == ';' ]] ; then\n      # We're looking for either a semicolon or a newline, whichever comes\n      # first.  Both of these are rendered as a \";\" (SEPER) by the ${(z)..}\n      # flag.\n      #\n      # We can't use the (Z+n+) flag because that elides the end-of-command\n      # token altogether, so 'echo foo\\necho bar' (two commands) becomes\n      # indistinguishable from 'echo foo echo bar' (one command with three\n      # words for arguments).\n      local needle=$'[;\\n]'\n      integer offset=$(( ${proc_buf[(i)$needle]} - 1 ))\n      (( start_pos += offset ))\n      (( end_pos = start_pos + $#arg ))\n    else\n      # The line was:\n      #\n      # integer offset=$(((len-start_pos)-${#${proc_buf##([[:space:]]|\\\\[[:space:]])#}}))\n      #\n      # - len-start_pos is length of current proc_buf; basically: initial length minus where\n      #   we are, and proc_buf is chopped to the \"where we are\" (compare the \"previous value\n      #   of start_pos\" below, and the len-(start_pos-offset) = len-start_pos+offset)\n      # - what's after main minus sign is: length of proc_buf without spaces at the beginning\n      # - so what the line actually did, was computing length of the spaces!\n      # - this can be done via (#b) flag, like below\n      if [[ \"$proc_buf\" = (#b)(#s)(([[:space:]]|\\\\[[:space:]])##)* ]]; then\n          # The first, outer parenthesis\n          integer offset=\"${#match[1]}\"\n      else\n          integer offset=0\n      fi\n      ((start_pos+=offset))\n      ((end_pos=$start_pos+${#arg}))\n    fi\n\n    # Compute the new $proc_buf. We advance it\n    # (chop off characters from the beginning)\n    # beyond what end_pos points to, by skipping\n    # as many characters as end_pos was advanced.\n    #\n    # end_pos was advanced by $offset (via start_pos)\n    # and by $#arg. Note the `start_pos=$end_pos`\n    # below.\n    #\n    # As for the [,len]. We could use [,len-start_pos+offset]\n    # here, but to make it easier on eyes, we use len and\n    # rely on the fact that Zsh simply handles that. The\n    # length of proc_buf is len-start_pos+offset because\n    # we're chopping it to match current start_pos, so its\n    # length matches the previous value of start_pos.\n    #\n    # Why [,-1] is slower than [,length] isn't clear.\n    proc_buf=\"${proc_buf[offset + $#arg + 1,len]}\"\n\n    # Handle the INTERACTIVE_COMMENTS option.\n    #\n    # We use the (Z+c+) flag so the entire comment is presented as one token in $arg.\n    if [[ -n ${interactive_comments+'set'} && $arg[1] == $histchars[3] ]]; then\n      if [[ $this_word == *(':regular:'|':start:')* ]]; then\n        style=comment\n      else\n        style=unknown-token # prematurely terminated\n      fi\n      _zsh_highlight_main_add_region_highlight $start_pos $end_pos $style\n      already_added=1\n      start_pos=$end_pos\n      continue\n    fi\n\n    # Analyse the current word.\n    if _zsh_highlight_main__is_redirection $arg ; then\n      # A '<' or '>', possibly followed by a digit\n      in_redirection=2\n    fi\n\n    # Special-case the first word after 'sudo'.\n    if (( ! in_redirection )); then\n      if [[ $this_word == *':sudo_opt:'* ]] && [[ $arg != -* ]]; then\n        this_word=${this_word//:sudo_opt:/}\n      fi\n    fi\n\n    # Parse the sudo command line\n    if (( ! in_redirection )); then\n      if [[ $this_word == *':sudo_opt:'* ]]; then\n        case \"$arg\" in\n          # Flag that requires an argument\n          '-'[Cgprtu]) this_word=${this_word//:start:/};\n                       next_word=':sudo_arg:';;\n          # This prevents misbehavior with sudo -u -otherargument\n          '-'*)        this_word=${this_word//:start:/};\n                       next_word+=':start:';\n                       next_word+=':sudo_opt:';;\n          *)           ;;\n        esac\n      elif [[ $this_word == *':sudo_arg:'* ]]; then\n        next_word+=':sudo_opt:'\n        next_word+=':start:'\n      fi\n   fi\n\n   # The Great Fork: is this a command word?  Is this a non-command word?\n   if [[ $this_word == *':always:'* && $arg == 'always' ]]; then\n     # try-always construct\n     style=reserved-word # de facto a reserved word, although not de jure\n     next_word=':start:'\n   elif [[ $this_word == *':start:'* ]] && (( in_redirection == 0 )); then # $arg is the command word\n     if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS:#\"$arg\"} ]]; then\n      style=precommand\n     elif [[ \"$arg\" = \"sudo\" ]]; then\n      style=precommand\n      next_word=${next_word//:regular:/}\n      next_word+=':sudo_opt:'\n      next_word+=':start:'\n     else\n      _zsh_highlight_main_highlighter_expand_path $arg\n      local expanded_arg=\"$REPLY\"\n      _zsh_highlight_main__type ${expanded_arg}\n      local res=\"$REPLY\"\n      () {\n        # Special-case: command word is '$foo', like that, without braces or anything.\n        #\n        # That's not entirely correct --- if the parameter's value happens to be a reserved\n        # word, the parameter expansion will be highlighted as a reserved word --- but that\n        # incorrectness is outweighed by the usability improvement of permitting the use of\n        # parameters that refer to commands, functions, and builtins.\n        local -a match mbegin mend\n        local MATCH; integer MBEGIN MEND\n        if [[ $res == none ]] && (( ${+parameters} )) &&\n           [[ ${arg[1]} == \\$ ]] && [[ ${arg:1} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+)$ ]] &&\n           (( ${+parameters[${MATCH}]} ))\n           then\n          _zsh_highlight_main__type ${(P)MATCH}\n          res=$REPLY\n        fi\n      }\n      case $res in\n        reserved)       # reserved word\n                        style=reserved-word\n                        case $arg in\n                          ($'\\x7b')\n                            braces_stack='Y'\"$braces_stack\"\n                            ;;\n                          ($'\\x7d')\n                            # We're at command word, so no need to check $right_brace_is_recognised_everywhere\n                            _zsh_highlight_main__stack_pop 'Y' style=reserved-word\n                            if [[ $style == reserved-word ]]; then\n                              next_word+=':always:'\n                            fi\n                            ;;\n                          ('do')\n                            braces_stack='D'\"$braces_stack\"\n                            ;;\n                          ('done')\n                            _zsh_highlight_main__stack_pop 'D' style=reserved-word\n                            ;;\n                          ('if')\n                            braces_stack=':?'\"$braces_stack\"\n                            ;;\n                          ('then')\n                            _zsh_highlight_main__stack_pop ':' style=reserved-word\n                            ;;\n                          ('elif')\n                            if [[ ${braces_stack[1]} == '?' ]]; then\n                              braces_stack=':'\"$braces_stack\"\n                            else\n                              style=unknown-token\n                            fi\n                            ;;\n                          ('else')\n                            if [[ ${braces_stack[1]} == '?' ]]; then\n                              :\n                            else\n                              style=unknown-token\n                            fi\n                            ;;\n                          ('fi')\n                            _zsh_highlight_main__stack_pop '?' \"\"\n                            ;;\n                          ('foreach')\n                            braces_stack='$'\"$braces_stack\"\n                            ;;\n                          ('end')\n                            _zsh_highlight_main__stack_pop '$' style=reserved-word\n                            ;;\n                        esac\n                        ;;\n        'suffix alias') style=suffix-alias;;\n        alias)          () {\n                          integer insane_alias\n                          case $arg in \n                            # Issue #263: aliases with '=' on their LHS.\n                            #\n                            # There are three cases:\n                            #\n                            # - Unsupported, breaks 'alias -L' output, but invokable:\n                            ('='*) :;;\n                            # - Unsupported, not invokable:\n                            (*'='*) insane_alias=1;;\n                            # - The common case:\n                            (*) :;;\n                          esac\n                          if (( insane_alias )); then\n                            style=unknown-token\n                          else\n                            style=alias\n                            _zsh_highlight_main__resolve_alias $arg\n                            local alias_target=\"$REPLY\"\n                            [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS:#\"$alias_target\"} && -z ${(M)ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS:#\"$arg\"} ]] && ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS+=($arg)\n                          fi\n                        }\n                        ;;\n        builtin)        style=builtin;;\n        function)       style=function;;\n        command)        style=command;;\n        hashed)         style=hashed-command;;\n        none)           if _zsh_highlight_main_highlighter_check_assign; then\n                          style=assign\n                          if [[ $arg[-1] == '(' ]]; then\n                            in_array_assignment=true\n                          else\n                            # assignment to a scalar parameter.\n                            # (For array assignments, the command doesn't start until the \")\" token.)\n                            next_word+=':start:'\n                          fi\n                        elif [[ $arg[0,1] = $histchars[0,1] ]] && (( $#arg[0,2] == 2 )); then\n                          style=history-expansion\n                        elif [[ $arg[0,1] == $histchars[2,2] ]]; then\n                          style=history-expansion\n                        elif [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#\"$arg\"} ]]; then\n                          if [[ $this_word == *':regular:'* ]]; then\n                            # This highlights empty commands (semicolon follows nothing) as an error.\n                            # Zsh accepts them, though.\n                            style=commandseparator\n                          else\n                            style=unknown-token\n                          fi\n                        elif (( in_redirection == 2 )); then\n                          style=redirection\n                        elif [[ $arg[1,2] == '((' ]]; then\n                          # Arithmetic evaluation.\n                          #\n                          # Note: prior to zsh-5.1.1-52-g4bed2cf (workers/36669), the ${(z)...}\n                          # splitter would only output the '((' token if the matching '))' had\n                          # been typed.  Therefore, under those versions of zsh, BUFFER=\"(( 42\"\n                          # would be highlighted as an error until the matching \"))\" are typed.\n                          #\n                          # We highlight just the opening parentheses, as a reserved word; this\n                          # is how [[ ... ]] is highlighted, too.\n                          style=reserved-word\n                          _zsh_highlight_main_add_region_highlight $start_pos $((start_pos + 2)) $style\n                          already_added=1\n                          if [[ $arg[-2,-1] == '))' ]]; then\n                            _zsh_highlight_main_add_region_highlight $((end_pos - 2)) $end_pos $style\n                            already_added=1\n                          fi\n                        elif [[ $arg == '()' ]]; then\n                          # anonymous function\n                          style=reserved-word\n                        elif [[ $arg == $'\\x28' ]]; then\n                          # subshell\n                          style=reserved-word\n                          braces_stack='R'\"$braces_stack\"\n                        elif [[ $arg == $'\\x29' ]]; then\n                          # end of subshell\n                          _zsh_highlight_main__stack_pop 'R' style=reserved-word\n                        else\n                          if _zsh_highlight_main_highlighter_check_path; then\n                            style=$REPLY\n                          else\n                            style=unknown-token\n                          fi\n                        fi\n                        ;;\n        *)              _zsh_highlight_main_add_region_highlight $start_pos $end_pos arg0_$res arg0\n                        already_added=1\n                        ;;\n      esac\n     fi\n   fi\n   if (( ! already_added )) && [[ $style == unknown-token ]] && # not handled by the 'command word' codepath\n      { (( in_redirection )) || [[ $this_word == *':regular:'* ]] || [[ $this_word == *':sudo_opt:'* ]] || [[ $this_word == *':sudo_arg:'* ]] }\n   then # $arg is a non-command word\n      case $arg in\n        $'\\x29') # subshell or end of array assignment\n                 if $in_array_assignment; then\n                   style=assign\n                   in_array_assignment=false\n                   next_word+=':start:'\n                 else\n                   _zsh_highlight_main__stack_pop 'R' style=reserved-word\n                 fi;;\n        $'\\x28\\x29') # possibly a function definition\n                 if (( multi_func_def )) || false # TODO: or if the previous word was a command word\n                 then\n                   next_word+=':start:'\n                 fi\n                 style=reserved-word\n                 ;;\n        $'\\x7d') # right brace\n                 #\n                 # Parsing rule: # {\n                 #\n                 #     Additionally, `tt(})' is recognized in any position if neither the\n                 #     tt(IGNORE_BRACES) option nor the tt(IGNORE_CLOSE_BRACES) option is set.\"\"\"\n                 if $right_brace_is_recognised_everywhere; then\n                   _zsh_highlight_main__stack_pop 'Y' style=reserved-word\n                   if [[ $style == reserved-word ]]; then\n                     next_word+=':always:'\n                   fi\n                 else\n                   # Fall through to the catchall case at the end.\n                 fi\n                 ;|\n        '--'*)   style=double-hyphen-option;;\n        '-'*)    style=single-hyphen-option;;\n        \"'\"*)    style=single-quoted-argument;;\n        '\"'*)    style=double-quoted-argument\n                 _zsh_highlight_main_add_region_highlight $start_pos $end_pos $style\n                 _zsh_highlight_main_highlighter_highlight_string\n                 already_added=1\n                 ;;\n        \\$\\'*)   style=dollar-quoted-argument\n                 _zsh_highlight_main_add_region_highlight $start_pos $end_pos $style\n                 _zsh_highlight_main_highlighter_highlight_dollar_string\n                 already_added=1\n                 ;;\n        '`'*)    style=back-quoted-argument;;\n        [$][*])  style=default;;\n        [*?]*|*[^\\\\][*?]*)\n                 $highlight_glob && style=globbing || style=default;;\n        *)       if false; then\n                 elif [[ $arg = $'\\x7d' ]] && $right_brace_is_recognised_everywhere; then\n                   # was handled by the $'\\x7d' case above\n                 elif [[ $arg[0,1] = $histchars[0,1] ]] && (( $#arg[0,2] == 2 )); then\n                   style=history-expansion\n                 elif [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#\"$arg\"} ]]; then\n                   if [[ $this_word == *':regular:'* ]]; then\n                     style=commandseparator\n                   else\n                     style=unknown-token\n                   fi\n                 elif (( in_redirection == 2 )); then\n                   style=redirection\n                 else\n                   if _zsh_highlight_main_highlighter_check_path; then\n                     style=$REPLY\n                   else\n                     style=default\n                   fi\n                 fi\n                 ;;\n      esac\n    fi\n    if ! (( already_added )); then\n      _zsh_highlight_main_add_region_highlight $start_pos $end_pos $style\n      [[ $style == path || $style == path_prefix ]] && _zsh_highlight_main_highlighter_highlight_path_separators\n    fi\n    if [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR:#\"$arg\"} ]]; then\n      if [[ $arg == ';' ]] && $in_array_assignment; then\n        # literal newline inside an array assignment\n        next_word=':regular:'\n      else\n        next_word=':start:'\n        highlight_glob=true\n      fi\n    elif\n       [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_CONTROL_FLOW:#\"$arg\"} && $this_word == *':start:'* ]] ||\n       [[ -n ${(M)ZSH_HIGHLIGHT_TOKENS_PRECOMMANDS:#\"$arg\"} && $this_word == *':start:'* ]]; then\n      next_word=':start:'\n    elif [[ $arg == \"repeat\" && $this_word == *':start:'* ]]; then\n      # skip the repeat-count word\n      in_redirection=2\n      # The redirection mechanism assumes $this_word describes the word\n      # following the redirection.  Make it so.\n      #\n      # That word can be a command word with shortloops (`repeat 2 ls`)\n      # or a command separator (`repeat 2; ls` or `repeat 2; do ls; done`).\n      #\n      # The repeat-count word will be handled like a redirection target.\n      this_word=':start::regular:'\n    fi\n    start_pos=$end_pos\n    if (( in_redirection == 0 )); then\n      # This is the default/common codepath.\n      this_word=$next_word\n    else\n      # Stall $this_word.\n    fi\n  done\n}\n\n# Check if $arg is variable assignment\n_zsh_highlight_main_highlighter_check_assign()\n{\n    setopt localoptions extended_glob\n    [[ $arg == [[:alpha:]_][[:alnum:]_]#(|\\[*\\])(|[+])=* ]] ||\n      [[ $arg == [0-9]##(|[+])=* ]]\n}\n\n_zsh_highlight_main_highlighter_highlight_path_separators()\n{\n  local pos style_pathsep\n  style_pathsep=${style}_pathseparator\n  [[ -z \"$ZSH_HIGHLIGHT_STYLES[$style_pathsep]\" || \"$ZSH_HIGHLIGHT_STYLES[$style]\" == \"$ZSH_HIGHLIGHT_STYLES[$style_pathsep]\" ]] && return 0\n  for (( pos = start_pos; $pos <= end_pos; pos++ )) ; do\n    if [[ $BUFFER[pos] == / ]]; then\n      _zsh_highlight_main_add_region_highlight $((pos - 1)) $pos $style_pathsep\n    fi\n  done\n}\n\n# Check if $arg is a path.\n# If yes, return 0 and in $REPLY the style to use.\n# Else, return non-zero (and the contents of $REPLY is undefined).\n_zsh_highlight_main_highlighter_check_path()\n{\n  _zsh_highlight_main_highlighter_expand_path $arg;\n  local expanded_path=\"$REPLY\"\n\n  REPLY=path\n\n  [[ -z $expanded_path ]] && return 1\n  [[ -L $expanded_path ]] && return 0\n  [[ -e $expanded_path ]] && return 0\n\n  # Search the path in CDPATH\n  local cdpath_dir\n  for cdpath_dir in $cdpath ; do\n    [[ -e \"$cdpath_dir/$expanded_path\" ]] && return 0\n  done\n\n  # If dirname($arg) doesn't exist, neither does $arg.\n  [[ ! -d ${expanded_path:h} ]] && return 1\n\n  # If this word ends the buffer, check if it's the prefix of a valid path.\n  if [[ ${BUFFER[1]} != \"-\" && $pure_buf_len == $end_pos ]] &&\n     [[ $WIDGET != zle-line-finish ]]; then\n    local -a tmp\n    tmp=( ${expanded_path}*(N) )\n    (( $#tmp > 0 )) && REPLY=path_prefix && return 0\n  fi\n\n  # It's not a path.\n  return 1\n}\n\n# Highlight special chars inside double-quoted strings\n_zsh_highlight_main_highlighter_highlight_string()\n{\n  setopt localoptions noksharrays\n  local -a match mbegin mend\n  local MATCH; integer MBEGIN MEND\n  local i j k style\n  # Starting quote is at 1, so start parsing at offset 2 in the string.\n  for (( i = 2 ; i < end_pos - start_pos ; i += 1 )) ; do\n    (( j = i + start_pos - 1 ))\n    (( k = j + 1 ))\n    case \"$arg[$i]\" in\n      '$' ) style=dollar-double-quoted-argument\n            # Look for an alphanumeric parameter name.\n            if [[ ${arg:$i} =~ ^([A-Za-z_][A-Za-z0-9_]*|[0-9]+) ]] ; then\n              (( k += $#MATCH )) # highlight the parameter name\n              (( i += $#MATCH )) # skip past it\n            elif [[ ${arg:$i} =~ ^[{]([A-Za-z_][A-Za-z0-9_]*|[0-9]+)[}] ]] ; then\n              (( k += $#MATCH )) # highlight the parameter name and braces\n              (( i += $#MATCH )) # skip past it\n            elif [[ $arg[i+1] == '$' ]]; then\n              # $$ - pid\n              (( k += 1 )) # highlight both dollar signs\n              (( i += 1 )) # don't consider the second one as introducing another parameter expansion\n            elif [[ $arg[i+1] == [-#*@?] ]]; then\n              # $#, $*, $@, $?, $- - like $$ above\n              (( k += 1 )) # highlight both dollar signs\n              (( i += 1 )) # don't consider the second one as introducing another parameter expansion\n            elif [[ $arg[i+1] == $'\\x28' ]]; then\n              # Highlight just the '$'.\n            else\n              continue\n            fi\n            ;;\n      \"\\\\\") style=back-double-quoted-argument\n            if [[ \\\\\\`\\\"\\$${histchars[1]} == *$arg[$i+1]* ]]; then\n              (( k += 1 )) # Color following char too.\n              (( i += 1 )) # Skip parsing the escaped char.\n            else\n              continue\n            fi\n            ;;\n      ($histchars[1]) # ! - may be a history expansion\n            if [[ $arg[i+1] != ('='|$'\\x28'|$'\\x7b'|[[:blank:]]) ]]; then\n              style=history-expansion\n            else\n              continue\n            fi\n            ;;\n      *) continue ;;\n\n    esac\n    _zsh_highlight_main_add_region_highlight $j $k $style\n  done\n}\n\n# Highlight special chars inside dollar-quoted strings\n_zsh_highlight_main_highlighter_highlight_dollar_string()\n{\n  setopt localoptions noksharrays\n  local -a match mbegin mend\n  local MATCH; integer MBEGIN MEND\n  local i j k style\n  local AA\n  integer c\n  # Starting dollar-quote is at 1:2, so start parsing at offset 3 in the string.\n  for (( i = 3 ; i < end_pos - start_pos ; i += 1 )) ; do\n    (( j = i + start_pos - 1 ))\n    (( k = j + 1 ))\n    case \"$arg[$i]\" in\n      \"\\\\\") style=back-dollar-quoted-argument\n            for (( c = i + 1 ; c <= end_pos - start_pos ; c += 1 )); do\n              [[ \"$arg[$c]\" != ([0-9xXuUa-fA-F]) ]] && break\n            done\n            AA=$arg[$i+1,$c-1]\n            # Matching for HEX and OCT values like \\0xA6, \\xA6 or \\012\n            if [[    \"$AA\" =~ \"^(x|X)[0-9a-fA-F]{1,2}\"\n                  || \"$AA\" =~ \"^[0-7]{1,3}\"\n                  || \"$AA\" =~ \"^u[0-9a-fA-F]{1,4}\"\n                  || \"$AA\" =~ \"^U[0-9a-fA-F]{1,8}\"\n               ]]; then\n              (( k += $#MATCH ))\n              (( i += $#MATCH ))\n            else\n              if (( $#arg > $i+1 )) && [[ $arg[$i+1] == [xXuU] ]]; then\n                # \\x not followed by hex digits is probably an error\n                style=unknown-token\n              fi\n              (( k += 1 )) # Color following char too.\n              (( i += 1 )) # Skip parsing the escaped char.\n            fi\n            ;;\n      *) continue ;;\n\n    esac\n    _zsh_highlight_main_add_region_highlight $j $k $style\n  done\n}\n\n# Called with a single positional argument.\n# Perform filename expansion (tilde expansion) on the argument and set $REPLY to the expanded value.\n#\n# Does not perform filename generation (globbing).\n_zsh_highlight_main_highlighter_expand_path()\n{\n  (( $# == 1 )) || print -r -- >&2 \"zsh-syntax-highlighting: BUG: _zsh_highlight_main_highlighter_expand_path: called without argument\"\n\n  # The $~1 syntax normally performs filename generation, but not when it's on the right-hand side of ${x:=y}.\n  setopt localoptions nonomatch\n  unset REPLY\n  : ${REPLY:=${(Q)~1}}\n}\n\n# -------------------------------------------------------------------------------------------------\n# Main highlighter initialization\n# -------------------------------------------------------------------------------------------------\n\n_zsh_highlight_main__precmd_hook() {\n  _zsh_highlight_main__command_type_cache=()\n}\n\nautoload -U add-zsh-hook\nif add-zsh-hook precmd _zsh_highlight_main__precmd_hook 2>/dev/null; then\n  # Initialize command type cache\n  typeset -gA _zsh_highlight_main__command_type_cache\nelse\n  print -r -- >&2 'zsh-syntax-highlighting: Failed to load add-zsh-hook. Some speed optimizations will not be used.'\n  # Make sure the cache is unset\n  unset _zsh_highlight_main__command_type_cache\nfi\n"
  },
  {
    "path": ".config/zsh/syntax/highlighters/pattern/pattern-highlighter.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n\n# List of keyword and color pairs.\ntypeset -gA ZSH_HIGHLIGHT_PATTERNS\n\n# Whether the pattern highlighter should be called or not.\n_zsh_highlight_highlighter_pattern_predicate()\n{\n  _zsh_highlight_buffer_modified\n}\n\n# Pattern syntax highlighting function.\n_zsh_highlight_highlighter_pattern_paint()\n{\n  setopt localoptions extendedglob\n  local pattern\n  for pattern in ${(k)ZSH_HIGHLIGHT_PATTERNS}; do\n    _zsh_highlight_pattern_highlighter_loop \"$BUFFER\" \"$pattern\"\n  done\n}\n\n_zsh_highlight_pattern_highlighter_loop()\n{\n  # This does *not* do its job syntactically, sorry.\n  local buf=\"$1\" pat=\"$2\"\n  local -a match mbegin mend\n  local MATCH; integer MBEGIN MEND\n  if [[ \"$buf\" == (#b)(*)(${~pat})* ]]; then\n    region_highlight+=(\"$((mbegin[2] - 1)) $mend[2] $ZSH_HIGHLIGHT_PATTERNS[$pat]\")\n    \"$0\" \"$match[1]\" \"$pat\"; return $?\n  fi\n}\n"
  },
  {
    "path": ".config/zsh/syntax/highlighters/root/root-highlighter.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n\n# Define default styles.\n: ${ZSH_HIGHLIGHT_STYLES[root]:=standout}\n\n# Whether the root highlighter should be called or not.\n_zsh_highlight_highlighter_root_predicate()\n{\n  _zsh_highlight_buffer_modified\n}\n\n# root highlighting function.\n_zsh_highlight_highlighter_root_paint()\n{\n  if (( EUID == 0 )) { _zsh_highlight_add_highlight 0 $#BUFFER root }\n}\n"
  },
  {
    "path": ".config/zsh/syntax/zsh-syntax-highlighting.zsh",
    "content": "#!/usr/bin/env zsh\n# -------------------------------------------------------------------------------------------------\n# Copyright (c) 2010-2016 zsh-syntax-highlighting contributors\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification, are permitted\n# provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright notice, this list of conditions\n#    and the following disclaimer.\n#  * Redistributions in binary form must reproduce the above copyright notice, this list of\n#    conditions and the following disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#  * Neither the name of the zsh-syntax-highlighting contributors nor the names of its contributors\n#    may be used to endorse or promote products derived from this software without specific prior\n#    written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER\n# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT\n# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# -------------------------------------------------------------------------------------------------\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n# -------------------------------------------------------------------------------------------------\n\n# First of all, ensure predictable parsing.\nzsh_highlight__aliases=`builtin alias -Lm '[^+]*'`\n# In zsh <= 5.2, `alias -L` emits aliases that begin with a plus sign ('alias -- +foo=42')\n# them without a '--' guard, so they don't round trip.\n#\n# Hence, we exclude them from unaliasing:\nbuiltin unalias -m '[^+]*'\n\n# Set $0 to the expected value, regardless of functionargzero.\n0=${(%):-%N}\nif true; then\n  # $0 is reliable\n  typeset -g ZSH_HIGHLIGHT_VERSION=$(<\"${0:A:h}\"/.version)\n  typeset -g ZSH_HIGHLIGHT_REVISION=$(<\"${0:A:h}\"/.revision-hash)\n  if [[ $ZSH_HIGHLIGHT_REVISION == \\$Format:* ]]; then\n    # When running from a source tree without 'make install', $ZSH_HIGHLIGHT_REVISION\n    # would be set to '$Format:%H$' literally.  That's an invalid value, and obtaining\n    # the valid value (via `git rev-parse HEAD`, as Makefile does) might be costly, so:\n    ZSH_HIGHLIGHT_REVISION=HEAD\n  fi\nfi\n\n# -------------------------------------------------------------------------------------------------\n# Core highlighting update system\n# -------------------------------------------------------------------------------------------------\n\n# Use workaround for bug in ZSH?\n# zsh-users/zsh@48cadf4 http://www.zsh.org/mla/workers//2017/msg00034.html\nautoload -U is-at-least\nif is-at-least 5.4; then\n  zsh_highlight__pat_static_bug=false\nelse\n  zsh_highlight__pat_static_bug=true\nfi\n\n# Array declaring active highlighters names.\ntypeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS\n\n# Update ZLE buffer syntax highlighting.\n#\n# Invokes each highlighter that needs updating.\n# This function is supposed to be called whenever the ZLE state changes.\n_zsh_highlight()\n{\n  # Store the previous command return code to restore it whatever happens.\n  local ret=$?\n\n  # Remove all highlighting in isearch, so that only the underlining done by zsh itself remains.\n  # For details see FAQ entry 'Why does syntax highlighting not work while searching history?'.\n  # This disables highlighting during isearch (for reasons explained in README.md) unless zsh is new enough\n  # and doesn't have the pattern matching bug\n  if [[ $WIDGET == zle-isearch-update ]] && { $zsh_highlight__pat_static_bug || ! (( $+ISEARCHMATCH_ACTIVE )) }; then\n    region_highlight=()\n    return $ret\n  fi\n\n  setopt localoptions warncreateglobal\n  setopt localoptions noksharrays\n  local REPLY # don't leak $REPLY into global scope\n\n  # Do not highlight if there are more than 300 chars in the buffer. It's most\n  # likely a pasted command or a huge list of files in that case..\n  [[ -n ${ZSH_HIGHLIGHT_MAXLENGTH:-} ]] && [[ $#BUFFER -gt $ZSH_HIGHLIGHT_MAXLENGTH ]] && return $ret\n\n  # Do not highlight if there are pending inputs (copy/paste).\n  [[ $PENDING -gt 0 ]] && return $ret\n\n  # Reset region highlight to build it from scratch\n  typeset -ga region_highlight\n  region_highlight=();\n\n  {\n    local cache_place\n    local -a region_highlight_copy\n\n    # Select which highlighters in ZSH_HIGHLIGHT_HIGHLIGHTERS need to be invoked.\n    local highlighter; for highlighter in $ZSH_HIGHLIGHT_HIGHLIGHTERS; do\n\n      # eval cache place for current highlighter and prepare it\n      cache_place=\"_zsh_highlight__highlighter_${highlighter}_cache\"\n      typeset -ga ${cache_place}\n\n      # If highlighter needs to be invoked\n      if ! type \"_zsh_highlight_highlighter_${highlighter}_predicate\" >&/dev/null; then\n        echo \"zsh-syntax-highlighting: warning: disabling the ${(qq)highlighter} highlighter as it has not been loaded\" >&2\n        # TODO: use ${(b)} rather than ${(q)} if supported\n        ZSH_HIGHLIGHT_HIGHLIGHTERS=( ${ZSH_HIGHLIGHT_HIGHLIGHTERS:#${highlighter}} )\n      elif \"_zsh_highlight_highlighter_${highlighter}_predicate\"; then\n\n        # save a copy, and cleanup region_highlight\n        region_highlight_copy=(\"${region_highlight[@]}\")\n        region_highlight=()\n\n        # Execute highlighter and save result\n        {\n          \"_zsh_highlight_highlighter_${highlighter}_paint\"\n        } always {\n          eval \"${cache_place}=(\\\"\\${region_highlight[@]}\\\")\"\n        }\n\n        # Restore saved region_highlight\n        region_highlight=(\"${region_highlight_copy[@]}\")\n\n      fi\n\n      # Use value form cache if any cached\n      eval \"region_highlight+=(\\\"\\${${cache_place}[@]}\\\")\"\n\n    done\n\n    # Re-apply zle_highlight settings\n\n    # region\n    if (( REGION_ACTIVE == 1 )); then\n      _zsh_highlight_apply_zle_highlight region standout \"$MARK\" \"$CURSOR\"\n    elif (( REGION_ACTIVE == 2 )); then\n      () {\n        local needle=$'\\n'\n        integer min max\n        if (( MARK > CURSOR )) ; then\n          min=$CURSOR max=$MARK\n        else\n          min=$MARK max=$CURSOR\n        fi\n        (( min = ${${BUFFER[1,$min]}[(I)$needle]} ))\n        (( max += ${${BUFFER:($max-1)}[(i)$needle]} - 1 ))\n        _zsh_highlight_apply_zle_highlight region standout \"$min\" \"$max\"\n      }\n    fi\n\n    # yank / paste (zsh-5.1.1 and newer)\n    (( $+YANK_ACTIVE )) && (( YANK_ACTIVE )) && _zsh_highlight_apply_zle_highlight paste standout \"$YANK_START\" \"$YANK_END\"\n\n    # isearch\n    (( $+ISEARCHMATCH_ACTIVE )) && (( ISEARCHMATCH_ACTIVE )) && _zsh_highlight_apply_zle_highlight isearch underline \"$ISEARCHMATCH_START\" \"$ISEARCHMATCH_END\"\n\n    # suffix\n    (( $+SUFFIX_ACTIVE )) && (( SUFFIX_ACTIVE )) && _zsh_highlight_apply_zle_highlight suffix bold \"$SUFFIX_START\" \"$SUFFIX_END\"\n\n\n    return $ret\n\n\n  } always {\n    typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER=\"$BUFFER\"\n    typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR=$CURSOR\n  }\n}\n\n# Apply highlighting based on entries in the zle_highlight array.\n# This function takes four arguments:\n# 1. The exact entry (no patterns) in the zle_highlight array:\n#    region, paste, isearch, or suffix\n# 2. The default highlighting that should be applied if the entry is unset\n# 3. and 4. Two integer values describing the beginning and end of the\n#    range. The order does not matter.\n_zsh_highlight_apply_zle_highlight() {\n  local entry=\"$1\" default=\"$2\"\n  integer first=\"$3\" second=\"$4\"\n\n  # read the relevant entry from zle_highlight\n  local region=\"${zle_highlight[(r)${entry}:*]}\"\n\n  if [[ -z \"$region\" ]]; then\n    # entry not specified at all, use default value\n    region=$default\n  else\n    # strip prefix\n    region=\"${region#${entry}:}\"\n\n    # no highlighting when set to the empty string or to 'none'\n    if [[ -z \"$region\" ]] || [[ \"$region\" == none ]]; then\n      return\n    fi\n  fi\n\n  integer start end\n  if (( first < second )); then\n    start=$first end=$second\n  else\n    start=$second end=$first\n  fi\n  region_highlight+=(\"$start $end $region\")\n}\n\n\n# -------------------------------------------------------------------------------------------------\n# API/utility functions for highlighters\n# -------------------------------------------------------------------------------------------------\n\n# Array used by highlighters to declare user overridable styles.\ntypeset -gA ZSH_HIGHLIGHT_STYLES\n\n# Whether the command line buffer has been modified or not.\n#\n# Returns 0 if the buffer has changed since _zsh_highlight was last called.\n_zsh_highlight_buffer_modified()\n{\n  [[ \"${_ZSH_HIGHLIGHT_PRIOR_BUFFER:-}\" != \"$BUFFER\" ]]\n}\n\n# Whether the cursor has moved or not.\n#\n# Returns 0 if the cursor has moved since _zsh_highlight was last called.\n_zsh_highlight_cursor_moved()\n{\n  [[ -n $CURSOR ]] && [[ -n ${_ZSH_HIGHLIGHT_PRIOR_CURSOR-} ]] && (($_ZSH_HIGHLIGHT_PRIOR_CURSOR != $CURSOR))\n}\n\n# Add a highlight defined by ZSH_HIGHLIGHT_STYLES.\n#\n# Should be used by all highlighters aside from 'pattern' (cf. ZSH_HIGHLIGHT_PATTERN).\n# Overwritten in tests/test-highlighting.zsh when testing.\n_zsh_highlight_add_highlight()\n{\n  local -i start end\n  local highlight\n  start=$1\n  end=$2\n  shift 2\n  for highlight; do\n    if (( $+ZSH_HIGHLIGHT_STYLES[$highlight] )); then\n      region_highlight+=(\"$start $end $ZSH_HIGHLIGHT_STYLES[$highlight]\")\n      break\n    fi\n  done\n}\n\n# -------------------------------------------------------------------------------------------------\n# Setup functions\n# -------------------------------------------------------------------------------------------------\n\n# Helper for _zsh_highlight_bind_widgets\n# $1 is name of widget to call\n_zsh_highlight_call_widget()\n{\n  builtin zle \"$@\" && \n  _zsh_highlight\n}\n\n# Rebind all ZLE widgets to make them invoke _zsh_highlights.\n_zsh_highlight_bind_widgets()\n{\n  setopt localoptions noksharrays\n  typeset -F SECONDS\n  local prefix=orig-s$SECONDS-r$RANDOM # unique each time, in case we're sourced more than once\n\n  # Load ZSH module zsh/zleparameter, needed to override user defined widgets.\n  zmodload zsh/zleparameter 2>/dev/null || {\n    print -r -- >&2 'zsh-syntax-highlighting: failed loading zsh/zleparameter.'\n    return 1\n  }\n\n  # Override ZLE widgets to make them invoke _zsh_highlight.\n  local -U widgets_to_bind\n  widgets_to_bind=(${${(k)widgets}:#(.*|run-help|which-command|beep|set-local-history|yank)})\n\n  # Always wrap special zle-line-finish widget. This is needed to decide if the\n  # current line ends and special highlighting logic needs to be applied.\n  # E.g. remove cursor imprint, don't highlight partial paths, ...\n  widgets_to_bind+=(zle-line-finish)\n\n  # Always wrap special zle-isearch-update widget to be notified of updates in isearch.\n  # This is needed because we need to disable highlighting in that case.\n  widgets_to_bind+=(zle-isearch-update)\n\n  local cur_widget\n  for cur_widget in $widgets_to_bind; do\n    case $widgets[$cur_widget] in\n\n      # Already rebound event: do nothing.\n      user:_zsh_highlight_widget_*);;\n\n      # The \"eval\"'s are required to make $cur_widget a closure: the value of the parameter at function\n      # definition time is used.\n      #\n      # We can't use ${0/_zsh_highlight_widget_} because these widgets are always invoked with\n      # NO_function_argzero, regardless of the option's setting here.\n\n      # User defined widget: override and rebind old one with prefix \"orig-\".\n      user:*) zle -N $prefix-$cur_widget ${widgets[$cur_widget]#*:}\n              eval \"_zsh_highlight_widget_${(q)prefix}-${(q)cur_widget}() { _zsh_highlight_call_widget ${(q)prefix}-${(q)cur_widget} -- \\\"\\$@\\\" }\"\n              zle -N $cur_widget _zsh_highlight_widget_$prefix-$cur_widget;;\n\n      # Completion widget: override and rebind old one with prefix \"orig-\".\n      completion:*) zle -C $prefix-$cur_widget ${${(s.:.)widgets[$cur_widget]}[2,3]} \n                    eval \"_zsh_highlight_widget_${(q)prefix}-${(q)cur_widget}() { _zsh_highlight_call_widget ${(q)prefix}-${(q)cur_widget} -- \\\"\\$@\\\" }\"\n                    zle -N $cur_widget _zsh_highlight_widget_$prefix-$cur_widget;;\n\n      # Builtin widget: override and make it call the builtin \".widget\".\n      builtin) eval \"_zsh_highlight_widget_${(q)prefix}-${(q)cur_widget}() { _zsh_highlight_call_widget .${(q)cur_widget} -- \\\"\\$@\\\" }\"\n               zle -N $cur_widget _zsh_highlight_widget_$prefix-$cur_widget;;\n\n      # Incomplete or nonexistent widget: Bind to z-sy-h directly.\n      *) \n         if [[ $cur_widget == zle-* ]] && [[ -z $widgets[$cur_widget] ]]; then\n           _zsh_highlight_widget_${cur_widget}() { :; _zsh_highlight }\n           zle -N $cur_widget _zsh_highlight_widget_$cur_widget\n         else\n      # Default: unhandled case.\n           print -r -- >&2 \"zsh-syntax-highlighting: unhandled ZLE widget ${(qq)cur_widget}\"\n           print -r -- >&2 \"zsh-syntax-highlighting: (This is sometimes caused by doing \\`bindkey <keys> ${(q-)cur_widget}\\` without creating the ${(qq)cur_widget} widget with \\`zle -N\\` or \\`zle -C\\`.)\"\n         fi\n    esac\n  done\n}\n\n# Load highlighters from directory.\n#\n# Arguments:\n#   1) Path to the highlighters directory.\n_zsh_highlight_load_highlighters()\n{\n  setopt localoptions noksharrays\n\n  # Check the directory exists.\n  [[ -d \"$1\" ]] || {\n    print -r -- >&2 \"zsh-syntax-highlighting: highlighters directory ${(qq)1} not found.\"\n    return 1\n  }\n\n  # Load highlighters from highlighters directory and check they define required functions.\n  local highlighter highlighter_dir\n  for highlighter_dir ($1/*/); do\n    highlighter=\"${highlighter_dir:t}\"\n    [[ -f \"$highlighter_dir${highlighter}-highlighter.zsh\" ]] &&\n      . \"$highlighter_dir${highlighter}-highlighter.zsh\"\n    if type \"_zsh_highlight_highlighter_${highlighter}_paint\" &> /dev/null &&\n       type \"_zsh_highlight_highlighter_${highlighter}_predicate\" &> /dev/null;\n    then\n        # New (0.5.0) function names\n    elif type \"_zsh_highlight_${highlighter}_highlighter\" &> /dev/null &&\n         type \"_zsh_highlight_${highlighter}_highlighter_predicate\" &> /dev/null;\n    then\n        # Old (0.4.x) function names\n        if false; then\n            # TODO: only show this warning for plugin authors/maintainers, not for end users\n            print -r -- >&2 \"zsh-syntax-highlighting: warning: ${(qq)highlighter} highlighter uses deprecated entry point names; please ask its maintainer to update it: https://github.com/zsh-users/zsh-syntax-highlighting/issues/329\"\n        fi\n        # Make it work.\n        eval \"_zsh_highlight_highlighter_${(q)highlighter}_paint() { _zsh_highlight_${(q)highlighter}_highlighter \\\"\\$@\\\" }\"\n        eval \"_zsh_highlight_highlighter_${(q)highlighter}_predicate() { _zsh_highlight_${(q)highlighter}_highlighter_predicate \\\"\\$@\\\" }\"\n    else\n        print -r -- >&2 \"zsh-syntax-highlighting: ${(qq)highlighter} highlighter should define both required functions '_zsh_highlight_highlighter_${highlighter}_paint' and '_zsh_highlight_highlighter_${highlighter}_predicate' in ${(qq):-\"$highlighter_dir${highlighter}-highlighter.zsh\"}.\"\n    fi\n  done\n}\n\n\n# -------------------------------------------------------------------------------------------------\n# Setup\n# -------------------------------------------------------------------------------------------------\n\n# Try binding widgets.\n_zsh_highlight_bind_widgets || {\n  print -r -- >&2 'zsh-syntax-highlighting: failed binding ZLE widgets, exiting.'\n  return 1\n}\n\n# Resolve highlighters directory location.\n_zsh_highlight_load_highlighters \"${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${${0:A}:h}/highlighters}\" || {\n  print -r -- >&2 'zsh-syntax-highlighting: failed loading highlighters, exiting.'\n  return 1\n}\n\n# Reset scratch variables when commandline is done.\n_zsh_highlight_preexec_hook()\n{\n  typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER=\n  typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR=\n}\nautoload -U add-zsh-hook\nadd-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null || {\n    print -r -- >&2 'zsh-syntax-highlighting: failed loading add-zsh-hook.'\n  }\n\n# Load zsh/parameter module if available\nzmodload zsh/parameter 2>/dev/null || true\n\n# Initialize the array of active highlighters if needed.\n[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)\n\n# Restore the aliases we unned\neval \"$zsh_highlight__aliases\"\nbuiltin unset zsh_highlight__aliases\n\n# Set $?.\ntrue\n"
  },
  {
    "path": ".config/zsh/upsearch/zsh-history-substring-search.zsh",
    "content": "#!/usr/bin/env zsh\n##############################################################################\n#\n# Copyright (c) 2009 Peter Stephenson\n# Copyright (c) 2011 - 2017 Guido van Steen\n# Copyright (c) 2011 Suraj N. Kurapati\n# Copyright (c) 2011 Sorin Ionescu\n# Copyright (c) 2011 Vincent Guerci\n# Copyright (c) 2016 Geza Lore\n# Copyright (c) 2017 Bengt Brodersen\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n#  * Redistributions of source code must retain the above copyright\n#    notice, this list of conditions and the following disclaimer.\n#\n#  * Redistributions in binary form must reproduce the above\n#    copyright notice, this list of conditions and the following\n#    disclaimer in the documentation and/or other materials provided\n#    with the distribution.\n#\n#  * Neither the name of the FIZSH nor the names of its contributors\n#    may be used to endorse or promote products derived from this\n#    software without specific prior written permission.\n#\n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n# POSSIBILITY OF SUCH DAMAGE.\n#\n##############################################################################\n\n#-----------------------------------------------------------------------------\n# declare global configuration variables\n#-----------------------------------------------------------------------------\n\ntypeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=25,fg=white,bold'\ntypeset -g HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'\ntypeset -g HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'\ntypeset -g HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=''\ntypeset -g HISTORY_SUBSTRING_SEARCH_FUZZY=''\n\n#-----------------------------------------------------------------------------\n# declare internal global variables\n#-----------------------------------------------------------------------------\n\ntypeset -g BUFFER MATCH MBEGIN MEND CURSOR\ntypeset -g _history_substring_search_refresh_display\ntypeset -g _history_substring_search_query_highlight\ntypeset -g _history_substring_search_result\ntypeset -g _history_substring_search_query\ntypeset -g -a _history_substring_search_query_parts\ntypeset -g -a _history_substring_search_raw_matches\ntypeset -g -i _history_substring_search_raw_match_index\ntypeset -g -a _history_substring_search_matches\ntypeset -g -i _history_substring_search_match_index\ntypeset -g -A _history_substring_search_unique_filter\n\n#-----------------------------------------------------------------------------\n# the main ZLE widgets\n#-----------------------------------------------------------------------------\n\nhistory-substring-search-up() {\n  _history-substring-search-begin\n\n  _history-substring-search-up-history ||\n  _history-substring-search-up-buffer ||\n  _history-substring-search-up-search\n\n  _history-substring-search-end\n}\n\nhistory-substring-search-down() {\n  _history-substring-search-begin\n\n  _history-substring-search-down-history ||\n  _history-substring-search-down-buffer ||\n  _history-substring-search-down-search\n\n  _history-substring-search-end\n}\n\nzle -N history-substring-search-up\nzle -N history-substring-search-down\n\n#-----------------------------------------------------------------------------\n# implementation details\n#-----------------------------------------------------------------------------\n\nzmodload -F zsh/parameter\n\n#\n# We have to \"override\" some keys and widgets if the\n# zsh-syntax-highlighting plugin has not been loaded:\n#\n# https://github.com/nicoulaj/zsh-syntax-highlighting\n#\nif [[ $+functions[_zsh_highlight] -eq 0 ]]; then\n  #\n  # Dummy implementation of _zsh_highlight() that\n  # simply removes any existing highlights when the\n  # user inserts printable characters into $BUFFER.\n  #\n  _zsh_highlight() {\n    if [[ $KEYS == [[:print:]] ]]; then\n      region_highlight=()\n    fi\n  }\n\n  #\n  # The following snippet was taken from the zsh-syntax-highlighting project:\n  #\n  # https://github.com/zsh-users/zsh-syntax-highlighting/blob/56b134f5d62ae3d4e66c7f52bd0cc2595f9b305b/zsh-syntax-highlighting.zsh#L126-161\n  #\n  # Copyright (c) 2010-2011 zsh-syntax-highlighting contributors\n  # All rights reserved.\n  #\n  # Redistribution and use in source and binary forms, with or without\n  # modification, are permitted provided that the following conditions are\n  # met:\n  #\n  #  * Redistributions of source code must retain the above copyright\n  #    notice, this list of conditions and the following disclaimer.\n  #\n  #  * Redistributions in binary form must reproduce the above copyright\n  #    notice, this list of conditions and the following disclaimer in the\n  #    documentation and/or other materials provided with the distribution.\n  #\n  #  * Neither the name of the zsh-syntax-highlighting contributors nor the\n  #    names of its contributors may be used to endorse or promote products\n  #    derived from this software without specific prior written permission.\n  #\n  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  # IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\n  # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n  #\n  #--------------8<-------------------8<-------------------8<-----------------\n  # Rebind all ZLE widgets to make them invoke _zsh_highlights.\n  _zsh_highlight_bind_widgets()\n  {\n    # Load ZSH module zsh/zleparameter, needed to override user defined widgets.\n    zmodload zsh/zleparameter 2>/dev/null || {\n      echo 'zsh-syntax-highlighting: failed loading zsh/zleparameter.' >&2\n      return 1\n    }\n\n    # Override ZLE widgets to make them invoke _zsh_highlight.\n    local cur_widget\n    for cur_widget in ${${(f)\"$(builtin zle -la)\"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*)}; do\n      case $widgets[$cur_widget] in\n\n        # Already rebound event: do nothing.\n        user:$cur_widget|user:_zsh_highlight_widget_*);;\n\n        # User defined widget: override and rebind old one with prefix \"orig-\".\n        user:*) eval \"zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \\\n                      _zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \\\"\\$@\\\" && _zsh_highlight }; \\\n                      zle -N $cur_widget _zsh_highlight_widget_$cur_widget\";;\n\n        # Completion widget: override and rebind old one with prefix \"orig-\".\n        completion:*) eval \"zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \\\n                            _zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \\\"\\$@\\\" && _zsh_highlight }; \\\n                            zle -N $cur_widget _zsh_highlight_widget_$cur_widget\";;\n\n        # Builtin widget: override and make it call the builtin \".widget\".\n        builtin) eval \"_zsh_highlight_widget_$cur_widget() { builtin zle .$cur_widget -- \\\"\\$@\\\" && _zsh_highlight }; \\\n                       zle -N $cur_widget _zsh_highlight_widget_$cur_widget\";;\n\n        # Default: unhandled case.\n        *) echo \"zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget'\" >&2 ;;\n      esac\n    done\n  }\n  #-------------->8------------------->8------------------->8-----------------\n\n  _zsh_highlight_bind_widgets\nfi\n\n_history-substring-search-begin() {\n  setopt localoptions extendedglob\n\n  _history_substring_search_refresh_display=\n  _history_substring_search_query_highlight=\n\n  #\n  # If the buffer is the same as the previously displayed history substring\n  # search result, then just keep stepping through the match list. Otherwise\n  # start a new search.\n  #\n  if [[ -n $BUFFER && $BUFFER == ${_history_substring_search_result:-} ]]; then\n    return;\n  fi\n\n  #\n  # Clear the previous result.\n  #\n  _history_substring_search_result=''\n\n  if [[ -z $BUFFER ]]; then\n    #\n    # If the buffer is empty, we will just act like up-history/down-history\n    # in ZSH, so we do not need to actually search the history. This should\n    # speed things up a little.\n    #\n    _history_substring_search_query=\n    _history_substring_search_query_parts=()\n    _history_substring_search_raw_matches=()\n\n  else\n    #\n    # For the purpose of highlighting we keep a copy of the original\n    # query string.\n    #\n    _history_substring_search_query=$BUFFER\n\n    #\n    # compose search pattern\n    #\n    if [[ -n $HISTORY_SUBSTRING_SEARCH_FUZZY ]]; then\n      #\n      # `=` split string in arguments\n      #\n      _history_substring_search_query_parts=(${=_history_substring_search_query})\n    else\n      _history_substring_search_query_parts=(${_history_substring_search_query})\n    fi\n\n    #\n    # Escape and join query parts with wildcard character '*' as seperator\n    # `(j:CHAR:)` join array to string with CHAR as seperator\n    #\n    local search_pattern=\"*${(j:*:)_history_substring_search_query_parts[@]//(#m)[\\][()|\\\\*?#<>~^]/\\\\$MATCH}*\"\n\n    #\n    # Find all occurrences of the search pattern in the history file.\n    #\n    # (k) returns the \"keys\" (history index numbers) instead of the values\n    # (R) returns values in reverse older, so the index of the youngest\n    # matching history entry is at the head of the list.\n    #\n    _history_substring_search_raw_matches=(${(k)history[(R)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${search_pattern}]})\n  fi\n\n  #\n  # In order to stay as responsive as possible, we will process the raw\n  # matches lazily (when the user requests the next match) to choose items\n  # that need to be displayed to the user.\n  # _history_substring_search_raw_match_index holds the index of the last\n  # unprocessed entry in _history_substring_search_raw_matches. Any items\n  # that need to be displayed will be added to\n  # _history_substring_search_matches.\n  #\n  # We use an associative array (_history_substring_search_unique_filter) as\n  # a 'set' data structure to ensure uniqueness of the results if desired.\n  # If an entry (key) is in the set (non-empty value), then we have already\n  # added that entry to _history_substring_search_matches.\n  #\n  _history_substring_search_raw_match_index=0\n  _history_substring_search_matches=()\n  _history_substring_search_unique_filter=()\n\n  #\n  # If $_history_substring_search_match_index is equal to\n  # $#_history_substring_search_matches + 1, this indicates that we\n  # are beyond the end of $_history_substring_search_matches and that we\n  # have also processed all entries in\n  # _history_substring_search_raw_matches.\n  #\n  # If $#_history_substring_search_match_index is equal to 0, this indicates\n  # that we are beyond the beginning of $_history_substring_search_matches.\n  #\n  # If we have initially pressed \"up\" we have to initialize\n  # $_history_substring_search_match_index to 0 so that it will be\n  # incremented to 1.\n  #\n  # If we have initially pressed \"down\" we have to initialize\n  # $_history_substring_search_match_index to 1 so that it will be\n  # decremented to 0.\n  #\n  if [[ $WIDGET == history-substring-search-down ]]; then\n     _history_substring_search_match_index=1\n  else\n    _history_substring_search_match_index=0\n  fi\n}\n\n_history-substring-search-end() {\n  setopt localoptions extendedglob\n\n  _history_substring_search_result=$BUFFER\n\n  # the search was successful so display the result properly by clearing away\n  # existing highlights and moving the cursor to the end of the result buffer\n  if [[ $_history_substring_search_refresh_display -eq 1 ]]; then\n    region_highlight=()\n    CURSOR=${#BUFFER}\n  fi\n\n  # highlight command line using zsh-syntax-highlighting\n  _zsh_highlight\n\n  # highlight the search query inside the command line\n  if [[ -n $_history_substring_search_query_highlight ]]; then\n    # highlight first matching query parts\n    local highlight_start_index=0\n    local highlight_end_index=0\n    for query_part in $_history_substring_search_query_parts; do\n      local escaped_query_part=${query_part//(#m)[\\][()|\\\\*?#<>~^]/\\\\$MATCH}\n      # (i) get index of pattern\n      local query_part_match_index=${${BUFFER:$highlight_start_index}[(i)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)${escaped_query_part}]}\n      if [[ $query_part_match_index -le ${#BUFFER:$highlight_start_index} ]]; then\n        highlight_start_index=$(( $highlight_start_index + $query_part_match_index ))\n        highlight_end_index=$(( $highlight_start_index + ${#query_part} ))\n        region_highlight+=(\"$(($highlight_start_index - 1)) $(($highlight_end_index - 1)) $_history_substring_search_query_highlight\")\n      fi\n    done\n  fi\n\n  # For debugging purposes:\n  # zle -R \"mn: \"$_history_substring_search_match_index\" m#: \"${#_history_substring_search_matches}\n  # read -k -t 200 && zle -U $REPLY\n\n  # Exit successfully from the history-substring-search-* widgets.\n  return 0\n}\n\n_history-substring-search-up-buffer() {\n  #\n  # Check if the UP arrow was pressed to move the cursor within a multi-line\n  # buffer. This amounts to three tests:\n  #\n  # 1. $#buflines -gt 1.\n  #\n  # 2. $CURSOR -ne $#BUFFER.\n  #\n  # 3. Check if we are on the first line of the current multi-line buffer.\n  #    If so, pressing UP would amount to leaving the multi-line buffer.\n  #\n  #    We check this by adding an extra \"x\" to $LBUFFER, which makes\n  #    sure that xlbuflines is always equal to the number of lines\n  #    until $CURSOR (including the line with the cursor on it).\n  #\n  local buflines XLBUFFER xlbuflines\n  buflines=(${(f)BUFFER})\n  XLBUFFER=$LBUFFER\"x\"\n  xlbuflines=(${(f)XLBUFFER})\n\n  if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xlbuflines -ne 1 ]]; then\n    zle up-line-or-history\n    return 0\n  fi\n\n  return 1\n}\n\n_history-substring-search-down-buffer() {\n  #\n  # Check if the DOWN arrow was pressed to move the cursor within a multi-line\n  # buffer. This amounts to three tests:\n  #\n  # 1. $#buflines -gt 1.\n  #\n  # 2. $CURSOR -ne $#BUFFER.\n  #\n  # 3. Check if we are on the last line of the current multi-line buffer.\n  #    If so, pressing DOWN would amount to leaving the multi-line buffer.\n  #\n  #    We check this by adding an extra \"x\" to $RBUFFER, which makes\n  #    sure that xrbuflines is always equal to the number of lines\n  #    from $CURSOR (including the line with the cursor on it).\n  #\n  local buflines XRBUFFER xrbuflines\n  buflines=(${(f)BUFFER})\n  XRBUFFER=\"x\"$RBUFFER\n  xrbuflines=(${(f)XRBUFFER})\n\n  if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xrbuflines -ne 1 ]]; then\n    zle down-line-or-history\n    return 0\n  fi\n\n  return 1\n}\n\n_history-substring-search-up-history() {\n  #\n  # Behave like up in ZSH, except clear the $BUFFER\n  # when beginning of history is reached like in Fish.\n  #\n  if [[ -z $_history_substring_search_query ]]; then\n\n    # we have reached the absolute top of history\n    if [[ $HISTNO -eq 1 ]]; then\n      BUFFER=\n\n    # going up from somewhere below the top of history\n    else\n      zle up-line-or-history\n    fi\n\n    return 0\n  fi\n\n  return 1\n}\n\n_history-substring-search-down-history() {\n  #\n  # Behave like down-history in ZSH, except clear the\n  # $BUFFER when end of history is reached like in Fish.\n  #\n  if [[ -z $_history_substring_search_query ]]; then\n\n    # going down from the absolute top of history\n    if [[ $HISTNO -eq 1 && -z $BUFFER ]]; then\n      BUFFER=${history[1]}\n      _history_substring_search_refresh_display=1\n\n    # going down from somewhere above the bottom of history\n    else\n      zle down-line-or-history\n    fi\n\n    return 0\n  fi\n\n  return 1\n}\n\n_history_substring_search_process_raw_matches() {\n  #\n  # Process more outstanding raw matches and append any matches that need to\n  # be displayed to the user to _history_substring_search_matches.\n  # Return whether there were any more results appended.\n  #\n\n  #\n  # While we have more raw matches. Process them to see if there are any more\n  # matches that need to be displayed to the user.\n  #\n  while [[ $_history_substring_search_raw_match_index -lt $#_history_substring_search_raw_matches ]]; do\n    #\n    # Move on to the next raw entry and get its history index.\n    #\n    _history_substring_search_raw_match_index+=1\n    local index=${_history_substring_search_raw_matches[$_history_substring_search_raw_match_index]}\n\n    #\n    # If HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set to a non-empty value,\n    # then ensure that only unique matches are presented to the user.\n    # When HIST_IGNORE_ALL_DUPS is set, ZSH already ensures a unique history,\n    # so in this case we do not need to do anything.\n    #\n    if [[ ! -o HIST_IGNORE_ALL_DUPS && -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then\n      #\n      # Get the actual history entry at the new index, and check if we have\n      # already added it to _history_substring_search_matches.\n      #\n      local entry=${history[$index]}\n\n      if [[ -z ${_history_substring_search_unique_filter[$entry]} ]]; then\n        #\n        # This is a new unique entry. Add it to the filter and append the\n        # index to _history_substring_search_matches.\n        #\n        _history_substring_search_unique_filter[$entry]=1\n        _history_substring_search_matches+=($index)\n\n        #\n        # Indicate that we did find a match.\n        #\n        return 0\n      fi\n\n    else\n      #\n      # Just append the new history index to the processed matches.\n      #\n      _history_substring_search_matches+=($index)\n\n      #\n      # Indicate that we did find a match.\n      #\n      return 0\n    fi\n\n  done\n\n  #\n  # We are beyond the end of the list of raw matches. Indicate that no\n  # more matches are available.\n  #\n  return 1\n}\n\n_history-substring-search-has-next() {\n  #\n  # Predicate function that returns whether any more older matches are\n  # available.\n  #\n\n  if  [[ $_history_substring_search_match_index -lt $#_history_substring_search_matches ]]; then\n    #\n    # We did not reach the end of the processed list, so we do have further\n    # matches.\n    #\n    return 0\n\n  else\n    #\n    # We are at the end of the processed list. Try to process further\n    # unprocessed matches. _history_substring_search_process_raw_matches\n    # returns whether any more matches were available, so just return\n    # that result.\n    #\n    _history_substring_search_process_raw_matches\n    return $?\n  fi\n}\n\n_history-substring-search-has-prev() {\n  #\n  # Predicate function that returns whether any more younger matches are\n  # available.\n  #\n\n  if [[ $_history_substring_search_match_index -gt 1 ]]; then\n    #\n    # We did not reach the beginning of the processed list, so we do have\n    # further matches.\n    #\n    return 0\n\n  else\n    #\n    # We are at the beginning of the processed list. We do not have any more\n    # matches.\n    #\n    return 1\n  fi\n}\n\n_history-substring-search-found() {\n  #\n  # A match is available. The index of the match is held in\n  # $_history_substring_search_match_index\n  #\n  # 1. Make $BUFFER equal to the matching history entry.\n  #\n  # 2. Use $HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND\n  #    to highlight the current buffer.\n  #\n  BUFFER=$history[$_history_substring_search_matches[$_history_substring_search_match_index]]\n  _history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND\n}\n\n_history-substring-search-not-found() {\n  #\n  # No more matches are available.\n  #\n  # 1. Make $BUFFER equal to $_history_substring_search_query so the user can\n  #    revise it and search again.\n  #\n  # 2. Use $HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND\n  #    to highlight the current buffer.\n  #\n  BUFFER=$_history_substring_search_query\n  _history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND\n}\n\n_history-substring-search-up-search() {\n  _history_substring_search_refresh_display=1\n\n  #\n  # Select history entry during history-substring-down-search:\n  #\n  # The following variables have been initialized in\n  # _history-substring-search-up/down-search():\n  #\n  # $_history_substring_search_matches is the current list of matches that\n  # need to be displayed to the user.\n  # $_history_substring_search_match_index is the index of the current match\n  # that is being displayed to the user.\n  #\n  # The range of values that $_history_substring_search_match_index can take\n  # is: [0, $#_history_substring_search_matches + 1].  A value of 0\n  # indicates that we are beyond the beginning of\n  # $_history_substring_search_matches. A value of\n  # $#_history_substring_search_matches + 1 indicates that we are beyond\n  # the end of $_history_substring_search_matches and that we have also\n  # processed all entries in _history_substring_search_raw_matches.\n  #\n  # If $_history_substring_search_match_index equals\n  # $#_history_substring_search_matches and\n  # $_history_substring_search_raw_match_index is not greater than\n  # $#_history_substring_search_raw_matches, then we need to further process\n  # $_history_substring_search_raw_matches to see if there are any more\n  # entries that need to be displayed to the user.\n  #\n  # In _history-substring-search-up-search() the initial value of\n  # $_history_substring_search_match_index is 0. This value is set in\n  # _history-substring-search-begin(). _history-substring-search-up-search()\n  # will initially increment it to 1.\n  #\n\n  if [[ $_history_substring_search_match_index -gt $#_history_substring_search_matches ]]; then\n    #\n    # We are beyond the end of $_history_substring_search_matches. This\n    # can only happen if we have also exhausted the unprocessed matches in\n    # _history_substring_search_raw_matches.\n    #\n    # 1. Update display to indicate search not found.\n    #\n    _history-substring-search-not-found\n    return\n  fi\n\n  if _history-substring-search-has-next; then\n    #\n    # We do have older matches.\n    #\n    # 1. Move index to point to the next match.\n    # 2. Update display to indicate search found.\n    #\n    _history_substring_search_match_index+=1\n    _history-substring-search-found\n\n  else\n    #\n    # We do not have older matches.\n    #\n    # 1. Move the index beyond the end of\n    #    _history_substring_search_matches.\n    # 2. Update display to indicate search not found.\n    #\n    _history_substring_search_match_index+=1\n    _history-substring-search-not-found\n  fi\n\n  #\n  # When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from\n  # history should be matched, make sure the new and old results are different.\n  #\n  # However, if the HIST_IGNORE_ALL_DUPS shell option, or\n  # HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set, then we already have a\n  # unique history, so in this case we do not need to do anything.\n  #\n  if [[ -o HIST_IGNORE_ALL_DUPS || -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then\n    return\n  fi\n\n  if [[ -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then\n    #\n    # Repeat the current search so that a different (unique) match is found.\n    #\n    _history-substring-search-up-search\n  fi\n}\n\n_history-substring-search-down-search() {\n  _history_substring_search_refresh_display=1\n\n  #\n  # Select history entry during history-substring-down-search:\n  #\n  # The following variables have been initialized in\n  # _history-substring-search-up/down-search():\n  #\n  # $_history_substring_search_matches is the current list of matches that\n  # need to be displayed to the user.\n  # $_history_substring_search_match_index is the index of the current match\n  # that is being displayed to the user.\n  #\n  # The range of values that $_history_substring_search_match_index can take\n  # is: [0, $#_history_substring_search_matches + 1].  A value of 0\n  # indicates that we are beyond the beginning of\n  # $_history_substring_search_matches. A value of\n  # $#_history_substring_search_matches + 1 indicates that we are beyond\n  # the end of $_history_substring_search_matches and that we have also\n  # processed all entries in _history_substring_search_raw_matches.\n  #\n  # In _history-substring-search-down-search() the initial value of\n  # $_history_substring_search_match_index is 1. This value is set in\n  # _history-substring-search-begin(). _history-substring-search-down-search()\n  # will initially decrement it to 0.\n  #\n\n  if [[ $_history_substring_search_match_index -lt 1 ]]; then\n    #\n    # We are beyond the beginning of $_history_substring_search_matches.\n    #\n    # 1. Update display to indicate search not found.\n    #\n    _history-substring-search-not-found\n    return\n  fi\n\n  if _history-substring-search-has-prev; then\n    #\n    # We do have younger matches.\n    #\n    # 1. Move index to point to the previous match.\n    # 2. Update display to indicate search found.\n    #\n    _history_substring_search_match_index+=-1\n    _history-substring-search-found\n\n  else\n    #\n    # We do not have younger matches.\n    #\n    # 1. Move the index beyond the beginning of\n    #    _history_substring_search_matches.\n    # 2. Update display to indicate search not found.\n    #\n    _history_substring_search_match_index+=-1\n    _history-substring-search-not-found\n  fi\n\n  #\n  # When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from\n  # history should be matched, make sure the new and old results are different.\n  #\n  # However, if the HIST_IGNORE_ALL_DUPS shell option, or\n  # HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set, then we already have a\n  # unique history, so in this case we do not need to do anything.\n  #\n  if [[ -o HIST_IGNORE_ALL_DUPS || -n $HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE ]]; then\n    return\n  fi\n\n  if [[ -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then\n    #\n    # Repeat the current search so that a different (unique) match is found.\n    #\n    _history-substring-search-down-search\n  fi\n}\n\n# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-\n# vim: ft=zsh sw=2 ts=2 et\n"
  },
  {
    "path": ".config/zsh/upsearch/zsh-miscellaneous.zsh",
    "content": "#!/usr/bin/env zsh\n\n################################################\n#\n# Register history-substring-search-up and history-substring-search-down as user-defined zle widgets\n#\nzle -N history-substring-search-up\nzle -N history-substring-search-down\n\n################################################\n#\n# Create the array \"key\" if it does not exist\n#\n[[ $(echo ${key+1}) != \"1\" ]] && typeset -A key && key=(Up \"${terminfo[kcuu1]}\" Down \"${terminfo[kcud1]}\" Home \"${terminfo[khome]}\" End \"${terminfo[kend]}\" Insert \"${terminfo[kich1]}\" Delete \"${terminfo[kdch1]}\" Left \"${terminfo[kcub1]}\" Right \"${terminfo[kcuf1]}\" PageUp \"${terminfo[kpp]}\" PageDown \"${terminfo[knp]}\")\n\n################################################\n#\n# Define missing keys using terminfo\n#\n[[ \"${key[Up]}\"       == \"\" ]]  && key[Up]=\"${terminfo[kcuu1]}\"\n[[ \"${key[Down]}\"     == \"\" ]]  && key[Down]=\"${terminfo[kcud1]}\"\n[[ \"${key[Home]}\"     == \"\" ]]  && key[Home]=\"${terminfo[khome]}\"\n[[ \"${key[End]}\"      == \"\" ]]  && key[End]}=\"${terminfo[kend]}\"\n[[ \"${key[Insert]}\"   == \"\" ]]  && key[Insert]=\"${terminfo[kich1]}\"\n[[ \"${key[Delete]}\"   == \"\" ]]  && key[Delete]=\"${terminfo[kdch1]}\"\n[[ \"${key[Left]}\"     == \"\" ]]  && key[Left]}=\"${terminfo[kcub1]}\"\n[[ \"${key[Right]}\"    == \"\" ]]  && key[Right]=\"${terminfo[kcuf1]}\"\n[[ \"${key[PageUp]}\"   == \"\" ]]  && key[PageUp]=\"${terminfo[kpp]}\"\n[[ \"${key[PageDown]}\" == \"\" ]]  && key[PageDown]=\"${terminfo[knp]}\"\n\n################################################\n#\n# Bind the keys in $key\n#\nbindkey  \"${key[Up]}\"       history-substring-search-up\nbindkey  \"${key[Down]}\"     history-substring-search-down\nbindkey  \"${key[Home]}\"     beginning-of-line\nbindkey  \"${key[End]}\"      end-of-line\nbindkey  \"${key[Insert]}\"   overwrite-mode\nbindkey  \"${key[Delete]}\"   delete-char\nbindkey  \"${key[Left]}\"     backward-char\nbindkey  \"${key[Right]}\"    forward-char\nbindkey  \"${key[PageUp]}\"   beginning-of-history\nbindkey  \"${key[PageDown]}\" end-of-history\n\n################################################\n#\n# As a fallback bind some additional key codes that could be generated\n#\nbindkey \"$terminfo[kcuu1]\" history-substring-search-up\nbindkey \"$terminfo[kcud1]\" history-substring-search-down\n\nbindkey \"\\e[A\" history-substring-search-up\nbindkey \"\\e[B\" history-substring-search-down\n\nbindkey \"^[[A\" history-substring-search-up\nbindkey \"^[0A\" history-substring-search-up\n\nbindkey \"^[[B\" history-substring-search-down\nbindkey \"^[0B\" history-substring-search-down\n\n################################################\n#\n# Bind history-incremental-search-backward, history-incremental-search-forward and backward-delete-char\n# history-incremental-search-backward and history-incremental-search-forward\n#\nbindkey \"^[[1;5C\" forward-word\nbindkey \"^[01;5C\" forward-word\n\nbindkey \"^[[1;5D\" backward-word\nbindkey \"^[01;5D\" backward-word\n\nbindkey \"^?\" backward-delete-char\n\nbindkey \"^r\" history-incremental-search-backward\nbindkey \"^s\" history-incremental-search-forward\n"
  },
  {
    "path": ".config/zsh/visualvi/zsh-vimode-visual.zsh",
    "content": "#!/bin/zsh -f\n\nbindkey -N vivis\n\nget-x-clipboard()\n{\n    local clippaste clipboard\n    if (( $+commands[pbpaste] )); then\n        clippaste=\"pbpaste\"\n    elif (( $+commands[xsel] )); then\n        clippaste=\"xsel --clipboard --output\"\n    else\n        return 1\n    fi\n\n    clipboard=\"$( ${=clippaste} )\"\n    if [[ -n $clipboard && $clipboard != $CUTBUFFER ]]; then\n        killring=(\"$CUTBUFFER\" \"${(@)killring[1,-2]}\")\n        CUTBUFFER=\"$clipboard\"\n    fi\n}\n\nset-x-clipboard()\n{\n    local clipcopy clipboard\n    if (( $+commands[pbcopy] )); then\n        clipcopy=\"pbcopy\"\n    elif (( $+commands[xsel] )); then\n        clipcopy=\"xsel --clipboard --input\"\n    else\n        return 1\n    fi\n\n    printf -- \"$@\" | ${=clipcopy}\n}\n\nvi-set-buffer()\n{\n    read -k keys\n    if [[ $keys == '+' ]]; then\n        _clipcopy='+'\n    else\n        zle -U $keys\n        zle .vi-set-buffer\n    fi\n}\nzle -N vi-set-buffer\n\nvi-put-after()\n{\n    local cbuf\n    if [[ $_clipcopy == '+' ]]; then\n        cbuf=\"$CUTBUFFER\"\n        get-x-clipboard\n        zle .vi-put-after\n        unset _clipcopy\n        CUTBUFFER=\"$cbuf\"\n    else\n        zle .vi-put-after\n    fi\n}\nzle -N vi-put-after\n\nvi-put-before()\n{\n    local cbuf\n    if [[ $_clipcopy == '+' ]]; then\n        cbuf=\"$CUTBUFFER\"\n        get-x-clipboard\n        zle .vi-put-before\n        unset _clipcopy\n        CUTBUFFER=\"$cbuf\"\n    else\n        zle .vi-put-before\n    fi\n}\nzle -N vi-put-before\n\n#         _                       _              _                 _ \n#  __   _(_)  _ __ ___   ___   __| | ___  __   _(_)___ _   _  __ _| |\n#  \\ \\ / / | | '_ ` _ \\ / _ \\ / _` |/ _ \\ \\ \\ / / / __| | | |/ _` | |\n#   \\ V /| | | | | | | | (_) | (_| |  __/  \\ V /| \\__ \\ |_| | (_| | |\n#    \\_/ |_| |_| |_| |_|\\___/ \\__,_|\\___|   \\_/ |_|___/\\__,_|\\__,_|_|\n#                                                                   \n# create a new keymap and remap a few key's with other or new widget's\n\n# Main Highlighting Widget for VISUAL Mode\nvi-visual-highlight()\n{\n    integer CURSOR_HL MARK_HL\n\n    if [[ $CURSOR -gt $MARK ]];then\n        (( CURSOR_HL = CURSOR + 1 ))\n        __regstart=$MARK\n        __regend=$CURSOR_HL\n        region_highlight=(\"${MARK} ${CURSOR_HL} standout\")\n    elif [[ $MARK -gt $CURSOR ]];then\n        (( MARK_HL = MARK + 1 ))\n        __regstart=$CURSOR\n        __regend=$MARK_HL\n        region_highlight=(\"${CURSOR} ${MARK_HL} standout\")\n    elif [[ $MARK -eq $CURSOR ]];then\n        __regstart=$CURSOR\n        __regend=$MARK\n        region_highlight=(\"${CURSOR} ${MARK} standout\")\n    fi\n}\nzle -N vi-visual-highlight\n\n# Start Vi Visual mode\nvi-visual-mode()\n{\n    zle -K vivis\n    MARK=$CURSOR\n    zle vi-visual-highlight\n}\nzle -N vi-visual-mode\n\n# Exit Vi Visual mode and go to vi-cmd-mode\nvi-visual-exit()\n{\n    region_highlight=(\"0 0 standout\")\n    (( CURSOR = CURSOR + 1 ))\n    MARK=0\n    __regstart=0\n    __regend=0\n    zle .vi-cmd-mode\n}\nzle -N vi-visual-exit\n\n# Vi Visual Kill\nvi-visual-kill()\n{\n    if [[ $CURSOR -gt $MARK ]];then\n        (( CURSOR = CURSOR + 1 ))\n    elif [[ $MARK -gt $CURSOR ]];then\n        (( MARK = MARK + 1 ))\n    elif [[ $MARK -eq $CURSOR ]];then\n        zle .vi-delete-char\n        return 0\n    fi\n    zle .kill-region\n}\nzle -N vi-visual-kill\n\n# Exit Vi Visual and enter Insert mode\nvi-visual-exit-to-insert()\n{\n    region_highlight=(\"0 0 standout\")\n    MARK=0\n    __regstart=0\n    __regend=0\n    zle .vi-insert\n}\nzle -N vi-visual-exit-to-insert\n\n# Exit VISUAL mode and enter VLines Mode keeping the region\nvi-visual-exit-to-vlines()\n{\n    zle -K vivli\n    __savepos=$CURSOR\n    zle .vi-beginning-of-line -N\n    __start2=$CURSOR\n    zle .end-of-line -N\n    __end2=$CURSOR\n    CURSOR=$MARK\n    zle .vi-beginning-of-line -N\n    __start1=$CURSOR\n    zle .end-of-line -N\n    __end1=$CURSOR\n    zle vi-vlines-highlight\n}\nzle -N vi-visual-exit-to-vlines\n\n# Exit Vi Visual and open line above\nvi-visual-open-above()\n{\n    region_highlight=(\"0 0 standout\")\n    MARK=0\n    zle .vi-open-line-above\n}\nzle -N vi-visual-open-above\n\n# Vi Visual move to matched bracket\nvi-visual-match-bracket()\n{\n    zle .vi-match-bracket\n    zle vi-visual-highlight\n}\nzle -N vi-visual-match-bracket\n\n# Vi Visual move to column\nvi-visual-goto-column()\n{\n    zle .vi-goto-column\n    zle vi-visual-highlight\n}\nzle -N vi-visual-goto-column\n\n# Vi Visual move back to first non-blank char\nvi-visual-first-non-blank()\n{\n    zle .vi-first-non-blank\n    zle vi-visual-highlight\n}\nzle -N vi-visual-first-non-blank\n\n# Vi Visual repeat find\nvi-visual-repeat-find()\n{\n    zle .vi-repeat-find\n    zle vi-visual-highlight\n}\nzle -N vi-visual-repeat-find\n\n# Vi Visual reverse repeat find\nvi-visual-rev-repeat-find()\n{\n    zle .vi-rev-repeat-find\n    zle vi-visual-highlight\n}\nzle -N vi-visual-rev-repeat-find\n\n# Vi Visual kill whole line and enter to viins\nvi-visual-substitute-lines()\n{\n    local EOL\n    integer n\n    CURSOR=$__regend\n    zle .vi-end-of-line -N\n    EOL=$CURSOR\n    CURSOR=$__regstart\n    zle .vi-first-non-blank\n    n=$CURSOR\n    while [[ $n -lt $EOL ]]\n    do\n        zle .delete-char\n        (( n++ ))\n    done\n    zle vi-visual-exit-to-insert\n}\nzle -N vi-visual-substitute-lines\n\n# Vi Visual move backward-blank-word\nvi-visual-backward-blank-word()\n{\n    zle .vi-backward-blank-word\n    zle vi-visual-highlight\n}\nzle -N vi-visual-backward-blank-word\n\n# Vi Visual move forward-blank-word\nvi-visual-forward-blank-word-end()\n{\n    zle .vi-forward-blank-word-end\n    zle vi-visual-highlight\n}\nzle -N vi-visual-forward-blank-word-end\n\n# Vi Visual move to prev char x\nvi-visual-find-prev-char()\n{\n    zle .vi-find-prev-char\n    zle vi-visual-highlight\n}\nzle -N vi-visual-find-prev-char\n\n# Vi Visual insert bol\nvi-visual-insert-bol()\n{\n    zle vi-visual-exit-to-insert\n    zle .vi-insert-bol\n}\nzle -N vi-visual-insert-bol\n\n# Vi Visual Join Lines\nvi-visual-join()\n{\n    CURSOR=$__regstart\n    while [[ $RBUFFER == *$'\\n'* && $CURSOR -lt $__regend ]]\n    do\n        zle .vi-join\n    done\n    zle vi-visual-exit\n}\nzle -N vi-visual-join\n\n# Vi Visual move to prev char x and skip\nvi-visual-find-prev-char-skip()\n{\n    zle .vi-find-prev-char-skip\n    zle vi-visual-highlight\n}\nzle -N vi-visual-find-prev-char-skip\n\n# Vi Visual move forward blank word\nvi-visual-forward-blank-word()\n{\n    zle .vi-forward-blank-word\n    zle vi-visual-highlight\n}\nzle -N vi-visual-forward-blank-word\n\n# Vi Visual move backward word\nvi-visual-backward-word()\n{\n    zle .vi-backward-word\n    zle vi-visual-highlight\n}\nzle -N vi-visual-backward-word\n\n# Vi Visual change\nvi-visual-change()\n{\n    zle vi-visual-kill\n    set-x-clipboard \"$CUTBUFFER\"\n    zle vi-visual-exit-to-insert\n}\nzle -N vi-visual-change\n\n# Vi Visual Kill and enter vicmd\nvi-visual-kill-and-vicmd()\n{\n    zle vi-visual-kill\n    set-x-clipboard \"$CUTBUFFER\"\n    zle vi-visual-exit\n}\nzle -N vi-visual-kill-and-vicmd\n\n# Vi Visual move forward to word end\nvi-visual-forward-word-end()\n{\n    zle .vi-forward-word-end\n    zle vi-visual-highlight\n}\nzle -N vi-visual-forward-word-end\n\n# Vi Visual move to next char x\nvi-visual-find-next-char()\n{\n    zle .vi-find-next-char\n    zle vi-visual-highlight\n}\nzle -N vi-visual-find-next-char\n\n# Vi Visual move backward\nvi-visual-backward-char()\n{\n    zle .vi-backward-char\n    zle vi-visual-highlight\n}\nzle -N vi-visual-backward-char\n\n# Vi Visual move down\nvi-visual-down-line()\n{\n    setopt extended_glob\n    local NL_CHAR NL_SUM\n    NL_CHAR=${RBUFFER//[^$'\\n']/}\n    if [[ $RBUFFER == *$'\\n'* && $#NL_CHAR -ge $NUMERIC ]]; then\n        zle .down-line-or-history\n        zle vi-visual-highlight\n    else\n        return 1\n    fi\n}\nzle -N vi-visual-down-line\n\n# Vi Visual move up\nvi-visual-up-line()\n{\n    setopt extended_glob\n    local NL_CHAR\n    NL_CHAR=${LBUFFER//[^$'\\n']/}\n    if [[ $LBUFFER == *$'\\n'* && $#NL_CHAR -ge $NUMERIC ]]; then\n        zle .up-line-or-history\n        zle vi-visual-highlight\n    else\n        return 1\n    fi\n}\nzle -N vi-visual-up-line\n\n# Vi Visual move forward\nvi-visual-forward-char()\n{\n    zle .vi-forward-char\n    zle vi-visual-highlight\n}\n\nzle -N vi-visual-forward-char\n\n# Vi Visual Put\nvi-visual-put()\n{\n    zle vi-visual-kill\n    zle vi-visual-exit\n    (( CURSOR = CURSOR - 1 ))\n    if [[ $_clipcopy == '+' ]]; then\n        local cbuf\n        cbuf=\"$CUTBUFFER\"\n        get-x-clipboard\n        zle .vi-put-after\n        unset _clipcopy\n        CUTBUFFER=\"$cbuf\"\n    else\n        zle -U 2 && zle .vi-set-buffer\n        zle .vi-put-after\n    fi\n}\nzle -N vi-visual-put\n\n# Vi Visual exchange start and end of region\nvi-visual-exchange-points()\n{\n    local CS_SAVE\n    CS_SAVE=$CURSOR\n    CURSOR=$MARK\n    MARK=$CS_SAVE\n    zle vi-visual-highlight\n}\nzle -N vi-visual-exchange-points\n\n# Vi Visual move to till char x\nvi-visual-find-next-char-skip()\n{\n    zle .vi-find-next-char-skip\n    zle vi-visual-highlight\n}\nzle -N vi-visual-find-next-char-skip\n\n# Vi Visual lowercase region\nvi-visual-lowercase-region()\n{\n    local LCSTART LCEND\n    (( LCSTART = __regstart + 1 ))\n    LCEND=$__regend\n\n    if [[ $__regstart == $__regend ]]; then\n        BUFFER[${LCSTART}]=\"${(L)BUFFER[${LCSTART}]}\"\n        zle vi-visual-exit\n    else\n        BUFFER[${LCSTART},${LCEND}]=\"${(L)BUFFER[${LCSTART},${LCEND}]}\"\n        zle vi-visual-exit\n    fi\n}\nzle -N vi-visual-lowercase-region\n\n# Vi Visual uppercase region\nvi-visual-uppercase-region()\n{\n    local LCSTART LCEND\n    (( LCSTART = __regstart + 1 ))\n    LCEND=$__regend\n\n    if [[ $__regstart == $__regend ]]; then\n        BUFFER[${LCSTART}]=\"${(U)BUFFER[${LCSTART}]}\"\n        CURSOR=$__regstart\n        zle vi-visual-exit\n    else\n        BUFFER[${LCSTART},${LCEND}]=\"${(U)BUFFER[${LCSTART},${LCEND}]}\"\n        CURSOR=$__regstart\n        zle vi-visual-exit\n    fi\n}\nzle -N vi-visual-uppercase-region\n\n# Vi Visual replace region\nvi-visual-replace-region()\n{\n    integer n\n    local LCSTART LCEND\n    (( LCSTART = __regstart + 1 ))\n    LCEND=$__regend\n\n    if [[ $__regstart == $__regend ]]; then\n        read -k key\n        BUFFER[${LCSTART}]=\"$key\"\n        zle vi-visual-exit\n    else\n        read -k key\n        n=$LCSTART\n        while [[ $n -le ${LCEND} ]]\n        do\n            if [[ ! $BUFFER[$n] == $'\\n' ]] && [[ -n $BUFFER[$n] ]]; then\n                BUFFER[$n]=\"$key\"\n            fi\n            (( n++ ))\n        done\n        CURSOR=$__regstart\n        zle vi-visual-exit\n    fi\n}\nzle -N vi-visual-replace-region\n\n# Vi Visual move word forward\nvi-visual-forward-word()\n{\n    zle .vi-forward-word\n    zle vi-visual-highlight\n}\nzle -N vi-visual-forward-word\n\n# Vi Visual Yank\nvi-visual-yank()\n{\n    if [[ $__regstart == $__regend ]]; then\n        zle .vi-yank\n        zle vi-visual-exit\n    else\n        zle .copy-region-as-kill \"$BUFFER[${__regstart}+1,${__regend}]\"\n        zle vi-visual-exit\n    fi\n    set-x-clipboard \"$CUTBUFFER\"\n}\nzle -N vi-visual-yank\n\n# Vi Visual move to bol\nvi-visual-bol()\n{\n    zle .vi-digit-or-beginning-of-line\n    zle vi-visual-highlight\n}\nzle -N vi-visual-bol\n\n# Vi Visual move to eol\nvi-visual-eol()\n{\n    zle .vi-end-of-line\n    zle .vi-backward-char\n    zle vi-visual-highlight\n}\nzle -N vi-visual-eol\n\n# Some use(less|ful) keybindings\n# I took this from grml's zshrc\nif [[ \"$TERM\" != emacs ]] ; then\n    [[ -z \"$terminfo[kcuu1]\" ]] || bindkey -M vivis \"$terminfo[kcuu1]\" vi-visual-up-line\n    [[ -z \"$terminfo[kcud1]\" ]] || bindkey -M vivis \"$terminfo[kcud1]\" vi-visual-down-line\n    [[ -z \"$terminfo[kcuf1]\" ]] || bindkey -M vivis \"$terminfo[kcuf1]\" vi-visual-forward-char\n    [[ -z \"$terminfo[kcub1]\" ]] || bindkey -M vivis \"$terminfo[kcub1]\" vi-visual-backward-char\n    # ncurses stuff:\n    [[ \"$terminfo[kcuu1]\" == $'\\eO'* ]] && bindkey -M vivis \"${terminfo[kcuu1]/O/[}\" vi-visual-up-line\n    [[ \"$terminfo[kcud1]\" == $'\\eO'* ]] && bindkey -M vivis \"${terminfo[kcud1]/O/[}\" vi-visual-down-line\n    [[ \"$terminfo[kcuf1]\" == $'\\eO'* ]] && bindkey -M vivis \"${terminfo[kcuf1]/O/[}\" vi-visual-forward-char\n    [[ \"$terminfo[kcub1]\" == $'\\eO'* ]] && bindkey -M vivis \"${terminfo[kcub1]/O/[}\" vi-visual-backward-char\nfi\n\n#         _                       _              _ _                 \n#  __   _(_)  _ __ ___   ___   __| | ___  __   _| (_)_ __   ___  ___ \n#  \\ \\ / / | | '_ ` _ \\ / _ \\ / _` |/ _ \\ \\ \\ / / | | '_ \\ / _ \\/ __|\n#   \\ V /| | | | | | | | (_) | (_| |  __/  \\ V /| | | | | |  __/\\__ \\\n#    \\_/ |_| |_| |_| |_|\\___/ \\__,_|\\___|   \\_/ |_|_|_| |_|\\___||___/\n#                                                                    \n# Create new keymap using existing vicmd keymap\nbindkey -N vivli vicmd\nbindkey -M vivli -r 'i'\nbindkey -M vivli -r 'I'\nbindkey -M vivli -r 'a'\nbindkey -M vivli -r 'A'\nbindkey -M vivli 'u' vi-visual-lowercase-region\nbindkey -M vivli 'U' vi-visual-uppercase-region\nbindkey -M vivli 'r' vi-visual-replace-region\nbindkey -M vivli 'J' vi-visual-join\nbindkey -M vivli 'y' vi-visual-yank\nbindkey -M vivli 'Y' vi-visual-yank\nbindkey -M vivli '^[' vi-visual-exit\n#bindkey -M vivli 'jj' vi-visual-exit\nbindkey -M vivli 'V' vi-visual-exit\nbindkey -M vivli 'c' vi-visual-substitute-lines\nbindkey -M vivli 'C' vi-visual-substitute-lines\n#bindkey -M vivli 'S' vi-visual-substitute-lines\nbindkey -M vivli 'R' vi-visual-substitute-lines\n\n# Highlight Lines\nvi-vlines-highlight()\n{\n    if [[ $__start1 == $__start2 ]] && [[ $__end1 == $__end2 ]]; then\n        __regstart=$__start1\n        __regend=$__end1\n        region_highlight=(\"${__regstart} ${__regend} standout\")\n        CURSOR=$__savepos\n    elif [[ $__start1 -lt $__start2 ]] && [[ $__end1 -lt $__end2 ]]; then\n        __regstart=$__start1\n        __regend=$__end2\n        region_highlight=(\"${__regstart} ${__regend} standout\")\n        CURSOR=$__savepos\n    elif [[ $__start1 -gt $__start2 ]] && [[ $__end1 -gt $__end2 ]]; then\n        __regstart=$__start2\n        __regend=$__end1\n        region_highlight=(\"${__regstart} ${__regend} standout\")\n        CURSOR=$__savepos\n    fi\n}\nzle -N vi-vlines-highlight\n\n# Vi Visual Lines Mode\nvi-vlines-mode()\n{\n    zle -K vivli\n    __csorig=$CURSOR\n    __csbefore=$CURSOR\n    __savepos=$CURSOR\n    zle .vi-beginning-of-line -N\n    __start1=$CURSOR\n    __start2=$CURSOR\n    zle .end-of-line -N\n    __end1=$CURSOR\n    __end2=$CURSOR\n    zle vi-vlines-highlight\n}\nzle -N vi-vlines-mode\n\nvi-visual-whole-line()\n{\n    __csorig=$CURSOR\n    __csbefore=$CURSOR\n    __savepos=$CURSOR\n    zle .vi-beginning-of-line -N\n    __start1=$CURSOR\n    __start2=$CURSOR\n    zle .end-of-line -N\n    __end1=$CURSOR\n    __end2=$CURSOR\n    zle vi-vlines-highlight\n}\nzle -N vi-visual-whole-line\n\n# Exchange Start and End Point of Visual Lines Mode\nvi-vlines-exchange-points()\n{\n    local SAVE_S1 SAVE_E1\n\n    __csbefore=$__csorig\n    __csorig=$CURSOR\n    __savepos=$__csbefore\n\n    SAVE_S1=$__start1\n    SAVE_E1=$__end1\n    __start1=$__start2\n    __start2=$SAVE_S1\n    __end1=$__end2\n    __end2=$SAVE_E1\n    zle vi-vlines-highlight\n}\nzle -N vi-vlines-exchange-points\n\n# VI Visual Lines down\nvi-vlines-down-line()\n{\n    setopt extended_glob\n    local NL_CHAR NL_SUM\n    NL_CHAR=${RBUFFER//[^$'\\n']/}\n    if [[ $RBUFFER == *$'\\n'* && $#NL_CHAR -ge $NUMERIC ]]; then\n        zle .down-line-or-history\n        __savepos=$CURSOR\n        zle .vi-beginning-of-line -N\n        __start2=$CURSOR\n        zle .end-of-line -N\n        __end2=$CURSOR\n        zle vi-vlines-highlight\n    else\n        return 1\n    fi\n}\nzle -N vi-vlines-down-line\n\n# VI Visual Lines up\nvi-vlines-up-line()\n{\n    setopt extended_glob\n    local NL_CHAR NL_SUM\n    NL_CHAR=${LBUFFER//[^$'\\n']/}\n    if [[ $LBUFFER == *$'\\n'* && $#NL_CHAR -ge $NUMERIC ]]; then\n        zle .up-line-or-history\n        __savepos=$CURSOR\n        zle .vi-beginning-of-line -N\n        __start2=$CURSOR\n        zle .end-of-line -N\n        __end2=$CURSOR\n        zle vi-vlines-highlight\n    else\n        return 1\n    fi\n}\nzle -N vi-vlines-up-line\n\n# Kill highlighted region in VLines\nvi-vlines-kill()\n{\n    MARK=$__regend\n    CURSOR=$__regstart\n    zle .kill-region\n    if [[ $__regstart -le 1 ]]; then\n        zle .kill-whole-line\n    else\n        zle .backward-delete-char -N\n        zle .forward-char -N\n    fi\n}\nzle -N vi-vlines-kill\n\n# Kill highlighted region in VLines\nvi-vlines-kill-and-vicmd()\n{\n    zle vi-vlines-kill\n    set-x-clipboard \"$CUTBUFFER\"\n    zle vi-visual-exit\n}\nzle -N vi-vlines-kill-and-vicmd\n\n# Exit Visual Lines Mode and enter VISUAL Mode keeping the region\nvi-vlines-exit-to-visual()\n{\n    zle -K vivis\n    MARK=$__csorig\n    zle vi-visual-highlight\n}\nzle -N vi-vlines-exit-to-visual\n\n# Vi VLines Put\nvi-vlines-put()\n{\n    MARK=$__regend\n    CURSOR=$__regstart\n    zle .kill-region\n    if [[ $_clipcopy == '+' ]]; then\n        local cbuf\n        cbuf=\"$CUTBUFFER\"\n        get-x-clipboard\n        zle .vi-put-after\n        unset _clipcopy\n        CUTBUFFER=\"$cbuf\"\n    else\n        zle -U 2 && zle .vi-set-buffer\n        zle .vi-put-after\n    fi\n    zle vi-visual-exit\n}\nzle -N vi-vlines-put\n\n##################### zsh vi misc stuff ###############################################################################\n#######################################################################################################################\n\n# Vi go to line x\nvi-goto-line()\n{\n    setopt extended_glob\n    local LNL_CHAR RNL_CHAR NL_SUM CUR_LINE\n    integer n\n    LNL_CHAR=${LBUFFER//[^$'\\n']/}\n    RNL_CHAR=${RBUFFER//[^$'\\n']/}\n    (( CUR_LINE = $#LNL_CHAR + 1 ))\n    (( NL_SUM = $#LNL_CHAR + $#RNL_CHAR + 1 ))\n\n    if [[ $NUMERIC -gt NL_SUM ]]; then\n        return 1\n    fi\n\n    if [[ -z $NUMERIC || $NUMERIC == 0 ]]; then\n        CURSOR=$#BUFFER\n        zle .vi-first-non-blank\n        return 0\n    elif [[ -n $NUMERIC && $CUR_LINE -lt $NUMERIC ]]; then\n        n=$CUR_LINE\n        while [[ $n -lt $NUMERIC ]]\n        do\n            zle .down-line-or-history -N\n            (( n++ ))\n        done\n        zle .vi-first-non-blank\n        return 0\n    elif [[ -n $NUMERIC && $CUR_LINE -gt $NUMERIC ]]; then\n        n=$CUR_LINE\n        while [[ $n -gt $NUMERIC ]]\n        do\n            zle .up-line-or-history -N\n            (( n-- ))\n        done\n        zle .vi-first-non-blank\n        return 0\n    elif [[ -n $NUMERIC && $CUR_LINE -eq $NUMERIC ]]; then\n        zle .vi-first-non-blank\n        return 0\n    fi\n}\nzle -N vi-goto-line\n\n# Vi go to first line\nvi-goto-first-line()\n{\n    CURSOR=0\n    zle .vi-first-non-blank\n}\nzle -N vi-goto-first-line\n\n# Vi VISUAL go to line\nvi-visual-goto-line()\n{\n    zle vi-goto-line\n    zle vi-visual-highlight\n}\nzle -N vi-visual-goto-line\n\n# Vi VISUAL go to first line\nvi-visual-goto-first-line()\n{\n    zle vi-goto-first-line\n    zle vi-visual-highlight\n}\nzle -N vi-visual-goto-first-line\n\n# Vi Vlines go to line\nvi-vlines-goto-line()\n{\n    zle vi-goto-line\n    __savepos=$CURSOR\n    zle .vi-beginning-of-line -N\n    __start2=$CURSOR\n    zle .end-of-line -N\n    __end2=$CURSOR\n    zle vi-vlines-highlight\n}\nzle -N vi-vlines-goto-line\n\n# Vi Vlines go to first line\nvi-vlines-goto-first-line()\n{\n    zle vi-goto-first-line\n    __savepos=$CURSOR\n    zle .vi-beginning-of-line -N\n    __start2=$CURSOR\n    zle .end-of-line -N\n    __end2=$CURSOR\n    zle vi-vlines-highlight\n}\nzle -N vi-vlines-goto-first-line\n\nvi-visual-surround-dquote()\n{\n    zle vi-visual-kill\n    BUFFER=\"$LBUFFER\\\"$CUTBUFFER\\\"$RBUFFER\"\n    zle vi-visual-exit\n}\nzle -N vi-visual-surround-dquote\n\nvi-visual-surround-squote()\n{\n    zle vi-visual-kill\n    BUFFER=\"$LBUFFER'$CUTBUFFER'$RBUFFER\"\n    zle vi-visual-exit\n}\nzle -N vi-visual-surround-squote\n\nvi-visual-surround-parenthesis()\n{\n    zle vi-visual-kill\n    BUFFER=\"$LBUFFER($CUTBUFFER)$RBUFFER\"\n    zle vi-visual-exit\n}\nzle -N vi-visual-surround-parenthesis\n\nvi-visual-surround-space()\n{\n    zle vi-visual-kill\n    BUFFER=\"$LBUFFER $CUTBUFFER $RBUFFER\"\n    zle vi-visual-exit\n}\nzle -N vi-visual-surround-space\n\n#bindkey -M vivis '-' vi-visual-up-line\n#bindkey -M vivis 'S' vi-visual-substitute-lines\n#bindkey -M vivis 'v' vi-visual-exit\n#bindkey -M vivli 'v' vi-vlines-exit-to-visual\n\nbindkey -M vivis \"\\\"\" vi-set-buffer\nbindkey -M vivis '1'  digit-argument\nbindkey -M vivis '2'  digit-argument\nbindkey -M vivis '3'  digit-argument\nbindkey -M vivis '4'  digit-argument\nbindkey -M vivis '5'  digit-argument\nbindkey -M vivis '6'  digit-argument\nbindkey -M vivis '7'  digit-argument\nbindkey -M vivis '8'  digit-argument\nbindkey -M vivis '9'  digit-argument\nbindkey -M vicmd 'G'  vi-goto-line\nbindkey -M vicmd 'V'  vi-vlines-mode\nbindkey -M vicmd 'gg' vi-goto-first-line\nbindkey -M vicmd 'v'  vi-visual-mode\nbindkey -M vivis \"S'\" vi-visual-surround-squote\nbindkey -M vivis ' '  vi-visual-forward-char\nbindkey -M vivis '%'  vi-visual-match-bracket\nbindkey -M vivis '+'  vi-visual-down-line\nbindkey -M vivis ','  vi-visual-rev-repeat-find\nbindkey -M vivis '0'  vi-visual-bol\nbindkey -M vivis ';'  vi-visual-repeat-find\nbindkey -M vivis 'B'  vi-visual-backward-blank-word\nbindkey -M vivis 'C'  vi-visual-substitute-lines\nbindkey -M vivis 'D'  vi-visual-kill-and-vicmd\nbindkey -M vivis 'E'  vi-visual-forward-blank-word-end\nbindkey -M vivis 'F'  vi-visual-find-prev-char\nbindkey -M vivis 'G'  vi-visual-goto-line\nbindkey -M vivis 'I'  vi-visual-insert-bol\nbindkey -M vivis 'J'  vi-visual-join\nbindkey -M vivis 'O'  vi-visual-exchange-points\nbindkey -M vivis 'R'  vi-visual-substitute-lines\nbindkey -M vivis 'S ' vi-visual-surround-space\nbindkey -M vivis 'S\"' vi-visual-surround-dquote\nbindkey -M vivis 'S(' vi-visual-surround-parenthesis\nbindkey -M vivis 'S)' vi-visual-surround-parenthesis\nbindkey -M vivis 'T'  vi-visual-find-prev-char-skip\nbindkey -M vivis 'U'  vi-visual-uppercase-region\nbindkey -M vivis 'V'  vi-visual-exit-to-vlines\nbindkey -M vivis 'W'  vi-visual-forward-blank-word\nbindkey -M vivis 'Y'  vi-visual-yank\nbindkey -M vivis '\\$' vi-visual-eol\nbindkey -M vivis '\\^' vi-visual-first-non-blank\nbindkey -M vivis '\\|' vi-visual-goto-column\nbindkey -M vivis '^?' vi-visual-backward-char\nbindkey -M vivis '^M' vi-visual-yank\nbindkey -M vivis '^[' vi-visual-exit\nbindkey -M vivis 'b'  vi-visual-backward-word\nbindkey -M vivis 'c'  vi-visual-change\nbindkey -M vivis 'd'  vi-visual-kill-and-vicmd\nbindkey -M vivis 'e'  vi-visual-forward-word-end\nbindkey -M vivis 'f'  vi-visual-find-next-char\nbindkey -M vivis 'gg' vi-visual-goto-first-line\nbindkey -M vivis 'h'  vi-visual-backward-char\nbindkey -M vivis 'j'  vi-visual-down-line\nbindkey -M vivis 'jj' vi-visual-exit\nbindkey -M vivis 'k'  vi-visual-up-line\nbindkey -M vivis 'l'  vi-visual-forward-char\nbindkey -M vivis 'o'  vi-visual-exchange-points\nbindkey -M vivis 'p'  vi-visual-put\nbindkey -M vivis 'r'  vi-visual-replace-region\nbindkey -M vivis 't'  vi-visual-find-next-char-skip\nbindkey -M vivis 'u'  vi-visual-lowercase-region\nbindkey -M vivis 'v'  vi-visual-eol\nbindkey -M vivis 'w'  vi-visual-forward-word\nbindkey -M vivis 'y'  vi-visual-yank\nbindkey -M vivis 'X'  vi-visual-kill-and-vicmd\nbindkey -M vivis 'x'  vi-visual-kill-and-vicmd\n\nbindkey -M vivli 'D'  vi-vlines-kill-and-vicmd\nbindkey -M vivli 'G'  vi-vlines-goto-line\nbindkey -M vivli 'O'  vi-vlines-exchange-points\nbindkey -M vivli 'P'  vi-vlines-put\nbindkey -M vivli 'd'  vi-vlines-kill-and-vicmd\nbindkey -M vivli 'gg' vi-vlines-goto-first-line\nbindkey -M vivli 'j'  vi-vlines-down-line\nbindkey -M vivli 'k'  vi-vlines-up-line\nbindkey -M vivli 'o'  vi-vlines-exchange-points\nbindkey -M vivli 'p'  vi-vlines-put\nbindkey -M vivli 'v'  vi-vlines-exit-to-visual\n\n"
  },
  {
    "path": ".func/article",
    "content": "bib_safe(){ biber --tool --output_encoding=ascii --output_safechars $BIB; }\nget_doi(){ pdftotext $1 - | grep -i \"doi\"; }\ntex2pdf(){ ls $1 | entr latexmk -quiet -bibtex -f -pdf $1; latexmk -bibtex -c; }\nimg4ppr(){ convert -units PixelsPerInch $1 -quality 100 -density 300 $1.jpg; }\niten(){ translate --sl=it --tl=en \"$@\"; }\nenit(){ translate --sl=en --tl=it \"$@\"; }\n"
  },
  {
    "path": ".func/code",
    "content": "function dallo() { colordiff $@ | bat; }\n\nalias one=\"nix-shell --command zsh\"\nalias six=\"nix-shell --command zsh support/shell.nix\"\n\nalias git='hub'\nalias doc='docker'\nalias docker='supdock'\n\nalias dev='devenv'\nalias pro='proji'\n\nfunction cdp(){ cd $(pro ls | head -n-1 | tail -n+4 | fzy | cut -d \"|\" -f4); }\n\nfunction finder(){ file=$(find ${1:-$PWD} -name \"*\" -type f | fzp); [[ -n $file ]] && nvim $file; }\nfunction search(){ rg $@; }\nfunction replace(){ rg -l $1 | xargs sed -i \"s/$1/$2/g\" *;}\n\nfunction compile(){ [[ $(ls -A build/) ]] && rm -rf build/*; cmake -H. -Bbuild -DHUNTER_STATUS_DEBUG=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_BUILD_TYPE=${1:-FastDebug} ${2:-\"\"} 2>&1 | bat; }\nfunction build(){ cmake --build build/ --target; }\nfunction kungfu(){ compile ${1:-FastDebug} && cmake --build build/ --target; }\nfunction karate(){ compile ${1:-FastDebug} -GNinja && ninja -C build; }\n"
  },
  {
    "path": ".func/docker",
    "content": "function hass(){ docker run -d --name=hass --volume=\"/home/bresilla/.hassio:/config\" --volume=\"/etc/localtime:/etc/localtime:ro\" --net=host homeassistant/home-assistant; }\n\nfunction port(){ docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v ~/.config/portainer:/data portainer/portainer && xdg-open \"http://localhost:9000\" || docker start port && xdg-open \"http://localhost:9000/#/dashboard\"; }\n\nfunction mopi(){ docker run -d --rm --user $UID:$GID -v /run/user/$UID/pulse:/run/user/105/pulse -p 6600:6600 -p 6680:6680 bresilla/mopidy mopidy -o spotify/username=$spotname -o spotify/password=$spotpass -o spotify/client_id=$spotid -o spotify/client_secret=$spotsecret; }\n\nfunction nass(){ docker run -d -p 8080:80 -v \"/home/bresilla/sync/nextcloud:/var/www/html\" -v \"/home/bresilla/data/TEMP:/home\" nextcloud; }\n\nfunction ltex(){ docker run -v $PWD/:/doc/ -v /home/$USER/.fonts/:/usr/share/fonts/external/ -t -i thomasweise/texlive $@; }\n"
  },
  {
    "path": ".func/media",
    "content": "function img2svg() { convert -channel RGB -compress None $1 ppm:- | potrace -s --flat - -o $1.svg && suda rm -r $1; }\nfunction img24k() { convert $1 -resize 4096x2160 -define filter:support=2 -unsharp 3x1.7+1.9+0.065 $1_4k_SH.jpg; }\nfunction tubedl(){ clipp=$(xsel --clipboard); youtube-dl -i -f best --yes-playlist --restrict-filenames -o \"%(autonumber)s-%(title)s.%(ext)s\" --no-part --skip-unavailable-fragments --no-overwrites ${1:-$clipp}; }\nfunction dotshot(){ sleep ${1:-5} && scr=~/TEMP/$(date +%s).png && scrot -d 1 $scr && sxiv $scr; } #&& convert $scr -gravity North -chop 0x1080 $scr;\nfunction dotback(){ sleep ${2:-10} && scr=~/TEMP/$(date +%s).png && scrot -d 1 $scr; xdotool key 'Escape'; sleep .2 && sxiv $scr & sleep 2 && xdotool key 'e+Up' && sleep .2 && xdotool key 'Up+Up'; sleep .2 && maim -s $scr; } #&& convert $scr -gravity North -chop 0x1080 $scr;\nfunction flix(){ peerflix $@ --mpv; }\n\nalias asci='asciinema'\n"
  },
  {
    "path": ".func/network",
    "content": "function dnsinuse(){ nmcli dev show | grep IP4.DNS; }\nfunction findip(){ doas arp-scan --localnet; }\nfunction netspeed() { wget --output-document=/dev/null http://speedtest.wdc01.softlayer.com/downloads/test500.zip; }\nfunction portgraph(){ doas lsof -n -F | ./lsofgraph | dot -Tjpg > /tmp/a.jpg; }\nfunction portmon(){ doas lsof -Pnl -i4; }\nfunction openports(){ doas netstat -tulpn; }\nfunction wifis(){ nmcli -t -f ssid dev wifi; }\nfunction myip(){ int=$(curl -s https://api.myip.com); echo $int | jq -r '.ip' && echo $int | jq -r '.country'; }\n"
  },
  {
    "path": ".func/robot",
    "content": "###ROS\nfunction ros_exist(){ export CATKIN_PATH=$PWD; cd src && catkin_init_workspace; cd .. && catkin_make; }\nfunction ros_init(){ mkdir \"$1\" && cd \"$1\"; export CATKIN_PATH=$PWD; mkdir src && cd src && catkin_init_workspace &&\tcd $CATKIN_PATH && catkin_make; }\nfunction ros_source(){ source /opt/ros/kinetic/setup.bash && cd $CATKIN_PATH && source devel/setup.bash; }\nfunction ros_build(){ TEMPATH=$PWD; cd $CATKIN_PATH && catkin_make; cd $TEMPATH; }\nfunction ros_depend(){ cd $CATKIN_PATH && rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y; }\nfunction ros_makepack(){ cd $CATKIN_PATH/src && catkin_create_pkg \"$1\" && mkdir \"$1\"/src/ && touch \"$1\"/src/\"$1\" && chmod u+x \"$1\"/src/\"$1\" && echo '#!/usr/bin/env python' >> \"$1\"/src/\"$1\"; }\nfunction ros_gitpack(){ cd $CATKIN_PATH/src && git clone $1 && cd $CATKIN_PATH; }\n\n###REMOTE\nfunction pissh(){ ssh -R 52698:127.0.0.1:52698 trim@$pi -X; }\nfunction pifsh(){ sshfs trim@$pi:/home/trim /home/bresilla/Remote; }\nfunction pivid(){ mplayer -fps 200 -demuxer h264es ffmpeg://tcp://$pi:2222; }\nfunction pisyc(){ watch -n 10 rsync -avz /media/bresilla/indrive/Code/Raspi/ trim@$pi:/home/trim/Code/; }\nfunction pivnc(){ vncviewer $pi:1 --passwd=/home/bresilla/.vnc/passwd; }\nfunction pimav(){ mavproxy.py --master udp:\"$pi\":14560 --out \"$pi\":14550 --out \"$pi\":14551 --out \"$pi\":14552 --out \"$pi\":14553 --out \"$pi\":14554 --out \"$pi\":14555 --out \"$pi\":14556 --out \"$pi\":14557 --out \"$pi\":14558 --out \"$pi\":14559 --out \"$2\":14550 --out \"$3\":14550 --out \"$4\":14550; }\nfunction picpy(){ [[ $# -eq 0 ]] && scp $PWD/* trim@$pi:/home/trim || scp $@ trim@$pi:/home/trim; }\n"
  },
  {
    "path": ".func/system",
    "content": "alias s='sudo -E'\n\nalias ups=\"doas systemctl\"\nalias upu=\"systemctl --user\"\nalias clip='xclip -sel clip'\nalias suspend='systemctl suspend'\n\n#ALTERNATIVES\nalias vim='nvim'\nalias mutt='neomutt'\nalias ping=\"mtr\"\n\n#PACKAGE_MANAGER\nalias pack='unset GOPATH; unset GOBIN && yay'\nalias mirror=\"doas pacman-mirrors --fasttrack 5 && doas pacman -Syyu\"\nfunction branch(){ doas pacman-mirrors --api -S $@ && mirror; }\n\n#WM\nalias refresh='pkill -USR1 -x sxhkd && bash ~/.startup -r'\nalias dotfile='/usr/bin/git --git-dir=$HOME/dots --work-tree=$HOME'\n\n#SYSTEM\nalias cp='acp -g -r -p'\nalias mv='amv -g -u'\nalias rm='rm -rf'\nalias rn='mv -v'\nfunction mk(){ mkdir -p \"$(dirname \"$1\")\" && touch \"$1\"; }\n\n\nalias ls='exa -F'\nalias ll='exa -liSHF --header --git --group-directories-first --tree -L1'\nalias la='exa -laiSHF --header --git --group-directories-first --tree -L1'\nalias lt='exa -liSHF --header --git --tree -L2'\nalias lu='dutree -d1 --usage -x .git -x .direnv'\n\nalias df='dfc -dTomw -p -/dev/loop,tmp,dev,run,one'\nalias lsblk='lsblk -f'\nalias dd='dd status=progress'\nalias ncdu='doas ncdu --color=dark \\\n    --exclude /home \\\n    --exclude /opt \\\n    --exclude /nix \\\n    --exclude /var/lib/libvirt \\\n    --exclude /var/lib/docker \\\n    --exclude /var/lib/flatpak \\\n    --exclude /var/lib/snapd \\\n    --exclude /var/lib/lxd'\n\n#LOGS\n# function syslog(){ bat \"/var/log/syslog\" }\n\n##PROGRAMS\nfunction fzp(){ fzf --preview=\"head -$LINES {}\"; }\nfunction _shko(){ shko -c --short 19 && cd \"$(cat ~/.config/shko/settings/chdir)\"; }\nalias x='dtrx --one-entry=rename'\nalias ari='aria2c'\nalias mix='ncpamixer'\nalias inxi='optirun inxi -Fxxxz'\n\n##HISTORY\nfunction hister(){ fc -lrn 0 | tux -e | clip; }\nfunction delete_hister(){ name=$(tac $HISTFILE | fzy); [[ -n $name ]] && LC_ALL=C sed -i \"/$name/d\" $HISTFILE; }\n\n##FILES\nalias own='doas chown -R $USER:$USER'\nalias exe='chmod u+x'\nalias dxe='chmod u-x'\n\n#FUNCTIONS\n# run(){ nohup $1 > /dev/null 2>&1 &! }\nfunction open(){ nohup mimeo $1 > /dev/null 2>&1 &!; }\nfunction note(){ nvim $(notes list | fzp); }\nfunction phone(){ sshfs -p 1234 bresilla@$1:/storage/emulated/0 /home/bresilla/OnePlus; }\nfunction diskspeed() { doas dd if=$1 of=/dev/null bs=512k count=16k iflag=direct; }\nfunction rofit(){ rofi -theme $HOME/.config/rofi/rofi_bar -theme-str \"*{accent: ${FOREGROUND:-#000000};}\" -dmenu -i -p '>>>'; }\nfunction showpath() { echo $PATH | tr ':' '\\n' | rofit; }\nfunction snip(){ PREV=$(fc -lrn | head -n 1); sh -c \"pet new `printf %q \"$PREV\"`\"; }\nfunction killer(){ n=$(ps -ef | sed 1d | tux -m | awk '{print $2}'); [[ -n $n ]] && doas kill $n; }\n\n#WINDOW MANAGER\nfunction class(){ xprop |awk '/WM_CLASS/{print $4}'; }\nfunction configs(){ name=$(fd -E \".git\" -t f -H . '/home/bresilla/dots/' | fzp); [[ -n $name ]] && nvim $name; }\n"
  },
  {
    "path": ".gitconfig",
    "content": "[user]\n\temail = trim.bresilla@gmail.com\n\tname = Trim Bresilla\n[core]\n    pager = delta --dark --plus-color=\"#012800\" --minus-color=\"#340001\" --theme=\"OneHalfDark\"\n\n[credential]\n\thelper = cache --timeout=10000\n\n[color]\n    ui = true\n[color \"branch\"]\n    current = yellow reverse\n    local = yellow\n    remote = green\n[color \"diff\"]\n    meta = yellow bold\n    frag = magenta bold\n    old = red bold\n    new = green bold\n[color \"status\"]\n    added = yellow\n    changed = green\n    untracked = red\n\n[push]\n    default = simple\n[pull]\n    rebase = true\n[rebase]\n    autostash = true\n\n[merge]\n    log = true\n    ff = false\n\ttool = diffconflicts\n[mergetool \"diffconflicts\"]\n    cmd = vim -c DiffConflicts \\\"$MERGED\\\" \\\"$BASE\\\" \\\"$LOCAL\\\" \\\"$REMOTE\\\"\n    trustExitCode = true\n[mergetool]\n    keepBackup = false\n\n[alias]\n    view = !grv\n    ban = \"!fd -E \".git\" -H . | fzf | parallel 'git ignore {}; git rm -rf --cached {};'\"\n    uncommit = reset --soft HEAD^\n    master = checkout master\n    develop = checkout develop\n    module = submodule\n    clone = clone --recursive\n    sshify = \"!f(){ [[ $(git remote -v | awk 'NR==1{print $2}' | awk -F'/' '/com/ {print $1}') == \"https:\" ]] && git remote -v | awk 'NR==1{print $2}' | awk -F'/' '{print $4,$5}' | export read username reponame && git remote set-url origin git@github.com:$username/$reponame.git; }; f\"\n    get = \"!f(){ INPUT=${1:-$(xsel --clipboard)}; NAMEEE=$(echo $INPUT | cut -d/ -f1-5); git clone --recursive $NAMEEE; }; f\"\n    down = \"!f(){ INPUT=${1:-$(xsel --clipboard)}; NAMEEE=$(echo $INPUT | cut -d/ -f1-5); git clone --recursive $NAMEEE -- /home/$USER/down/$(echo $NAMEEE | cut -d/ -f5); }; f\"\n    unfuck = \"!f(){ git reset --hard origin/`git rev-parse --abbrev-ref HEAD`; rm -fv `git st | grep ^? | cut -d' '  -f2-`; }; f\"\n    tree = log --graph --all --format=format:'%w(80,0,0)%C(bold magenta)%h%C(reset) %C(white)%ad%C(reset) %C(dim white)(%ar)%C(reset) %C(bold dim white)%aN%C(auto)%+D%C(reset)%n%C(bold white)%s%C(reset)%+b%n'\n    publish = \"!f(){ git push origin --follow-tags $1 && git checkout develop && hub browse; }; f\"\n    open = \"!f(){ hub browse; }; f\"\n    remotes = remote -v\n    branches = branch -a\n    conflicts = !git diff --name-only --diff-filter=U\n    fix = !git mergetool --tool=diffconflicts\n"
  },
  {
    "path": ".gitignore",
    "content": ".config/nvim/plugged/\n.config/Code/\nSets\nOSS/\n.config/mutt/account.com.gmail.kushtrim\n.config/mutt/account.com.hotmail.kushtrim\n.config/mutt/account.com.unibo.kushtrim\n.config/mutt/account.com.yahoo.kushtrim\n.other\n.local\n.config/direnv/allow\n"
  },
  {
    "path": ".profile",
    "content": "#USER_BIN\n[[ -d \"$HOME/.bin\" ]] && PATH=\"$HOME/.bin:$PATH\"\n[[ -d \"$HOME/.sbin\" ]] && PATH=\"$HOME/.sbin:$PATH\"\n[[ -d \"$HOME/.local/bin\" ]] && PATH=\"$HOME/.local/bin:$PATH\"\n[[ -d \"$HOME/.local/sbin\" ]] && PATH=\"$HOME/.local/sbin:$PATH\"\n\n#GO\n[[ -d \"/opt/bin/go/bin\" ]] && PATH=\"/opt/bin/go/bin:$PATH\"\n#RUST\n[[ -d \"/opt/bin/cargo/bin\" ]] && PATH=\"/opt/bin/cargo/bin:$PATH\"\n#NIM\n[[ -d \"/opt/bin/nimble/bin\" ]] && PATH=\"/opt/bin/nimble/bin:$PATH\"\n\n#NIX\n[[ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]] && . $HOME/.nix-profile/etc/profile.d/nix.sh;\n# [[ -d \"$HOME/.nix-profile/bin\" ]] && PATH=\"$HOME/.nix-profile/bin:$PATH\";\n# [[ -d \"/nix/var/nix/profiles/default/bin\" ]] && PATH=\"/nix/var/nix/profiles/default/bin:$PATH\";\n\n#OTHER VARS\n[[ -e \"/home/bresilla/.variables\" ]] && source /home/bresilla/.variables\n\nexport BROWSER=firefox\nexport EDITOR=nvim\nexport TERMINAL=kitty\nexport MANPATH=$(manpath)\n\n\nexport SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)\nexport MONITOR1=eDP1\nexport MONITOR2=DP1\n\nexport CARGO_HOME=\"/opt/bin/cargo\"\nexport NIMBLE_DIR=\"/opt/bin/nimble\"\nexport GOPATH=\"/opt/bin/go\"\nexport GOBIN=\"$GOPATH/bin\"\n\n\nexport UBUNTUPATH=\"/opt/chroot/ubuntu\"\nexport TZ='Europe/Berlin'\n\n\nexport WINEPREFIX=/opt/wine\nexport LOCALE_ARCHIVE=/usr/lib/locale/locale-archive\nexport XDG_CONFIG_HOME=/home/$USER/.config\nexport XDG_CONFIG_PATH=/home/$USER/.config\n\nexport IPFS_PATH=/home/bresilla/sync/planetary/ipfs\n\nexport DOTS=/home/bresilla/dots\nexport WALL=/usr/share/backgrounds\nexport CODE=/home/bresilla/DATA/CODE\nexport PRO=/home/bresilla/DATA/CODE/PROJECTS\n\nexport FOREGROUND=$(xrdb -query | grep 'foreground:'| awk 'NR==1{print $NF}')\nexport BACKGROUND=$(xrdb -query | grep 'background:'| awk 'NR==1{print $NF}')\nexport BLACK=$(xrdb -query | grep 'color0:'| awk 'NR==1{print $NF}')\nexport RED=$(xrdb -query | grep 'color1:'| awk 'NR==1{print $NF}')\nexport GREEN=$(xrdb -query | grep 'color2:'| awk 'NR==1{print $NF}')\nexport YELLOW=$(xrdb -query | grep 'color3:'| awk 'NR==1{print $NF}')\nexport BLUE=$(xrdb -query | grep 'color4:'| awk 'NR==1{print $NF}')\nexport MAGENTA=$(xrdb -query | grep 'color5:'| awk 'NR==1{print $NF}')\nexport CYAN=$(xrdb -query | grep 'color6:'| awk 'NR==1{print $NF}')\nexport WHITE=$(xrdb -query | grep 'color7:'| awk 'NR==1{print $NF}')\n"
  },
  {
    "path": ".sbin/adblock",
    "content": "#!/bin/sh\n\n# Version:    2.1.3\n# Author:     Héctor Molinero Fernández <hector@molinero.dev>\n# Repository: https://github.com/hectorm/hblock\n# License:    MIT, https://opensource.org/licenses/MIT\n\nset -eu\nexport LC_ALL=C\n\n# shellcheck disable=SC2039\nHOSTNAME=${HOSTNAME-$(uname -n)}\n\n# Builtin values\nBUILTIN_HEADER=$(cat <<-EOF\n127.0.0.1       localhost $HOSTNAME\n127.0.0.1       services.bitwig.com dash.bitwig.com\n255.255.255.255 broadcasthost\n::1             localhost ip6-localhost ip6-loopback\nfe00::0         ip6-localnet\nff00::0         ip6-mcastprefix\nff02::1         ip6-allnodes\nff02::2         ip6-allrouters\nff02::3         ip6-allhosts\nEOF\n)\nBUILTIN_FOOTER=''\nBUILTIN_SOURCES=$(cat <<-'EOF'\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/adguard-simplified/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/antipopads/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-ad/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-malvertising/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-malware/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-tracking/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/dshield.org-high/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/easyprivacy/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/eth-phishing-detect/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.2o7net/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.dead/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.risk/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.spam/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/hostsvn/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/kadhosts/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/malwaredomainlist.com/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/malwaredomains.com-immortaldomains/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/malwaredomains.com-justdomains/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/matomo.org-spammers/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/mitchellkrogza-badd-boyz-hosts/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/pgl.yoyo.org/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/phishing.army/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/ransomwaretracker.abuse.ch/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/someonewhocares.org/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/spam404.com/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/stevenblack/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-badware/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-privacy/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/winhelp2002.mvps.org/list.txt\n\thttps://raw.githubusercontent.com/hectorm/hmirror/master/data/zerodot1-coinblockerlists-browser/list.txt\nEOF\n)\nBUILTIN_WHITELIST=''\nBUILTIN_BLACKLIST=''\n\n# Check if a program exists\nexists() {\n\t# shellcheck disable=SC2230\n\tif command -v true; then command -v -- \"$1\"\n\telif eval type type; then eval type -- \"$1\"\n\telse which -- \"$1\"; fi >/dev/null 2>&1\n}\n\n# Escape strings in sed\n# See: https://stackoverflow.com/a/29613573\nquoteRe() { printf -- '%s' \"$1\" | sed -e 's/[^^]/[&]/g; s/\\^/\\\\^/g; $!a'\\\\''\"$(printf '\\n')\"'\\\\n' | tr -d '\\n'; }\nquoteSubst() { printf -- '%s' \"$1\" | sed -e ':a' -e '$!{N;ba' -e '}' -e 's/[&/\\]/\\\\&/g; s/\\n/\\\\&/g'; }\n\n# Remove comments from string\nremoveComments() { printf -- '%s' \"$1\" | sed -e 's/[[:blank:]]*#.*//'; }\n\n# Translate true/false to yes/no\ngetBoolVal() { [ \"$1\" = true ] && s='yes' || s='no'; printf -- '%s' \"$s\"; }\n\n# Print to stdout if quiet mode is not enabled\nprintStdout() {\n\tif [ \"$quiet\" != true ]; then\n\t\t# shellcheck disable=SC2059\n\t\tprintf -- \"$@\"\n\tfi\n}\n\n# Print to stderr\nprintStderr() {\n\t# shellcheck disable=SC2059\n\t>&2 printf -- \"$@\"\n}\n\n# Print informational message\nlogInfo() {\n\tprintStdout '   - %s\\n' \"$@\"\n}\n\n# Print action message\nlogAction() {\n\tif [ \"$color\" = true ]; then\n\t\tprintStdout '\\033[1;33m + \\033[1;32m%s \\033[0m\\n' \"$@\"\n\telse\n\t\tprintStdout ' + %s \\n' \"$@\"\n\tfi\n}\n\n# Print error message\nlogError() {\n\tif [ \"$color\" = true ]; then\n\t\tprintStderr '\\033[1;33m + \\033[1;31m%s \\033[0m\\n' \"$@\"\n\telse\n\t\tprintStderr ' + %s \\n' \"$@\"\n\tfi\n}\n\n# Create temporary file\ncreateTempFile() {\n\tif exists mktemp; then mktemp\n\telse # Since POSIX does not specify mktemp utility, use this as fallback\n\t\ttempCounter=${tempCounter:-9999}\n\t\ttempFile=\"${TMPDIR:-/tmp}/hblock.$$.$((tempCounter+=1))\"\n\t\trm -f -- \"$tempFile\" && (umask 077 && touch -- \"$tempFile\")\n\t\tprintf -- '%s\\n' \"$tempFile\"\n\tfi\n}\n\n# Print to stdout the contents of a URL\nfetchUrl() {\n\t# If the protocol is \"file://\" we can omit the download and simply use cat\n\tif [ \"${1#file://}\" != \"$1\" ]; then cat -- \"${1#file://}\"\n\telse\n\t\tuserAgent='Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'\n\t\tif exists curl; then curl -fsSL -A \"$userAgent\" -- \"$1\";\n\t\telif exists wget; then wget -qO- -U \"$userAgent\" -- \"$1\";\n\t\telse\n\t\t\tlogError 'Either wget or curl are required for this script'\n\t\t\texit 1\n\t\tfi\n\tfi\n}\n\n# Show help and quit\nshowHelp() {\n\tif [ $# -eq 0 ]; then\n\t\tprintStdout '%s\\n' \"$(cat <<-'EOF'\n\t\t\tUsage: hblock [options...]\n\t\t\t -O, --output <FILE>\n\t\t\t        Output file location\n\t\t\t        (default: \"/etc/hosts\" file)\n\t\t\t -H, --header <FILE>\n\t\t\t        Content to be included at the beginning of the output file\n\t\t\t        (default: HBLOCK_HEADER environment variable,\n\t\t\t        \"/etc/hblock.d/header\" file or builtin value)\n\t\t\t -F, --footer <FILE>\n\t\t\t        Content to be included at the end of the output file\n\t\t\t        (default: HBLOCK_FOOTER environment variable,\n\t\t\t        \"/etc/hblock.d/footer\" file or builtin value)\n\t\t\t -S, --sources <FILE>\n\t\t\t        Newline separated URLs used to generate the blocklist\n\t\t\t        (default: HBLOCK_SOURCES environment variable,\n\t\t\t        \"/etc/hblock.d/sources.list\" file or builtin value)\n\t\t\t -W, --whitelist <FILE>\n\t\t\t        Newline separated domains to be removed from the blocklist\n\t\t\t        (default: HBLOCK_WHITELIST environment variable,\n\t\t\t        \"/etc/hblock.d/whitelist.list\" file or builtin value)\n\t\t\t -B, --blacklist <FILE>\n\t\t\t        Newline separated domains to be added to the blocklist\n\t\t\t        (default: HBLOCK_BLACKLIST environment variable,\n\t\t\t        \"/etc/hblock.d/blacklist.list\" file or builtin value)\n\t\t\t -R, --redirection <REDIRECTION>\n\t\t\t        Redirection for all entries in the blocklist\n\t\t\t        (default: 0.0.0.0)\n\t\t\t -T, --template <TEMPLATE>\n\t\t\t        POSIX BREs replacement applied to each entry\n\t\t\t        \\1 = <DOMAIN>, \\2 = <REDIRECTION>\n\t\t\t        (default: \\2 \\1)\n\t\t\t -C, --comment <COMMENT>\n\t\t\t        Character used for comments\n\t\t\t        (default: #)\n\t\t\t -b, --backup [DIRECTORY]\n\t\t\t        Make a time-stamped backup in <DIRECTORY>\n\t\t\t        (default: output file directory)\n\t\t\t -l, --lenient\n\t\t\t        Match all entries from sources, regardless of their IP\n\t\t\t        (default: 0.0.0.0, 127.0.0.1 or none)\n\t\t\t -r, --enable-whitelist-regex\n\t\t\t        Use POSIX BREs instead of fixed strings\n\t\t\t -i, --ignore-download-error\n\t\t\t        Do not abort if a download error occurs\n\t\t\t -c, --color <auto|true|false>\n\t\t\t        Colorize the output\n\t\t\t        (default: auto)\n\t\t\t -q, --quiet\n\t\t\t        Suppress non-error messages\n\t\t\t -v, --version\n\t\t\t        Show version number and quit\n\t\t\t -h, --help\n\t\t\t        Show this help and quit\n\n\t\t\tReport bugs to: <https://github.com/hectorm/hblock/issues>.\n\t\tEOF\n\t\t)\"\n\t\texit 0\n\telse\n\t\t[ -n \"$1\" ] && printStderr '%s\\n' \"Illegal option $1\"\n\t\tprintStderr '%s\\n' \"Try 'hblock --help' for more information\"\n\t\texit 1\n\tfi\n}\n\n# Show version number and quit\nshowVersion() {\n\tprintStdout '%s\\n' '2.1.3'\n\texit 0\n}\n\nmain() {\n\toutputFile='/etc/hosts'\n\theaderFile='/etc/hblock.d/header'; defaultHeaderFile=$headerFile; header=''\n\tfooterFile='/etc/hblock.d/footer'; defaultFooterFile=$footerFile; footer=''\n\tsourcesFile='/etc/hblock.d/sources.list'; defaultSourcesFile=$sourcesFile; sources=''\n\twhitelistFile='/etc/hblock.d/whitelist.list'; defaultWhitelistFile=$whitelistFile; whitelist=''\n\tblacklistFile='/etc/hblock.d/blacklist.list'; defaultBlacklistFile=$blacklistFile; blacklist=''\n\tredirection='0.0.0.0'\n\ttemplate='\\2 \\1'\n\tcomment='#'\n\tbackup=false\n\tlenient=false\n\tenableWhitelistRegex=false\n\tignoreDownloadError=false\n\tcolor=auto\n\tquiet=false\n\n\t# Transform long options to short ones\n\tfor opt in \"$@\"; do\n\t\tshift\n\t\tcase \"$opt\" in\n\t\t\t'--output')                 set -- \"$@\" '-O' ;;\n\t\t\t'--header')                 set -- \"$@\" '-H' ;;\n\t\t\t'--footer')                 set -- \"$@\" '-F' ;;\n\t\t\t'--sources')                set -- \"$@\" '-S' ;;\n\t\t\t'--whitelist')              set -- \"$@\" '-W' ;;\n\t\t\t'--blacklist')              set -- \"$@\" '-B' ;;\n\t\t\t'--redirection')            set -- \"$@\" '-R' ;;\n\t\t\t'--template')               set -- \"$@\" '-T' ;;\n\t\t\t'--comment')                set -- \"$@\" '-C' ;;\n\t\t\t'--backup')                 set -- \"$@\" '-b' ;;\n\t\t\t'--lenient')                set -- \"$@\" '-l' ;;\n\t\t\t'--enable-whitelist-regex') set -- \"$@\" '-r' ;;\n\t\t\t'--ignore-download-error')  set -- \"$@\" '-i' ;;\n\t\t\t'--color')                  set -- \"$@\" '-c' ;;\n\t\t\t'--quiet')                  set -- \"$@\" '-q' ;;\n\t\t\t'--version')                set -- \"$@\" '-v' ;;\n\t\t\t'--help')                   set -- \"$@\" '-h' ;;\n\t\t\t*)                          set -- \"$@\" \"$opt\"\n\t\tesac\n\tdone\n\t# Set omitted arguments to empty strings\n\tfor opt in \"$@\"; do\n\t\tshift\n\t\tcase \"$opt\" in\n\t\t\t-*b)\n\t\t\t\tif a=\"$*\"; [ -z \"$a\" ] || [ \"${a#\\-}x\" != \"${a}x\" ]\n\t\t\t\t\tthen set -- \"$@\" \"$opt\" ''\n\t\t\t\t\telse set -- \"$@\" \"$opt\"\n\t\t\t\tfi\n\t\t\t\t;;\n\t\t\t*) set -- \"$@\" \"$opt\"\n\t\tesac\n\tdone\n\t# Read short options\n\tOPTIND=1\n\twhile getopts ':O:H:F:S:W:B:R:T:C:b:lric:qvh-:' opt; do\n\t\tcase \"$opt\" in\n\t\t\t'O') outputFile=\"$OPTARG\" ;;\n\t\t\t'H') headerFile=\"$OPTARG\" ;;\n\t\t\t'F') footerFile=\"$OPTARG\" ;;\n\t\t\t'S') sourcesFile=\"$OPTARG\" ;;\n\t\t\t'W') whitelistFile=\"$OPTARG\" ;;\n\t\t\t'B') blacklistFile=\"$OPTARG\" ;;\n\t\t\t'R') redirection=\"$OPTARG\" ;;\n\t\t\t'T') template=\"$OPTARG\" ;;\n\t\t\t'C') comment=\"$OPTARG\" ;;\n\t\t\t'b') backup=true; backupDir=\"$OPTARG\" ;;\n\t\t\t'l') lenient=true ;;\n\t\t\t'r') enableWhitelistRegex=true ;;\n\t\t\t'i') ignoreDownloadError=true ;;\n\t\t\t'c') color=\"$OPTARG\" ;;\n\t\t\t'q') quiet=true ;;\n\t\t\t'v') showVersion ;;\n\t\t\t'h') showHelp ;;\n\t\t\t'-') showHelp \"--$OPTARG\" ;;\n\t\t\t*)   showHelp \"-$OPTARG\"\n\t\tesac\n\tdone\n\n\t# Check color support\n\tif [ \"$color\" = auto ]; then\n\t\t[ -t 1 ] && color=true || color=false\n\tfi\n\n\t# Priority: $headerFile > $HBLOCK_HEADER > $defaultHeaderFile > builtin\n\tif [ \"$headerFile\" != \"$defaultHeaderFile\" ]; then\n\t\theader=$(cat -- \"$headerFile\")\n\t\theaderOrigin=$headerFile\n\telif [ \"${HBLOCK_HEADER+def}\" = def ]; then\n\t\theader=$HBLOCK_HEADER\n\t\theaderOrigin=environment\n\telif [ -f \"$headerFile\" ]; then\n\t\theader=$(cat -- \"$headerFile\")\n\t\theaderOrigin=$headerFile\n\telse\n\t\theader=$BUILTIN_HEADER\n\t\theaderOrigin=builtin\n\tfi\n\n\t# Priority: $footerFile > $HBLOCK_FOOTER > $defaultFooterFile > builtin\n\tif [ \"$footerFile\" != \"$defaultFooterFile\" ]; then\n\t\tfooter=$(cat -- \"$footerFile\")\n\t\tfooterOrigin=$footerFile\n\telif [ \"${HBLOCK_FOOTER+def}\" = def ]; then\n\t\tfooter=$HBLOCK_FOOTER\n\t\tfooterOrigin=environment\n\telif [ -f \"$footerFile\" ]; then\n\t\tfooter=$(cat -- \"$footerFile\")\n\t\tfooterOrigin=$footerFile\n\telse\n\t\tfooter=$BUILTIN_FOOTER\n\t\tfooterOrigin=builtin\n\tfi\n\n\t# Priority: $sourcesFile > $HBLOCK_SOURCES > $defaultSourcesFile > builtin\n\tif [ \"$sourcesFile\" != \"$defaultSourcesFile\" ]; then\n\t\tsources=$(cat -- \"$sourcesFile\")\n\t\tsourcesOrigin=$sourcesFile\n\telif [ \"${HBLOCK_SOURCES+def}\" = def ]; then\n\t\tsources=$HBLOCK_SOURCES\n\t\tsourcesOrigin=environment\n\telif [ -f \"$sourcesFile\" ]; then\n\t\tsources=$(cat -- \"$sourcesFile\")\n\t\tsourcesOrigin=$sourcesFile\n\telse\n\t\tsources=$BUILTIN_SOURCES\n\t\tsourcesOrigin=builtin\n\tfi\n\tsources=$(removeComments \"$sources\")\n\n\t# Priority: $whitelistFile > $HBLOCK_WHITELIST > $defaultWhitelistFile > builtin\n\tif [ \"$whitelistFile\" != \"$defaultWhitelistFile\" ]; then\n\t\twhitelist=$(cat -- \"$whitelistFile\")\n\t\twhitelistOrigin=$whitelistFile\n\telif [ \"${HBLOCK_WHITELIST+def}\" = def ]; then\n\t\twhitelist=$HBLOCK_WHITELIST\n\t\twhitelistOrigin=environment\n\telif [ -f \"$whitelistFile\" ]; then\n\t\twhitelist=$(cat -- \"$whitelistFile\")\n\t\twhitelistOrigin=$whitelistFile\n\telse\n\t\twhitelist=$BUILTIN_WHITELIST\n\t\twhitelistOrigin=builtin\n\tfi\n\twhitelist=$(removeComments \"$whitelist\")\n\n\t# Priority: $blacklistFile > $HBLOCK_BLACKLIST > $defaultBlacklistFile > builtin\n\tif [ \"$blacklistFile\" != \"$defaultBlacklistFile\" ]; then\n\t\tblacklist=$(cat -- \"$blacklistFile\")\n\t\tblacklistOrigin=$blacklistFile\n\telif [ \"${HBLOCK_BLACKLIST+def}\" = def ]; then\n\t\tblacklist=$HBLOCK_BLACKLIST\n\t\tblacklistOrigin=environment\n\telif [ -f \"$blacklistFile\" ]; then\n\t\tblacklist=$(cat -- \"$blacklistFile\")\n\t\tblacklistOrigin=$blacklistFile\n\telse\n\t\tblacklist=$BUILTIN_BLACKLIST\n\t\tblacklistOrigin=builtin\n\tfi\n\tblacklist=$(removeComments \"$blacklist\")\n\n\tlogAction 'Configuration:'\n\n\tlogInfo \"Output: $outputFile\"\n\tlogInfo \"Header: $headerOrigin\"\n\tlogInfo \"Footer: $footerOrigin\"\n\tlogInfo \"Sources: $sourcesOrigin\"\n\tlogInfo \"Whitelist: $whitelistOrigin\"\n\tlogInfo \"Blacklist: $blacklistOrigin\"\n\tlogInfo \"Redirection: $redirection\"\n\tlogInfo \"Template: $template\"\n\tlogInfo \"Comment: $comment\"\n\tlogInfo \"Backup: $(getBoolVal \"$backup\")\"\n\tlogInfo \"Lenient: $(getBoolVal \"$lenient\")\"\n\tlogInfo \"Enable regex in whitelist: $(getBoolVal \"$enableWhitelistRegex\")\"\n\tlogInfo \"Ignore download error: $(getBoolVal \"$ignoreDownloadError\")\"\n\n\t# Create temporary blocklist file\n\tblocklistFile=$(createTempFile)\n\trmtemp() { rm -f -- \"$blocklistFile\" \"$blocklistFile\".aux.*; }\n\ttrap rmtemp EXIT\n\n\tlogAction 'Downloading lists...'\n\n\t_IFS=$IFS; IFS=\"$(printf '\\nx')\"; IFS=\"${IFS%x}\"\n\tfor url in $sources; do\n\t\tlogInfo \"$url\"\n\t\tfetchUrl \"$url\" >> \"$blocklistFile\" && exitCode=0 || exitCode=$?\n\t\tif [ \"$exitCode\" -ne 0 ] && [ \"$ignoreDownloadError\" != true ]; then\n\t\t\tlogError 'Download failed'\n\t\t\texit 1\n\t\tfi\n\tdone\n\tIFS=$_IFS\n\n\tlogAction 'Parsing lists...'\n\n\tif [ -s \"$blocklistFile\" ]; then\n\t\tlogInfo 'Remove carriage return'\n\t\ttr -d '\\r' \\\n\t\t\t< \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t\tlogInfo 'Transform to lowercase'\n\t\ttr '[:upper:]' '[:lower:]' \\\n\t\t\t< \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t\tlogInfo 'Remove comments'\n\t\tsed -e 's/#.*//' \\\n\t\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t\tlogInfo 'Trim spaces'\n\t\tsed -e 's/^[[:blank:]]*//' \\\n\t\t\t-e 's/[[:blank:]]*$//' \\\n\t\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t\tlogInfo 'Match hosts lines'\n\t\tif [ \"$lenient\" = true ]; then\n\t\t\t# This regex would be ideal, but it is not POSIX-compliant.\n\t\t\t# ipOctetRegex='\\(25[0-5]\\|2[0-4][0-9]\\|[01]\\{0,1\\}[0-9][0-9]\\{0,1\\}\\)'\n\t\t\t# ipRegex=\"\\\\($ipOctetRegex\\\\.$ipOctetRegex\\\\.$ipOctetRegex\\\\.$ipOctetRegex\\\\)\"\n\t\t\tipRegex='\\([0-9]\\{1,3\\}\\.\\)\\{3\\}[0-9]\\{1,3\\}'\n\t\telse\n\t\t\t# Same as above.\n\t\t\t# ipRegex='\\(\\(0\\.0\\.0\\.0\\)\\|\\(127\\.0\\.0\\.1\\)\\)'\n\t\t\tipRegex='\\(0\\.0\\.0\\.0\\)\\{0,1\\}\\(127\\.0\\.0\\.1\\)\\{0,1\\}'\n\t\tfi\n\t\tdomainRegex='\\([0-9a-z_-]\\{1,63\\}\\.\\)\\{1,\\}[a-z][0-9a-z_-]\\{1,62\\}'\n\t\tsed -n \\\n\t\t\t-e \"/^\\\\(${ipRegex}[[:blank:]]\\\\{1,\\\\}\\\\)\\\\{0,1\\\\}$domainRegex$/p\" \\\n\t\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t\tlogInfo 'Remove reserved TLDs'\n\t\tsed -e '/\\.example$/d' \\\n\t\t\t-e '/\\.invalid$/d' \\\n\t\t\t-e '/\\.local$/d' \\\n\t\t\t-e '/\\.localdomain$/d' \\\n\t\t\t-e '/\\.localhost$/d' \\\n\t\t\t-e '/\\.test$/d' \\\n\t\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t\tlogInfo 'Remove destination IPs'\n\t\tsed -e 's/^.\\{1,\\}[[:blank:]]\\{1,\\}//' \\\n\t\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\tfi\n\n\t# This domain is used to check if hBlock is enabled\n\tprintf -- '%s\\n' 'hblock-check.molinero.dev' >> \"$blocklistFile\"\n\n\tif [ -n \"$blacklist\" ]; then\n\t\tlogInfo 'Apply blacklist'\n\t\tprintf -- '%s' \"$blacklist\" >> \"$blocklistFile\"\n\tfi\n\n\tlogInfo 'Sort entries'\n\tsort -- \"$blocklistFile\" | uniq | sed -e '/^$/d' > \"$blocklistFile.aux.1\" \\\n\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\tif [ -n \"$whitelist\" ]; then\n\t\tlogInfo 'Apply whitelist'\n\n\t\tif [ \"$enableWhitelistRegex\" = true ]; then\n\t\t\t_IFS=$IFS; IFS=\"$(printf '\\nx')\"; IFS=\"${IFS%x}\"\n\t\t\tfor regex in $whitelist; do\n\t\t\t\tsed -e \"/$regex/d\" \\\n\t\t\t\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\t\t\tdone\n\t\t\tIFS=$_IFS\n\t\telse\n\t\t\tprintf -- '%s' \"$whitelist\" | sort | uniq > \"$blocklistFile.aux.2\"\n\t\t\tcomm -23 -- \"$blocklistFile\" \"$blocklistFile.aux.2\" > \"$blocklistFile.aux.1\" \\\n\t\t\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\" \\\n\t\t\t\t&& rm -f -- \"$blocklistFile.aux.2\"\n\t\tfi\n\tfi\n\n\t# Count blocked domains\n\tblocklistCount=$(wc -l < \"$blocklistFile\" | tr -d ' ');\n\n\tlogInfo 'Apply format template'\n\tsed -e \"s/$/\\\\t$(quoteSubst \"$redirection\")/\" \\\n\t\t-e \"s/^\\\\(.*\\\\)\\\\t\\\\(.*\\\\)$/$template/\" \\\n\t\t-- \"$blocklistFile\" > \"$blocklistFile.aux.1\" \\\n\t\t&& mv -f -- \"$blocklistFile.aux.1\" \"$blocklistFile\"\n\n\t# Backup procedure\n\tif [ \"$backup\" = true ] && [ \"$outputFile\" != - ] && [ -f \"$outputFile\" ]; then\n\t\tlogAction 'Backing up original file...'\n\n\t\t[ -z \"$backupDir\" ] && backupDir=$(dirname -- \"$outputFile\")\n\t\tbackupFile=\"$backupDir/$(basename -- \"$outputFile\").$(date +%s).bak\"\n\n\t\tif touch -- \"$backupFile\" >/dev/null 2>&1; then\n\t\t\tcp -af -- \"$outputFile\" \"$backupFile\"\n\t\telif exists sudo; then\n\t\t\tsudo cp -af -- \"$outputFile\" \"$backupFile\"\n\t\telse\n\t\t\tlogError \"Cannot write '$backupFile': permission denied\"\n\t\t\texit 1\n\t\tfi\n\tfi\n\n\tlogAction 'Generating output file...'\n\n\tprintOutputFile() {\n\t\t# Define \"C\" variable for convenience\n\t\tC=$comment\n\n\t\tif [ -n \"$C\" ]; then\n\t\t\tprintf -- '%s\\n' \"$(cat <<-EOF\n\t\t\t\t$C Author:          Héctor Molinero Fernández <hector@molinero.dev>\n\t\t\t\t$C Repository:      https://github.com/hectorm/hblock\n\t\t\t\t$C Last updated:    $(date -u)\n\t\t\t\t$C Blocked domains: $blocklistCount\n\t\t\tEOF\n\t\t\t)\"\n\t\tfi\n\t\tif [ -n \"$header\" ]; then\n\t\t\tif [ -n \"$C\" ]; then printf -- '\\n%s\\n' \"$C <header>\"; fi\n\t\t\tprintf -- '%s\\n' \"$header\"\n\t\t\tif [ -n \"$C\" ]; then printf -- '%s\\n' \"$C </header>\"; fi\n\t\tfi\n\t\tif [ -s \"$blocklistFile\" ]; then\n\t\t\tif [ -n \"$C\" ]; then printf -- '\\n%s\\n' \"$C <blocklist>\"; fi\n\t\t\tcat -- \"$blocklistFile\"\n\t\t\tif [ -n \"$C\" ]; then printf -- '%s\\n' \"$C </blocklist>\"; fi\n\t\tfi\n\t\tif [ -n \"$footer\" ]; then\n\t\t\tif [ -n \"$C\" ]; then printf -- '\\n%s\\n' \"$C <footer>\"; fi\n\t\t\tprintf -- '%s\\n' \"$footer\"\n\t\t\tif [ -n \"$C\" ]; then printf -- '%s\\n' \"$C </footer>\"; fi\n\t\tfi\n\t}\n\n\t# Print to stdout if the output value is equal to -\n\tif [ \"$outputFile\" = - ]; then\n\t\tprintOutputFile\n\telse\n\t\tif [ -d \"$outputFile\" ]; then\n\t\t\tlogError \"Cannot write '$outputFile': is a directory\"\n\t\t\texit 1\n\t\telif touch -- \"$outputFile\" >/dev/null 2>&1; then\n\t\t\tprintOutputFile > \"$outputFile\"\n\t\telif exists sudo && exists tee; then\n\t\t\tprintOutputFile | sudo tee -- \"$outputFile\" >/dev/null\n\t\telse\n\t\t\tlogError \"Cannot write '$outputFile': permission denied\"\n\t\t\texit 1\n\t\tfi\n\tfi\n\n\tlogAction \"$blocklistCount blocked domains!\"\n}\n\nmain \"$@\"\n"
  },
  {
    "path": ".sbin/askpass",
    "content": "#!/usr/bin/env bash\n# Take password prompt from STDIN, print password to STDOUT\n\nrofi -theme /home/bresilla/.config/rofi/rofi_full -m 0 -fullscreen \\\n\t-dmenu \\\n\t-password \\\n\t-padding 2000 \\\n\t-theme-str '*{accent: #e53714;}' \\\n\t-font \"Monoisome 64\" \\\n\t-p \"$(printf \" -\t\" | sed s/://)\"\n"
  },
  {
    "path": ".sbin/biblio",
    "content": "#!/usr/bin/env sh\n\n\nif [ -f $BIB ]; then\n    curl -s http://api.crossref.org/works/$1/transform/application/x-bibtex | bat;\n    echo \"\\nDo you wish to add reference to \"$BIB\"?\\n\";\n    select yn in \"Yes\" \"No\"; do\n        case $yn in\n            Yes ) echo >> $BIB; curl -s \"http://api.crossref.org/works/$1/transform/application/x-bibtex\" >> $BIB; echo >> $BIB; echo \"\\n${GREEN}Reference added!\"; echo \"\"; break;;\n            No ) echo \"\\n${ORANGE}No changes made!\"; echo \"\"; break;;\n        esac\n    done;\nelse\n    echo \"\\nYour bibliograpy file ${RED}\\$BIB is not defined or found${NOCOLOR}, please define it and try again!\\n\";\nfi;\n\n"
  },
  {
    "path": ".sbin/checkinstall",
    "content": "#!/bin/sh\n\n# pacinstall 0.2 by Andreas Textor (textor.andreas@googlemail.com)\n# resembles checkinstall, for Arch Linux\n# See pacinstall -h or pacinstall --help for help\n# \n# This script is based on inst2rpm by Jon A. Christopher,\n# which is included with installwatch until version 0.5.6\n\n# Changelog: 0.1 - first version\n#            0.2 - fixed handling of files with spaces in their names\n\n# help\nfunction displayhelp {\n  cat << EOF\npacinstall 0.2 by Andreas Textor\nResembles checkinstall, for Arch Linux (http://archlinux.org/)\n\nJust call pacinstall instead of \"make install\" when installing\nsoftware from source. An arch package will be created and installed\nusing pacman.\n\nYou need to have installwatch installed, download it here:\nhttp://asic-linux.com.mx/~izto/checkinstall/installwatch.html\nEOF\n}\n\n# check for parameters and id\nif [ \"$1\" = \"-h\" ] || [ \"$1\" = \"--help\" ] || [ \"$1\" = \"help\" ]; then\n  displayhelp\n  exit\nfi\n\nif [ `whoami` != \"root\" ]; then\n  echo \"WARNING! You are not root. Errors during the installition are expected.\"\n  echo -n \"If you still want to continue, type \"yes\" (otherwise press CTRL+C): \"\n  read tmp\n  if [ x\"$tmp\" != \"xyes\" ]; then\n    exit\n  fi\nfi\n\n\n# check for installwatch\nINSTALLWATCH=`which installwatch 2>/dev/null`\nif [ x$INSTALLWATCH = x ]; then\n  echo \"installwatch not found in PATH, exiting.\"\n  echo \"Get it from: http://asic-linux.com.mx/~izto/checkinstall/installwatch.html\"\n  exit\nfi\n\n\n# set up values and temp-directory\nMPWD=\"`pwd`\"\na=\"${MPWD##*/}\"\nVERSION=\"${a##*-}\"\nPACKAGE=\"${a%%-*}\"\nURL=\nSUMMARY=\nLICENSE=\"GPL\"\nARCH=\"i686\"\nDEPENDS=\nFAKEROOT=/tmp/pacinstall\nPKGINFO=$FAKEROOT/.PKGINFO\nFILEINFO=$FAKEROOT/.FILELIST\nINSTALLWATCHLOG=/tmp/installwatchlog.$$\nFILELIST=/tmp/filelist.$$\n\nif [ -d $FAKEROOT ]; then\n  rm -rf $FAKEROOT\nfi\nmkdir $FAKEROOT\n\n# get values\necho -n \"New package name: ($PACKAGE): \"; read tmp\nif [ x\"$tmp\" != x ]; then \n  PACKAGE=\"$tmp\"\nfi\n\necho -n \"Version: ($VERSION): \"; read tmp\nif [ x\"$tmp\" != x ]; then\n  VERSION=\"$tmp\"\nfi\n\necho -n \"URL: ($URL): \"; read tmp\nif [ x\"$tmp\" != x ]; then\n  URL=\"$tmp\"\nfi\n\necho -n \"Summary: ($SUMMARY): \"; read tmp\nif [ x\"$tmp\" != x ]; then \n  SUMMARY=\"$tmp\"\nfi\n\necho -n \"License: ($LICENSE): \"; read tmp\nif [ x\"$tmp\" != x ]; then \n  LICENSE=\"$tmp\"\nfi\n\necho -n \"Architecture: ($ARCH): \"; read tmp\nif [ x\"$tmp\" != x ]; then \n  ARCH=\"$tmp\"\nfi\n\necho -n \"Depends (space separated): ($DEPENDS): \"; read tmp\nif [ x\"$tmp\" != x ]; then\n  DEPENDS=\"$tmp\"\nfi\n\necho\necho \"Installing using installwatch...\"\n\ninstallwatch -o $INSTALLWATCHLOG make install\n\necho \"Copying files to temp directory...\"\n\nawk -F'\\t' '$2==\"open\"||$2==\"link\" {print $3} ; $2==\"rename\" {print $4}' < $INSTALLWATCHLOG | grep ^/ | \\\n   egrep -v '/dev|$HOME' | sort | uniq > $FILELIST\n\nfor i in `cat $FILELIST`; do\n  tdir=\"${FAKEROOT}/${i%/*}\"\n  mkdir -p \"$tdir\"\n  cp \"$i\" \"$tdir\"\ndone\n/bin/rm $FILELIST\n\necho \"Create PKGINFO and FILEINFO...\"\n\n# write PKGINFO file\n[ -e $PKGINFO ] && rm $PKGINFO\ncat > $PKGINFO << EOF\n# Generated by pacinstall\npkgname = $PACKAGE\npkgver = $VERSION\npkgdesc = $SUMMARY\nurl = $URL\nbuilddate = `LC_ALL=C date \"+%a %b %d %H:%M:%S %Y\"`\npackager = Pacinstall\nsize = `/bin/du -sb $FAKEROOT|awk '{ print $1 }'`\narch = $ARCH\nlicense = $LICENSE\nEOF\nif [ x\"$DEPENDS\" != x ]; then\n  for i in $DEPENDS; do\n    echo \"depend = $i\" >> $PKGINFO\n  done\nfi\n\n# write FILEINFO file\ncd $FAKEROOT\n[ -e $FILEINFO ] && rm $FILEINFO\nfor i in *; do\n  find $i >> $FILEINFO\ndone\n\nPKG=\"$MPWD/$PACKAGE-$VERSION.pkg.tar.gz\"\necho \"Creating Package `basename $PKG`...\"\n\ncd \"$FAKEROOT\"\ntar cfvz \"$PKG\" .PKGINFO .FILELIST *\necho \"$PKG written.\"\n\n# install the package via pacman, to let pacman know about the new files\necho \"Installing $PKG...\"\npacman -Uf \"$PKG\"\n\n# clean up\n/bin/rm -rf $FAKEROOT\n/bin/rm $INSTALLWATCHLOG\n\n\n\n"
  },
  {
    "path": ".sbin/con",
    "content": "#!/usr/bin/env bash\nCONT=apps\nif [ \"$1\" == \"start\" ]; then\n    echo \"... RUNNING $CONT ...\"\n    optirun docker run \\\n        --gpus=all \\\n        --security-opt seccomp=unconfined \\\n        --net=host \\\n        --name=$CONT\\\n        --device=/dev/dri \\\n        --device /dev/snd \\\n        --expose=5900 \\\n        --expose=6080 \\\n        --volume=\"/tmp/.X11-unix:/tmp/.X11-unix\" \\\n        --volume=\"/home/bresilla/.config/xfce4:/home/bresilla/.config/xfce4:rw\" \\\n        --volume=\"/home/bresilla/.config/xfce4:/root/.config/xfce4:rw\" \\\n        --cap-add=SYS_PTRACE \\\n        -e DISPLAY=$DISPLAY \\\n        ${@:2} \\\n        --rm -it bresilla/$CONT start\nelif [ \"$1\" == \"vnc\" ]; then\n    xhost +local:`docker inspect --format='{{ .Config.Hostname }}' bresilla/$CONT` &&\n    vncviewer localhost:1\nelif [ \"$1\" == \"run\" ]; then\n    docker exec -it $CONT ${2:-bash}\nelse\n    docker exec -it $CONT zsh\nfi\n"
  },
  {
    "path": ".sbin/cornera",
    "content": "#!/usr/bin/env bash\n#:Usage: cornera [-tl cmd] [-tr cmd] [-bl cmd] [-br cmd] [-v]\n#:\n#:  cmd:   run the command when mouse reach to the edge of screen:\n#:\n#:  -tl cmd                          top-left\n#:  -tr cmd                          top-right\n#:  -bl cmd                          bottom-left\n#:  -br cmd                          bottom-right\n#:  -iof, --ignore-on-fullscreen     disable command when active window\n#:                                   is fullscreen.\n#:  --stop                           force stop cornera if it's running\n#:  -v                               verbose output\n#:  -h                               show the help\n#:\n# same as py version before, but faster\n\neval $(xdotool getdisplaygeometry --shell)\nG=2;MR=4 W=$((WIDTH-G)); H=$((HEIGHT-G)); DB=/tmp/cornera.lck;\n\nusage() {\n    grep \"^#:\" $0 | while read DOC; do printf '%s\\n' \"${DOC###:}\"; done\n    exit\n}\n\noptions() {\n    while [[ \"$1\" ]]; do\n        case \"$1\" in\n            \"-tl\") tl=\"$2\" ;;\n            \"-tr\") tr=\"$2\" ;;\n            \"-bl\") bl=\"$2\" ;;\n            \"-br\") br=\"$2\" ;;\n            \"-iof\"|\"--ignore-on-fullscreen\") iof=1 ;;\n            \"--stop\") kill -9 $(cat $DB) && exit ;;\n            \"-v\") verbose=1 ;;\n            \"\"|\"-h\"|\"--help\") usage ;;\n        esac\n    shift\n    done\n}\n\ndelay() {\n    local IFS\n    [[ -n \"${_de:-}\" ]] || exec {_de}<> <(:)\n    read ${1:+-t \"$1\"} -u $_de || :\n}\n\ninvoke() {\n    proc=$(IFS=\" \"; set -- $1; echo $1)\n    id=\"$(pidof -x \"$proc\")\"\n    if [[ -n \"$verbose\" ]]; then\n        [[ -z \"$id\" ]] && (eval \"$1\" &) || (kill -9 $id &)\n    else\n        [[ -z \"$id\" ]] && (eval \"$1\" 2&>/dev/null &) || (kill -9 $id 2&>/dev/null &)\n    fi\n    xdotool mousemove_relative $2 $3\n    delay 0.1\n}\n\nquithandler() {\n    rm -f $DB\n    exit $?\n}\n\ntrap quithandler SIGINT SIGTERM EXIT\n\n[[ -f \"$DB\" && -z \"$(cat $DB | xargs ps -p)\" ]] && rm -rf $DB\n[[ -z \"$@\" ]] && usage || options \"$@\"\n\nif [[ ! -f \"$DB\" ]]; then\n    while :;do\n        [[ ! -f \"$DB\" ]] && printf \"%s\\n\" $$ >$DB\n        eval $(xdotool getmouselocation --shell)\n        if [[ -n \"$iof\" && -n \"$(xdotool getactivewindow 2>/dev/null | xargs xprop -id 2>/dev/null | grep E_FULLS)\" ]]; then\n            delay 0.8\n        else\n            [[ -n \"$tl\" && \"$X\" -lt \"$G\" && \"$Y\" -lt \"$G\" ]] && invoke \"$tl\" $((X+MR)) $((Y+MR))\n            [[ -n \"$tr\" && \"$X\" -gt \"$W\" && \"$Y\" -lt \"$G\" ]] && invoke \"$tr\" $((X-MR)) $((Y+MR))\n            [[ -n \"$bl\" && \"$X\" -lt \"$G\" && \"$Y\" -gt \"$H\" ]] && invoke \"$bl\" $((X+MR)) $((Y-MR))\n            [[ -n \"$br\" && \"$X\" -gt \"$W\" && \"$Y\" -gt \"$H\" ]] && invoke \"$br\" $((X-MR)) $((Y-MR))\n        fi\n        delay 0.2\n    done\n    exit 0\nelse    \n    printf \"Lock Exists: Cornera is running at PID $(cat $DB). run \\\"cornera --stop\\\" to close it.\\n\"\n    exit 1\nfi\n\n"
  },
  {
    "path": ".sbin/hotspot",
    "content": "#!/usr/bin/env bash\n\n# general dependencies:\n#    bash (to run this script)\n#    util-linux (for getopt)\n#    procps or procps-ng\n#    hostapd\n#    iproute2\n#    iw\n#    iwconfig (you only need this if 'iw' can not recognize your adapter)\n#    haveged (optional)\n\n# dependencies for 'nat' or 'none' Internet sharing method\n#    dnsmasq\n#    iptables\n\nVERSION=0.4.6\nPROGNAME=\"$(basename $0)\"\n\n# make sure that all command outputs are in english\n# so we can parse them correctly\nexport LC_ALL=C\n\n# all new files and directories must be readable only by root.\n# in special cases we must use chmod to give any other permissions.\nSCRIPT_UMASK=0077\numask $SCRIPT_UMASK\n\nusage() {\n    echo \"Usage: \"$PROGNAME\" [options] <wifi-interface> [<interface-with-internet>] [<access-point-name> [<passphrase>]]\"\n    echo\n    echo \"Options:\"\n    echo \"  -h, --help              Show this help\"\n    echo \"  --version               Print version number\"\n    echo \"  -c <channel>            Channel number (default: 1)\"\n    echo \"  -w <WPA version>        Use 1 for WPA, use 2 for WPA2, use 1+2 for both (default: 1+2)\"\n    echo \"  -n                      Disable Internet sharing (if you use this, don't pass\"\n    echo \"                          the <interface-with-internet> argument)\"\n    echo \"  -m <method>             Method for Internet sharing.\"\n    echo \"                          Use: 'nat' for NAT (default)\"\n    echo \"                               'bridge' for bridging\"\n    echo \"                               'none' for no Internet sharing (equivalent to -n)\"\n    echo \"  --psk                   Use 64 hex digits pre-shared-key instead of passphrase\"\n    echo \"  --hidden                Make the Access Point hidden (do not broadcast the SSID)\"\n    echo \"  --mac-filter            Enable MAC address filtering\"\n    echo \"  --mac-filter-accept     Location of MAC address filter list (defaults to /etc/hostapd/hostapd.accept)\"\n    echo \"  --redirect-to-localhost If -n is set, redirect every web request to localhost (useful for public information networks)\"\n    echo \"  --hostapd-debug <level> With level between 1 and 2, passes arguments -d or -dd to hostapd for debugging.\"\n    echo \"  --isolate-clients       Disable communication between clients\"\n    echo \"  --ieee80211n            Enable IEEE 802.11n (HT)\"\n    echo \"  --ieee80211ac           Enable IEEE 802.11ac (VHT)\"\n    echo \"  --ht_capab <HT>         HT capabilities (default: [HT40+])\"\n    echo \"  --vht_capab <VHT>       VHT capabilities\"\n    echo \"  --country <code>        Set two-letter country code for regularity (example: US)\"\n    echo \"  --freq-band <GHz>       Set frequency band. Valid inputs: 2.4, 5 (default: 2.4)\"\n    echo \"  --driver                Choose your WiFi adapter driver (default: nl80211)\"\n    echo \"  --no-virt               Do not create virtual interface\"\n    echo \"  --no-haveged            Do not run 'haveged' automatically when needed\"\n    echo \"  --fix-unmanaged         If NetworkManager shows your interface as unmanaged after you\"\n    echo \"                          close hotspot, then use this option to switch your interface\"\n    echo \"                          back to managed\"\n    echo \"  --mac <MAC>             Set MAC address\"\n    echo \"  --dhcp-dns <IP1[,IP2]>  Set DNS returned by DHCP\"\n    echo \"  --daemon                Run hotspot in the background\"\n    echo \"  --stop <id>             Send stop command to an already running hotspot. For an <id>\"\n    echo \"                          you can put the PID of hotspot or the WiFi interface. You can\"\n    echo \"                          get them with --list-running\"\n    echo \"  --list-running          Show the hotspot processes that are already running\"\n    echo \"  --list-clients <id>     List the clients connected to hotspot instance associated with <id>.\"\n    echo \"                          For an <id> you can put the PID of hotspot or the WiFi interface.\"\n    echo \"                          If virtual WiFi interface was created, then use that one.\"\n    echo \"                          You can get them with --list-running\"\n    echo \"  --mkconfig <conf_file>  Store configs in conf_file\"\n    echo \"  --config <conf_file>    Load configs from conf_file\"\n    echo\n    echo \"Non-Bridging Options:\"\n    echo \"  --no-dns                Disable dnsmasq DNS server\"\n    echo \"  --no-dnsmasq            Disable dnsmasq server completely\"\n    echo \"  -g <gateway>            IPv4 Gateway for the Access Point (default: 192.168.12.1)\"\n    echo \"  -d                      DNS server will take into account /etc/hosts\"\n    echo \"  -e <hosts_file>         DNS server will take into account additional hosts file\"\n    echo\n    echo \"Useful informations:\"\n    echo \"  * If you're not using the --no-virt option, then you can create an AP with the same\"\n    echo \"    interface you are getting your Internet connection.\"\n    echo \"  * You can pass your SSID and password through pipe or through arguments (see examples).\"\n    echo \"  * On bridge method if the <interface-with-internet> is not a bridge interface, then\"\n    echo \"    a bridge interface is created automatically.\"\n    echo\n    echo \"Examples:\"\n    echo \"  \"$PROGNAME\" wlan0 eth0 MyAccessPoint MyPassPhrase\"\n    echo \"  echo -e 'MyAccessPoint\\nMyPassPhrase' | \"$PROGNAME\" wlan0 eth0\"\n    echo \"  \"$PROGNAME\" wlan0 eth0 MyAccessPoint\"\n    echo \"  echo 'MyAccessPoint' | \"$PROGNAME\" wlan0 eth0\"\n    echo \"  \"$PROGNAME\" wlan0 wlan0 MyAccessPoint MyPassPhrase\"\n    echo \"  \"$PROGNAME\" -n wlan0 MyAccessPoint MyPassPhrase\"\n    echo \"  \"$PROGNAME\" -m bridge wlan0 eth0 MyAccessPoint MyPassPhrase\"\n    echo \"  \"$PROGNAME\" -m bridge wlan0 br0 MyAccessPoint MyPassPhrase\"\n    echo \"  \"$PROGNAME\" --driver rtl871xdrv wlan0 eth0 MyAccessPoint MyPassPhrase\"\n    echo \"  \"$PROGNAME\" --daemon wlan0 eth0 MyAccessPoint MyPassPhrase\"\n    echo \"  \"$PROGNAME\" --stop wlan0\"\n}\n\n# on success it echos a non-zero unused FD\n# on error it echos 0\nget_avail_fd() {\n    local x\n    for x in $(seq 1 $(ulimit -n)); do\n        if [[ ! -a \"/proc/$BASHPID/fd/$x\" ]]; then\n            echo $x\n            return\n        fi\n    done\n    echo 0\n}\n\n# lock file for the mutex counter\nCOUNTER_LOCK_FILE=/tmp/hotspot.$$.lock\n\ncleanup_lock() {\n    rm -f $COUNTER_LOCK_FILE\n}\n\ninit_lock() {\n    local LOCK_FILE=/tmp/hotspot.all.lock\n\n    # we initialize only once\n    [[ $LOCK_FD -ne 0 ]] && return 0\n\n    LOCK_FD=$(get_avail_fd)\n    [[ $LOCK_FD -eq 0 ]] && return 1\n\n    # open/create lock file with write access for all users\n    # otherwise normal users will not be able to use it.\n    # to avoid race conditions on creation, we need to\n    # use umask to set the permissions.\n    umask 0555\n    eval \"exec $LOCK_FD>$LOCK_FILE\" > /dev/null 2>&1 || return 1\n    umask $SCRIPT_UMASK\n\n    # there is a case where lock file was created from a normal\n    # user. change the owner to root as soon as we can.\n    [[ $(id -u) -eq 0 ]] && chown 0:0 $LOCK_FILE\n\n    # create mutex counter lock file\n    echo 0 > $COUNTER_LOCK_FILE\n\n    return $?\n}\n\n# recursive mutex lock for all hotspot processes\nmutex_lock() {\n    local counter_mutex_fd\n    local counter\n\n    # lock local mutex and read counter\n    counter_mutex_fd=$(get_avail_fd)\n    if [[ $counter_mutex_fd -ne 0 ]]; then\n        eval \"exec $counter_mutex_fd<>$COUNTER_LOCK_FILE\"\n        flock $counter_mutex_fd\n        read -u $counter_mutex_fd counter\n    else\n        echo \"Failed to lock mutex counter\" >&2\n        return 1\n    fi\n\n    # lock global mutex and increase counter\n    [[ $counter -eq 0 ]] && flock $LOCK_FD\n    counter=$(( $counter + 1 ))\n\n    # write counter and unlock local mutex\n    echo $counter > /proc/$BASHPID/fd/$counter_mutex_fd\n    eval \"exec ${counter_mutex_fd}<&-\"\n    return 0\n}\n\n# recursive mutex unlock for all hotspot processes\nmutex_unlock() {\n    local counter_mutex_fd\n    local counter\n\n    # lock local mutex and read counter\n    counter_mutex_fd=$(get_avail_fd)\n    if [[ $counter_mutex_fd -ne 0 ]]; then\n        eval \"exec $counter_mutex_fd<>$COUNTER_LOCK_FILE\"\n        flock $counter_mutex_fd\n        read -u $counter_mutex_fd counter\n    else\n        echo \"Failed to lock mutex counter\" >&2\n        return 1\n    fi\n\n    # decrease counter and unlock global mutex\n    if [[ $counter -gt 0 ]]; then\n        counter=$(( $counter - 1 ))\n        [[ $counter -eq 0 ]] && flock -u $LOCK_FD\n    fi\n\n    # write counter and unlock local mutex\n    echo $counter > /proc/$BASHPID/fd/$counter_mutex_fd\n    eval \"exec ${counter_mutex_fd}<&-\"\n    return 0\n}\n\n# it takes 2 arguments\n# returns:\n#  0 if v1 (1st argument) and v2 (2nd argument) are the same\n#  1 if v1 is less than v2\n#  2 if v1 is greater than v2\nversion_cmp() {\n    local V1 V2 VN x\n    [[ ! $1 =~ ^[0-9]+(\\.[0-9]+)*$ ]] && die \"Wrong version format!\"\n    [[ ! $2 =~ ^[0-9]+(\\.[0-9]+)*$ ]] && die \"Wrong version format!\"\n\n    V1=( $(echo $1 | tr '.' ' ') )\n    V2=( $(echo $2 | tr '.' ' ') )\n    VN=${#V1[@]}\n    [[ $VN -lt ${#V2[@]} ]] && VN=${#V2[@]}\n\n    for ((x = 0; x < $VN; x++)); do\n        [[ ${V1[x]} -lt ${V2[x]} ]] && return 1\n        [[ ${V1[x]} -gt ${V2[x]} ]] && return 2\n    done\n\n    return 0\n}\n\nUSE_IWCONFIG=0\n\nis_interface() {\n    [[ -z \"$1\" ]] && return 1\n    [[ -d \"/sys/class/net/${1}\" ]]\n}\n\nis_wifi_interface() {\n    which iw > /dev/null 2>&1 && iw dev $1 info > /dev/null 2>&1 && return 0\n    if which iwconfig > /dev/null 2>&1 && iwconfig $1 > /dev/null 2>&1; then\n        USE_IWCONFIG=1\n        return 0\n    fi\n    return 1\n}\n\nis_bridge_interface() {\n    [[ -z \"$1\" ]] && return 1\n    [[ -d \"/sys/class/net/${1}/bridge\" ]]\n}\n\nget_phy_device() {\n    local x\n    for x in /sys/class/ieee80211/*; do\n        [[ ! -e \"$x\" ]] && continue\n        if [[ \"${x##*/}\" = \"$1\" ]]; then\n            echo $1\n            return 0\n        elif [[ -e \"$x/device/net/$1\" ]]; then\n            echo ${x##*/}\n            return 0\n        elif [[ -e \"$x/device/net:$1\" ]]; then\n            echo ${x##*/}\n            return 0\n        fi\n    done\n    echo \"Failed to get phy interface\" >&2\n    return 1\n}\n\nget_adapter_info() {\n    local PHY\n    PHY=$(get_phy_device \"$1\")\n    [[ $? -ne 0 ]] && return 1\n    iw phy $PHY info\n}\n\nget_adapter_kernel_module() {\n    local MODULE\n    MODULE=$(readlink -f \"/sys/class/net/$1/device/driver/module\")\n    echo ${MODULE##*/}\n}\n\ncan_be_sta_and_ap() {\n    # iwconfig does not provide this information, assume false\n    [[ $USE_IWCONFIG -eq 1 ]] && return 1\n    if [[ \"$(get_adapter_kernel_module \"$1\")\" == \"brcmfmac\" ]]; then\n        echo \"WARN: brmfmac driver doesn't work properly with virtual interfaces and\" >&2\n        echo \"      it can cause kernel panic. For this reason we disallow virtual\" >&2\n        echo \"      interfaces for your adapter.\" >&2\n        echo \"      For more info: https://github.com/oblique/hotspot/issues/203\" >&2\n        return 1\n    fi\n    get_adapter_info \"$1\" | grep -E '{.* managed.* AP.*}' > /dev/null 2>&1 && return 0\n    get_adapter_info \"$1\" | grep -E '{.* AP.* managed.*}' > /dev/null 2>&1 && return 0\n    return 1\n}\n\ncan_be_ap() {\n    # iwconfig does not provide this information, assume true\n    [[ $USE_IWCONFIG -eq 1 ]] && return 0\n    get_adapter_info \"$1\" | grep -E '\\* AP$' > /dev/null 2>&1 && return 0\n    return 1\n}\n\ncan_transmit_to_channel() {\n    local IFACE CHANNEL_NUM CHANNEL_INFO\n    IFACE=$1\n    CHANNEL_NUM=$2\n\n    if [[ $USE_IWCONFIG -eq 0 ]]; then\n        if [[ $FREQ_BAND == 2.4 ]]; then\n            CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep \" 24[0-9][0-9] MHz \\[${CHANNEL_NUM}\\]\")\n        else\n            CHANNEL_INFO=$(get_adapter_info ${IFACE} | grep \" \\(49[0-9][0-9]\\|5[0-9]\\{3\\}\\) MHz \\[${CHANNEL_NUM}\\]\")\n        fi\n        [[ -z \"${CHANNEL_INFO}\" ]] && return 1\n        [[ \"${CHANNEL_INFO}\" == *no\\ IR* ]] && return 1\n        [[ \"${CHANNEL_INFO}\" == *disabled* ]] && return 1\n        return 0\n    else\n        CHANNEL_NUM=$(printf '%02d' ${CHANNEL_NUM})\n        CHANNEL_INFO=$(iwlist ${IFACE} channel | grep -E \"Channel[[:blank:]]${CHANNEL_NUM}[[:blank:]]?:\")\n        [[ -z \"${CHANNEL_INFO}\" ]] && return 1\n        return 0\n    fi\n}\n\n# taken from iw/util.c\nieee80211_frequency_to_channel() {\n    local FREQ=$1\n    if [[ $FREQ -eq 2484 ]]; then\n        echo 14\n    elif [[ $FREQ -lt 2484 ]]; then\n        echo $(( ($FREQ - 2407) / 5 ))\n    elif [[ $FREQ -ge 4910 && $FREQ -le 4980 ]]; then\n        echo $(( ($FREQ - 4000) / 5 ))\n    elif [[ $FREQ -le 45000 ]]; then\n        echo $(( ($FREQ - 5000) / 5 ))\n    elif [[ $FREQ -ge 58320 && $FREQ -le 64800 ]]; then\n        echo $(( ($FREQ - 56160) / 2160 ))\n    else\n        echo 0\n    fi\n}\n\nis_5ghz_frequency() {\n    [[ $1 =~ ^(49[0-9]{2})|(5[0-9]{3})$ ]]\n}\n\nis_wifi_connected() {\n    return 1\n}\n\nis_macaddr() {\n    echo \"$1\" | grep -E \"^([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2}$\" > /dev/null 2>&1\n}\n\nis_unicast_macaddr() {\n    local x\n    is_macaddr \"$1\" || return 1\n    x=$(echo \"$1\" | cut -d: -f1)\n    x=$(printf '%d' \"0x${x}\")\n    [[ $(expr $x % 2) -eq 0 ]]\n}\n\nget_macaddr() {\n    is_interface \"$1\" || return\n    cat \"/sys/class/net/${1}/address\"\n}\n\nget_mtu() {\n    is_interface \"$1\" || return\n    cat \"/sys/class/net/${1}/mtu\"\n}\n\nalloc_new_iface() {\n    local prefix=$1\n    local i=0\n\n    mutex_lock\n    while :; do\n        if ! is_interface $prefix$i && [[ ! -f $COMMON_CONFDIR/ifaces/$prefix$i ]]; then\n            mkdir -p $COMMON_CONFDIR/ifaces\n            touch $COMMON_CONFDIR/ifaces/$prefix$i\n            echo $prefix$i\n            mutex_unlock\n            return\n        fi\n        i=$((i + 1))\n    done\n    mutex_unlock\n}\n\ndealloc_iface() {\n    rm -f $COMMON_CONFDIR/ifaces/$1\n}\n\nget_all_macaddrs() {\n    cat /sys/class/net/*/address\n}\n\nget_new_macaddr() {\n    local OLDMAC NEWMAC LAST_BYTE i\n    OLDMAC=$(get_macaddr \"$1\")\n    LAST_BYTE=$(printf %d 0x${OLDMAC##*:})\n    mutex_lock\n    for i in {1..255}; do\n        NEWMAC=\"${OLDMAC%:*}:$(printf %02x $(( ($LAST_BYTE + $i) % 256 )))\"\n        (get_all_macaddrs | grep \"$NEWMAC\" > /dev/null 2>&1) || break\n    done\n    mutex_unlock\n    echo $NEWMAC\n}\n\n# start haveged when needed\nhaveged_watchdog() {\n    local show_warn=1\n    while :; do\n        mutex_lock\n        if [[ $(cat /proc/sys/kernel/random/entropy_avail) -lt 1000 ]]; then\n            if ! which haveged > /dev/null 2>&1; then\n                if [[ $show_warn -eq 1 ]]; then\n                    echo \"WARN: Low entropy detected. We recommend you to install \\`haveged'\"\n                    show_warn=0\n                fi\n            elif ! pidof haveged > /dev/null 2>&1; then\n                echo \"Low entropy detected, starting haveged\"\n                # boost low-entropy\n                haveged -w 1024 -p $COMMON_CONFDIR/haveged.pid\n            fi\n        fi\n        mutex_unlock\n        sleep 2\n    done\n}\n\nNETWORKMANAGER_CONF=/etc/NetworkManager/NetworkManager.conf\nNM_OLDER_VERSION=1\n\nnetworkmanager_exists() {\n    local NM_VER\n    which nmcli > /dev/null 2>&1 || return 1\n    NM_VER=$(nmcli -v | grep -m1 -oE '[0-9]+(\\.[0-9]+)*\\.[0-9]+')\n    version_cmp $NM_VER 0.9.9\n    if [[ $? -eq 1 ]]; then\n        NM_OLDER_VERSION=1\n    else\n        NM_OLDER_VERSION=0\n    fi\n    return 0\n}\n\nnetworkmanager_is_running() {\n    local NMCLI_OUT\n    networkmanager_exists || return 1\n    if [[ $NM_OLDER_VERSION -eq 1 ]]; then\n        NMCLI_OUT=$(nmcli -t -f RUNNING nm 2>&1 | grep -E '^running$')\n    else\n        NMCLI_OUT=$(nmcli -t -f RUNNING g 2>&1 | grep -E '^running$')\n    fi\n    [[ -n \"$NMCLI_OUT\" ]]\n}\n\nnetworkmanager_iface_is_unmanaged() {\n    is_interface \"$1\" || return 2\n    (nmcli -t -f DEVICE,STATE d 2>&1 | grep -E \"^$1:unmanaged$\" > /dev/null 2>&1) || return 1\n}\n\nADDED_UNMANAGED=\n\nnetworkmanager_add_unmanaged() {\n    local MAC UNMANAGED WAS_EMPTY x\n    networkmanager_exists || return 1\n\n    [[ -d ${NETWORKMANAGER_CONF%/*} ]] || mkdir -p ${NETWORKMANAGER_CONF%/*}\n    [[ -f ${NETWORKMANAGER_CONF} ]] || touch ${NETWORKMANAGER_CONF}\n\n    if [[ $NM_OLDER_VERSION -eq 1 ]]; then\n        if [[ -z \"$2\" ]]; then\n            MAC=$(get_macaddr \"$1\")\n        else\n            MAC=\"$2\"\n        fi\n        [[ -z \"$MAC\" ]] && return 1\n    fi\n\n    mutex_lock\n    UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf)\n\n    WAS_EMPTY=0\n    [[ -z \"$UNMANAGED\" ]] && WAS_EMPTY=1\n    UNMANAGED=$(echo \"$UNMANAGED\" | sed 's/unmanaged-devices=//' | tr ';,' ' ')\n\n    # if it exists, do nothing\n    for x in $UNMANAGED; do\n        if [[ $x == \"mac:${MAC}\" ]] ||\n               [[ $NM_OLDER_VERSION -eq 0 && $x == \"interface-name:${1}\" ]]; then\n            mutex_unlock\n            return 2\n        fi\n    done\n\n    if [[ $NM_OLDER_VERSION -eq 1 ]]; then\n        UNMANAGED=\"${UNMANAGED} mac:${MAC}\"\n    else\n        UNMANAGED=\"${UNMANAGED} interface-name:${1}\"\n    fi\n\n    UNMANAGED=$(echo $UNMANAGED | sed -e 's/^ //')\n    UNMANAGED=\"${UNMANAGED// /;}\"\n    UNMANAGED=\"unmanaged-devices=${UNMANAGED}\"\n\n    if ! grep -E '^\\[keyfile\\]' ${NETWORKMANAGER_CONF} > /dev/null 2>&1; then\n        echo -e \"\\n\\n[keyfile]\\n${UNMANAGED}\" >> ${NETWORKMANAGER_CONF}\n    elif [[ $WAS_EMPTY -eq 1 ]]; then\n        sed -e \"s/^\\(\\[keyfile\\].*\\)$/\\1\\n${UNMANAGED}/\" -i ${NETWORKMANAGER_CONF}\n    else\n        sed -e \"s/^unmanaged-devices=.*/${UNMANAGED}/\" -i ${NETWORKMANAGER_CONF}\n    fi\n\n    ADDED_UNMANAGED=\"${ADDED_UNMANAGED} ${1} \"\n    mutex_unlock\n\n    local nm_pid=$(pidof NetworkManager)\n    [[ -n \"$nm_pid\" ]] && kill -HUP $nm_pid\n\n    return 0\n}\n\nnetworkmanager_rm_unmanaged() {\n    local MAC UNMANAGED\n    networkmanager_exists || return 1\n    [[ ! -f ${NETWORKMANAGER_CONF} ]] && return 1\n\n    if [[ $NM_OLDER_VERSION -eq 1 ]]; then\n        if [[ -z \"$2\" ]]; then\n            MAC=$(get_macaddr \"$1\")\n        else\n            MAC=\"$2\"\n        fi\n        [[ -z \"$MAC\" ]] && return 1\n    fi\n\n    mutex_lock\n    UNMANAGED=$(grep -m1 -Eo '^unmanaged-devices=[[:alnum:]:;,-]*' /etc/NetworkManager/NetworkManager.conf | sed 's/unmanaged-devices=//' | tr ';,' ' ')\n\n    if [[ -z \"$UNMANAGED\" ]]; then\n        mutex_unlock\n        return 1\n    fi\n\n    [[ -n \"$MAC\" ]] && UNMANAGED=$(echo $UNMANAGED | sed -e \"s/mac:${MAC}\\( \\|$\\)//g\")\n    UNMANAGED=$(echo $UNMANAGED | sed -e \"s/interface-name:${1}\\( \\|$\\)//g\")\n    UNMANAGED=$(echo $UNMANAGED | sed -e 's/ $//')\n\n    if [[ -z \"$UNMANAGED\" ]]; then\n        sed -e \"/^unmanaged-devices=.*/d\" -i ${NETWORKMANAGER_CONF}\n    else\n        UNMANAGED=\"${UNMANAGED// /;}\"\n        UNMANAGED=\"unmanaged-devices=${UNMANAGED}\"\n        sed -e \"s/^unmanaged-devices=.*/${UNMANAGED}/\" -i ${NETWORKMANAGER_CONF}\n    fi\n\n    ADDED_UNMANAGED=\"${ADDED_UNMANAGED/ ${1} /}\"\n    mutex_unlock\n\n    local nm_pid=$(pidof NetworkManager)\n    [[ -n \"$nm_pid\" ]] && kill -HUP $nm_pid\n\n    return 0\n}\n\nnetworkmanager_fix_unmanaged() {\n    [[ -f ${NETWORKMANAGER_CONF} ]] || return\n\n    mutex_lock\n    sed -e \"/^unmanaged-devices=.*/d\" -i ${NETWORKMANAGER_CONF}\n    mutex_unlock\n\n    local nm_pid=$(pidof NetworkManager)\n    [[ -n \"$nm_pid\" ]] && kill -HUP $nm_pid\n}\n\nnetworkmanager_rm_unmanaged_if_needed() {\n    [[ $ADDED_UNMANAGED =~ .*\\ ${1}\\ .* ]] && networkmanager_rm_unmanaged $1 $2\n}\n\nnetworkmanager_wait_until_unmanaged() {\n    local RES\n    networkmanager_is_running || return 1\n    while :; do\n        networkmanager_iface_is_unmanaged \"$1\"\n        RES=$?\n        [[ $RES -eq 0 ]] && break\n        [[ $RES -eq 2 ]] && die \"Interface '${1}' does not exist.\n       It's probably renamed by a udev rule.\"\n        sleep 1\n    done\n    sleep 2\n    return 0\n}\n\n\nCHANNEL=default\nGATEWAY=192.168.12.1\nWPA_VERSION=1+2\nETC_HOSTS=0\nADDN_HOSTS=\nDHCP_DNS=gateway\nNO_DNS=0\nNO_DNSMASQ=0\nDNS_PORT=\nHIDDEN=0\nMAC_FILTER=0\nMAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept\nISOLATE_CLIENTS=0\nSHARE_METHOD=nat\nIEEE80211N=0\nIEEE80211AC=0\nHT_CAPAB='[HT40+]'\nVHT_CAPAB=\nDRIVER=nl80211\nNO_VIRT=0\nCOUNTRY=\nFREQ_BAND=2.4\nNEW_MACADDR=\nDAEMONIZE=0\nNO_HAVEGED=0\nUSE_PSK=0\n\nHOSTAPD_DEBUG_ARGS=\nREDIRECT_TO_LOCALHOST=0\n\nCONFIG_OPTS=(CHANNEL GATEWAY WPA_VERSION ETC_HOSTS DHCP_DNS NO_DNS NO_DNSMASQ HIDDEN MAC_FILTER MAC_FILTER_ACCEPT ISOLATE_CLIENTS\n             SHARE_METHOD IEEE80211N IEEE80211AC HT_CAPAB VHT_CAPAB DRIVER NO_VIRT COUNTRY FREQ_BAND\n             NEW_MACADDR DAEMONIZE NO_HAVEGED WIFI_IFACE INTERNET_IFACE\n             SSID PASSPHRASE USE_PSK)\n\nFIX_UNMANAGED=0\nLIST_RUNNING=0\nSTOP_ID=\nLIST_CLIENTS_ID=\n\nSTORE_CONFIG=\nLOAD_CONFIG=\n\nCONFDIR=\nWIFI_IFACE=\nVWIFI_IFACE=\nINTERNET_IFACE=\nBRIDGE_IFACE=\nOLD_MACADDR=\nIP_ADDRS=\nROUTE_ADDRS=\n\nHAVEGED_WATCHDOG_PID=\n\n_cleanup() {\n    local PID x\n\n    trap \"\" SIGINT SIGUSR1 SIGUSR2 EXIT\n    mutex_lock\n    disown -a\n\n    # kill haveged_watchdog\n    [[ -n \"$HAVEGED_WATCHDOG_PID\" ]] && kill $HAVEGED_WATCHDOG_PID\n\n    # kill processes\n    for x in $CONFDIR/*.pid; do\n        # even if the $CONFDIR is empty, the for loop will assign\n        # a value in $x. so we need to check if the value is a file\n        [[ -f $x ]] && kill -9 $(cat $x)\n    done\n\n    rm -rf $CONFDIR\n\n    local found=0\n    for x in $(list_running_conf); do\n        if [[ -f $x/nat_internet_iface && $(cat $x/nat_internet_iface) == $INTERNET_IFACE ]]; then\n            found=1\n            break\n        fi\n    done\n\n    if [[ $found -eq 0 ]]; then\n        cp -f $COMMON_CONFDIR/${INTERNET_IFACE}_forwarding \\\n           /proc/sys/net/ipv4/conf/$INTERNET_IFACE/forwarding\n        rm -f $COMMON_CONFDIR/${INTERNET_IFACE}_forwarding\n    fi\n\n    # if we are the last hotspot instance then set back the common values\n    if ! has_running_instance; then\n        # kill common processes\n        for x in $COMMON_CONFDIR/*.pid; do\n            [[ -f $x ]] && kill -9 $(cat $x)\n        done\n\n        # set old ip_forward\n        if [[ -f $COMMON_CONFDIR/ip_forward ]]; then\n            cp -f $COMMON_CONFDIR/ip_forward /proc/sys/net/ipv4\n            rm -f $COMMON_CONFDIR/ip_forward\n        fi\n\n        # set old bridge-nf-call-iptables\n        if [[ -f $COMMON_CONFDIR/bridge-nf-call-iptables ]]; then\n            if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then\n                cp -f $COMMON_CONFDIR/bridge-nf-call-iptables /proc/sys/net/bridge\n            fi\n            rm -f $COMMON_CONFDIR/bridge-nf-call-iptables\n        fi\n\n        rm -rf $COMMON_CONFDIR\n    fi\n\n    if [[ \"$SHARE_METHOD\" != \"none\" ]]; then\n        if [[ \"$SHARE_METHOD\" == \"nat\" ]]; then\n            iptables -w -t nat -D POSTROUTING -s ${GATEWAY%.*}.0/24 ! -o ${WIFI_IFACE} -j MASQUERADE || die\n            iptables -w -D FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT\n            iptables -w -D FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT\n        elif [[ \"$SHARE_METHOD\" == \"bridge\" ]]; then\n            if ! is_bridge_interface $INTERNET_IFACE; then\n                ip link set dev $BRIDGE_IFACE down\n                ip link set dev $INTERNET_IFACE down\n                ip link set dev $INTERNET_IFACE promisc off\n                ip link set dev $INTERNET_IFACE nomaster\n                ip link delete $BRIDGE_IFACE type bridge\n                ip addr flush $INTERNET_IFACE\n                ip link set dev $INTERNET_IFACE up\n                dealloc_iface $BRIDGE_IFACE\n\n                for x in \"${IP_ADDRS[@]}\"; do\n                    x=\"${x/inet/}\"\n                    x=\"${x/secondary/}\"\n                    x=\"${x/dynamic/}\"\n                    x=$(echo $x | sed 's/\\([0-9]\\)sec/\\1/g')\n                    x=\"${x/${INTERNET_IFACE}/}\"\n                    ip addr add $x dev $INTERNET_IFACE\n                done\n\n                ip route flush dev $INTERNET_IFACE\n\n                for x in \"${ROUTE_ADDRS[@]}\"; do\n                    [[ -z \"$x\" ]] && continue\n                    [[ \"$x\" == default* ]] && continue\n                    ip route add $x dev $INTERNET_IFACE\n                done\n\n                for x in \"${ROUTE_ADDRS[@]}\"; do\n                    [[ -z \"$x\" ]] && continue\n                    [[ \"$x\" != default* ]] && continue\n                    ip route add $x dev $INTERNET_IFACE\n                done\n\n                networkmanager_rm_unmanaged_if_needed $INTERNET_IFACE\n            fi\n        fi\n    fi\n\n    if [[ \"$SHARE_METHOD\" != \"bridge\" ]]; then\n        if [[ $NO_DNS -eq 0 ]]; then\n            iptables -w -D INPUT -p tcp -m tcp --dport $DNS_PORT -j ACCEPT\n            iptables -w -D INPUT -p udp -m udp --dport $DNS_PORT -j ACCEPT\n            iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \\\n                -p tcp -m tcp --dport 53 -j REDIRECT --to-ports $DNS_PORT\n            iptables -w -t nat -D PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \\\n                -p udp -m udp --dport 53 -j REDIRECT --to-ports $DNS_PORT\n        fi\n        iptables -w -D INPUT -p udp -m udp --dport 67 -j ACCEPT\n    fi\n\n    if [[ $NO_VIRT -eq 0 ]]; then\n        if [[ -n \"$VWIFI_IFACE\" ]]; then\n            ip link set down dev ${VWIFI_IFACE}\n            ip addr flush ${VWIFI_IFACE}\n            networkmanager_rm_unmanaged_if_needed ${VWIFI_IFACE} ${OLD_MACADDR}\n            iw dev ${VWIFI_IFACE} del\n            dealloc_iface $VWIFI_IFACE\n        fi\n    else\n        ip link set down dev ${WIFI_IFACE}\n        ip addr flush ${WIFI_IFACE}\n        if [[ -n \"$NEW_MACADDR\" ]]; then\n            ip link set dev ${WIFI_IFACE} address ${OLD_MACADDR}\n        fi\n        networkmanager_rm_unmanaged_if_needed ${WIFI_IFACE} ${OLD_MACADDR}\n    fi\n\n    mutex_unlock\n    cleanup_lock\n}\n\ncleanup() {\n    echo\n    echo -n \"Doing cleanup.. \"\n    _cleanup > /dev/null 2>&1\n    echo \"done\"\n}\n\ndie() {\n    [[ -n \"$1\" ]] && echo -e \"\\nERROR: $1\\n\" >&2\n    # send die signal to the main process\n    [[ $BASHPID -ne $$ ]] && kill -USR2 $$\n    # we don't need to call cleanup because it's traped on EXIT\n    exit 1\n}\n\nclean_exit() {\n    # send clean_exit signal to the main process\n    [[ $BASHPID -ne $$ ]] && kill -USR1 $$\n    # we don't need to call cleanup because it's traped on EXIT\n    exit 0\n}\n\nlist_running_conf() {\n    local x\n    mutex_lock\n    for x in /tmp/hotspot.*; do\n        if [[ -f $x/pid && -f $x/wifi_iface && -d /proc/$(cat $x/pid) ]]; then\n            echo $x\n        fi\n    done\n    mutex_unlock\n}\n\nlist_running() {\n    local IFACE wifi_iface x\n    mutex_lock\n    for x in $(list_running_conf); do\n        IFACE=${x#*.}\n        IFACE=${IFACE%%.*}\n        wifi_iface=$(cat $x/wifi_iface)\n\n        if [[ $IFACE == $wifi_iface ]]; then\n            echo $(cat $x/pid) $IFACE\n        else\n            echo $(cat $x/pid) $IFACE '('$(cat $x/wifi_iface)')'\n        fi\n    done\n    mutex_unlock\n}\n\nget_wifi_iface_from_pid() {\n    list_running | awk '{print $1 \" \" $NF}' | tr -d '\\(\\)' | grep -E \"^${1} \" | cut -d' ' -f2\n}\n\nget_pid_from_wifi_iface() {\n    list_running | awk '{print $1 \" \" $NF}' | tr -d '\\(\\)' | grep -E \" ${1}$\" | cut -d' ' -f1\n}\n\nget_confdir_from_pid() {\n    local IFACE x\n    mutex_lock\n    for x in $(list_running_conf); do\n        if [[ $(cat $x/pid) == \"$1\" ]]; then\n            echo $x\n            break\n        fi\n    done\n    mutex_unlock\n}\n\nprint_client() {\n    local line ipaddr hostname\n    local mac=\"$1\"\n\n    if [[ -f $CONFDIR/dnsmasq.leases ]]; then\n        line=$(grep \" $mac \" $CONFDIR/dnsmasq.leases | tail -n 1)\n        ipaddr=$(echo $line | cut -d' ' -f3)\n        hostname=$(echo $line | cut -d' ' -f4)\n    fi\n\n    [[ -z \"$ipaddr\" ]] && ipaddr=\"*\"\n    [[ -z \"$hostname\" ]] && hostname=\"*\"\n\n    printf \"%-20s %-18s %s\\n\" \"$mac\" \"$ipaddr\" \"$hostname\"\n}\n\nlist_clients() {\n    local wifi_iface pid\n\n    # If PID is given, get the associated wifi iface\n    if [[ \"$1\" =~ ^[1-9][0-9]*$ ]]; then\n        pid=\"$1\"\n        wifi_iface=$(get_wifi_iface_from_pid \"$pid\")\n        [[ -z \"$wifi_iface\" ]] && die \"'$pid' is not the pid of a running $PROGNAME instance.\"\n    fi\n\n    [[ -z \"$wifi_iface\" ]] && wifi_iface=\"$1\"\n    is_wifi_interface \"$wifi_iface\" || die \"'$wifi_iface' is not a WiFi interface.\"\n\n    [[ -z \"$pid\" ]] && pid=$(get_pid_from_wifi_iface \"$wifi_iface\")\n    [[ -z \"$pid\" ]] && die \"'$wifi_iface' is not used from $PROGNAME instance.\\n\\\n       Maybe you need to pass the virtual interface instead.\\n\\\n       Use --list-running to find it out.\"\n    [[ -z \"$CONFDIR\" ]] && CONFDIR=$(get_confdir_from_pid \"$pid\")\n\n    if [[ $USE_IWCONFIG -eq 0 ]]; then\n        local awk_cmd='($1 ~ /Station$/) {print $2}'\n        local client_list=$(iw dev \"$wifi_iface\" station dump | awk \"$awk_cmd\")\n\n        if [[ -z \"$client_list\" ]]; then\n            echo \"No clients connected\"\n            return\n        fi\n\n        printf \"%-20s %-18s %s\\n\" \"MAC\" \"IP\" \"Hostname\"\n\n        local mac\n        for mac in $client_list; do\n            print_client $mac\n        done\n    else\n        die \"This option is not supported for the current driver.\"\n    fi\n}\n\nhas_running_instance() {\n    local PID x\n\n    mutex_lock\n    for x in /tmp/hotspot.*; do\n        if [[ -f $x/pid ]]; then\n            PID=$(cat $x/pid)\n            if [[ -d /proc/$PID ]]; then\n                mutex_unlock\n                return 0\n            fi\n        fi\n    done\n    mutex_lock\n\n    return 1\n}\n\nis_running_pid() {\n    list_running | grep -E \"^${1} \" > /dev/null 2>&1\n}\n\nsend_stop() {\n    local x\n\n    mutex_lock\n    # send stop signal to specific pid\n    if is_running_pid $1; then\n        kill -USR1 $1\n        mutex_unlock\n        return\n    fi\n\n    # send stop signal to specific interface\n    for x in $(list_running | grep -E \" \\(?${1}( |\\)?\\$)\" | cut -f1 -d' '); do\n        kill -USR1 $x\n    done\n    mutex_unlock\n}\n\n# Storing configs\nwrite_config() {\n    local i=1\n\n    if ! eval 'echo -n > \"$STORE_CONFIG\"' > /dev/null 2>&1; then\n        echo \"ERROR: Unable to create config file $STORE_CONFIG\" >&2\n        exit 1\n    fi\n\n    WIFI_IFACE=$1\n    if [[ \"$SHARE_METHOD\" == \"none\" ]]; then\n        SSID=\"$2\"\n        PASSPHRASE=\"$3\"\n    else\n        INTERNET_IFACE=\"$2\"\n        SSID=\"$3\"\n        PASSPHRASE=\"$4\"\n    fi\n\n    for config_opt in \"${CONFIG_OPTS[@]}\"; do\n        eval echo $config_opt=\\$$config_opt\n    done >> \"$STORE_CONFIG\"\n\n    echo -e \"Config options written to '$STORE_CONFIG'\"\n    exit 0\n}\n\nis_config_opt() {\n    local elem opt=\"$1\"\n\n    for elem in \"${CONFIG_OPTS[@]}\"; do\n        if [[ \"$elem\" == \"$opt\" ]]; then\n            return 0\n        fi\n    done\n    return 1\n}\n\n# Load options from config file\nread_config() {\n    local opt_name opt_val line\n\n    while read line; do\n        # Read switches and their values\n        opt_name=\"${line%%=*}\"\n        opt_val=\"${line#*=}\"\n        if is_config_opt \"$opt_name\" ; then\n            eval $opt_name=\"\\$opt_val\"\n        else\n            echo \"WARN: Unrecognized configuration entry $opt_name\" >&2\n        fi\n    done < \"$LOAD_CONFIG\"\n}\n\n\nARGS=( \"$@\" )\n\n# Preprocessing for --config before option-parsing starts\nfor ((i=0; i<$#; i++)); do\n    if [[ \"${ARGS[i]}\" = \"--config\" ]]; then\n        if [[ -f \"${ARGS[i+1]}\" ]]; then\n            LOAD_CONFIG=\"${ARGS[i+1]}\"\n            read_config\n        else\n            echo \"ERROR: No config file found at given location\" >&2\n            exit 1\n        fi\n        break\n    fi\ndone\n\nGETOPT_ARGS=$(getopt -o hc:w:g:de:nm: -l \"help\",\"hidden\",\"hostapd-debug:\",\"redirect-to-localhost\",\"mac-filter\",\"mac-filter-accept:\",\"isolate-clients\",\"ieee80211n\",\"ieee80211ac\",\"ht_capab:\",\"vht_capab:\",\"driver:\",\"no-virt\",\"fix-unmanaged\",\"country:\",\"freq-band:\",\"mac:\",\"dhcp-dns:\",\"daemon\",\"stop:\",\"list\",\"list-running\",\"list-clients:\",\"version\",\"psk\",\"no-haveged\",\"no-dns\",\"no-dnsmasq\",\"mkconfig:\",\"config:\" -n \"$PROGNAME\" -- \"$@\")\n[[ $? -ne 0 ]] && exit 1\neval set -- \"$GETOPT_ARGS\"\n\nwhile :; do\n    case \"$1\" in\n        -h|--help)\n            usage\n            exit 0\n            ;;\n        --version)\n            echo $VERSION\n            exit 0\n            ;;\n        --hidden)\n            shift\n            HIDDEN=1\n            ;;\n        --mac-filter)\n            shift\n            MAC_FILTER=1\n            ;;\n        --mac-filter-accept)\n            shift\n            MAC_FILTER_ACCEPT=\"$1\"\n            shift\n            ;;\n        --isolate-clients)\n            shift\n            ISOLATE_CLIENTS=1\n            ;;\n        -c)\n            shift\n            CHANNEL=\"$1\"\n            shift\n            ;;\n        -w)\n            shift\n            WPA_VERSION=\"$1\"\n            [[ \"$WPA_VERSION\" == \"2+1\" ]] && WPA_VERSION=1+2\n            shift\n            ;;\n        -g)\n            shift\n            GATEWAY=\"$1\"\n            shift\n            ;;\n        -d)\n            shift\n            ETC_HOSTS=1\n            ;;\n        -e)\n            shift\n            ADDN_HOSTS=\"$1\"\n            shift\n            ;;\n        -n)\n            shift\n            SHARE_METHOD=none\n            ;;\n        -m)\n            shift\n            SHARE_METHOD=\"$1\"\n            shift\n            ;;\n        --ieee80211n)\n            shift\n            IEEE80211N=1\n            ;;\n        --ieee80211ac)\n            shift\n            IEEE80211AC=1\n            ;;\n        --ht_capab)\n            shift\n            HT_CAPAB=\"$1\"\n            shift\n            ;;\n        --vht_capab)\n            shift\n            VHT_CAPAB=\"$1\"\n            shift\n            ;;\n        --driver)\n            shift\n            DRIVER=\"$1\"\n            shift\n            ;;\n        --no-virt)\n            shift\n            NO_VIRT=1\n            ;;\n        --fix-unmanaged)\n            shift\n            FIX_UNMANAGED=1\n            ;;\n        --country)\n            shift\n            COUNTRY=\"$1\"\n            shift\n            ;;\n        --freq-band)\n            shift\n            FREQ_BAND=\"$1\"\n            shift\n            ;;\n        --mac)\n            shift\n            NEW_MACADDR=\"$1\"\n            shift\n            ;;\n        --dhcp-dns)\n            shift\n            DHCP_DNS=\"$1\"\n            shift\n            ;;\n        --daemon)\n            shift\n            DAEMONIZE=1\n            ;;\n        --stop)\n            shift\n            STOP_ID=\"$1\"\n            shift\n            ;;\n        --list)\n            shift\n            LIST_RUNNING=1\n            echo -e \"WARN: --list is deprecated, use --list-running instead.\\n\" >&2\n            ;;\n        --list-running)\n            shift\n            LIST_RUNNING=1\n            ;;\n        --list-clients)\n            shift\n            LIST_CLIENTS_ID=\"$1\"\n            shift\n            ;;\n        --no-haveged)\n            shift\n            NO_HAVEGED=1\n            ;;\n        --psk)\n            shift\n            USE_PSK=1\n            ;;\n        --no-dns)\n            shift\n            NO_DNS=1\n            ;;\n        --no-dnsmasq)\n            shift\n            NO_DNSMASQ=1\n            ;;\n        --redirect-to-localhost)\n            shift\n            REDIRECT_TO_LOCALHOST=1\n            ;;\n        --hostapd-debug)\n            shift\n            if [ \"x$1\" = \"x1\" ]; then\n                HOSTAPD_DEBUG_ARGS=\"-d\"\n            elif [ \"x$1\" = \"x2\" ]; then\n                HOSTAPD_DEBUG_ARGS=\"-dd\"\n            else\n                printf \"Error: argument for --hostapd-debug expected 1 or 2, got %s\\n\" \"$1\"\n                exit 1\n            fi\n            shift\n            ;;\n        --mkconfig)\n            shift\n            STORE_CONFIG=\"$1\"\n            shift\n            ;;\n        --config)\n            shift\n            shift\n            ;;\n        --)\n            shift\n            break\n            ;;\n    esac\ndone\n\n# Load positional args from config file, if needed\nif [[ -n \"$LOAD_CONFIG\" && $# -eq 0 ]]; then\n    i=0\n    # set arguments in order\n    for x in WIFI_IFACE INTERNET_IFACE SSID PASSPHRASE; do\n        if eval \"[[ -n \\\"\\$${x}\\\" ]]\"; then\n            eval \"set -- \\\"\\${@:1:$i}\\\" \\\"\\$${x}\\\"\"\n            ((i++))\n        fi\n        # we unset the variable to avoid any problems later\n        eval \"unset $x\"\n    done\nfi\n\n# Check if required number of positional args are present\nif [[ $# -lt 1 && $FIX_UNMANAGED -eq 0  && -z \"$STOP_ID\" &&\n      $LIST_RUNNING -eq 0 && -z \"$LIST_CLIENTS_ID\" ]]; then\n    usage >&2\n    exit 1\nfi\n\n# Set NO_DNS, if dnsmasq is disabled\nif [[ $NO_DNSMASQ -eq 1 ]]; then\n  NO_DNS=1\nfi\n\ntrap \"cleanup_lock\" EXIT\n\nif ! init_lock; then\n    echo \"ERROR: Failed to initialize lock\" >&2\n    exit 1\nfi\n\n# if the user press ctrl+c or we get USR1 signal\n# then run clean_exit()\ntrap \"clean_exit\" SIGINT SIGUSR1\n# if we get USR2 signal then run die().\ntrap \"die\" SIGUSR2\n\n[[ -n \"$STORE_CONFIG\" ]] && write_config \"$@\"\n\nif [[ $LIST_RUNNING -eq 1 ]]; then\n    echo -e \"List of running $PROGNAME instances:\\n\"\n    list_running\n    exit 0\nfi\n\nif [[ -n \"$LIST_CLIENTS_ID\" ]]; then\n    list_clients \"$LIST_CLIENTS_ID\"\n    exit 0\nfi\n\nif [[ $(id -u) -ne 0 ]]; then\n    echo \"You must run it as root.\" >&2\n    exit 1\nfi\n\nif [[ -n \"$STOP_ID\" ]]; then\n    echo \"Trying to kill $PROGNAME instance associated with $STOP_ID...\"\n    send_stop \"$STOP_ID\"\n    exit 0\nfi\n\nif [[ $FIX_UNMANAGED -eq 1 ]]; then\n    echo \"Trying to fix unmanaged status in NetworkManager...\"\n    networkmanager_fix_unmanaged\n    exit 0\nfi\n\nif [[ $DAEMONIZE -eq 1 && $RUNNING_AS_DAEMON -eq 0 ]]; then\n    echo \"Running as Daemon...\"\n    # run a detached hotspot\n    RUNNING_AS_DAEMON=1 setsid \"$0\" \"${ARGS[@]}\" &\n    exit 0\nfi\n\nif [[ $FREQ_BAND != 2.4 && $FREQ_BAND != 5 ]]; then\n    echo \"ERROR: Invalid frequency band\" >&2\n    exit 1\nfi\n\nif [[ $CHANNEL == default ]]; then\n    if [[ $FREQ_BAND == 2.4 ]]; then\n        CHANNEL=1\n    else\n        CHANNEL=36\n    fi\nfi\n\nif [[ $FREQ_BAND != 5 && $CHANNEL -gt 14 ]]; then\n    echo \"Channel number is greater than 14, assuming 5GHz frequency band\"\n    FREQ_BAND=5\nfi\n\nWIFI_IFACE=$1\n\nif ! is_wifi_interface ${WIFI_IFACE}; then\n    echo \"ERROR: '${WIFI_IFACE}' is not a WiFi interface\" >&2\n    exit 1\nfi\n\nif ! can_be_ap ${WIFI_IFACE}; then\n    echo \"ERROR: Your adapter does not support AP (master) mode\" >&2\n    exit 1\nfi\n\nif ! can_be_sta_and_ap ${WIFI_IFACE}; then\n    if is_wifi_connected ${WIFI_IFACE}; then\n        echo \"ERROR: Your adapter can not be a station (i.e. be connected) and an AP at the same time\" >&2\n        exit 1\n    elif [[ $NO_VIRT -eq 0 ]]; then\n        echo \"WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt\" >&2\n        NO_VIRT=1\n    fi\nfi\n\nHOSTAPD=$(which hostapd)\n\nif [[ ! -x \"$HOSTAPD\" ]]; then\n    echo \"ERROR: hostapd not found.\" >&2\n    exit 1\nfi\n\nif [[ $(get_adapter_kernel_module ${WIFI_IFACE}) =~ ^(8192[cd][ue]|8723a[sue])$ ]]; then\n    if ! strings \"$HOSTAPD\" | grep -m1 rtl871xdrv > /dev/null 2>&1; then\n        echo \"ERROR: You need to patch your hostapd with rtl871xdrv patches.\" >&2\n        exit 1\n    fi\n\n    if [[ $DRIVER != \"rtl871xdrv\" ]]; then\n        echo \"WARN: Your adapter needs rtl871xdrv, enabling --driver=rtl871xdrv\" >&2\n        DRIVER=rtl871xdrv\n    fi\nfi\n\nif [[ \"$SHARE_METHOD\" != \"nat\" && \"$SHARE_METHOD\" != \"bridge\" && \"$SHARE_METHOD\" != \"none\" ]]; then\n    echo \"ERROR: Wrong Internet sharing method\" >&2\n    echo\n    usage >&2\n    exit 1\nfi\n\nif [[ -n \"$NEW_MACADDR\" ]]; then\n    if ! is_macaddr \"$NEW_MACADDR\"; then\n        echo \"ERROR: '${NEW_MACADDR}' is not a valid MAC address\" >&2\n        exit 1\n    fi\n\n    if ! is_unicast_macaddr \"$NEW_MACADDR\"; then\n        echo \"ERROR: The first byte of MAC address (${NEW_MACADDR}) must be even\" >&2\n        exit 1\n    fi\n\n    if [[ $(get_all_macaddrs | grep -c ${NEW_MACADDR}) -ne 0 ]]; then\n        echo \"WARN: MAC address '${NEW_MACADDR}' already exists. Because of this, you may encounter some problems\" >&2\n    fi\nfi\n\nif [[ \"$SHARE_METHOD\" != \"none\" ]]; then\n    MIN_REQUIRED_ARGS=2\nelse\n    MIN_REQUIRED_ARGS=1\nfi\n\nif [[ $# -gt $MIN_REQUIRED_ARGS ]]; then\n    if [[ \"$SHARE_METHOD\" != \"none\" ]]; then\n        if [[ $# -ne 3 && $# -ne 4 ]]; then\n            usage >&2\n            exit 1\n        fi\n        INTERNET_IFACE=\"$2\"\n        SSID=\"$3\"\n        PASSPHRASE=\"$4\"\n    else\n        if [[ $# -ne 2 && $# -ne 3 ]]; then\n            usage >&2\n            exit 1\n        fi\n        SSID=\"$2\"\n        PASSPHRASE=\"$3\"\n    fi\nelse\n    if [[ \"$SHARE_METHOD\" != \"none\" ]]; then\n        if [[ $# -ne 2 ]]; then\n            usage >&2\n            exit 1\n        fi\n        INTERNET_IFACE=\"$2\"\n    fi\n    if tty -s; then\n        while :; do\n            read -p \"SSID: \" SSID\n            if [[ ${#SSID} -lt 1 || ${#SSID} -gt 32 ]]; then\n                echo \"ERROR: Invalid SSID length ${#SSID} (expected 1..32)\" >&2\n                continue\n            fi\n            break\n        done\n        while :; do\n            if [[ $USE_PSK -eq 0 ]]; then\n                read -p \"Passphrase: \" -s PASSPHRASE\n                echo\n                if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 63 ]]; then\n                    echo \"ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)\" >&2\n                    continue\n                fi\n                read -p \"Retype passphrase: \" -s PASSPHRASE2\n                echo\n                if [[ \"$PASSPHRASE\" != \"$PASSPHRASE2\" ]]; then\n                    echo \"Passphrases do not match.\"\n                else\n                    break\n                fi\n            else\n                read -p \"PSK: \" PASSPHRASE\n                echo\n                if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -ne 64 ]]; then\n                    echo \"ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)\" >&2\n                    continue\n                fi\n            fi\n        done\n    else\n        read SSID\n        read PASSPHRASE\n    fi\nfi\n\nif [[ \"$SHARE_METHOD\" != \"none\" ]] && ! is_interface $INTERNET_IFACE; then\n    echo \"ERROR: '${INTERNET_IFACE}' is not an interface\" >&2\n    exit 1\nfi\n\nif [[ ${#SSID} -lt 1 || ${#SSID} -gt 32 ]]; then\n    echo \"ERROR: Invalid SSID length ${#SSID} (expected 1..32)\" >&2\n    exit 1\nfi\n\nif [[ $USE_PSK -eq 0 ]]; then\n    if [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -lt 8 ]] || [[ ${#PASSPHRASE} -gt 63 ]]; then\n        echo \"ERROR: Invalid passphrase length ${#PASSPHRASE} (expected 8..63)\" >&2\n        exit 1\n    fi\nelif [[ ${#PASSPHRASE} -gt 0 && ${#PASSPHRASE} -ne 64 ]]; then\n    echo \"ERROR: Invalid pre-shared-key length ${#PASSPHRASE} (expected 64)\" >&2\n    exit 1\nfi\n\nif [[ $(get_adapter_kernel_module ${WIFI_IFACE}) =~ ^rtl[0-9].*$ ]]; then\n    if [[ -n \"$PASSPHRASE\" ]]; then\n        echo \"WARN: Realtek drivers usually have problems with WPA1, enabling -w 2\" >&2\n        WPA_VERSION=2\n    fi\n    echo \"WARN: If AP doesn't work, please read: howto/realtek.md\" >&2\nfi\n\nif [[ $NO_VIRT -eq 1 && \"$WIFI_IFACE\" == \"$INTERNET_IFACE\" ]]; then\n    echo -n \"ERROR: You can not share your connection from the same\" >&2\n    echo \" interface if you are using --no-virt option.\" >&2\n    exit 1\nfi\n\nmutex_lock\ntrap \"cleanup\" EXIT\nCONFDIR=$(mktemp -d /tmp/hotspot.${WIFI_IFACE}.conf.XXXXXXXX)\necho \"Config dir: $CONFDIR\"\necho \"PID: $$\"\necho $$ > $CONFDIR/pid\n\n# to make --list-running work from any user, we must give read\n# permissions to $CONFDIR and $CONFDIR/pid\nchmod 755 $CONFDIR\nchmod 444 $CONFDIR/pid\n\nCOMMON_CONFDIR=/tmp/hotspot.common.conf\nmkdir -p $COMMON_CONFDIR\n\nif [[ \"$SHARE_METHOD\" == \"nat\" ]]; then\n    echo $INTERNET_IFACE > $CONFDIR/nat_internet_iface\n    cp -n /proc/sys/net/ipv4/conf/$INTERNET_IFACE/forwarding \\\n       $COMMON_CONFDIR/${INTERNET_IFACE}_forwarding\nfi\ncp -n /proc/sys/net/ipv4/ip_forward $COMMON_CONFDIR\nif [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then\n    cp -n /proc/sys/net/bridge/bridge-nf-call-iptables $COMMON_CONFDIR\nfi\nmutex_unlock\n\nif [[ \"$SHARE_METHOD\" == \"bridge\" ]]; then\n    if is_bridge_interface $INTERNET_IFACE; then\n        BRIDGE_IFACE=$INTERNET_IFACE\n    else\n        BRIDGE_IFACE=$(alloc_new_iface br)\n    fi\nfi\n\nif [[ $USE_IWCONFIG -eq 0 ]]; then\n    iw dev ${WIFI_IFACE} set power_save off\nfi\n\nif [[ $NO_VIRT -eq 0 ]]; then\n    VWIFI_IFACE=$(alloc_new_iface ap)\n\n    # in NetworkManager 0.9.9 and above we can set the interface as unmanaged without\n    # the need of MAC address, so we set it before we create the virtual interface.\n    if networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]]; then\n        echo -n \"Network Manager found, set ${VWIFI_IFACE} as unmanaged device... \"\n        networkmanager_add_unmanaged ${VWIFI_IFACE}\n        # do not call networkmanager_wait_until_unmanaged because interface does not\n        # exist yet\n        echo \"DONE\"\n    fi\n\n    if is_wifi_connected ${WIFI_IFACE}; then\n        WIFI_IFACE_FREQ=$(iw dev ${WIFI_IFACE} link | grep -i freq | awk '{print $2}')\n        WIFI_IFACE_CHANNEL=$(ieee80211_frequency_to_channel ${WIFI_IFACE_FREQ})\n        echo -n \"${WIFI_IFACE} is already associated with channel ${WIFI_IFACE_CHANNEL} (${WIFI_IFACE_FREQ} MHz)\"\n        if is_5ghz_frequency $WIFI_IFACE_FREQ; then\n            FREQ_BAND=5\n        else\n            FREQ_BAND=2.4\n        fi\n        if [[ $WIFI_IFACE_CHANNEL -ne $CHANNEL ]]; then\n            echo \", fallback to channel ${WIFI_IFACE_CHANNEL}\"\n            CHANNEL=$WIFI_IFACE_CHANNEL\n        else\n            echo\n        fi\n    fi\n\n    VIRTDIEMSG=\"Maybe your WiFi adapter does not fully support virtual interfaces.\n       Try again with --no-virt.\"\n    echo -n \"Creating a virtual WiFi interface... \"\n\n    if iw dev ${WIFI_IFACE} interface add ${VWIFI_IFACE} type __ap; then\n        # now we can call networkmanager_wait_until_unmanaged\n        networkmanager_is_running && [[ $NM_OLDER_VERSION -eq 0 ]] && networkmanager_wait_until_unmanaged ${VWIFI_IFACE}\n        echo \"${VWIFI_IFACE} created.\"\n    else\n        VWIFI_IFACE=\n        die \"$VIRTDIEMSG\"\n    fi\n    OLD_MACADDR=$(get_macaddr ${VWIFI_IFACE})\n    if [[ -z \"$NEW_MACADDR\" && $(get_all_macaddrs | grep -c ${OLD_MACADDR}) -ne 1 ]]; then\n        NEW_MACADDR=$(get_new_macaddr ${VWIFI_IFACE})\n    fi\n    WIFI_IFACE=${VWIFI_IFACE}\nelse\n    OLD_MACADDR=$(get_macaddr ${WIFI_IFACE})\nfi\n\nmutex_lock\necho $WIFI_IFACE > $CONFDIR/wifi_iface\nchmod 444 $CONFDIR/wifi_iface\nmutex_unlock\n\nif [[ -n \"$COUNTRY\" && $USE_IWCONFIG -eq 0 ]]; then\n    iw reg set \"$COUNTRY\"\nfi\n\ncan_transmit_to_channel ${WIFI_IFACE} ${CHANNEL} || die \"Your adapter can not transmit to channel ${CHANNEL}, frequency band ${FREQ_BAND}GHz.\"\n\nif networkmanager_exists && ! networkmanager_iface_is_unmanaged ${WIFI_IFACE}; then\n    echo -n \"Network Manager found, set ${WIFI_IFACE} as unmanaged device... \"\n    networkmanager_add_unmanaged ${WIFI_IFACE}\n\n    if networkmanager_is_running; then\n        networkmanager_wait_until_unmanaged ${WIFI_IFACE}\n    fi\n\n    echo \"DONE\"\nfi\n\n[[ $HIDDEN -eq 1 ]] && echo \"Access Point's SSID is hidden!\"\n\n[[ $MAC_FILTER -eq 1 ]] && echo \"MAC address filtering is enabled!\"\n\n[[ $ISOLATE_CLIENTS -eq 1 ]] && echo \"Access Point's clients will be isolated!\"\n\n# hostapd config\ncat << EOF > $CONFDIR/hostapd.conf\nbeacon_int=100\nssid=${SSID}\ninterface=${WIFI_IFACE}\ndriver=${DRIVER}\nchannel=${CHANNEL}\nctrl_interface=$CONFDIR/hostapd_ctrl\nctrl_interface_group=0\nignore_broadcast_ssid=$HIDDEN\nap_isolate=$ISOLATE_CLIENTS\nEOF\n\nif [[ -n \"$COUNTRY\" ]]; then\n    cat << EOF >> $CONFDIR/hostapd.conf\ncountry_code=${COUNTRY}\nieee80211d=1\nEOF\nfi\n\nif [[ $FREQ_BAND == 2.4 ]]; then\n    echo \"hw_mode=g\" >> $CONFDIR/hostapd.conf\nelse\n    echo \"hw_mode=a\" >> $CONFDIR/hostapd.conf\nfi\n\nif [[ $MAC_FILTER -eq 1 ]]; then\n    cat << EOF >> $CONFDIR/hostapd.conf\nmacaddr_acl=${MAC_FILTER}\naccept_mac_file=${MAC_FILTER_ACCEPT}\nEOF\nfi\n\nif [[ $IEEE80211N -eq 1 ]]; then\n    cat << EOF >> $CONFDIR/hostapd.conf\nieee80211n=1\nht_capab=${HT_CAPAB}\nEOF\nfi\n\nif [[ $IEEE80211AC -eq 1 ]]; then\n    echo \"ieee80211ac=1\" >> $CONFDIR/hostapd.conf\nfi\n\nif [[ -n \"$VHT_CAPAB\" ]]; then\n    echo \"vht_capab=${VHT_CAPAB}\" >> $CONFDIR/hostapd.conf\nfi\n\nif [[ $IEEE80211N -eq 1 ]] || [[ $IEEE80211AC -eq 1 ]]; then\n    echo \"wmm_enabled=1\" >> $CONFDIR/hostapd.conf\nfi\n\nif [[ -n \"$PASSPHRASE\" ]]; then\n    [[ \"$WPA_VERSION\" == \"1+2\" ]] && WPA_VERSION=3\n    if [[ $USE_PSK -eq 0 ]]; then\n        WPA_KEY_TYPE=passphrase\n    else\n        WPA_KEY_TYPE=psk\n    fi\n    cat << EOF >> $CONFDIR/hostapd.conf\nwpa=${WPA_VERSION}\nwpa_${WPA_KEY_TYPE}=${PASSPHRASE}\nwpa_key_mgmt=WPA-PSK\nwpa_pairwise=TKIP CCMP\nrsn_pairwise=CCMP\nEOF\nfi\n\nif [[ \"$SHARE_METHOD\" == \"bridge\" ]]; then\n    echo \"bridge=${BRIDGE_IFACE}\" >> $CONFDIR/hostapd.conf\nelif [[ $NO_DNSMASQ -eq 0 ]]; then\n    # dnsmasq config (dhcp + dns)\n    DNSMASQ_VER=$(dnsmasq -v | grep -m1 -oE '[0-9]+(\\.[0-9]+)*\\.[0-9]+')\n    version_cmp $DNSMASQ_VER 2.63\n    if [[ $? -eq 1 ]]; then\n        DNSMASQ_BIND=bind-interfaces\n    else\n        DNSMASQ_BIND=bind-dynamic\n    fi\n    if [[ \"$DHCP_DNS\" == \"gateway\" ]]; then\n        DHCP_DNS=\"$GATEWAY\"\n    fi\n    cat << EOF > $CONFDIR/dnsmasq.conf\nlisten-address=${GATEWAY}\n${DNSMASQ_BIND}\ndhcp-range=${GATEWAY%.*}.1,${GATEWAY%.*}.254,255.255.255.0,24h\ndhcp-option-force=option:router,${GATEWAY}\ndhcp-option-force=option:dns-server,${DHCP_DNS}\nEOF\n    MTU=$(get_mtu $INTERNET_IFACE)\n    [[ -n \"$MTU\" ]] && echo \"dhcp-option-force=option:mtu,${MTU}\" >> $CONFDIR/dnsmasq.conf\n    [[ $ETC_HOSTS -eq 0 ]] && echo no-hosts >> $CONFDIR/dnsmasq.conf\n    [[ -n \"$ADDN_HOSTS\" ]] && echo \"addn-hosts=${ADDN_HOSTS}\" >> $CONFDIR/dnsmasq.conf\n    if [[ \"$SHARE_METHOD\" == \"none\" && \"$REDIRECT_TO_LOCALHOST\" == \"1\" ]]; then\n        cat << EOF >> $CONFDIR/dnsmasq.conf\naddress=/#/$GATEWAY\nEOF\n    fi\nfi\n\n# initialize WiFi interface\nif [[ $NO_VIRT -eq 0 && -n \"$NEW_MACADDR\" ]]; then\n    ip link set dev ${WIFI_IFACE} address ${NEW_MACADDR} || die \"$VIRTDIEMSG\"\nfi\n\nip link set down dev ${WIFI_IFACE} || die \"$VIRTDIEMSG\"\nip addr flush ${WIFI_IFACE} || die \"$VIRTDIEMSG\"\n\nif [[ $NO_VIRT -eq 1 && -n \"$NEW_MACADDR\" ]]; then\n    ip link set dev ${WIFI_IFACE} address ${NEW_MACADDR} || die\nfi\n\nif [[ \"$SHARE_METHOD\" != \"bridge\" ]]; then\n    ip link set up dev ${WIFI_IFACE} || die \"$VIRTDIEMSG\"\n    ip addr add ${GATEWAY}/24 broadcast ${GATEWAY%.*}.255 dev ${WIFI_IFACE} || die \"$VIRTDIEMSG\"\nfi\n\n# enable Internet sharing\nif [[ \"$SHARE_METHOD\" != \"none\" ]]; then\n    echo \"Sharing Internet using method: $SHARE_METHOD\"\n    if [[ \"$SHARE_METHOD\" == \"nat\" ]]; then\n        iptables -w -t nat -I POSTROUTING -s ${GATEWAY%.*}.0/24 ! -o ${WIFI_IFACE} -j MASQUERADE || die\n        iptables -w -I FORWARD -i ${WIFI_IFACE} -s ${GATEWAY%.*}.0/24 -j ACCEPT || die\n        iptables -w -I FORWARD -i ${INTERNET_IFACE} -d ${GATEWAY%.*}.0/24 -j ACCEPT || die\n        echo 1 > /proc/sys/net/ipv4/conf/$INTERNET_IFACE/forwarding || die\n        echo 1 > /proc/sys/net/ipv4/ip_forward || die\n        # to enable clients to establish PPTP connections we must\n        # load nf_nat_pptp module\n        modprobe nf_nat_pptp > /dev/null 2>&1\n    elif [[ \"$SHARE_METHOD\" == \"bridge\" ]]; then\n        # disable iptables rules for bridged interfaces\n        if [[ -e /proc/sys/net/bridge/bridge-nf-call-iptables ]]; then\n            echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables\n        fi\n\n        # to initialize the bridge interface correctly we need to do the following:\n        #\n        # 1) save the IPs and route table of INTERNET_IFACE\n        # 2) if NetworkManager is running set INTERNET_IFACE as unmanaged\n        # 3) create BRIDGE_IFACE and attach INTERNET_IFACE to it\n        # 4) set the previously saved IPs and route table to BRIDGE_IFACE\n        #\n        # we need the above because BRIDGE_IFACE is the master interface from now on\n        # and it must know where is connected, otherwise connection is lost.\n        if ! is_bridge_interface $INTERNET_IFACE; then\n            echo -n \"Create a bridge interface... \"\n            OLD_IFS=\"$IFS\"\n            IFS=$'\\n'\n\n            IP_ADDRS=( $(ip addr show $INTERNET_IFACE | grep -A 1 -E 'inet[[:blank:]]' | paste - -) )\n            ROUTE_ADDRS=( $(ip route show dev $INTERNET_IFACE) )\n\n            IFS=\"$OLD_IFS\"\n\n            if networkmanager_is_running; then\n                networkmanager_add_unmanaged $INTERNET_IFACE\n                networkmanager_wait_until_unmanaged $INTERNET_IFACE\n            fi\n\n            # create bridge interface\n            ip link add name $BRIDGE_IFACE type bridge || die\n            ip link set dev $BRIDGE_IFACE up || die\n            # set 0ms forward delay\n            echo 0 > /sys/class/net/$BRIDGE_IFACE/bridge/forward_delay\n\n            # attach internet interface to bridge interface\n            ip link set dev $INTERNET_IFACE promisc on || die\n            ip link set dev $INTERNET_IFACE up || die\n            ip link set dev $INTERNET_IFACE master $BRIDGE_IFACE || die\n\n            ip addr flush $INTERNET_IFACE\n            for x in \"${IP_ADDRS[@]}\"; do\n                x=\"${x/inet/}\"\n                x=\"${x/secondary/}\"\n                x=\"${x/dynamic/}\"\n                x=$(echo $x | sed 's/\\([0-9]\\)sec/\\1/g')\n                x=\"${x/${INTERNET_IFACE}/}\"\n                ip addr add $x dev $BRIDGE_IFACE || die\n            done\n\n            # remove any existing entries that were added from 'ip addr add'\n            ip route flush dev $INTERNET_IFACE\n            ip route flush dev $BRIDGE_IFACE\n\n            # we must first add the entries that specify the subnets and then the\n            # gateway entry, otherwise 'ip addr add' will return an error\n            for x in \"${ROUTE_ADDRS[@]}\"; do\n                [[ \"$x\" == default* ]] && continue\n                ip route add $x dev $BRIDGE_IFACE || die\n            done\n\n            for x in \"${ROUTE_ADDRS[@]}\"; do\n                [[ \"$x\" != default* ]] && continue\n                ip route add $x dev $BRIDGE_IFACE || die\n            done\n\n            echo \"$BRIDGE_IFACE created.\"\n        fi\n    fi\nelse\n    echo \"No Internet sharing\"\nfi\n\n# start dhcp + dns (optional)\nif [[ \"$SHARE_METHOD\" != \"bridge\" ]]; then\n    if [[ $NO_DNS -eq 0 ]]; then\n        DNS_PORT=5353\n        iptables -w -I INPUT -p tcp -m tcp --dport $DNS_PORT -j ACCEPT || die\n        iptables -w -I INPUT -p udp -m udp --dport $DNS_PORT -j ACCEPT || die\n        iptables -w -t nat -I PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \\\n            -p tcp -m tcp --dport 53 -j REDIRECT --to-ports $DNS_PORT || die\n        iptables -w -t nat -I PREROUTING -s ${GATEWAY%.*}.0/24 -d ${GATEWAY} \\\n            -p udp -m udp --dport 53 -j REDIRECT --to-ports $DNS_PORT || die\n    else\n        DNS_PORT=0\n    fi\n\n    if [[ $NO_DNSMASQ -eq 0 ]]; then\n      iptables -w -I INPUT -p udp -m udp --dport 67 -j ACCEPT || die\n\n      if which complain > /dev/null 2>&1; then\n          # openSUSE's apparmor does not allow dnsmasq to read files.\n          # remove restriction.\n          complain dnsmasq\n      fi\n\n      umask 0033\n      dnsmasq -C $CONFDIR/dnsmasq.conf -x $CONFDIR/dnsmasq.pid -l $CONFDIR/dnsmasq.leases -p $DNS_PORT || die\n      umask $SCRIPT_UMASK\n    fi\nfi\n\n# start access point\necho \"hostapd command-line interface: hostapd_cli -p $CONFDIR/hostapd_ctrl\"\n\nif [[ $NO_HAVEGED -eq 0 ]]; then\n    haveged_watchdog &\n    HAVEGED_WATCHDOG_PID=$!\nfi\n\n# start hostapd (use stdbuf when available for no delayed output in programs that redirect stdout)\nSTDBUF_PATH=`which stdbuf`\nif [ $? -eq 0 ]; then\n    STDBUF_PATH=$STDBUF_PATH\" -oL\"\nfi\n$STDBUF_PATH $HOSTAPD $HOSTAPD_DEBUG_ARGS $CONFDIR/hostapd.conf &\nHOSTAPD_PID=$!\necho $HOSTAPD_PID > $CONFDIR/hostapd.pid\n\nif ! wait $HOSTAPD_PID; then\n    echo -e \"\\nError: Failed to run hostapd, maybe a program is interfering.\" >&2\n    if networkmanager_is_running; then\n        echo \"If an error like 'n80211: Could not configure driver mode' was thrown\" >&2\n        echo \"try running the following before starting hotspot:\" >&2\n        if [[ $NM_OLDER_VERSION -eq 1 ]]; then\n            echo \"    nmcli nm wifi off\" >&2\n        else\n            echo \"    nmcli r wifi off\" >&2\n        fi\n        echo \"    rfkill unblock wlan\" >&2\n    fi\n    die\nfi\n\nclean_exit\n\n# Local Variables:\n# tab-width: 4\n# indent-tabs-mode: nil\n# End:\n\n# vim: et sts=4 sw=4\n"
  },
  {
    "path": ".sbin/loopwall",
    "content": "#!/usr/bin/env bash\nwhile true\n  do ls $1/* | sort -R | tail -$N | while read file\n    do\twal -i $file --backend haishoku --saturate 1.0\n    # do\twal -i $file\n    sleep $2\n  done\ndone\n"
  },
  {
    "path": ".sbin/pipes",
    "content": "#!/usr/bin/env bash\n# pipes.sh: Animated pipes terminal screensaver.\n# https://github.com/pipeseroni/pipes.sh\n#\n# Copyright (c) 2015-2018 Pipeseroni/pipes.sh contributors\n# Copyright (c) 2013-2015 Yu-Jie Lin\n# Copyright (c) 2010 Matthew Simpson\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n# SOFTWARE.\n\n\nVERSION=1.3.0\n\nM=32768  # Bash RANDOM maximum + 1\np=1      # number of pipes\nf=75     # frame rate\ns=13     # probability of straight fitting\nr=2000   # characters limit\nt=0      # iteration counter for -r character limit\nw=80     # terminal size\nh=24\n\n# ab -> sets[][idx] = a*4 + b\n# 0: up, 1: right, 2: down, 3: left\n# 00 means going up   , then going up   -> ┃\n# 12 means going right, then going down -> ┓\nsets=(\n    \"┃┏ ┓┛━┓  ┗┃┛┗ ┏━\"\n    \"│╭ ╮╯─╮  ╰│╯╰ ╭─\"\n    \"│┌ ┐┘─┐  └│┘└ ┌─\"\n    \"║╔ ╗╝═╗  ╚║╝╚ ╔═\"\n    \"|+ ++-+  +|++ +-\"\n    \"|/ \\/-\\  \\|/\\ /-\"\n    \".. ....  .... ..\"\n    \".o oo.o  o.oo o.\"\n    \"-\\ /\\|/  /-\\/ \\|\"  # railway\n    \"╿┍ ┑┚╼┒  ┕╽┙┖ ┎╾\"  # knobby pipe\n)\nSETS=()  # rearranged all pipe chars into individul elements for easier access\n\n# pipes'\nx=()  # current position\ny=()\nl=()  # current directions\n      # 0: up, 1: right, 2: down, 3: left\nn=()  # new directions\nv=()  # current types\nc=()  # current escape codes\n\n# selected pipes'\nV=()  # types (indexes to sets[])\nC=()  # color indices for tput setaf\nVN=0  # number of selected types\nCN=0  # number of selected colors\nE=()  # pre-generated escape codes from BOLD, NOCOLOR, and C\n\n# switches\nRNDSTART=0  # randomize starting position and direction\nBOLD=1\nNOCOLOR=0\nKEEPCT=0    # keep pipe color and type\n\n\n# print help message in 72-char width\nprint_help() {\n    local cgap\n    printf -v cgap '%*s' $((15 - ${#COLORS})) ''\n    cat <<HELP\nUsage: $(basename $0) [OPTION]...\nAnimated pipes terminal screensaver.\n\n  -p [1-]               number of pipes (D=1)\n  -t [0-$((${#sets[@]} - 1))]              pipe type (D=0)\n  -t c[16 chars]        custom pipe type\n  -c [0-$COLORS]${cgap}pipe color INDEX (TERM=$TERM), can be\n                        hexadecimal with '#' prefix\n                        (D=-c 1 -c 2 ... -c 7 -c 0)\n  -f [20-100]           framerate (D=75)\n  -s [5-15]             going straight probability, 1 in (D=13)\n  -r [0-]               reset after (D=2000) characters, 0 if no reset\n  -R                    randomize starting position and direction\n  -B                    no bold effect\n  -C                    no color\n  -K                    keep pipe color and type when crossing edges\n  -h                    print this help message\n  -v                    print version number\n\nNote: -t and -c can be used more than once.\nHELP\n}\n\n\n# parse command-line options\n# It depends on a valid COLORS which is set by _CP_init_termcap_vars\nparse() {\n    # test if $1 is a natural number in decimal, an integer >= 0\n    is_N() {\n        [[ -n $1 && -z ${1//[0-9]} ]]\n    }\n\n\n    # test if $1 is a hexadecimal string\n    is_hex() {\n        [[ -n $1 && -z ${1//[0-9A-Fa-f]} ]]\n    }\n\n\n    # print error message for invalid argument to standard error, this\n    # - mimics getopts error message\n    # - use all positional parameters as error message\n    # - has a newline appended\n    # $arg and $OPTARG are the option name and argument set by getopts.\n    pearg() {\n        printf \"%s: -$arg invalid argument -- $OPTARG; %s\\n\" \"$0\" \"$*\" >&2\n    }\n\n\n    OPTIND=1\n    while getopts \"p:t:c:f:s:r:RBCKhv\" arg; do\n    case $arg in\n        p)\n            if is_N \"$OPTARG\" && ((OPTARG > 0)); then\n                p=$OPTARG\n            else\n                pearg 'must be an integer and greater than 0'\n                return 1\n            fi\n            ;;\n        t)\n            if [[ \"$OPTARG\" = c???????????????? ]]; then\n                V+=(${#sets[@]})\n                sets+=(\"${OPTARG:1}\")\n            elif is_N \"$OPTARG\" && ((OPTARG < ${#sets[@]})); then\n                V+=($OPTARG)\n            else\n                pearg 'must be an integer and from 0 to' \\\n                      \"$((${#sets[@]} - 1)); or a custom type\"\n                return 1\n            fi\n            ;;\n        c)\n            if [[ $OPTARG == '#'* ]]; then\n                if ! is_hex \"${OPTARG:1}\"; then\n                    pearg 'unrecognized hexadecimal string'\n                    return 1\n                fi\n                if ((16$OPTARG >= COLORS)); then\n                    pearg 'hexadecimal must be from #0 to' \\\n                          \"#$(printf '%X' $((COLORS - 1)))\"\n                    return 1\n                fi\n                C+=($((16$OPTARG)))\n            elif is_N \"$OPTARG\" && ((OPTARG < COLORS)); then\n                C+=($OPTARG)\n            else\n                pearg \"must be an integer and from 0 to $((COLORS - 1));\" \\\n                      'or a hexadecimal string with # prefix'\n                return 1\n            fi\n            ;;\n        f)\n            if is_N \"$OPTARG\" && ((OPTARG >= 20 && OPTARG <= 100)); then\n                f=$OPTARG\n            else\n                pearg 'must be an integer and from 20 to 100'\n                return 1\n            fi\n            ;;\n        s)\n            if is_N \"$OPTARG\" && ((OPTARG >= 5 && OPTARG <= 15)); then\n                s=$OPTARG\n            else\n                pearg 'must be an integer and from 5 to 15'\n                return 1\n            fi\n            ;;\n        r)\n            if is_N \"$OPTARG\"; then\n                r=$OPTARG\n            else\n                pearg 'must be a non-negative integer'\n                return 1\n            fi\n            ;;\n        R) RNDSTART=1;;\n        B) BOLD=0;;\n        C) NOCOLOR=1;;\n        K) KEEPCT=1;;\n        h)\n            print_help\n            exit 0\n            ;;\n        v) echo \"$(basename -- \"$0\") $VERSION\"\n            exit 0\n            ;;\n        *)\n            return 1\n        esac\n    done\n\n    shift $((OPTIND - 1))\n    if (($#)); then\n        printf \"$0: illegal arguments -- $*; no arguments allowed\\n\" >&2\n        return 1\n    fi\n}\n\n\ncleanup() {\n    # clear out standard input\n    read -t 0.001 && cat </dev/stdin>/dev/null\n\n    tput reset  # fix for konsole, see pipeseroni/pipes.sh#43\n    tput rmcup\n    tput cnorm\n    stty echo\n    printf \"$SGR0\"\n    exit 0\n}\n\n\nresize() {\n    w=$(tput cols) h=$(tput lines)\n}\n\n\ninit_pipes() {\n    # +_CP_init_pipes\n    local i\n\n    ci=$((KEEPCT ? 0 : CN * RANDOM / M))\n    vi=$((KEEPCT ? 0 : VN * RANDOM / M))\n    for ((i = 0; i < p; i++)); do\n        ((\n            n[i] = 0,\n            l[i] = RNDSTART ? RANDOM % 4 : 0,\n            x[i] = RNDSTART ? w * RANDOM / M : w / 2,\n            y[i] = RNDSTART ? h * RANDOM / M : h / 2,\n            v[i] = V[vi]\n        ))\n        c[i]=${E[ci]}\n        ((ci = (ci + 1) % CN, vi = (vi + 1) % VN))\n    done\n    # -_CP_init_pipes\n}\n\n\ninit_screen() {\n    stty -echo\n    tput smcup\n    tput civis\n    tput clear\n    trap cleanup HUP TERM\n\n    resize\n    trap resize SIGWINCH\n}\n\n\nmain() {\n    # simple pre-check of TERM, tput's error message should be enough\n    tput -T \"$TERM\" sgr0 >/dev/null || return $?\n\n    # +_CP_init_termcap_vars\n    COLORS=$(tput colors)  # COLORS - 1 == maximum color index for -c argument\n    SGR0=$(tput sgr0)\n    SGR_BOLD=$(tput bold)\n    # -_CP_init_termcap_vars\n\n    parse \"$@\" || return $?\n\n    # +_CP_init_VC\n    # set default values if not by options\n    ((${#V[@]})) || V=(0)\n    VN=${#V[@]}\n    ((${#C[@]})) || C=(1 2 3 4 5 6 7 0)\n    CN=${#C[@]}\n    # -_CP_init_VC\n\n    # +_CP_init_E\n    # generate E[] based on BOLD (SGR_BOLD), NOCOLOR, and C for each element in\n    # C, a corresponding element in E[] =\n    #   SGR0\n    #   + SGR_BOLD, if BOLD\n    #   + tput setaf C, if !NOCOLOR\n    local i\n    for ((i = 0; i < CN; i++)) {\n        E[i]=$SGR0\n        ((BOLD))    && E[i]+=$SGR_BOLD\n        ((NOCOLOR)) || E[i]+=$(tput setaf ${C[i]})\n    }\n    # -_CP_init_E\n\n    # +_CP_init_SETS\n    local i j\n    for ((i = 0; i < ${#sets[@]}; i++)) {\n        for ((j = 0; j < 16; j++)) {\n            SETS+=(\"${sets[i]:j:1}\")\n        }\n    }\n    unset i j\n    # -_CP_init_SETS\n\n    init_screen\n    init_pipes\n\n    # any key press exits the loop and this script\n    trap 'break 2' INT\n\n    local i\n    while REPLY=; do\n        read -t 0.0$((1000 / f)) -n 1 2>/dev/null\n        case \"$REPLY\" in\n            P) ((s = s <  15 ? s + 1 : s));;\n            O) ((s = s >   3 ? s - 1 : s));;\n            F) ((f = f < 100 ? f + 1 : f));;\n            D) ((f = f >  20 ? f - 1 : f));;\n            B) ((BOLD = (BOLD + 1) % 2));;\n            C) ((NOCOLOR = (NOCOLOR + 1) % 2));;\n            K) ((KEEPCT = (KEEPCT + 1) % 2));;\n            ?) break;;\n        esac\n        for ((i = 0; i < p; i++)); do\n            # New position:\n            # l[] direction = 0: up, 1: right, 2: down, 3: left\n            # +_CP_newpos\n            ((l[i] % 2)) && ((x[i] += -l[i] + 2, 1)) || ((y[i] += l[i] - 1))\n            # -_CP_newpos\n\n            # Loop on edges (change color on loop):\n            # +_CP_warp\n            ((!KEEPCT && (x[i] >= w || x[i] < 0 || y[i] >= h || y[i] < 0))) \\\n            && { c[i]=${E[CN * RANDOM / M]}; ((v[i] = V[VN * RANDOM / M])); }\n            ((x[i] = (x[i] + w) % w,\n              y[i] = (y[i] + h) % h))\n            # -_CP_warp\n\n            # new turning direction:\n            # $((s - 1)) in $s, going straight, therefore n[i] == l[i];\n            # and 1 in $s that pipe makes a right or left turn\n            #\n            #     s * RANDOM / M - 1 == 0\n            #     n[i] == -1\n            #  => n[i] == l[i] + 1 or l[i] - 1\n            # +_CP_newdir\n            ((\n                n[i] = s * RANDOM / M - 1,\n                n[i] = n[i] >= 0 ? l[i] : l[i] + (2 * (RANDOM % 2) - 1),\n                n[i] = (n[i] + 4) % 4\n            ))\n            # -_CP_newdir\n\n            # Print:\n            # +_CP_print\n            printf '\\e[%d;%dH%s%s'                      \\\n                   $((y[i] + 1)) $((x[i] + 1)) ${c[i]}  \\\n                   \"${SETS[v[i] * 16 + l[i] * 4 + n[i]]}\"\n            # -_CP_print\n            l[i]=${n[i]}\n        done\n        ((r > 0 && t * p >= r)) && tput reset && tput civis && t=0 || ((t++))\n    done\n\n    cleanup\n}\n\n\n# when being sourced, $0 == bash, only invoke main when they are the same\n[[ \"$0\" != \"$BASH_SOURCE\" ]] ||  main \"$@\"\n\n"
  },
  {
    "path": ".sbin/play",
    "content": "#!/usr/bin/env bash\n\n# pkill mpv\nclipp=$(xsel --clipboard)\nmpv --no-sub-auto --panscan=1.0 --no-keepaspect --speed=1.0 --ytdl-format='bestvideo[height<=?1080]+bestaudio/best' --input-file /home/bresilla/.config/mpv/control --load-unsafe-playlists --record-file=/tmp/mkv_rec.mkv --no-terminal \"${1:-$clipp}\"\n#--panscan=1.0 --no-keepaspect\n"
  },
  {
    "path": ".sbin/recffm",
    "content": "#!/bin/bash\nnvenc(){\n  echo \"START\"\n  slop=$(slop -f \"%x %y %w %h %g %i\") && read -r X Y W H G ID < <(echo $slop)\n  echo \" rec\" > /home/bresilla/.config/bspwm/pipes/rec &\n  optirun ffmpeg -y -re \\\n    -f x11grab \\\n    -s \"$W\"x\"$H\" \\\n    -i :0.0+$X,$Y \\\n    -r 30 -framerate 60 \\\n    -vcodec h264_nvenc \\\n    -profile high444p -pixel_format yuv444p -qmin 10 -qmax 52 -preset lossless -level 51\\\n    ~/DATA/VIDEOS/CASTS/$(date +%s).mkv\n  echo \"\" > /home/bresilla/.config/bspwm/pipes/rec\n}\n\nlibx264(){\n  slop=$(slop -f \"%x %y %w %h %g %i\") && read -r X Y W H G ID < <(echo $slop)\n  echo \" rec\" > /home/bresilla/.config/bspwm/pipes/rec &\n  ffmpeg -y -re \\\n    -f x11grab \\\n    -s \"$W\"x\"$H\" \\\n    -i :0.0+$X,$Y \\\n    -vcodec libx264rgb \\\n    -profile high444 -pixel_format yuv444p -crf 19 -preset ultrafast -qp 0 -level 51\\\n    ~/DATA/VIDEOS/CASTS/$(date +%s).mkv\n  echo \"\" > /home/bresilla/.config/bspwm/pipes/rec\n#    -f alsa -i pulse \\\n}\n\nif [ \"$1\" == \"-w\" ] ;then\n  mpv --geometry=-0-0 --autofit=20% /dev/video0\nelif [ \"$1\" == \"-c\" ] ;then\n  libx264\nelif [ \"$1\" == \"-g\" ] ;then\n  nvenc\nfi\n"
  },
  {
    "path": ".sbin/ship",
    "content": "#!/usr/bin/env bash\n## Title........: ship.sh\n## Description..: A simple, handy network addressing multitool with plenty of features.\n## Author.......: Sotirios M. Roussis a.k.a. xtonousou - xtonousou@gmail.com\n## Date.........: 20170722\n## Usage........: bash ship.sh [options]? [arguments]?\n## Bash Version.: 3.2 or later\n\n### Debugging\n#set -o xtrace\n\n### Script's Info\nreadonly VERSION=\"2.6.1\"\nreadonly SCRIPT_NAME=\"ship\"\n\n### Author's Info\nreadonly AUTHOR=\"Sotirios M. Roussis\"\nreadonly AUTHOR_NICKNAME=\"xtonousou\"\nreadonly GMAIL=\"${AUTHOR_NICKNAME}@gmail.com\"\nreadonly GITHUB=\"https://github.com/${AUTHOR_NICKNAME}\"\n\n### Colors\ndeclare -r COLORS=(\n  \"\\e[1;0m\"     # Normal  ## COLORS[0]\n  \"\\033[1;31m\"  # Red     ## COLORS[1]\n  \"\\033[1;32m\"  # Green   ## COLORS[2]\n  \"\\033[1;33m\"  # Orange  ## COLORS[3]\n  \"\\033[1;36m\"  # Cyan    ## COLORS[4]\n  \"\\033[1;95m\"  # Magenta ## COLORS[5]\n)\n\n### Locations\nreadonly TEMP=\"/tmp\"\nreadonly GOOGLE_DNS=\"8.8.8.8\"\ndeclare -r PUBLIC_IP=(\n  \"icanhazip.com\"\n  \"ident.me\"\n  \"ipinfo.io/ip\"\n  \"wgetip.com\"\n  \"wtfismyip.com/text\"\n)\n\n### Timeouts\nreadonly SHORT_TIMEOUT=\"2\"\nreadonly TIMEOUT=\"6\"\nreadonly LONG_TIMEOUT=\"17\"\n\n### Dialogs\nreadonly DIALOG_UNDER_DEVELOPMENT=\"${COLORS[1]}under development${COLORS[0]}\"\nreadonly DIALOG_PRESS_CTRL_C=\"Press [CTRL+C] to stop\"\nreadonly DIALOG_ERROR=\"Try ${SCRIPT_NAME} ${COLORS[2]}-h${COLORS[0]} or ${SCRIPT_NAME} ${COLORS[2]}--help${COLORS[0]} for more information.\"\nreadonly DIALOG_ABORTING=\"${COLORS[1]}Aborting${COLORS[0]}.\"\nreadonly DIALOG_NO_ARGUMENTS=\"No arguments. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_INTERNET=\"Internet connection unavailable. ${DIALOG_ABORTING}\"\nreadonly DIALOG_IPV6_UNAVAILABLE=\"IPv6 unavailable. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_LOCAL_CONNECTION=\"Local connection unavailable. ${DIALOG_ABORTING}\"\nreadonly DIALOG_DESTINATION_UNREACHABLE=\"Destination is unreachable. ${DIALOG_ABORTING}\"\nreadonly DIALOG_SERVER_IS_DOWN=\"Destination is unreachable. Server may be down or has connection issues. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_VALID_IPV4=\"The IPv4 address is invalid. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_VALID_IPV6=\"The IPv6 address is invalid. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_VALID_MASK=\"The netmask is invalid. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_VALID_CIDR=\"The CIDR is invalid. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_VALID_ADDRESSES=\"No valid IPv4, IPv6 or MAC addresses found. ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_NETMASK=\"Netmask is missing. Usage: ${COLORS[5]}192.168.0.1/24${COLORS[0]} or ${COLORS[5]}192.168.0.1 255.255.128.0 ${DIALOG_ABORTING}\"\nreadonly DIALOG_NO_TRACEPATH6=\"${COLORS[3]}tracepath6${COLORS[0]} is missing, will use ${COLORS[3]}tracepath${COLORS[0]} with no IPv6 compatibility\"\nreadonly DIALOG_NO_TRACE_COMMAND=\"You must install at least one of the following tools to perform this action: ${COLORS[3]}tracepath${COLORS[0]}, ${COLORS[3]}traceroute${COLORS[0]}, ${COLORS[3]}mtr${COLORS[0]}. ${DIALOG_ABORTING}\"\n\n########################################################################\n#                                                                      #\n#  Helpful functions to print or check, verify and test various things #\n#                                                                      #\n########################################################################\n\n# Initializes a set of regexps variables (IPv4, IPv6, with and without CIDR).\nfunction init_regexes() {\n\n  # MAC\n  REGEX_MAC=\"([a-fA-F0-9]{2}:){5}[a-fA-F0-9]{2}\"\n  # IPv4\n  REGEX_IPV4=\"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|\"\n  REGEX_IPV4+=\"(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\"\n  # IPv4 with CIDR notation\n  REGEX_IPV4_CIDR=\"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|\"\n  REGEX_IPV4_CIDR+=\"25[0-5])\\.){3}([0-9]|\"\"[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|\"\n  REGEX_IPV4_CIDR+=\"25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))\"\n  # IPv6\n  REGEX_IPV6=\"([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|\"\n  REGEX_IPV6+=\"([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:\"\n  REGEX_IPV6+=\"[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4})\"\n  REGEX_IPV6+=\"{1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|\"\n  REGEX_IPV6+=\"([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]\"\n  REGEX_IPV6+=\"{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:\"\n  REGEX_IPV6+=\"[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|\"\n  REGEX_IPV6+=\"fe08:(:[0-9a-fA-F]{1,4}){2,2}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4})\"\n  REGEX_IPV6+=\"{0,1}:){0,1}${REGEX_IPV4}|([0-9a-fA-F]{1,4}:){1,4}:${REGEX_IPV4}\"\n  # IPv6 with CIDR notation\n  REGEX_IPV6_CIDR=\"^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|\"\n  REGEX_IPV6_CIDR+=\"(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|\"\n  REGEX_IPV6_CIDR+=\"2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|\"\n  REGEX_IPV6_CIDR+=\":))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|\"\n  REGEX_IPV6_CIDR+=\":((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|\"\n  REGEX_IPV6_CIDR+=\"[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]\"\n  REGEX_IPV6_CIDR+=\"{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|\"\n  REGEX_IPV6_CIDR+=\"[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|\"\n  REGEX_IPV6_CIDR+=\"(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|\"\n  REGEX_IPV6_CIDR+=\"((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)\"\n  REGEX_IPV6_CIDR+=\"(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]\"\n  REGEX_IPV6_CIDR+=\"{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4})\"\n  REGEX_IPV6_CIDR+=\"{0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|\"\n  REGEX_IPV6_CIDR+=\"[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]\"\n  REGEX_IPV6_CIDR+=\"{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|\"\n  REGEX_IPV6_CIDR+=\"1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|\"\n  REGEX_IPV6_CIDR+=\"(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}\"\n  REGEX_IPV6_CIDR+=\":((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|\"\n  REGEX_IPV6_CIDR+=\"[1-9]?d)){3}))|:)))(%.+)?s*(\\/([0-9]|[1-9][0-9]|\"\n  REGEX_IPV6_CIDR+=\"1[0-1][0-9]|12[0-8]))?$\"\n\n  return 0\n}\n\n# Convert a decimal to binary.\nfunction dec_to_bin() {\n\n  declare D2B\n\n  D2B=({0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1})\n\n  echo -n \"${D2B[${1}]}\"\n\n  return 0\n}\n\n# Convert a decimal to a hexadecimal.\nfunction dec_to_hex() {\n\n  printf \"%#X\" \"${1}\"\n\n  return 0\n}\n\n# Convert binary to a decimal.\nfunction bin_to_dec() {\n\n  echo \"$((2#${1}))\"\n\n  return 0\n}\n\n# Returns the integer representation of an IP arg,\n# passed in ascii dotted-decimal notation (x.x.x.x).\nfunction dotted_quad_ip_to_decimal {\n\n  local IFS A B C D IP=\"${1}\"\n\n  IFS=. read -r A B C D <<< \"${IP}\"\n  \n  printf '%d\\n' \"$(( A * 256 ** 3 + B * 256 ** 2 + C * 256 + D ))\"\n\n  return 0\n}\n\n# Prints a message while checking a network host.\nfunction print_check() {\n\n  echo -ne \"Checking ${COLORS[2]}${1}${COLORS[0]} ...\"\n\n  return 0\n}\n\n# Clears previous line.\nfunction clear_line() {\n\n  printf \"\\r\\033[K\"\n\n  return 0\n}\n\n# Prints a list of most common ports with protocols.\nfunction print_port_protocol_list() {\n\n  local ITEM\n\n  declare -r PORTS_ARRAY=(\n    \"20-21\" \"22\" \"23\" \"25\" \"53\" \"67-68\" \"69\" \"80\" \"110\" \"123\" \"137-139\" \"143\"\n    \"161-162\" \"179\" \"389\" \"443\" \"636\" \"989-990\"\n  )\n\n  declare -r PORTS_TCP_UDP_ARRAY=(\n    \"TCP\" \"TCP\" \"TCP\" \"TCP\" \"TCP/UDP\" \"UDP\" \"UDP\" \"TCP\" \"TCP\" \"UDP\" \"TCP/UDP\"\n    \"TCP\" \"TCP/UDP\" \"TCP\" \"TCP/UDP\" \"TCP\" \"TCP/UDP\" \"TCP\"\n  )\n\n  declare -r PORTS_PROTOCOL_ARRAY=(\n    \"FTP\" \"SSH\" \"Telnet\" \"SMTP\" \"DNS\" \"DHCP\" \"TFTP\" \"HTTP\" \"POPv3\" \"NTP\"\n    \"NetBIOS\" \"IMAP\" \"SNMP\" \"BGP\" \"LDAP\" \"HTTPS\" \"LDAPS\" \"FTP over TLS/SSL\"\n  )\n\n  for ITEM in \"${!PORTS_ARRAY[@]}\"; do\n    printf \"%-17s%-8s%s\\n\" \"${PORTS_PROTOCOL_ARRAY[ITEM]}\" \"${PORTS_TCP_UDP_ARRAY[ITEM]}\" \"${PORTS_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Checks network connection (local or internet).\nfunction check_connectivity() {\n\n  case \"${1}\" in\n    \"--local\")\n      ip route | grep ^default &>/dev/null \\\n        || error_exit \"${DIALOG_NO_LOCAL_CONNECTION}\"\n      ;;\n    \"--internet\")\n      ping -q -c 1 -W \"${LONG_TIMEOUT}\" \"${GOOGLE_DNS}\" &>/dev/null \\\n        || error_exit \"${DIALOG_NO_INTERNET}\"\n      ;;\n  esac\n\n  return 0\n}\n\n# Exits ship, if ping fails to reach $1 in an amount of time.\nfunction check_destination() {\n\n  local CLEAN_DESTINATION RETURNED_VALUE\n\n  CLEAN_DESTINATION=$(echo \"${1}\" | sed 's/^http\\(\\|s\\):\\/\\///g' | cut --fields=1 --delimiter=\"/\")\n\n  timeout \"${LONG_TIMEOUT}\" ping -q -c 1 \"${CLEAN_DESTINATION}\" &>/dev/null || RETURNED_VALUE=\"${?}\"\n\n  [[ \"${RETURNED_VALUE}\" -ge 2 ]] && error_exit \"${DIALOG_DESTINATION_UNREACHABLE}\"\n\n  return 0\n}\n\n# Checks if a network address is valid.\nfunction check_dotted_quad_address() {\n\n  local IFS\n  local DECIMAL_POINTS\n  local PART_A PART_B PART_C PART_D\n\n  DECIMAL_POINTS=$(echo \"${1}\" | grep --only-matching \"\\\\.\" | wc --lines)\n  # check if there are three dots\n  [ \"${DECIMAL_POINTS}\" -ne 3 ] && show_usage_ipcalc && error_exit\n\n  IFS=.\n  read -r PART_A PART_B PART_C PART_D <<< \"${1}\"\n\n  # check for non numerical values\n  [[ ! \"${PART_A}\" =~ ^[0-9]+$ || ! \"${PART_B}\" =~ ^[0-9]+$ || ! \"${PART_C}\" =~ ^[0-9]+$ || ! \"${PART_D}\" =~ ^[0-9]+$ ]] \\\n    && show_usage_ipcalc \\\n    && error_exit\n\n  # check if any part is empty\n  [[ ! \"${PART_A}\" || ! \"${PART_B}\" || ! \"${PART_C}\" || ! \"${PART_D}\" ]] \\\n    && show_usage_ipcalc \\\n    && error_exit\n\n  # check if any part of the address is < 0 or > 255\n  [[ \"${PART_A}\" -lt 0 || \"${PART_A}\" -gt 255 || \"${PART_B}\" -lt 0 || \"${PART_B}\" -gt 255 || \"${PART_C}\" -lt 0 || \"${PART_C}\" -gt 255 || \"${PART_D}\" -lt 0 || \"${PART_D}\" -gt 255 ]] \\\n    && show_usage_ipcalc \\\n    && error_exit\n\n  IFS=\n\n  return 0\n}\n\n# Checks if IPv6 is available, if not exit.\nfunction check_ipv6() {\n\n  grep -i \"ipv6\" \"/proc/modules\" &> /dev/null \\\n    || echo \"IPv6 is supported but the 'ipv6' module is not loaded\"\n  \n  test -f \"/proc/net/if_inet6\" || error_exit \"${DIALOG_IPV6_UNAVAILABLE}\"\n\n  return 0\n}\n\n# Checks if an argument is passed, if not exit.\n# $1=error message, $2=argument\nfunction check_for_missing_args() {\n\n  [ -z \"${2}\" ] && error_exit \"${1}\"\n\n  return 0\n}\n\n# Numerical verification.\nfunction check_if_parameter_is_positive_integer() {\n\n  [[ ! \"${1}\" =~ ^[0-9]+$ ]] && error_exit \"${1} is not a positive integer. ${DIALOG_ABORTING}\" \"${1}\"\n\n  return 0\n}\n\n# Checks for root privileges.\nfunction check_root_permissions() {\n\n  [ \"$(id -u)\" -ne 0 ] && error_exit \"${COLORS[2]}${SCRIPT_NAME}${COLORS[0]} requires ${COLORS[1]}root${COLORS[0]} privileges for this action.\"\n\n  return 0\n}\n\n# Checks Bash version. Minimum is version 3.2.\nfunction check_bash_version() {\n\n  [ \"${BASH_VERSINFO[0]}${BASH_VERSINFO[1]}\" -lt 32 ] && error_exit \"Insufficient Bash version. Bash 3.2 or newer is required. ${DIALOG_ABORTING}\"\n\n  return 0\n}\n\n# Deletes every file that is created by this script. Usually in /tmp.\nfunction mr_proper() {\n\n  # \"${TEMP:?}\" to ensure this never expands to /*\n  rm --recursive --force \"${TEMP:?}/${SCRIPT_NAME}\"* &>/dev/null\n\n  return 0\n}\n\n# Background tasks' handler.\nfunction handle_jobs() {\n\n  local JOB\n\n  for JOB in $(jobs -p); do wait \"${JOB}\"; done\n\n  return 0\n}\n\n# Used with zero parameters: exit 1.\n# Used with one parameter  : echoes parameter, usually error dialogs.\n# Used with two parameters : invalid option, then echoes first parameter, usually error dialogs.\nfunction error_exit() {\n\n  [ -z \"${1}\" ] && clear_line && exit 1 \\\n    || [ -z \"${2}\" ] \\\n      && clear_line \\\n      && echo -e \"${1}\" \\\n      && exit 1 \\\n    || clear_line\\\n      && echo -e \"${SCRIPT_NAME}: invalid option '${2}'\" \\\n      && echo -e \"${1}\" && \\\n      exit 1\n}\n\n# Traps INT and SIGTSTP.\nfunction trap_handler() {\n\n  local YESNO=\"\"\n  \n  echo\n  while [[ ! \"${YESNO}\" =~ ^[YyNn]$ ]]; do\n    echo -ne \"Exit? [y/n] \"\n    read -r YESNO &>/dev/null\n  done\n\n  [ \"${YESNO}\" = \"N\" ] && YESNO=\"n\"\n  [ \"${YESNO}\" = \"Y\" ] && YESNO=\"y\"\n  [ \"${YESNO}\" = \"y\" ] && handle_jobs && exit 0\n\n  return 0\n}\n\n########################################################################\n#                                                                      #\n#  Main script's functions in alphabetical order based on show_usage() #\n#                                                                      #\n########################################################################\n\n# Prints active network interfaces with their IPv4 address.\nfunction show_ipv4() {\n\n  local ITEM\n\n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  declare IPV4_ARRAY\n\n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    IPV4_ARRAY[ITEM]=$(ip -4 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=inet '$0 ~ family {print $2}' | cut --delimiter=\"/\" --fields=1)\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${IPV4_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Prints active network interfaces with their IPv6 address.\nfunction show_ipv6() {\n\n  check_ipv6\n\n  local ITEM\n\n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  declare IPV6_ARRAY\n\n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    IPV6_ARRAY[ITEM]=$(ip -6 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=\"inet6\" 'tolower($0) ~ family {print $2}' | cut --delimiter=\"/\" --fields=1)\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${IPV6_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Prints all \"basic\" info.\nfunction show_all() {\n\n  check_ipv6\n\n  local MAC_OF\n  local DRIVER_OF\n  local GATEWAY\n  local ITEM\n\n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  declare IPV4_ARRAY\n  declare IPV6_ARRAY\n\n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    IPV4_ARRAY[ITEM]=$(ip -4 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=inet '$0 ~ family {print $2}' | cut --delimiter=\"/\" --fields=1)\n    IPV6_ARRAY[ITEM]=$(ip -6 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=\"inet6\" 'tolower($0) ~ family {print $2}' | cut --delimiter=\"/\" --fields=1)\n    [ -f \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/phy80211/device/uevent\" ] \\\n      && DRIVER_OF=$(awk -F '=' 'tolower($0) ~ /driver/{print $2}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/phy80211/device/uevent\") \\\n      || DRIVER_OF=$(awk -F '=' 'tolower($0) ~ /driver/{print $2}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/device/uevent\")\n    MAC_OF=$(awk '{print $0}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/address\" 2> /dev/null)\n    GATEWAY=$(ip route | awk \"/${INTERFACES_ARRAY[ITEM]}/ && tolower(\\$0) ~ /default/ {print \\$3}\")\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${DRIVER_OF}\" \"${MAC_OF}\" \"${GATEWAY}\" \"${IPV4_ARRAY[ITEM]}\" \"${IPV6_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Prints all available network interfaces.\nfunction show_all_interfaces() {\n\n  ip link show | \\\n    awk '/^[0-9]/{printf \"%s \", $2}' | \\\n      sed 's/://g' | \\\n        sed 's/ *$//g'\n  echo\n}\n\n# Prints the driver used of active interface.\nfunction show_driver() {\n  \n  local DRIVER_OF\n  local ITEM\n\n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n\n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    [ -f \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/phy80211/device/uevent\" ] \\\n      && DRIVER_OF=$(awk -F '=' 'tolower($0) ~ /driver/{print $2}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/phy80211/device/uevent\") \\\n      || DRIVER_OF=$(awk -F '=' 'tolower($0) ~ /driver/{print $2}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/device/uevent\")\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${DRIVER_OF}\" \n  done\n\n  return 0\n}\n\n# Prints the external IP address/es. If $1 is empty prints user's public IP, if not, $1 should be like example.com.\nfunction show_ip_from() {\n\n  local HTTP_CODE\n  local TEMP_FILE\n  local RANDOM_SOURCE\n  local ITEM\n\n  RANDOM_SOURCE=\"${PUBLIC_IP[\"$(( RANDOM % ${#PUBLIC_IP[@]} ))\"]}\"\n\n  if [ -z \"${1}\" ]; then\n    print_check \"${RANDOM_SOURCE}\"\n    HTTP_CODE=$(wget --spider --tries=1 --timeout=\"${TIMEOUT}\" --server-response \"${RANDOM_SOURCE}\" 2>&1 | awk '/HTTP\\//{print $2}' | tail --lines=1)\n\n    [ ! \"${HTTP_CODE}\" = \"200\" ] && error_exit \"${DIALOG_SERVER_IS_DOWN}\"\n\n    clear_line\n    TEMP_FILE=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n\n    echo -ne \"Grabbing ${COLORS[2]}IP${COLORS[0]} ...\"\n    wget \"${RANDOM_SOURCE}\" --quiet --output-document=\"${TEMP_FILE}\"\n\n    # Ensure that TEMP_FILE is written on /tmp\n    while [ ! -f \"${TEMP_FILE}\" ]; do\n      wget \"${RANDOM_SOURCE}\" --quiet --output-document=\"${TEMP_FILE}\"\n    done\n\n    clear_line\n    awk '{print $0}' \"${TEMP_FILE}\"\n  else\n    print_check \"${1}\"\n    check_destination \"${1}\"\n\n    clear_line\n    TEMP_FILE=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n    \n    INPUT=$(echo \"${1}\" | sed --expression='s/^http\\(\\|s\\):\\/\\///g' --expression='s/^`//' --expression='s/`//' --expression='s/`$//' | cut --fields=1 --delimiter=\"/\")\n\n    function ping_source() {\n      \n      for ITEM in {1..25}; do\n        ping -c 1 -w \"${LONG_TIMEOUT}\" \"${INPUT}\" 2> /dev/null | awk -F '[()]' '/PING/{print $2}' >> \"${TEMP_FILE}\" &\n      done\n      handle_jobs\n    }\n\n    echo -ne \"Pinging ${COLORS[2]}$1${COLORS[0]} ...\"\n    ping_source\n    \n    # Ensure that TEMP_FILE is written on /tmp\n    while [ ! -f \"${TEMP_FILE}\" ]; do\n      ping_source\n    done\n\n    clear_line\n    sort --version-sort --unique \"${TEMP_FILE}\"\n  fi\n\n  return 0\n}\n\n# Prints all valid IPv4, IPv6 and MAC addresses extracted from file.\nfunction show_ips_from_file() {\n\n  local FILE\n    \n  [ -z \"${1}\" ] && error_exit \"No file was specified. ${DIALOG_ABORTING}\"\n  for FILE in \"${@}\"; do\n    [ ! -f \"${FILE}\" ] && error_exit \"${COLORS[3]}${FILE}${COLORS[0]} does not exist. ${DIALOG_ABORTING}\"\n  done\n    \n  local TEMP_FILE_IPV4 TEMP_FILE_IPV6 TEMP_FILE_MAC\n  local IS_TEMP_FILE_IPV4_EMPTY IS_TEMP_FILE_IPV6_EMPTY IS_TEMP_FILE_MAC_EMPTY\n\n  TEMP_FILE_IPV4=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n  TEMP_FILE_IPV6=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n  TEMP_FILE_MAC=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n\n  init_regexes\n\n  for FILE in \"${@}\"; do\n    grep --extended-regexp --only-matching \"${REGEX_IPV4}\" \"${FILE}\" 2>/dev/null >> \"${TEMP_FILE_IPV4}\"\n    grep --extended-regexp --only-matching \"${REGEX_IPV6}\" \"${FILE}\" 2>/dev/null >> \"${TEMP_FILE_IPV6}\"\n    grep --extended-regexp --only-matching \"${REGEX_MAC}\" \"${FILE}\" 2>/dev/null >> \"${TEMP_FILE_MAC}\"\n  done\n\n  sort --version-sort --unique --output=\"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_IPV4}\"\n  sort --version-sort --unique --output=\"${TEMP_FILE_IPV6}\" \"${TEMP_FILE_IPV6}\"\n  sort --version-sort --unique --output=\"${TEMP_FILE_MAC}\" \"${TEMP_FILE_MAC}\"\n\n  [ -s \"${TEMP_FILE_IPV4}\" ] && IS_TEMP_FILE_IPV4_EMPTY=0 || IS_TEMP_FILE_IPV4_EMPTY=1\n  [ -s \"${TEMP_FILE_IPV6}\" ] && IS_TEMP_FILE_IPV6_EMPTY=0 || IS_TEMP_FILE_IPV6_EMPTY=1\n  [ -s \"${TEMP_FILE_MAC}\" ] && IS_TEMP_FILE_MAC_EMPTY=0 || IS_TEMP_FILE_MAC_EMPTY=1\n\n  case \"${IS_TEMP_FILE_IPV4_EMPTY}:${IS_TEMP_FILE_IPV6_EMPTY}:${IS_TEMP_FILE_MAC_EMPTY}\" in\n    0:0:0) # IPv4, IPv6 and MAC addresses\n      paste \"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_IPV6}\" \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%-15s │ %-39s │ %s\\n\", $1, tolower($2), tolower($3))}'\n      ;;\n    0:0:1) # Only IPv4 and IPv6 addresses\n      paste \"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_IPV6}\" | \\\n        awk -F '\\t' '{printf(\"%-15s │ %s\\n\", $1, tolower($2))}'\n      ;;\n    0:1:0) # Only IPv4 and MAC addresses\n      paste \"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%-15s │ %s\\n\", $1, tolower($2))}'\n      ;;\n    0:1:1) # Only IPv4 addresses\n      paste \"${TEMP_FILE_IPV4}\" | \\\n        awk -F '\\t' '{printf(\"%s\\n\", $1)}'\n      ;;\n    1:0:0) # Only IPv6 and MAC addresses\n      paste \"${TEMP_FILE_IPV6}\" \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%-39s │ %s\\n\", tolower($1), tolower($2))}'\n      ;;\n    1:0:1) # Only IPv6 addresses\n      paste \"${TEMP_FILE_IPV6}\" | \\\n        awk -F '\\t' '{printf(\"%s\\n\", tolower($1))}'\n      ;;\n    1:1:0) # Only MAC addresses\n      paste \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%s\\n\", tolower($1))}'\n      ;;\n    1:1:1) # None\n      error_exit \"${DIALOG_NO_VALID_ADDRESSES}\"\n      ;;\n  esac\n\n  return 0\n}\n\n# Prints active network interfaces and their gateway.\nfunction show_gateway() {\n  \n  local GATEWAY ITEM\n  \n  declare -r INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n\n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    GATEWAY=$(ip route | awk \"/${INTERFACES_ARRAY[ITEM]}/ && tolower(\\$0) ~ /default/ {print \\$3}\")\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${GATEWAY}\"\n  done\n\n  return 0\n}\n\n# Scans live hosts on network and prints their IPv4 address with or without MAC address. ICMP and ARP.\nfunction show_live_hosts() {\n  \n  check_root_permissions\n  \n  local ONLINE_INTERFACE NETWORK_IP NETWORK_IP_CIDR FILTERED_IP HOST\n  \n  ONLINE_INTERFACE=$(ip route get \"${GOOGLE_DNS}\" | awk -F 'dev ' 'NR == 1 {split($2, a, \" \"); print a[1]}')\n  NETWORK_IP=$(ip route | awk \"/${ONLINE_INTERFACE}/ && /src/ {print \\$1}\" | cut --fields=1 --delimiter=\"/\")\n  NETWORK_IP_CIDR=$(ip route | awk \"/${ONLINE_INTERFACE}/ && /src/ {print \\$1}\")\n  FILTERED_IP=$(echo \"${NETWORK_IP}\" | awk 'BEGIN{FS=OFS=\".\"} NF--')\n  \n  ip -statistics neighbour flush all &>/dev/null\n  \n  echo -ne \"Pinging ${COLORS[2]}${NETWORK_IP_CIDR}${COLORS[0]}, please wait ...\"\n  for HOST in {1..254}; do\n    ping \"${FILTERED_IP}.${HOST}\" -c 1 -w \"${LONG_TIMEOUT}\" &>/dev/null &\n  done\n  handle_jobs\n  \n  clear_line\n  init_regexes\n  \n  case \"${1}\" in\n    \"--normal\")\n      ip neighbour | \\\n        awk 'tolower($0) ~ /reachable|stale|delay|probe/{print $1}' | \\\n          sort --version-sort --unique\n      ;;\n    \"--mac\")      \n      ip neighbour | \\\n        awk 'tolower($0) ~ /reachable|stale|delay|probe/{printf (\"%5s\\t%s\\n\", $1, $5)}' | \\\n          sort --version-sort --unique\n      ;;\n  esac\n\n  return 0\n}\n\n# Prints active network interfaces.\nfunction show_interfaces() {\n\n  declare -r INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n\n  echo \"${INTERFACES_ARRAY[@]}\"\n\n  return 0\n}\n\n# Prints a list of private and reserved IPs. $1 \"normal\" or \"cidr\".\nfunction show_bogon_ips() {\n\n  local IP\n\n  declare -r IPV4_BOGON_ARRAY=(\n    \"0.0.0.0\" \"10.0.0.0\" \"100.64.0.0\" \"127.0.0.0\" \"127.0.53.53\" \"169.254.0.0\"\n    \"172.16.0.0\" \"192.0.0.0\" \"192.0.2.0\" \"192.168.0.0\" \"198.18.0.0\"\n    \"198.51.100.0\" \"203.0.113.0\" \"224.0.0.0\" \"240.0.0.0\" \"255.255.255.255\"\n  )\n\n  declare -r IPV6_BOGON_ARRAY=(\n    \"::\" \"::1\" \"::ffff:0:0\" \"::\" \"100::\" \"2001:10::\" \"2001:db8::\" \"fc00::\"\n    \"fe80::\" \"fec0::\" \"ff00::\"\n  )\n\n  declare -r IPV4_CIDR_BOGON_ARRAY=(\n    \"0.0.0.0/8\" \"10.0.0.0/8\" \"100.64.0.0/10\" \"127.0.0.0/8\" \"127.0.53.53/8\"\n    \"169.254.0.0/16\" \"172.16.0.0/12\" \"192.0.0.0/24\" \"192.0.2.0/24\" \"192.168.0.0/16\"\n    \"198.18.0.0/15\" \"198.51.100.0/24\" \"203.0.113.0/24\" \"224.0.0.0/4\" \"240.0.0.0/4\"\n    \"255.255.255.255/32\"\n  )\n\n  declare -r IPV6_CIDR_BOGON_ARRAY=(\n    \"::/128\" \"::1/128\" \"::ffff:0:0/96\" \"::/96\" \"100::/64\" \"2001:10::/28\"\n    \"2001:db8::/32\" \"fc00::/7\" \"fe80::/10\" \"fec0::/10\" \"ff00::/8\"\n  )\n\n  declare -r IPV4_DIALOG_ARRAY=(\n    \"'This' network\" \"Private-use networks\" \"Carrier-grade NAT\" \"Loopback\"\n    \"Name collision occurrence\" \"Link local\" \"Private-use networks\"\n    \"IETF protocol assignments\" \"TEST-NET-1\" \"Private-use networks\"\n    \"Network interconnect device benchmark testing\" \"TEST-NET-2\" \"TEST-NET-3\"\n    \"Multicast\" \"Reserved for future use\" \"Limited broadcast\"\n  )\n\n  declare -r IPV6_DIALOG_ARRAY=(\n    \"Node-scope unicast unspecified address\" \"Node-scope unicast loopback address\"\n    \"IPv4-mapped addresses\" \"IPv4-compatible addresses\"\n    \"Remotely triggered black hole addresses\"\n    \"Overlay routable cryptographic hash identifiers (ORCHID)\"\n    \"Documentation prefix\" \"Unique local addresses (ULA)\" \"Link-local unicast\"\n    \"Site-local unicast (deprecated)\"\n    \"Multicast (Note: ff0e:/16 is global scope and may appear on the global internet)\"\n  )\n\n  case \"${1}\" in\n    \"--normal\")\n      for IP in \"${!IPV4_DIALOG_ARRAY[@]}\"; do\n        printf \"%-16s%s\\n\" \"${IPV4_BOGON_ARRAY[IP]}\" \"${IPV4_DIALOG_ARRAY[IP]}\"\n      done\n      \n      for IP in \"${!IPV6_DIALOG_ARRAY[@]}\"; do\n        printf \"%-16s%s\\n\" \"${IPV6_BOGON_ARRAY[IP]}\" \"${IPV6_DIALOG_ARRAY[IP]}\"\n      done\n      ;;\n    \"--cidr\")\n      for IP in \"${!IPV4_DIALOG_ARRAY[@]}\"; do\n        printf \"%-19s%s\\n\" \"${IPV4_CIDR_BOGON_ARRAY[IP]}\" \"${IPV4_DIALOG_ARRAY[IP]}\"\n      done\n      \n      for IP in \"${!IPV6_DIALOG_ARRAY[@]}\"; do\n        printf \"%-19s%s\\n\" \"${IPV6_CIDR_BOGON_ARRAY[IP]}\" \"${IPV6_DIALOG_ARRAY[IP]}\"\n      done\n      ;;\n  esac\n\n  return 0\n}\n\n# Prints active network interfaces with their MAC address.\nfunction show_mac() {\n  \n  local MAC_OF ITEM\n  \n  declare -r INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  \n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    MAC_OF=$(awk '{print $0}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/address\" 2> /dev/null)\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${MAC_OF}\"\n  done\n\n  return 0\n}\n\n# Shows neighbor table.\nfunction show_neighbor_cache() {\n  \n  local TEMP_FILE\n  \n  TEMP_FILE=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n\n  ip neigh | awk 'tolower($0) ~ /permanent|noarp|stale|reachable|incomplete|delay|probe/{printf (\"%-16s%-20s%s\\n\", $1, $5, $6)}' >> \"${TEMP_FILE}\"\n  \n  awk '{print $0}' \"${TEMP_FILE}\" | sort --version-sort\n\n  return 0\n}\n\n# Prints connections and the count of them per IP.\nfunction show_port_connections() {\n  \n  [ -z \"${1}\" ] && print_port_protocol_list && exit 0\n  \n  check_root_permissions\n  check_if_parameter_is_positive_integer \"${1}\"\n  \n  local PORT=\"${1}\"\n\n  init_regexes\n  \n  clear\n  while :; do\n    clear\n    echo -e \"${DIALOG_PRESS_CTRL_C}\"\n    echo\n    echo -e \"      ${COLORS[2]}┌─> ${COLORS[1]}Count Port ${COLORS[2]}──┐\"\n    echo -e \"      │ ┌───────> ${COLORS[1]}IPv4 ${COLORS[2]}└─> ${COLORS[1]}${PORT}\"\n    echo -e \"    ${COLORS[2]}┌─┘ └──────────────┐${COLORS[0]}\"\n    ss --all --numeric --process | grep --extended-regexp \"${REGEX_IPV4}\" | grep \":${PORT}\" | awk '{print $6}' | cut --delimiter=\":\" --fields=1 | sort --version-sort | uniq --count\n    sleep 2\n  done\n\n  return 0\n}\n\n# Prints hops to a destination. $1=--ipv4|--ipv6, $2=network destination.\nfunction show_next_hops() {\n  \n  local FILTERED_INPUT\n  local PROTOCOL\n  local TRACEPATH_CMD\n  local TRACEROUTE_CMD\n  local MTR_CMD\n  local TEMP_FILE\n\n  TEMP_FILE=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n\n  hash tracepath &>/dev/null && TRACEPATH_CMD=1 || TRACEPATH_CMD=0\n  hash traceroute &>/dev/null && TRACEROUTE_CMD=1 || TRACEROUTE_CMD=0\n  hash mtr &>/dev/null && MTR_CMD=1 || MTR_CMD=0\n\n  FILTERED_INPUT=$(echo \"${2}\" | sed 's/^http\\(\\|s\\):\\/\\///g' | cut --fields=1 --delimiter=\"/\")\n\n  check_for_missing_args \"${DIALOG_NO_ARGUMENTS}\" \"${FILTERED_INPUT}\"\n  \n  case \"${1}\" in\n    \"--ipv4\")\n      PROTOCOL=4\n      ;;\n    \"--ipv6\")\n      check_ipv6\n      PROTOCOL=6\n      ;;\n  esac\n\n  print_check \"${FILTERED_INPUT}\"\n\n  check_destination \"${FILTERED_INPUT}\"\n\n  init_regexes\n\n  function trace_hops() {\n    \n    # traceroute is deprecated, nevertheless it is preferred over all\n    case \"${TRACEPATH_CMD}:${TRACEROUTE_CMD}:${MTR_CMD}\" in\n      # If none of the tools (tracepath, traceroute, mtr) is installed\n      0:0:0)\n        echo -e \"${DIALOG_NO_TRACE_COMMAND}\"\n        ;;\n      # If it is installed 'mtr' only\n      0:0:1)\n        case \"${PROTOCOL}\" in\n          4)\n            mtr -\"${PROTOCOL}\" --report-cycles 2 --no-dns --report \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            mtr -\"${PROTOCOL}\" --report-cycles 2 --no-dns --report \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n      # If it is installed 'traceroute' only\n      0:1:0)\n        case \"${PROTOCOL}\" in\n          4)\n            timeout \"${SHORT_TIMEOUT}\" traceroute -\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              tail --lines=+2 | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            timeout \"${SHORT_TIMEOUT}\" traceroute -\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              tail --lines=+2 | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n      # If it is installed 'traceroute' and 'mtr' only\n      0:1:1)\n        case \"${PROTOCOL}\" in\n          4)\n            mtr -\"${PROTOCOL}\" --report-cycles 2 --no-dns --report \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            mtr -\"${PROTOCOL}\" --report-cycles 2 --no-dns --report \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n      # If it is installed 'tracepath' only\n      1:0:0)\n        # tracepath6 workaround: Many linux distributions do not have tracepath6 (it is included in manpages tho :/)\n        hash tracepath6 &>/dev/null && PROTOCOL=6\n        [ \"${PROTOCOL}\" -eq 4 ] && echo -e \"${DIALOG_NO_TRACEPATH6}\"\n\n        case \"${PROTOCOL}\" in\n          4)\n            timeout \"${SHORT_TIMEOUT}\" tracepath\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              awk '{print $2}' | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            timeout \"${SHORT_TIMEOUT}\" tracepath\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              awk '{print $2}' | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n      # If it is installed 'tracepath' and 'mtr' only\n      1:0:1)\n        case \"${PROTOCOL}\" in\n          4)\n            mtr -\"${PROTOCOL}\" --report-cycles 2 --no-dns --report \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            mtr -\"${PROTOCOL}\" --report-cycles 2 --no-dns --report \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n      # If it is installed 'tracepath' and 'traceroute' only\n      1:1:0)\n        case \"${PROTOCOL}\" in\n          4)\n            timeout \"${SHORT_TIMEOUT}\" traceroute -\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              tail --lines=+2 | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            timeout \"${SHORT_TIMEOUT}\" traceroute -\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              tail --lines=+2 | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n      # If it is installed 'tracepath', 'traceroute' and 'mtr'\n      1:1:1)\n        case \"${PROTOCOL}\" in\n          4)\n            timeout \"${SHORT_TIMEOUT}\" traceroute -\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              tail --lines=+2 | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV4}\"\n            ;;\n          6)\n            timeout \"${SHORT_TIMEOUT}\" traceroute -\"${PROTOCOL}\" -n \"${FILTERED_INPUT}\" 2> /dev/null | \\\n              tail --lines=+2 | \\\n                grep --extended-regexp --only-matching \"${REGEX_IPV6}\"\n            ;;\n        esac\n        ;;\n    esac >> \"${TEMP_FILE}\"\n  }\n\n  clear_line\n  echo -ne \"Tracing path to ${COLORS[2]}${FILTERED_INPUT}${COLORS[0]} ...\"\n  trace_hops\n\n  # Ensure that TEMP_FILE is written on /tmp\n  while [ ! -f \"${TEMP_FILE}\" ]; do\n    trace_hops\n  done\n  \n  clear_line\n  awk '!seen[$0]++ {print}' \"${TEMP_FILE}\"\n\n  return 0\n}\n\n# Shows broadcast, network address, cisco wildcard mask, class and host range by given IPv4 address and netmask.\nfunction show_ipcalc() {\n\n  local NOBINARY HTML\n  local IFS CIDR\n  local DECIMAL_POINTS BITS\n  local HOSTS HOST_MINIMUM HOST_MINIMUM_BINARY HOST_MAXIMUM HOST_MAXIMUM_BINARY\n  local CLASS CLASS_DESCRIPTION\n  local IP IP_BINARY\n  local NETMASK NETMASK_BINARY\n  local WILDCARD WILDCARD_BINARY\n  local NETWORK_ADDRESS NETWORK_ADDRESS_BINARY\n  local BROADCAST_ADDRESS BROADCAST_ADDRESS_BINARY\n  local IP_PART_A IP_PART_B IP_PART_C IP_PART_D\n  local NETMASK_PART_A NETMASK_PART_B NETMASK_PART_C NETMASK_PART_D\n  local PART_A PART_B PART_C PART_D\n\n  NOBINARY=0\n  HTML=0\n\n  case \"${1}\" in\n    \"-b\"|\"--nobinary\")\n      NOBINARY=1\n      shift\n      ;;\n    \"-h\"|\"--html\")\n      HTML=1\n      shift\n      ;;\n  esac\n\n  case \"${1}\" in\n    \"-b\"|\"--nobinary\")\n      NOBINARY=1\n      shift\n      ;;\n    \"-h\"|\"--html\")\n      HTML=1\n      shift\n      ;;\n  esac\n\n  init_regexes\n\n  # pass the input into a variable\n  IP=$(grep --extended-regexp \"${REGEX_IPV4}\" <<< \"${1}\")\n  # check only the IP part\n  check_dotted_quad_address \"$(awk -F '/' '{print $1}' <<< \"${IP}\")\"\n\n  # if ipv4/cidr\n  if grep --extended-regexp --only-matching \"${REGEX_IPV4_CIDR}\" <<< \"${1}\" &> /dev/null; then\n    CIDR=$(awk -F '/' '{print $2}' <<< \"${1}\")\n    # if no CIDR is specified then pass the default value\n    [ ! \"${CIDR}\" ] && CIDR=\"24\" # default notation\n    # check for non numerical CIDR\n    [[ ! \"${CIDR}\" =~ ^[0-9]+$ ]] && error_exit \"${DIALOG_NO_VALID_CIDR}\"\n    # check if cidr is < 0 or > 32\n    [[ \"${CIDR}\" -lt 1 || \"${CIDR}\" -gt 32 ]] && error_exit \"${DIALOG_NO_VALID_CIDR}\"\n\n    # calculate netmask\n    NETMASK=$(( 0xffffffff ^ (( 1 << ( 32 - CIDR )) -1 ) ))\n    NETMASK=$(( ( NETMASK >> 24 ) & 0xff )).$(( ( NETMASK >> 16 ) & 0xff )).$(( ( NETMASK >> 8 ) & 0xff )).$(( NETMASK & 0xff ))\n\n    IFS=.\n    # split netmask into multiple parts for better ease\n    read -r NETMASK_PART_A NETMASK_PART_B NETMASK_PART_C NETMASK_PART_D <<< \"${NETMASK}\"\n    # convert netmask to binary\n    NETMASK_BINARY=\"$(dec_to_bin \"${NETMASK_PART_A}\").$(dec_to_bin \"${NETMASK_PART_B}\").$(dec_to_bin \"${NETMASK_PART_C}\").$(dec_to_bin \"${NETMASK_PART_D}\")\"\n  # if only ipv4 and no CIDR\n  elif grep --extended-regexp --only-matching \"${REGEX_IPV4}\" <<< \"${1}\" &> /dev/null; then\n    # if no netmask was specified keep the default value\n    if [[ -z \"${2}\" ]]; then NETMASK=\"255.255.255.0\"; else NETMASK=\"${2}\"; fi\n\n    IFS=.\n    declare -a NETMASK_ARRAY\n    # split netmask into parts and pass them into an array\n    NETMASK_ARRAY=($(tr \" \" \"\\n\" <<< \"${NETMASK}\"))\n    \n    # check if netmask is valid\n    check_dotted_quad_address \"${NETMASK}\"\n    # if netmask first part is 0\n    [ \"${NETMASK_ARRAY[0]}\" -eq 0 ] && echo -e \"${DIALOG_NO_VALID_MASK}\" && show_usage_subnet && error_exit\n    \n    # iterate through netmask and validate\n    for POSITION in \"${!NETMASK_ARRAY[@]}\"; do\n      case \"${NETMASK_ARRAY[POSITION]}\" in\n        255) ;; 254) ;; 252) ;; 248) ;; 240) ;;\n        224) ;; 192) ;; 128) ;;   0) ;;\n        *)\n          echo -e \"${DIALOG_NO_VALID_MASK}\"\n          show_usage_subnet\n          error_exit\n        ;;\n      esac\n    done\n\n    # pass netmask array values into variables for better ease\n    NETMASK_PART_A=\"${NETMASK_ARRAY[0]}\"; NETMASK_PART_B=\"${NETMASK_ARRAY[1]}\"\n    NETMASK_PART_C=\"${NETMASK_ARRAY[2]}\"; NETMASK_PART_D=\"${NETMASK_ARRAY[3]}\"\n\n    # convert netmask to binary\n    NETMASK_BINARY=\"$(dec_to_bin \"${NETMASK_PART_A}\").$(dec_to_bin \"${NETMASK_PART_B}\").$(dec_to_bin \"${NETMASK_PART_C}\").$(dec_to_bin \"${NETMASK_PART_D}\")\"\n    # convert netmask to CIDR\n    CIDR=$(echo \"${NETMASK_BINARY}\" | grep --only-matching 1 | wc --lines)\n  else\n    show_usage_subnet\n    error_exit\n  fi\n\n  # remove CIDR from IP address\n  IP=$(awk -F '/' '{print $1}' <<< \"${IP}\")\n\n  # pass IP parts into multiple variables for future checks\n  read -r IP_PART_A IP_PART_B IP_PART_C IP_PART_D <<< \"${IP}\"\n  # convert IP to binary\n  IP_BINARY=\"$(dec_to_bin \"${IP_PART_A}\").$(dec_to_bin \"${IP_PART_B}\").$(dec_to_bin \"${IP_PART_C}\").$(dec_to_bin \"${IP_PART_D}\")\"\n\n  # calculate wildcard in binary\n  WILDCARD_BINARY=$(tr 01 10 <<< \"${NETMASK_BINARY}\") # inverse the address\n  # pass wildcard parts into multiple variables for future checks\n  read -r PART_A PART_B PART_C PART_D <<< \"${WILDCARD_BINARY}\"\n\n  # convert wildcard to decimal\n  WILDCARD=\"$(bin_to_dec \"${PART_A}\").$(bin_to_dec \"${PART_B}\").$(bin_to_dec \"${PART_C}\").$(bin_to_dec \"${PART_D}\")\"\n\n  # calculate network address by => parts of ip address AND parts of netmask address\n  NETWORK_ADDRESS=$(( IP_PART_A & NETMASK_PART_A )).$(( IP_PART_B & NETMASK_PART_B )).$(( IP_PART_C & NETMASK_PART_C )).$(( IP_PART_D & NETMASK_PART_D ))\n  # split network address into parts for better ease\n  PART_A=$(cut --delimiter='.' --fields=1 <<< \"${NETWORK_ADDRESS}\"); PART_B=$(cut --delimiter='.' --fields=2 <<< \"${NETWORK_ADDRESS}\")\n  PART_C=$(cut --delimiter='.' --fields=3 <<< \"${NETWORK_ADDRESS}\"); PART_D=$(cut --delimiter='.' --fields=4 <<< \"${NETWORK_ADDRESS}\")\n  # convert network address to binary\n  NETWORK_ADDRESS_BINARY=\"$(dec_to_bin \"${PART_A}\").$(dec_to_bin \"${PART_B}\").$(dec_to_bin \"${PART_C}\").$(dec_to_bin \"${PART_D}\")\"\n\n  # calculate host bits\n  HOST_BITS=$(echo \"${NETMASK_BINARY}\" | grep --only-matching 0 | wc --lines) # count how many 0s are there in netmask binary\n\n  # calculate first usable IP address\n  PART_D=$(( PART_D + 1 )) # add 1 to the last octet of the network address\n  HOST_MINIMUM=\"${PART_A}.${PART_B}.${PART_C}.${PART_D}\" # merge decimal parts\n  HOST_MINIMUM_BINARY=$(dec_to_bin \"${PART_A}\").$(dec_to_bin \"${PART_B}\").$(dec_to_bin \"${PART_C}\").$(dec_to_bin \"${PART_D}\") # convert to binary\n\n  BROADCAST_ADDRESS_BINARY=\"${IP_BINARY//.}\" # remove dots and merge strings together\n  BROADCAST_ADDRESS_BINARY=\"${BROADCAST_ADDRESS_BINARY:0:${#BROADCAST_ADDRESS_BINARY}-${HOST_BITS}}\" # remove last bits, as many as HOST_BITS are\n\n  # append bits to trimmed binary\n  BITS=$(( 32 - HOST_BITS ))\n  until [[ \"${BITS}\" -eq 32 ]]; do\n    BROADCAST_ADDRESS_BINARY+=\"1\" # append a bit every loop\n    let BITS+=1\n  done\n\n  # put a dot every 8th character and remove last occurence of dot\n  BROADCAST_ADDRESS_BINARY=$(sed --expression=\"s/\\(.\\{8\\}\\)/\\1./g\" --expression=\"s/\\(.*\\)./\\1 /\" <<< \"${BROADCAST_ADDRESS_BINARY}\")\n\n  # split broadcast address binary into parts for better ease\n  PART_A=$(cut --delimiter='.' --fields=1 <<< \"${BROADCAST_ADDRESS_BINARY}\"); PART_B=$(cut --delimiter='.' --fields=2 <<< \"${BROADCAST_ADDRESS_BINARY}\")\n  PART_C=$(cut --delimiter='.' --fields=3 <<< \"${BROADCAST_ADDRESS_BINARY}\"); PART_D=$(cut --delimiter='.' --fields=4 <<< \"${BROADCAST_ADDRESS_BINARY}\")\n  # convert broadcast address binary to decimal\n  BROADCAST_ADDRESS=\"$(bin_to_dec \"${PART_A}\").$(bin_to_dec \"${PART_B}\").$(bin_to_dec \"${PART_C}\").$(bin_to_dec \"${PART_D}\")\"\n  \n  # calculate last usable IP address\n  PART_D=$(bin_to_dec \"${PART_D}\") # convert to decimal in order to substract later\n  PART_D=$(( PART_D - 1 )) # substract 1 from the last octet of the broadcast address\n  PART_D=$(dec_to_bin \"${PART_D}\") # convert to binary\n  HOST_MAXIMUM=$(bin_to_dec \"${PART_A}\").$(bin_to_dec \"${PART_B}\").$(bin_to_dec \"${PART_C}\").$(bin_to_dec \"${PART_D}\") # merge parts and convert them to decimals\n  HOST_MAXIMUM_BINARY=\"${PART_A}.${PART_B}.${PART_C}.${PART_D}\" # merge binary parts\n\n  # maximum Number of hosts\n  HOSTS=$(( 2 ** ( 32 - CIDR ) - 2 ))\n  \n  # classful addressing: leading bits checking\n  IP_PART_A=$(dec_to_bin \"${IP_PART_A}\") # convert first octet to binary\n  # find class by checking first 0-4 bits\n  case \"${IP_PART_A}\" in\n       0*) CLASS=\"A\" ;;\n      10*) CLASS=\"B\" ;;\n     110*) CLASS=\"C\" ;;\n    1110*) CLASS=\"D\" ;;\n    1111*) CLASS=\"E\" ;;\n  esac\n  \n  # RFC 1918 based\n  IP_PART_B=$(dec_to_bin \"${IP_PART_B}\") # convert second octet to binary\n  # describe the IP address by checking the first two octets\n  case \"${IP_PART_A}:${IP_PART_B}\" in\n    01111111:*) CLASS_DESCRIPTION=\"Loopback\" ;;\n    00001010:*) CLASS_DESCRIPTION=\"Private Internet\" ;;\n    10101100:0001*) CLASS_DESCRIPTION=\"Private Internet\" ;;\n    11000000:10101000) CLASS_DESCRIPTION=\"Private Internet\" ;;\n    1110*:*) CLASS_DESCRIPTION=\"Multicast\" ;;\n    1111*:*) CLASS_DESCRIPTION=\"Experimental\" ;;\n  esac\n\n  # describe IP address by checking the CIDR 30-32 \n  case \"${CIDR}\" in\n    30)\n      CLASS_DESCRIPTION+=\", Glue Network PtP Link\"\n      ;;\n    31)\n      CLASS_DESCRIPTION+=\", PtP Link RFC 3021\"\n      HOSTS=2\n      HOST_MINIMUM=\"${NETWORK_ADDRESS}\"\n      HOST_MINIMUM_BINARY=\"${NETWORK_ADDRESS_BINARY}\"\n      IP_PART_A=$(bin_to_dec \"${IP_PART_A}\")\n      IP_PART_B=$(bin_to_dec \"${IP_PART_B}\")\n      # calculates properly host range\n      [ $(( IP_PART_D % 2 )) -eq 0 ] \\\n        && IP_PART_D=$(( IP_PART_D + 1 )) \\\n        && HOST_MAXIMUM=\"${IP_PART_A}.${IP_PART_B}.${IP_PART_C}.${IP_PART_D}\" \\\n        && HOST_MAXIMUM_BINARY=$(dec_to_bin \"${IP_PART_A}\").$(dec_to_bin \"${IP_PART_B}\").$(dec_to_bin \"${IP_PART_C}\").$(dec_to_bin \"${IP_PART_D}\") \\\n        || HOST_MAXIMUM=\"${IP}\" \\\n        || HOST_MAXIMUM_BINARY=\"${IP_BINARY}\"\n      ;;\n    32)\n      CLASS_DESCRIPTION+=\", Hostroute\"\n      HOSTS=1 # number of hosts workaround\n      ;;\n  esac\n\n  IFS=\n\n  function print_with_binary() {\n\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Address:\" \"${IP}\" \"${IP_BINARY}\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Address (dec):\" \"$(dotted_quad_ip_to_decimal \"${IP}\")\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Address (hex):\" \"$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${IP}\")\")\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[1]}%s${COLORS[0]}\\n\" \"Netmask:\" \"${NETMASK} = ${CIDR}\" \"${NETMASK_BINARY}\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[1]}%s${COLORS[0]}\\n\" \"Netmask (hex):\" \"$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${NETMASK}\")\")\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Wildcard:\" \"${WILDCARD}\" \"${WILDCARD_BINARY}\"\n    printf \"=>\\n\"\n    [ \"${CIDR}\" -le 31 ] \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Network:\" \"${NETWORK_ADDRESS}/${CIDR}\" \"${NETWORK_ADDRESS_BINARY}\" \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"HostMin:\" \"${HOST_MINIMUM}\" \"${HOST_MINIMUM_BINARY}\" \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"HostMax:\" \"${HOST_MAXIMUM}\" \"${HOST_MAXIMUM_BINARY}\" \\\n      || printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Hostroute:\" \"${IP}\" \"${IP_BINARY}\"\n    [ \"${CIDR}\" -le 30 ] \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Broadcast:\" \"${BROADCAST_ADDRESS}\" \"${BROADCAST_ADDRESS_BINARY}\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[5]}%s${COLORS[0]}%-22s${COLORS[4]}\\n\" \"Hosts/Net:\" \"${HOSTS}\" \"Class ${CLASS}\" \" ${CLASS_DESCRIPTION}\"\n    echo -e \"${COLORS[0]}\" # revert color back to normal\n  }\n\n  function print_without_binary() {\n    \n    printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\"               \"Address:\" \"${IP}\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Address (dec):\" \"$(dotted_quad_ip_to_decimal \"${IP}\")\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[3]}%s${COLORS[0]}\\n\" \"Address (hex):\" \"$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${IP}\")\")\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\"               \"Netmask:\" \"${NETMASK} = ${CIDR}\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[1]}%s${COLORS[0]}\\n\" \"Netmask (hex):\" \"$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${NETMASK}\")\")\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\"               \"Wildcard:\" \"${WILDCARD}\"\n    printf \"=>\\n\"\n    [ \"${CIDR}\" -le 31 ] \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\" \"Network:\"   \"${NETWORK_ADDRESS}/${CIDR}\" \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\" \"HostMin:\"   \"${HOST_MINIMUM}\" \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\" \"HostMax:\"   \"${HOST_MAXIMUM}\" \\\n      || printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\" \"Hostroute:\" \"${IP}\"\n    [ \"${CIDR}\" -le 30 ] \\\n      && printf \"%-16s${COLORS[4]}%-21s${COLORS[0]}\\n\"                           \"Broadcast:\" \"${BROADCAST_ADDRESS}\"\n    printf \"%-16s${COLORS[4]}%-21s${COLORS[5]}%s${COLORS[0]}%-22s${COLORS[4]}\\n\" \"Hosts/Net:\" \"${HOSTS}\" \"Class ${CLASS}\" \" ${CLASS_DESCRIPTION}\"\n    echo -e \"${COLORS[0]}\" # revert color back to normal\n  }\n\n  function print_html_with_binary() {\n\n    cat << EOF\n      <!DOCTYPE html>\n        <html>\n          <head>\n            <meta charset=\"UTF-8\"/>\n            <title>ship.sh</title>\n            <style>\n              @import url(//fonts.googleapis.com/css?family=Source+Code+Pro);\n\n              .ascii_art {\n                font-size:   10pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                white-space: pre\n                color:       green;\n              }\n\n              .text {\n                font-size:   13pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                font-weight: light;\n                color:       #F0F0F0;\n              }\n\n              .ip {\n                font-size:   13pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                font-weight: 800;\n                color:       #2F888B;\n              }\n\n              .binary {\n                font-size:   13pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                font-weight: light;\n                color:       #0D5A63;\n              }\n\n              #inlineParagraph {\n                display:     inline;\n              }\n\n              html {\n                position:    relative;\n                min-height:  100%;\n              }\n              \n              body {\n                margin:           0 0 100px;\n                padding:          25px;\n                background-color: #000000;\n              }\n              \n              footer {\n                position:         absolute;\n                left:             0;\n                bottom:           0;\n                height:           100px;\n                width:            100%;\n                overflow:         hidden;\n                color:            #2F888B;\n              }\n\n              table {\n                border-collapse: collapse;\n                border:          1px solid black;\n              }\n\n              td {\n                text-align:       left;\n                padding-left:     7px;\n                padding-right:    7px;\n              }\n            </style>\n        </head>\n        <body>\n        <a href=\"https://github.com/xtonousou/shIP\"><img style=\"position: absolute; top: 0; right: 0; border: 0;\" src=\"https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67\" alt=\"Fork me on GitHub\" data-canonical-src=\"https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png\"></a>\n        <table>\n        <tr>\n          <td class=\"text\">Address:</td>\n          <td class=\"ip\">${IP}</td>\n          <td class=\"binary\">${IP_BINARY}</td>\n        </tr> \n        <tr>\n          <td class=\"text\">Address (dec):</td>\n          <td class=\"ip\">$(dotted_quad_ip_to_decimal \"${IP}\")</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Address (hex):</td>\n          <td class=\"ip\">$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${IP}\")\")</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Netmask:</td>\n          <td class=\"ip\">${NETMASK} = ${CIDR}</td>\n          <td class=\"binary\">${NETMASK_BINARY}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Netmask (hex):</td>\n          <td class=\"ip\">$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${NETMASK}\")\")</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Wildcard:</td>\n          <td class=\"ip\">${WILDCARD}</td>\n          <td class=\"binary\">${WILDCARD_BINARY}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">=></td>\n        </tr>\nEOF\n    [ \"${CIDR}\" -le 31 ] \\\n      && cat << EOF\n        <tr>\n          <td class=\"text\">Network:</td>\n          <td class=\"ip\">${NETWORK_ADDRESS}/${CIDR}</td>\n          <td class=\"binary\">${NETWORK_ADDRESS_BINARY}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">HostMin:</td>\n          <td class=\"ip\">${HOST_MINIMUM}</td>\n          <td class=\"binary\">${HOST_MINIMUM_BINARY}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">HostMax:</td>\n          <td class=\"ip\">${HOST_MAXIMUM}</td>\n          <td class=\"binary\">${HOST_MAXIMUM_BINARY}</td>\n        </tr>\nEOF\n    [ \"${CIDR}\" -eq 32 ] \\\n      && cat << EOF\n        <tr>\n          <td class=\"text\">Hostroute:</td>\n          <td class=\"ip\">${IP}</td>\n          <td class=\"binary\">${IP_BINARY}</td>\n        </tr>\nEOF\n    [ \"${CIDR}\" -le 30 ] \\\n      && cat << EOF\n        <tr>\n          <td class=\"text\">Broadcast:</td>\n          <td class=\"ip\">${BROADCAST_ADDRESS}</td>\n          <td class=\"binary\">${BROADCAST_ADDRESS_BINARY}</td>\n        </tr>\nEOF\n    cat <<- EOF\n      <tr>\n        <td class=\"text\">Hosts/Net:</td>\n        <td class=\"ip\">${HOSTS}</td>\n        <td><p id=\"inlineParagraph\" class=\"ip\">Class ${CLASS}</p><p id=\"inlineParagraph\" class=\"text\">&nbsp;${CLASS_DESCRIPTION}</p></td>\n      </tr>\n      </table>\n      </body>\n      <footer>\n      <p align=\"center\">\n        Made with <3 by Sotirios Roussis (aka. xToNouSou)<br/>\n        Contact information: <a href=\"mailto:xtonousou@gmail.com\">xtonousou@gmail.com</a><br/>\n      </p>\n      </footer>\n      </html>\nEOF\n  }\n\n  function print_html_without_binary() {\n\n    cat << EOF\n      <!DOCTYPE html>\n        <html>\n          <head>\n            <meta charset=\"UTF-8\"/>\n            <title>ship.sh</title>\n            <style>\n              @import url(//fonts.googleapis.com/css?family=Source+Code+Pro);\n\n              .ascii_art {\n                font-size:   10pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                white-space: pre\n                color:       green;\n              }\n\n              .text {\n                font-size:   13pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                font-weight: light;\n                color:       #F0F0F0;\n              }\n\n              .ip {\n                font-size:   13pt;\n                font-family: \"Source Code Pro\", Courier, monospace;\n                font-weight: 800;\n                color:       #2F888B;\n              }\n\n              #inlineParagraph {\n                display:     inline;\n              }\n\n              html {\n                position:    relative;\n                min-height:  100%;\n              }\n              \n              body {\n                margin:           0 0 100px;\n                padding:          25px;\n                background-color: #000000;\n              }\n              \n              footer {\n                position:         absolute;\n                left:             0;\n                bottom:           0;\n                height:           100px;\n                width:            100%;\n                overflow:         hidden;\n                color:            #2F888B;\n              }\n\n              table {\n                border-collapse: collapse;\n                border:          1px solid black;\n              }\n\n              td {\n                text-align:       left;\n                padding-left:     7px;\n                padding-right:    7px;\n              }\n            </style>\n        </head>\n        <body>\n        <a href=\"https://github.com/xtonousou/shIP\"><img style=\"position: absolute; top: 0; right: 0; border: 0;\" src=\"https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67\" alt=\"Fork me on GitHub\" data-canonical-src=\"https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png\"></a>\n        <table>\n        <tr>\n          <td class=\"text\">Address:</td>\n          <td class=\"ip\">${IP}</td>\n        </tr> \n        <tr>\n          <td class=\"text\">Address (dec):</td>\n          <td class=\"ip\">$(dotted_quad_ip_to_decimal \"${IP}\")</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Address (hex):</td>\n          <td class=\"ip\">$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${IP}\")\")</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Netmask:</td>\n          <td class=\"ip\">${NETMASK} = ${CIDR}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Netmask (hex):</td>\n          <td class=\"ip\">$(dec_to_hex \"$(dotted_quad_ip_to_decimal \"${NETMASK}\")\")</td>\n        </tr>\n        <tr>\n          <td class=\"text\">Wildcard:</td>\n          <td class=\"ip\">${WILDCARD}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">=></td>\n        </tr>\nEOF\n    [ \"${CIDR}\" -le 31 ] \\\n      && cat << EOF\n        <tr>\n          <td class=\"text\">Network:</td>\n          <td class=\"ip\">${NETWORK_ADDRESS}/${CIDR}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">HostMin:</td>\n          <td class=\"ip\">${HOST_MINIMUM}</td>\n        </tr>\n        <tr>\n          <td class=\"text\">HostMax:</td>\n          <td class=\"ip\">${HOST_MAXIMUM}</td>\n        </tr>\nEOF\n    [ \"${CIDR}\" -eq 32 ] \\\n      && cat << EOF\n        <tr>\n          <td class=\"text\">Hostroute:</td>\n          <td class=\"ip\">${IP}</td>\n        </tr>\nEOF\n    [ \"${CIDR}\" -le 30 ] \\\n      && cat << EOF\n        <tr>\n          <td class=\"text\">Broadcast:</td>\n          <td class=\"ip\">${BROADCAST_ADDRESS}</td>\n        </tr>\nEOF\n    cat <<- EOF\n      <tr>\n        <td class=\"text\">Hosts/Net:</td>\n        <td class=\"ip\">${HOSTS}</td>\n        <td><p id=\"inlineParagraph\" class=\"ip\">Class ${CLASS}</p><p id=\"inlineParagraph\" class=\"text\">&nbsp;${CLASS_DESCRIPTION}</p></td>\n      </tr>\n      </table>\n      </body>\n      <footer>\n      <p align=\"center\">\n        Made with <3 by Sotirios Roussis (aka. xToNouSou)<br/>\n        Contact information: <a href=\"mailto:xtonousou@gmail.com\">xtonousou@gmail.com</a><br/>\n      </p>\n      </footer>\n      </html>\nEOF\n  }\n\n  case \"${NOBINARY}:${HTML}\" in\n    0:0) print_with_binary ;;\n    0:1) print_html_with_binary ;;\n    1:0) print_without_binary ;;\n    1:1) print_html_without_binary ;;\n  esac\n\n  return 0\n}\n\n# Extracts valid IPv4, IPv6 and MAC addresses from URLs.\nfunction show_ips_from_online_documents() {\n\n  check_for_missing_args \"No URL was specified. ${DIALOG_ABORTING}\" \"${1}\"\n\n  local HTTP_CODE DOCUMENT\n  local TEMP_FILE_IPV4 TEMP_FILE_IPV6 TEMP_FILE_MAC TEMP_FILE_HTML\n  local IS_TEMP_FILE_IPV4_EMPTY IS_TEMP_FILE_IPV6_EMPTY IS_TEMP_FILE_MAC_EMPTY\n\n  TEMP_FILE_IPV4=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n  TEMP_FILE_IPV6=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n  TEMP_FILE_MAC=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n  TEMP_FILE_HTML=$(mktemp \"${TEMP}\"/\"${SCRIPT_NAME}\".XXXXXXXXXX)\n\n  init_regexes\n\n  for DOCUMENT in \"${@}\"; do\n    print_check \"${DOCUMENT}\"\n    HTTP_CODE=$(wget --spider --tries 1 --timeout=\"${TIMEOUT}\" --server-response \"${DOCUMENT}\" 2>&1 | awk '/HTTP\\//{print $2}' | tail --lines=1)\n    \n    clear_line\n    [ ! \"${HTTP_CODE}\" = \"200\" ] \\\n      && error_exit \"${COLORS[3]}${DOCUMENT}${COLORS[0]} is unreachable. Input was invalid or server is down or has connection issues. ${DIALOG_ABORTING}\"\n\n    echo -ne \"Downloading ${COLORS[2]}$1${COLORS[0]} ...\"\n    wget \"${DOCUMENT}\" --quiet --output-document=\"${TEMP_FILE_HTML}\"\n\n    # Ensure that TEMP_FILE_HTML is written on /tmp\n    while [ ! -f \"${TEMP_FILE_HTML}\" ]; do\n      wget \"${DOCUMENT}\" --quiet --output-document=\"${TEMP_FILE_HTML}\"\n    done\n\n    clear_line\n    grep --extended-regexp --only-matching \"${REGEX_IPV4}\" \"${TEMP_FILE_HTML}\" >> \"${TEMP_FILE_IPV4}\"\n    grep --extended-regexp --only-matching \"${REGEX_IPV6}\" \"${TEMP_FILE_HTML}\" >> \"${TEMP_FILE_IPV6}\"\n    grep --extended-regexp --only-matching \"${REGEX_MAC}\" \"${TEMP_FILE_HTML}\" >> \"${TEMP_FILE_MAC}\"\n  done\n\n  [ -s \"${TEMP_FILE_IPV4}\" ] && IS_TEMP_FILE_IPV4_EMPTY=0 || IS_TEMP_FILE_IPV4_EMPTY=1\n  [ -s \"${TEMP_FILE_IPV6}\" ] && IS_TEMP_FILE_IPV6_EMPTY=0 || IS_TEMP_FILE_IPV6_EMPTY=1\n  [ -s \"${TEMP_FILE_MAC}\" ] && IS_TEMP_FILE_MAC_EMPTY=0 || IS_TEMP_FILE_MAC_EMPTY=1\n\n  sort --version-sort --unique --output=\"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_IPV4}\"\n  sort --version-sort --unique --output=\"${TEMP_FILE_IPV6}\" \"${TEMP_FILE_IPV6}\"\n  sort --version-sort --unique --output=\"${TEMP_FILE_MAC}\" \"${TEMP_FILE_MAC}\"\n\n  case \"${IS_TEMP_FILE_IPV4_EMPTY}:${IS_TEMP_FILE_IPV6_EMPTY}:${IS_TEMP_FILE_MAC_EMPTY}\" in\n    0:0:0) # IPv4, IPv6 and MAC addresses\n      paste \"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_IPV6}\" \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%-15s │ %-39s │ %s\\n\", $1, tolower($2), tolower($3))}'\n      ;;\n    0:0:1) # Only IPv4 and IPv6 addresses\n      paste \"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_IPV6}\" | \\\n        awk -F '\\t' '{printf(\"%-15s │ %s\\n\", $1, tolower($2))}'\n      ;;\n    0:1:0) # Only IPv4 and MAC addresses\n      paste \"${TEMP_FILE_IPV4}\" \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%-15s │ %s\\n\", $1, tolower($2))}'\n      ;;\n    0:1:1) # Only IPv4 addresses\n      paste \"${TEMP_FILE_IPV4}\" | \\\n        awk -F '\\t' '{printf(\"%s\\n\", $1)}'\n      ;;\n    1:0:0) # Only IPv6 and MAC addresses\n      paste \"${TEMP_FILE_IPV6}\" \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%-39s │ %s\\n\", tolower($1), tolower($2))}'\n      ;;\n    1:0:1) # Only IPv6 addresses\n      paste \"${TEMP_FILE_IPV6}\" | \\\n        awk -F '\\t' '{printf(\"%s\\n\", tolower($1))}'\n      ;;\n    1:1:0) # Only MAC addresses\n      paste \"${TEMP_FILE_MAC}\" | \\\n        awk -F '\\t' '{printf(\"%s\\n\", tolower($1))}'\n      ;;\n    1:1:1) # None\n      error_exit \"${DIALOG_NO_VALID_ADDRESSES}\"\n      ;;\n  esac\n\n  return 0\n}\n\n# Prints script's version and author's info.\nfunction show_version() {\n\n  echo -e \"${COLORS[4]}\"\n  echo -e \"   ▄▄▄▄▄    ▄  █ ▄█ █ ▄▄\"\n  echo -e \"  █     ▀▄ █   █ ██ █   █ \\t ${COLORS[0]}Author .: ${COLORS[4]}${AUTHOR} - xtonousou\"\n  echo -e \"▄  ▀▀▀▀▄   ██▀▀█ ██ █▀▀▀ \\t ${COLORS[0]}Mail ...: ${COLORS[4]}${GMAIL}\"\n  echo -e \" ▀▄▄▄▄▀    █   █ ▐█ █ \\t\\t ${COLORS[0]}Github .: ${COLORS[4]}${GITHUB}\"\n  echo -e \"              █   ▐  █ \\t\\t ${COLORS[0]}Version : ${COLORS[4]}${VERSION}\"\n  echo -e \"             ▀        ▀\"\n  echo -e \"${COLORS[0]}\"\n\n  return 0\n}\n\n# Prints active network interfaces with their IPv4 address and CIDR suffix.\nfunction show_ipv4_cidr() {\n\n  local ITEM\n\n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  declare IPV4_CIDR_ARRAY\n  \n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    IPV4_CIDR_ARRAY[ITEM]=$(ip -4 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=inet '$0 ~ family {print $2}')\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${IPV4_CIDR_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Prints active network interfaces with their IPv6 address and CIDR suffix.\nfunction show_ipv6_cidr() {\n\n  check_ipv6\n\n  local ITEM\n  \n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  declare IPV6_CIDR_ARRAY\n\n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    IPV6_CIDR_ARRAY[ITEM]=$(ip -6 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=\"inet6\" 'tolower($0) ~ family {print $2}')\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${IPV6_CIDR_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Prints all info and CIDR suffix.\nfunction show_all_cidr() {\n\n  check_ipv6\n  \n  local MAC_OF\n  local DRIVER_OF\n  local GATEWAY\n  local CIDR\n  local ITEM\n  \n  declare INTERFACES_ARRAY=($(ip route | awk 'tolower($0) ~ /default/ {print $5}'))\n  declare IPV4_CIDR_ARRAY\n  declare IPV6_CIDR_ARRAY\n  \n  for ITEM in \"${!INTERFACES_ARRAY[@]}\"; do\n    IPV4_CIDR_ARRAY[ITEM]=$(ip -4 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=inet '$0 ~ family {print $2}')\n    IPV6_CIDR_ARRAY[ITEM]=$(ip -6 address show dev \"${INTERFACES_ARRAY[ITEM]}\" | awk -v family=\"inet6\" 'tolower($0) ~ family {print $2}')\n    [ -f \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/phy80211/device/uevent\" ] \\\n      && DRIVER_OF=$(awk -F '=' 'tolower($0) ~ /driver/{print $2}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/phy80211/device/uevent\") \\\n      || DRIVER_OF=$(awk -F '=' 'tolower($0) ~ /driver/{print $2}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/device/uevent\")\n    MAC_OF=$(awk '{print $0}' \"/sys/class/net/${INTERFACES_ARRAY[ITEM]}/address\" 2> /dev/null)\n    GATEWAY=$(ip route | awk \"/${INTERFACES_ARRAY[ITEM]}/ && tolower(\\$0) ~ /default/ {print \\$3}\")\n    CIDR=$(echo -n \"${IPV4_CIDR_ARRAY[ITEM]}\" | sed 's/^.*\\//\\//')\n    echo \"${INTERFACES_ARRAY[ITEM]}\" \"${DRIVER_OF}\" \"${MAC_OF}\" \"${GATEWAY}${CIDR}\" \"${IPV4_CIDR_ARRAY[ITEM]}\" \"${IPV6_CIDR_ARRAY[ITEM]}\"\n  done\n\n  return 0\n}\n\n# Prints help message.\nfunction show_usage() {\n  \n  echo    \" usage: ${SCRIPT_NAME} [OPTION] <ARGUMENT/S>\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-4 ${COLORS[0]}, ${COLORS[0]}--ipv4 ${COLORS[0]}          shows active interfaces with their IPv4 address\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-6 ${COLORS[0]}, ${COLORS[0]}--ipv6 ${COLORS[0]}          shows active interfaces with their IPv6 address\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-a ${COLORS[0]}, ${COLORS[0]}--all ${COLORS[0]}           shows all information\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-A ${COLORS[0]}, ${COLORS[0]}--all-interfaces ${COLORS[0]}shows all available network interfaces\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-c ${COLORS[0]}, ${COLORS[0]}--calculate ${COLORS[0]}<>   shows calculated IP information\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-d ${COLORS[0]}, ${COLORS[0]}--driver ${COLORS[0]}        shows each active interface's driver\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-e ${COLORS[0]}, ${COLORS[0]}--external ${COLORS[0]}      shows your external IP address\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-e ${COLORS[0]}, ${COLORS[0]}--external ${COLORS[0]}<>    shows external IP addresses\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-f ${COLORS[0]}, ${COLORS[0]}--find ${COLORS[0]}<>        shows valid IP and MAC addresses found on file/s\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-g ${COLORS[0]}, ${COLORS[0]}--gateway ${COLORS[0]}       shows gateway of online interfaces\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-h ${COLORS[0]}, ${COLORS[0]}--help${COLORS[0]}           shows this help message\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[1]}-H ${COLORS[0]}, ${COLORS[1]}--hosts ${COLORS[0]}         shows active hosts on network\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[1]}-HM${COLORS[0]}, ${COLORS[1]}--hosts-mac ${COLORS[0]}     shows active hosts on network with their MAC address\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-i ${COLORS[0]}, ${COLORS[0]}--interfaces ${COLORS[0]}    shows active interfaces\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-l ${COLORS[0]}, ${COLORS[0]}--list ${COLORS[0]}          shows a list of private and reserved IP addresses\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-m ${COLORS[0]}, ${COLORS[0]}--mac ${COLORS[0]}           shows active interfaces with their MAC address\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-n ${COLORS[0]}, ${COLORS[0]}--neighbor ${COLORS[0]}      shows neighbor cache\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-P ${COLORS[0]}, ${COLORS[0]}--port ${COLORS[0]}          shows a list of common ports\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[1]}-P ${COLORS[0]}, ${COLORS[1]}--port ${COLORS[0]}<>        shows connections to a port per IP\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-r ${COLORS[0]}, ${COLORS[0]}--route-ipv4 ${COLORS[0]}<>  shows the path to a network host using IPv4\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-r6${COLORS[0]}, ${COLORS[0]}--route-ipv6 ${COLORS[0]}<>  shows the path to a network host using IPv6\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-u ${COLORS[0]}, ${COLORS[0]}--url ${COLORS[0]}<>         shows valid IP and MAC addresses found on website/s\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[0]}-v ${COLORS[0]}, ${COLORS[0]}--version ${COLORS[0]}       shows the version of script\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[2]}--cidr-4${COLORS[0]}, ${COLORS[2]}--cidr-ipv4 ${COLORS[0]}shows active interfaces with their IPv4 address and CIDR\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[2]}--cidr-6${COLORS[0]}, ${COLORS[2]}--cidr-ipv6 ${COLORS[0]}shows active interfaces with their IPv6 address and CIDR\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[2]}--cidr-a${COLORS[0]}, ${COLORS[2]}--cidr-all ${COLORS[0]} shows all information with CIDR\"\n  echo -e \"  ${SCRIPT_NAME} ${COLORS[2]}--cidr-l${COLORS[0]}, ${COLORS[2]}--cidr-list ${COLORS[0]}shows a list of private and reserved IP addresses with CIDR\"\n  echo -e \" options in ${COLORS[2]}green${COLORS[0]} force include ${COLORS[2]}CIDR${COLORS[0]} notation\"\n  echo -e \" options in ${COLORS[1]}red${COLORS[0]} require ${COLORS[1]}ROOT${COLORS[0]} privileges\"\n\n  return 0\n}\n\n# Prints the right usage of ship -c | --calculate.\nfunction show_usage_ipcalc() {\n\n  echo    \" usage:\"\n  echo -e \"  ${SCRIPT_NAME} -c, --calculate <OPTIONS> ${COLORS[5]}192.168.0.1${COLORS[0]}\"\n  echo -e \"  ${SCRIPT_NAME} -c, --calculate <OPTIONS> ${COLORS[5]}192.168.0.1/24${COLORS[0]}\"\n  echo -e \"  ${SCRIPT_NAME} -c, --calculate <OPTIONS> ${COLORS[5]}192.168.0.1 255.255.255.0${COLORS[0]}\"\n  echo    \" options:\"\n  echo -e \"  -b, --nobinary ${COLORS[5]}suppress the bitwise output ${COLORS[0]}\"\n  echo -e \"  -h, --html     ${COLORS[5]}display results as HTML${COLORS[0]}\"\n  echo -e \"  -s, --split    ${COLORS[5]}split into networks of size n1, n2, n3 ${DIALOG_UNDER_DEVELOPMENT}\" #TODO\n  echo -e \"  -r, --range    ${COLORS[5]}deaggregate address range ${DIALOG_UNDER_DEVELOPMENT}\" #TODO\n\n  return 0\n}\n\n# Starts ship.\nfunction sail() {\n  \n  [ -z \"${1}\" ] && error_exit \"${DIALOG_ERROR}\"\n\n  check_bash_version\n  \n  while :; do\n    case \"${1}\" in\n      \"-4\"|\"--ipv4\")\n        check_connectivity \"--local\"\n        show_ipv4\n        break\n        ;;\n      \"-6\"|\"--ipv6\")\n        check_connectivity \"--local\"\n        show_ipv6\n        break\n        ;;\n      \"-a\"|\"--all\")\n        check_connectivity \"--local\"\n        show_all\n        break\n        ;;\n      \"-A\"|\"--all-interfaces\")\n        show_all_interfaces\n        break\n        ;;\n      \"-c\"|\"--calculate\")\n        show_ipcalc \"${@:2}\"\n        break\n        ;;\n      \"-d\"|\"--driver\")\n        check_connectivity \"--local\"\n        show_driver\n        break\n        ;;\n      \"-e\"|\"--external\")\n        check_connectivity \"--internet\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_ip_from \"${2}\"\n        shift 2\n        break\n        ;;\n      \"-f\"|\"--find\")\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_ips_from_file \"${@:2}\"\n        break\n        ;;\n      \"-g\"|\"--gateway\")\n        check_connectivity \"--local\"\n        show_gateway\n        break\n        ;;\n      \"-h\"|\"--help\")\n        show_usage\n        break\n        ;;\n      \"-H\"|\"--hosts\")\n        check_connectivity \"--local\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_live_hosts \"--normal\"\n        break\n        ;;\n      \"-HM\"|\"--hosts-mac\")\n        check_connectivity \"--local\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_live_hosts \"--mac\"\n        break\n        ;;\n      \"-i\"|\"--interfaces\")\n        check_connectivity \"--local\"\n        show_interfaces\n        break\n        ;;\n      \"-l\"|\"--list\")\n        show_bogon_ips \"--normal\"\n        break\n        ;;\n      \"-m\"|\"--mac\")\n        check_connectivity \"--local\"\n        show_mac\n        break\n        ;;\n      \"-n\"|\"--neighbor\")\n        check_connectivity \"--local\"\n        show_neighbor_cache\n        break\n        ;;\n      \"-P\"|\"--port\")\n        check_connectivity \"--internet\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_port_connections \"${2}\"\n        shift 2\n        break\n        ;;\n      \"-r\"|\"--route-ipv4\")\n        check_connectivity \"--internet\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_next_hops \"--ipv4\" \"${2}\"\n        shift 2\n        break\n        ;;\n      \"-r6\"|\"--route-ipv6\")\n        check_connectivity \"--internet\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_next_hops \"--ipv6\" \"${2}\"\n        shift 2\n        break\n        ;;\n      \"-u\"|\"--url\")\n        check_connectivity \"--internet\"\n        trap trap_handler INT &>/dev/null\n        trap trap_handler SIGTSTP &>/dev/null\n        show_ips_from_online_documents \"${@:2}\"\n        break\n        ;;\n      \"-v\"|\"--version\")\n        show_version\n        break\n        ;;\n      \"--cidr-4\"|\"--cidr-ipv4\")\n        check_connectivity \"--local\"\n        show_ipv4_cidr\n        break\n        ;;\n      \"--cidr-6\"|\"--cidr-ipv6\")\n        check_connectivity \"--local\"\n        show_ipv6_cidr\n        break\n        ;;\n      \"--cidr-a\"|\"--cidr-all\")\n        check_connectivity \"--local\"\n        show_all_cidr\n        break\n        ;;\n      \"--cidr-l\"|\"--cidr-list\")\n        show_bogon_ips \"--cidr\"\n        break\n        ;;\n      *)\n        error_exit \"${DIALOG_ERROR}\" \"${1}\"\n        ;;\n    esac\n  done\n\n  mr_proper && trap mr_proper EXIT\n  exit 0\n}\n\nsail \"${1+${@}}\"\n\n"
  },
  {
    "path": ".sbin/tdrop",
    "content": "#!/usr/bin/env bash\n\nMUTDROP_PATH=/tmp/tdrop_\"$USER\"\n# shellcheck disable=SC2174\nmkdir -p \"$MUTDROP_PATH\" -m 700\n\nprint_help() {\n\techo \"\nusage: tdrop [options] <program> [program options ...]\n                       or 'current'\n                       or one of 'auto_show'/'auto_hide'/'toggle_auto_hide'\n                       or 'hide_all'\noptions:\n\t-h height\tspecify a height for a newly created term (default: 45%)\n\t-w width\tspecify a width for a newly created term (default: 100%)\n\t-x pos\t\tspecify x offset for a newly created term (default: 0)\n\t-y pos\t\tspecify y offset for a newly created term (default: 1, see man)\n\t-s name\t\tname for tmux/tmuxinator/tmuxifier session (supported\n\t\t\tterminal required)\n\t-n num\t\tnum or extra text; only needed if for the purpose of using\n\t\t\tmultiple dropdowns of same program\n\t-c cmd\t\tprovide a pre-create command\n\t-C cmd\t\tprovide a post-create command\n\t-l cmd\t\tprovide a command to float the window before it is mapped\n\t-L cmd\t\tprovide a command to float the window after it is mapped\n\t-p cmd\t\tprovide a pre-map command\n\t-P cmd\t\tprovide a post-map command\n\t-u cmd\t\tprovide a pre-unmap command\n\t-U cmd\t\tprovide a post-unmap command\n\t-d XxY\t\tgive decoration/border size to accurately restore window\n\t\t\tposition; only applicable with auto_show\n\t-S cmd\t\tcan be used to fix saved geometry with auto_hide; see manpage\n\t-i cmd\t\tprovide a command to detect whether the current window is a\n\t\t\tfloating window; on applicable with auto_hide\n\t-f flags\tspecify flags/options to be used when creating the term or\n\t\t\twindow (e.g. -f '--title mytitle'; default: none).\n\t\t\tNOTE: This flag is deprecated. Specify flags after the program name\n\t\t\tinstead. This flag may be removed in the future.\n\t\t\tCaution: if there is a tmux session specified (with -s), the option\n\t\t\tto execute a program (usually -e for terminal programs) is\n\t\t\timplicitly added by tdrop\n\t-a\t\tautomatically detect window manager and set relevant options\n\t\t\t(e.g. this makes specifying -l/-L, -d, and -i uneccessary\n\t\t\tfor supported WMs) (default: false)\n\t-m\t\tfor use with multiple monitors and only with dropdowns\n\t\t\t(i.e. not for auto_show or auto_hide); convert percentages used\n\t\t\tfor width or height to values relative to the size of the\n\t\t\tcurrent monitor and force resizing of the dropdown when\n\t\t\tthe monitor changes (default: false)\n\t-t\t\tuse mouse pointer location for detecting which monitor is the current\n\t\t\tone\n\t--wm\t\tset the window manager name to mimic another window manager\n\t\t\t(for use with -a)\n\t--class name\tmanually specify the class of the window (can be obtained with xprop)\n\t--name name\tset a new name for the dropdown window\n\t--clear\t\tclear saved window id; useful after accidentally make a\n\t\t\twindow a dropdown (e.g. '$ tdrop --clear current')\n\t--no-cancel\tdon't cancel auto-showing (default is to prevent this when\n\t\t\tmanually toggling a window after it is auto-hidden)\n\t--help\t\tprint help\n\nSee man page for more details.\n\"\n\tif [[ $1 == illegal_opt ]]; then\n\t\texit 1\n\telse\n\t\texit 0\n\tfi\n}\n\n# * Default Options and Option Parsing\n# xdotool can take percentages; cannot take decimal percentages though\nwidth=\"100%\"\nheight=\"45%\"\nxoff=0\nyoff=2\nsession_name=\nnum=\npre_create=\npost_create=\npre_float=\npost_float=\npre_map=\npost_map=\npre_unmap=\npost_unmap=\ndec_fix=\n# NOTE:\n# pekwm, xfwm4, sawfish, openbox need subtract_when_same to be true\n# for awesome, fluxbox, blackbox, mutter, fvwm, and metacity, the value\n# does not matter\n# set in decoration_settings\nsubtract_when_same=\nis_floating=\nprogram_flags=()\nclearwid=false\ncancel_auto_show=true\nauto_detect_wm=false\nmonitor_aware=false\npointer_monitor_detection=false\nwm=\nuser_set_wm=false\nclass=\nname=\nwhile getopts :h:w:x:y:s:n:c:C:l:L:p:P:u:U:d:S:i:f:-:amt opt\ndo\n\tcase $opt in\n\t\th) height=$OPTARG;;\n\t\tw) width=$OPTARG;;\n\t\tx) xoff=$OPTARG;;\n\t\ty) yoff=$OPTARG;;\n\t\ts) session_name=$OPTARG;;\n\t\tn) num=$OPTARG;;\n\t\tc) pre_create=$OPTARG;;\n\t\tC) post_create=$OPTARG;;\n\t\tl) pre_float=$OPTARG;;\n\t\tL) post_float=$OPTARG;;\n\t\tp) pre_map=$OPTARG;;\n\t\tP) post_map=$OPTARG;;\n\t\tu) pre_unmap=$OPTARG;;\n\t\tU) post_unmap=$OPTARG;;\n\t\td) dec_fix=$OPTARG;;\n\t\tS) subtract_when_same=false;;\n\t\ti) is_floating=$OPTARG;;\n\t\tf) eval \"program_flags=($OPTARG)\";;\n\t\ta) auto_detect_wm=true;;\n\t\tm) monitor_aware=true;;\n\t\tt) pointer_monitor_detection=true;;\n\t\t-)\n\t\t\tif [[ $OPTARG =~ ^(auto-detect-wm|monitor-aware|pointer-monitor-detection|clear|no-cancel|help)$ ]] || \\\n\t\t\t\t   [[ $OPTARG == *=* ]]; then\n\t\t\t\tOPTION=${OPTARG%%=*}\n\t\t\t\tOPTARG=${OPTARG#*=}\n\t\t\telse\n\t\t\t\tOPTION=$OPTARG\n\t\t\t\t# shellcheck disable=SC2124\n\t\t\t\tOPTARG=${@:$OPTIND:1}\n\t\t\t\t((OPTIND++))\n\t\t\tfi\n\t\t\tcase $OPTION in\n\t\t\t\theight) height=$OPTARG;;\n\t\t\t\twidth) width=$OPTARG;;\n\t\t\t\tx-offset) xoff=$OPTARG;;\n\t\t\t\ty-offset) yoff=$OPTARG;;\n\t\t\t\tsession) session_name=$OPTARG;;\n\t\t\t\tnumber) num=$OPTARG;;\n\t\t\t\tpre-create-hook) pre_create=$OPTARG;;\n\t\t\t\tpost-create-hook) post_create=$OPTARG;;\n\t\t\t\tpre-map-float-command) pre_float=$OPTARG;;\n\t\t\t\tpost-map-float-command) post_float=$OPTARG;;\n\t\t\t\tpre-map-hook) pre_map=$OPTARG;;\n\t\t\t\tpost-map-hook) post_map=$OPTARG;;\n\t\t\t\tpre-unmap-hook) pre_unmap=$OPTARG;;\n\t\t\t\tpost-unmap-hook) post_unmap=$OPTARG;;\n\t\t\t\tdecoration-fix) dec_fix=$OPTARG;;\n\t\t\t\tno-subtract-when-same) subtract_when_same=false;;\n\t\t\t\tis-floating) is_floating=$OPTARG;;\n\t\t\t\tprogram-flags) eval \"program_flags=($OPTARG)\";;\n\t\t\t\tauto-detect-wm) auto_detect_wm=true;;\n\t\t\t\tmonitor-aware) monitor_aware=true;;\n\t\t\t\tpointer-monitor-detection) pointer_monitor_detection=true;;\n\t\t\t\twm) wm=$OPTARG\n\t\t\t\t\tuser_set_wm=true;;\n\t\t\t\tclass) class=$OPTARG;;\n\t\t\t\tname) name=$OPTARG;;\n\t\t\t\tclear) clearwid=true;;\n\t\t\t\tno-cancel) cancel_auto_show=false;;\n\t\t\t\thelp) print_help;;\n\t\t\t\t*) print_help illegal_opt;;\n\t\t\tesac;;\n\t\t*) print_help illegal_opt;;\n\tesac\ndone\nshift \"$((OPTIND-1))\"\nprogram=$1\n\nif [[ -z $program_flags ]]; then\n\tprogram_flags=(\"${@:2}\")\nfi\n\n# check that the program is not a path and does not contain flags\nif [[ ! $program =~ ^(current|auto_hide|auto_show|toggle_auto_hide|hide_all)$ ]] && \\\n\t   ! type \"$program\" &> /dev/null; then\n\techo >&2 \"The program should be in PATH and not contain flags.\" | \\\n\t\ttee -a \"$MUTDROP_PATH\"/log\n\texit 1\nfi\n\nif [[ -z $program ]]; then\n\techo >&2 \"Program to run is required as a positional argument.\" \\\n\t\t\t \"For help use -h or --help or see the manpage.\" | \\\n\t\ttee -a \"$MUTDROP_PATH\"/log\n\texit 1\nfi\n\n# validate options that require number values\nif [[ ! $height$width$xoff$yoff =~ ^[0-9%-]*$ ]]; then\n\techo >&2 \"The -h, -w, -x, and -y values must be numbers (or percentages).\" | \\\n\t\ttee -a \"$MUTDROP_PATH\"/log\n\texit 1\nfi\nif [[ -n $dec_fix ]] && [[ ! $dec_fix =~ ^-?[0-9]+x-?[0-9]+$ ]]; then\n\techo >&2 \"The decoration fix value must have form 'num'x'num'.\" \\\n\t\t\t \"The numbers can be negative or zero.\" | tee -a \"$MUTDROP_PATH\"/log\n\texit 1\nfi\n\n# non-user-settable global vars\nwid=\n\n# * Multiple Monitor Automatic Re-Sizing\npercent_of_total() { # percent total\n\t# gawk \"BEGIN {printf(\\\"%.0f\\\", 0.01*${1%\\%}*$2)}\"\n\techo $((${1%\\%} * ${2} / 100))\n}\n\n# acts on globals\nconvert_geometry_to_pixels() {\n\ttotal_width=$1\n\ttotal_height=$2\n\tlocal minus_width minus_height minus_xoff minus_yoff\n\tif [[ $width =~ %$ ]]; then\n\t\twidth=$(percent_of_total \"$width\" \"$total_width\")\n\telif [[ $width =~ ^- ]]; then\n\t\tminus_width=${width#-}\n\t\twidth=$((total_width-minus_width))\n\tfi\n\tif [[ $height =~ %$ ]]; then\n\t\theight=$(percent_of_total \"$height\" \"$total_height\")\n\telif [[ $height =~ ^- ]]; then\n\t\tminus_height=${height#-}\n\t\theight=$((total_height-minus_height))\n\tfi\n\tif [[ $xoff =~ %$ ]]; then\n\t\txoff=$(percent_of_total \"$xoff\" \"$total_width\")\n\telif [[ $xoff =~ ^- ]]; then\n\t\tminus_xoff=${xoff#-}\n\t\txoff=$((total_width-minus_xoff))\n\tfi\n\tif [[ $yoff =~ %$ ]]; then\n\t\tyoff=$(percent_of_total \"$yoff\" \"$total_height\")\n\telif [[ $yoff =~ ^- ]]; then\n\t\tminus_yoff=${yoff#-}\n\t\tyoff=$((total_height-minus_yoff))\n\tfi\n}\n\n# meant to set non-local variables\nsplit_geometry() { # <monitor geometry>\n\tmonitor_geo=$1\n\t# x_begin=$(echo \"$monitor_geo\" | gawk -F '+' '{print $2}')\n\tx_begin=${monitor_geo#*+}\n\tx_begin=${x_begin%+*}\n\t# y_begin=$(echo \"$monitor_geo\" | gawk -F '+' '{print $3}')\n\ty_begin=${monitor_geo##*+}\n\t# x_width=$(echo \"$monitor_geo\" | gawk -F 'x' '{print $1}')\n\tx_width=${monitor_geo%x*}\n\t# y_height=$(echo \"$monitor_geo\" | gawk -F 'x|+' '{print $2}')\n\ty_height=${monitor_geo#*x}\n\ty_height=${y_height%%+*}\n}\n\nupdate_geometry_settings_for_monitor() {\n\t# 1. Correctly interpret width/height percentages when there exist multiple\n\t#    monitors so an initially created dropdown is the correct size (xdotool\n\t#    would create a dropdown the width of all screens for 100% width)\n\t# 2. Force resize the dropdown to the correct percentage of the current\n\t#    monitor IF the monitor has changed since the last time the dropdown\n\t#    was used\n\n\t# it is conceivable that a user may want to use -m but not -a, so\n\t# get the wm from within this function\n\tlocal current_monitor\n\tif [[ $wm == bspwm ]]; then\n\t\tcurrent_monitor=$(bspc query --names --monitors --monitor)\n\telif [[ $wm == i3 ]]; then\n\t\t# TODO use jq if installed\n\t\t# I'd rather not make jq a dependency\n\t\tcurrent_monitor=$(i3-msg -t get_workspaces | sed 's/{\"num\"/\\n/g' | \\\n\t\t\t\t\t\t\t  gawk -F ',' '/focused\":true/ {sub(\".*output\",\"\"); gsub(\"[:\\\"]\",\"\"); print $1}')\n\tfi\n\n\tlocal monitor_geo x_begin y_begin x_width y_height\n\tif [[ -n $current_monitor ]]; then\n\t\tmonitor_geo=$(xrandr --current | \\\n\t\t\t\t\t\t  gawk \"/^$current_monitor/ {gsub(\\\"primary \\\",\\\"\\\"); print \\$3}\")\n\t\tsplit_geometry \"$monitor_geo\"\n\telse\n\t\tlocal current_x current_y monitors_info x_end y_end\n\t\tif ! $pointer_monitor_detection; then\n\t\t\t# determine current monitor using active window\n\t\t\tlocal wid wininfo\n\t\t\twid=$(xdotool getactivewindow)\n\t\t\tif [[ -z $wid ]]; then\n\t\t\t\t# will try again after remapping or creating the dropdown\n\t\t\t\treturn 1\n\t\t\tfi\n\n\t\t\twininfo=$(xwininfo -id \"$wid\")\n\t\t\tcurrent_x=$(echo \"$wininfo\" | gawk '/Absolute.*X/ {print $4}')\n\t\t\tcurrent_y=$(echo \"$wininfo\" | gawk '/Absolute.*Y/ {print $4}')\n\t\telse\n\t\t\t# shellcheck disable=SC2034\n\t\t\tlocal X Y SCREEN WINDOW\n\t\t\t# determine current monitor using pointer location\n\t\t\teval \"$(xdotool getmouselocation --shell)\"\n\t\t\tcurrent_x=X\n\t\t\tcurrent_y=Y\n\t\tfi\n\t\tmonitors_info=$(xrandr --current | gawk '/ connected/ {gsub(\"primary \",\"\"); print}')\n\t\twhile read -r monitor; do\n\t\t\tmonitor_geo=$(echo \"$monitor\" | gawk '{print $3}')\n\t\t\tif [[ $monitor_geo =~ ^[0-9]+x[0-9]+\\+[0-9]+\\+[0-9]+$ ]]; then\n\t\t\t\tsplit_geometry \"$monitor_geo\"\n\t\t\t\tx_end=$((x_begin+x_width))\n\t\t\t\ty_end=$((y_begin+y_height))\n\t\t\t\tif [[ $current_x -ge $x_begin ]] && [[ $current_x -lt $x_end ]] && \\\n\t\t\t\t\t   [[ $current_y -ge $y_begin ]] && [[ $current_y -lt $y_end ]]; then\n\t\t\t\t\t# current_monitor=$(echo \"$monitor\" | gawk '{print $1}')\n\t\t\t\t\tcurrent_monitor=${monitor%% *}\n\t\t\t\t\tbreak\n\t\t\t\tfi\n\t\t\tfi\n\t\tdone <<< \"$monitors_info\"\n\tfi\n\n\t# convert w/h/x/y percentages/negatives to pixels\n\tconvert_geometry_to_pixels \"$x_width\" \"$y_height\"\n\n\t# update x and y offsets, so that will appear on correct screen\n\t# (required for some WMs apparently, but not for others)\n\t((xoff+=x_begin))\n\t((yoff+=y_begin))\n}\n\nmap_and_reset_geometry() {\n\txdotool windowmap \"$wid\" windowmove \"$wid\" \"$xoff\" \"$yoff\" \\\n\t\t\twindowsize \"$wid\" \"$width\" \"$height\" 2> /dev/null\n}\n\n# * WM Detection and Hooks\nset_wm() {\n\tif ! $user_set_wm && $auto_detect_wm; then\n\t\tlocal id\n\t\tid=$(xprop -root -notype _NET_SUPPORTING_WM_CHECK)\n\t\tid=${id##* }\n\t\t# xfwm4 and fvwm at least will give two names (hence piping into head)\n\t\twm=$(xprop -notype -id \"$id\" _NET_WM_NAME | head -n 1)\n\t\twm=${wm##* }\n\t\twm=${wm//\\\"/}\n\tfi\n}\n\ndecoration_settings() {\n\tif [[ -z $subtract_when_same ]]; then\n\t\tif $auto_detect_wm \\\n\t\t\t\t&& [[ $wm =~ ^(Mutter|GNOME Shell|bspwm|i3|GoomwW)$ ]]; then\n\t\t\tsubtract_when_same=false\n\t\telse\n\t\t\tsubtract_when_same=true\n\t\tfi\n\tfi\n\n\tif [[ -z $dec_fix ]] && $auto_detect_wm; then\n\t\t# settings for stacking/floating wms where can't get right position\n\t\t# easily from xwininfo; take borders into account\n\t\tif [[ $wm == Blackbox ]]; then\n\t\t\tdec_fix=\"1x22\"\n\t\telif [[ $wm =~ ^(Mutter|GNOME Shell)$ ]]; then\n\t\t\tdec_fix=\"-10x-8\"\n\t\telif [[ $wm =~ ^(Mutter \\(Muffin\\))$ ]]; then\n\t\t\tdec_fix=\"-9x-8\"\n\t\tfi\n\tfi\n}\n\nset_class() {\n\tif [[ -z $class ]]; then\n\t\tif [[ $program =~ ^emacsclient ]]; then\n\t\t\tclass=emacs\n\t\telif [[ $program =~ ^google-chrome ]]; then\n\t\t\tclass=google-chrome\n\t\telif [[ $program == st ]]; then\n\t\t\tclass=st-256color\n\t\telif [[ $program == gnome-terminal ]]; then\n\t\t\tclass=Gnome-terminal\n\t\telif [[ $program =~ ^urxvt.* ]]; then\n\t\t\tclass=urxvt\n\t\telif [[ $program == xiatec ]]; then\n\t\t\tclass=xiate\n\t\telif [[ $program == alacritty ]]; then\n\t\t\tclass=Alacritty\n\t\telif [[ $program == current ]]; then\n\t\t\tclass=$(cat \"$MUTDROP_PATH\"/current\"$num\"_class  2> /dev/null)\n\t\telse\n\t\t\tclass=$program\n\t\tfi\n\tfi\n}\n\nis_floating() {\n\tif [[ -n $is_floating ]]; then\n\t\teval \"$is_floating $1\"\n\telif $auto_detect_wm; then\n\t\tif [[ $wm == i3 ]]; then\n\t\t\t# TODO make sure this returns 1 on failure\n\t\t\ti3-msg -t get_tree | gawk 'gsub(/{\"id\"/, \"\\n{\\\"id\\\"\")' | \\\n\t\t\t\tgawk '/focused\":true.*floating\":\"user_on/ {print $1}'\n\t\telif [[ $wm == bspwm ]]; then\n\t\t\tbspc query -T -n | grep '\"state\":\"floating\"'\n\t\telse\n\t\t\treturn 0\n\t\tfi\n\telse\n\t\treturn 0\n\tfi\n}\n\npre_float() {\n\tif [[ $wm == bspwm ]]; then\n\t\t# newest (using \"instance\" names)\n\t\tif [[ $class =~ [A-Z] ]]; then\n\t\t\tbspc rule -a \"$class\" -o state=floating\n\t\telse\n\t\t\tbspc rule -a \\*:\"$class\" -o state=floating\n\t\tfi\n\tfi\n}\n\npost_float() {\n\tif [[ $wm == awesome ]]; then\n\t\techo 'local awful = require(\"awful\") ; awful.client.floating.set(c, true)' | \\\n\t\t\tawesome-client\n\telif [[ $wm == i3 ]]; then\n\t\ti3-msg \"[id=$wid] floating enable\" > /dev/null\n\telif [[ $wm == herbstluftwm ]]; then\n\t\therbstclient fullscreen on\n\tfi\n}\n\npre_create() {\n\tif [[ -n $pre_create ]]; then\n\t\teval \"$pre_create\"\n\tfi\n}\n\npost_create() {\n\tif [[ -n $post_create ]]; then\n\t\teval \"$post_create\"\n\tfi\n}\n\npre_map() {\n\tfloat=${1:-true}\n\tif [[ $float != false ]]; then\n\t\tif [[ -n $pre_float ]]; then\n\t\t\teval \"$pre_float\"\n\t\telif $auto_detect_wm; then\n\t\t\tpre_float\n\t\tfi\n\tfi\n\tif [[ -n $pre_map ]]; then\n\t\teval \"$pre_map\"\n\tfi\n}\n\nmap_and_post_map() {\n\t# always reset geometry\n\tmap_and_reset_geometry\n\tfloat=${1:-true}\n\tif [[ $float != false ]]; then\n\t\tif [[ -n $post_float ]]; then\n\t\t\teval \"$post_float\"\n\t\telif $auto_detect_wm; then\n\t\t\tpost_float\n\t\tfi\n\tfi\n\t# need to set geometry again if wasn't previously floating\n\tmap_and_reset_geometry\n\tif [[ -n $post_map ]]; then\n\t\teval \"$post_map\"\n\tfi\n}\n\npre_unmap() {\n\tif [[ -n $pre_unmap ]]; then\n\t\teval \"$pre_unmap\"\n\tfi\n}\n\npost_unmap() {\n\tif [[ -n $post_unmap ]]; then\n\t\teval \"$post_unmap\"\n\tfi\n}\n\nunmap() {\n\thide=$1\n\tpre_unmap\n\txdotool windowunmap \"$wid\"\n\tif [[ -z $hide ]]; then\n\t\tif [[ $wm == herbstluftwm ]]; then\n\t\t\t# TODO should only happen if wasn't previously fullscreen\n\t\t\therbstclient fullscreen off\n\t\tfi\n\tfi\n\tpost_unmap\n}\n\n# Old notes:\n# floating WMs that may move a window after remapping it\n# pekwm|Fluxbox|Blackbox|xfwm4|Metacity|FVWM|Sawfish|GoomwW|Mutter|GNOME Shell|Mutter \\(Muffin\\)|KWin|Metacity \\(Marco\\)|[Cc]ompiz|bspwm\n# floating WMs that may both move and resize a window after remapping it\n# Openbox\n\n# * General Helper Functions\nget_class_name() {\n\tlocal class\n\tclass=$(xprop -id \"$1\" WM_CLASS 2> /dev/null)\n\tclass=${class##* }\n\tclass=${class//\\\"/}\n\techo \"$class\"\n}\n\nget_visibility() {\n\txwininfo -id \"$1\" 2> /dev/null | gawk '/Map State/ {print $3}'\n}\n\nmaybe_cancel_auto_show() {\n\tif $cancel_auto_show && \\\n\t\t\t[[ $1 == $(cat \"$MUTDROP_PATH\"/auto_hidden/wid 2> /dev/null) ]]; then\n\t\t# shellcheck disable=SC2188\n\t\t> \"$MUTDROP_PATH\"/auto_hidden/wid\n\tfi\n}\n\n# * Dropdown Initialization\n# TODO ideally this function wouldn't be necessary and some external program\n# (something like xtoolwait) could be used to return the wid\ncreate_win_return_wid() {\n\tlocal blacklist program_command pid visible_wid wids wid program_wid\n\t# blacklist all existing wids of program\n\t# (for programs where one pid shares all wids)\n\tblacklist=$(xdotool search --classname \"$program\")\n\t# for programs where $! won't always work (e.g. one pid for all windows)\n\tif [[ $program =~ ^(tilix|xfce4-terminal)$ ]]; then\n\t\tpid=$(pgrep -x \"$program\")\n\telif [[ $program == urxvtc ]]; then\n\t\tblacklist=$(xdotool search --classname urxvtd)\n\t\tpid=$(pgrep -x urxvtd)\n\telif [[ $program == xiatec ]]; then\n\t\tpid=$(pgrep -x xiate)\n\telif [[ $program == chromium ]]; then\n\t\t# this may work fine\n\t\t# pid=$(pgrep -xo chromium)\n\t\tpid=$(pgrep -xa chromium | gawk '!/--type/ {print $1}')\n\telif [[ $program == chromium-browser ]]; then\n\t\tpid=$(pgrep -xa chromium-browse | gawk '!/--type/ {print $1}')\n\telif [[ $program =~ ^google-chrome ]]; then\n\t\tpid=$(pgrep -xa chrome | gawk '!/--type/ {print $1}')\n\telif [[ $program =~ ^emacsclient ]]; then\n\t\tblacklist=$(xdotool search --classname emacs)\n\tfi\n\t# need to redirect stdout or function won't return\n\t\"$@\" > /dev/null &\n\tif [[ -z $pid ]]; then\n\t\t# for normal programs\n\t\t# also for when one of the programs above hadn't already been started\n\t\tpid=$!\n\tfi\n\tvisible_wid=false\n\twhile : ; do\n\t\tif [[ $program == gnome-terminal ]]; then\n\t\t\t# only 1 pid; changes at some point after first run\n\t\t\t# actual process name for me is gnome-terminal-\n\t\t\tpid=$(pgrep gnome-terminal)\n\t\tfi\n\t\tif [[ $program == discord ]]; then\n\t\t\twids=$(xdotool search --classname discord)\n\t\t\tblacklist=\n\t\telif [[ $program == qutebrowser ]]; then\n\t\t\t# one pid, but can't use for getting wids with xdotool\n\t\t\twids=$(xdotool search --classname qutebrowser)\n\t\telif [[ $program =~ ^emacsclient ]]; then\n\t\t\twids=$(xdotool search --classname emacs)\n\t\telse\n\t\t\twids=$(xdotool search --pid \"$pid\")\n\t\tfi\n\t\tif [[ -n $wids ]]; then\n\t\t\twhile read -r wid; do\n\t\t\t\tif [[ ! $blacklist =~ (^|$'\\n')$wid($|$'\\n') ]] && \\\n\t\t\t\t\t   [[ $(get_visibility \"$wid\") == IsViewable ]]; then\n\t\t\t\t\tvisible_wid=true\n\t\t\t\t\tprogram_wid=$wid\n\t\t\t\tfi\n\t\t\tdone <<< \"$wids\"\n\t\tfi\n\t\tif $visible_wid; then\n\t\t\tbreak\n\t\tfi\n\t\tsleep 0.01\n\tdone\n\t# workaround for urxvt tabbed plugin using -embed\n\tif [[ $program =~ urxvt ]] && [[ -n $program_wid ]]; then\n\t\tmaybe_program_wid=$(xprop -id \"$program_wid\" | \\\n\t\t\t\t\t\t\t\tgawk -F '\"' '/-embed/ {print $6}')\n\t\tif [[ -n $maybe_program_wid ]]; then\n\t\t\tprogram_wid=$maybe_program_wid\n\t\tfi\n\tfi\n\techo -n \"$program_wid\"\n}\n\nprogram_start() {\n\tlocal program_command tmux_command wid\n\tprogram_command=(\"$program\")\n\tif [[ $program == alacritty ]]; then\n\t\t# prevent alacritty from resizing the terminal to 80x24\n\t\tprogram_command+=(-d 0 0)\n\tfi\n\tprogram_command+=(\"${program_flags[@]}\")\n\tif [[ -n $session_name ]]; then\n\t\tsession_name=$(printf \"%q\" \"$session_name\")\n\t\ttmux_command=\"tmux attach-session -dt $session_name || \\\n\t\t\ttmuxifier load-session $session_name || \\\n\t\t\ttmuxinator start $session_name || \\\n\t\t\ttmux new-session -s $session_name\"\n\t\t# note: st will work with or without the -e flag (like kitty)\n\t\t# note: regular console works with or without quotes, but trinity's\n\t\t# konsole only works without quotes\n\t\tif [[ $program =~ ^(urxvt|alacritty|xiatec|st|lxterminal|qterminal|cool-retro-term|lilyterm|konsole$) ]]; then\n\t\t\tprogram_command+=(-e bash -c \"$tmux_command\")\n\t\telif [[ $program == kitty ]]; then\n\t\t\tprogram_command+=(bash -c \"$tmux_command\")\n\t\telse\n\t\t\tprogram_command+=(-e \"\\\"bash -c $tmux_command\\\"\")\n\t\tfi\n\tfi\n\twid=$(create_win_return_wid \"${program_command[@]}\")\n\tif [[ -n $name ]]; then\n\t\txdotool set_window --name \"$name\" \"$wid\"\n\tfi\n\techo \"$wid\" > \"$MUTDROP_PATH/$program$num\"\n\techo -n \"$wid\"\n}\n\ncurrent_create() {\n\t# turns active window into a dropdown\n\tlocal wid\n\twid=$(xdotool getactivewindow)\n\techo \"$wid\" > \"$MUTDROP_PATH\"/current\"$num\"\n\tget_class_name \"$wid\" > \"$MUTDROP_PATH\"/current\"$num\"_class\n\tif [[ -n $name ]]; then\n\t\txdotool set_window --name \"$name\" \"$wid\"\n\tfi\n\techo -n \"$wid\"\n}\n\nwid_toggle() {\n\t# used for -m option; at first tdrop assumes that there is a focused window\n\t# on the current desktop; if there isn't (and the WM doesn't have some way\n\t# to query the current monitor), this will be set to false, and tdrop will\n\t# have to find out the current monitor info after opening the dropdown\n\t# (currently, using xwininfo to find the position of a window is the only\n\t# WM-independent way I know to find out what the current monitor is)\n\tlocal focused_window_exists\n\tfocused_window_exists=true\n\n\t# deal with percentages/negatives when no -m\n\tif ! $monitor_aware; then\n\t\tlocal total_geo total_width total_height\n\t\ttotal_geo=$(xwininfo -root | gawk '/geometry/ {gsub(\"+*\",\"\"); print $2}')\n\t\t# total_width=$(echo \"$total_geo\" | gawk -F 'x' '{print $1}')\n\t\ttotal_width=${total_geo%x*}\n\t\t# total_height=$(echo \"$total_geo\" | gawk -F 'x' '{print $2}')\n\t\ttotal_height=${total_geo#*x}\n\t\tconvert_geometry_to_pixels \"$total_width\" \"$total_height\"\n\tfi\n\t# get saved window id if already created\n\tlocal exists visibility\n\t# cat to silence error\n\twid=$(cat \"$MUTDROP_PATH/$program$num\" 2> /dev/null)\n\texists=true\n\tif [[ -n $wid ]]; then\n\t\tvisibility=$(get_visibility \"$wid\")\n\t\t# sometimes xwininfo will still report a window as existing hence xprop check\n\t\tif [[ -z $visibility ]] || ! xprop -id \"$wid\" &> /dev/null; then\n\t\t\t# window no longer exists\n\t\t\texists=false\n\t\t\t# shellcheck disable=SC2188\n\t\t\t> \"$MUTDROP_PATH/$program$num\"\n\t\tfi\n\telse\n\t\texists=false\n\tfi\n\tif $exists; then\n\t\tif [[ $visibility =~ ^(IsUnMapped|IsUnviewable)$ ]]; then\n\t\t\t# visibility will be IsUnMapped on most WMs if the dropdown is open\n\t\t\t# on another desktop; may also be IsUnviewable\n\t\t\txdotool set_desktop_for_window \"$wid\" \"$(xdotool get_desktop)\"\n\t\t\tif [[ $(get_visibility \"$wid\") == IsUnMapped ]]; then\n\t\t\t\tpre_map\n\t\t\telse\n\t\t\t\txdotool windowactivate \"$wid\"\n\t\t\tfi\n\t\t\t# update here if possible so this doesn't cause a delay\n\t\t\t# between the window being remapped and resized\n\t\t\tif $monitor_aware; then\n\t\t\t\tupdate_geometry_settings_for_monitor || \\\n\t\t\t\t\tfocused_window_exists=false\n\t\t\tfi\n\t\t\tmap_and_post_map\n\t\t\t# cancel auto-show for a window when manually remapping it\n\t\t\tmaybe_cancel_auto_show \"$wid\"\n\t\t\tif ! $focused_window_exists; then\n\t\t\t\t# need to use dropdown as active window to get monitor info\n\t\t\t\tupdate_geometry_settings_for_monitor\n\t\t\t\t# always resize/move; if monitor hasn't changed then it won't be\n\t\t\t\t# necessary, but it won't cause problems either\n\t\t\t\tmap_and_reset_geometry\n\t\t\tfi\n\t\telse\n\t\t\tunmap\n\t\tfi\n\telse\n\t\t# necessary to deal with negative width or height\n\t\t# if creating on an empty desktop and can't determine the monitor,\n\t\t# must set temporary values for negative width and/or height\n\t\tlocal original_width original_height\n\t\tif $monitor_aware && ! update_geometry_settings_for_monitor; then\n\t\t\tfocused_window_exists=false\n\t\t\tif [[ $width =~ ^- ]]; then\n\t\t\t\toriginal_width=$width\n\t\t\t\twidth=100%\n\t\t\tfi\n\t\t\tif [[ $height =~ ^- ]]; then\n\t\t\t\toriginal_height=$height\n\t\t\t\theight=100%\n\t\t\tfi\n\t\tfi\n\t\t# make it\n\t\tpre_create\n\t\tif [[ $program == current ]]; then\n\t\t\twid=$(current_create)\n\t\t\tunmap\n\t\telse\n\t\t\tpre_map\n\t\t\twid=$(program_start)\n\t\t\tmap_and_post_map\n\t\t\t# update window dimensions if necessary\n\t\t\tif ! $focused_window_exists; then\n\t\t\t\twidth=${original_width:-$width}\n\t\t\t\theight=${original_height:-$height}\n\t\t\t\tupdate_geometry_settings_for_monitor\n\t\t\t\tmap_and_reset_geometry\n\t\t\tfi\n\t\tfi\n\t\tpost_create\n\tfi\n}\n\n# * Helper Functions for Auto Hiding/Showing\nget_geometry() {\n\t# so that won't float a tiled window later when showing\n\tif is_floating \"$1\" &> /dev/null; then\n\t\tlocal wininfo x y rel_x rel_y width height\n\t\twininfo=$(xwininfo -id \"$1\")\n\t\tx=$(echo \"$wininfo\" | gawk '/Absolute.*X/ {print $4}')\n\t\ty=$(echo \"$wininfo\" | gawk '/Absolute.*Y/ {print $4}')\n\t\trel_x=$(echo \"$wininfo\" | gawk '/Relative.*X/ {print $4}')\n\t\trel_y=$(echo \"$wininfo\" | gawk '/Relative.*Y/ {print $4}')\n\t\tif [[ $subtract_when_same != false ]]; then\n\t\t\t# behaviour works for most WMs (at least floating ones)\n\t\t\tx=$((x-rel_x))\n\t\t\ty=$((y-rel_y))\n\t\telse\n\t\t\t# don't subtract when abs and rel values are the same\n\t\t\t# necessary for WMs like bspwm and i3\n\t\t\tif [[ $x -ne $rel_x ]]; then\n\t\t\t\tx=$((x-rel_x))\n\t\t\tfi\n\t\t\tif [[ $y -ne $rel_y ]]; then\n\t\t\t\ty=$((y-rel_y))\n\t\t\tfi\n\t\tfi\n\t\twidth=$(xwininfo -id \"$(xdotool getactivewindow)\" | \\\n\t\t\t\t\tgawk '/Width/ {print $2}')\n\t\theight=$(xwininfo -id \"$(xdotool getactivewindow)\" | \\\n\t\t\t\t\t gawk '/Height/ {print $2}')\n\t\techo -n -e \"xoff=$x\\nyoff=$y\\nwidth=$width\\nheight=$height\"\n\telse\n\t\t# window is not floating; don't bother saving geometry\n\t\techo -n \"false\"\n\tfi\n}\n\n# set global xoff, yoff, width, and height based on stored values\nrestore_geometry() {\n\tlocal x_fix y_fix\n\teval \"$(< \"$MUTDROP_PATH\"/auto_hidden/geometry)\"\n\tif [[ -n $dec_fix ]]; then\n\t\tx_fix=$(echo \"$dec_fix\" | gawk -F \"x\" '{print $1}')\n\t\ty_fix=$(echo \"$dec_fix\" | gawk -F \"x\" '{print $2}')\n\t\txoff=$((xoff-x_fix))\n\t\tyoff=$((yoff-y_fix))\n\tfi\n}\n\ntoggle_auto_hide() {\n\tlocal no_hide\n\tno_hide=$(cat \"$MUTDROP_PATH\"/auto_hidden/no_hide 2> /dev/null)\n\tmkdir -p \"$MUTDROP_PATH\"/auto_hidden\n\tif [[ -z $no_hide ]]; then\n\t\techo \"true\" > \"$MUTDROP_PATH\"/auto_hidden/no_hide\n\telse\n\t\t# shellcheck disable=SC2188\n\t\t> \"$MUTDROP_PATH\"/auto_hidden/no_hide\n\tfi\n}\n\n# * Auto Hiding/Showing\nauto_hide() {\n\tlocal no_hide\n\tno_hide=$(cat \"$MUTDROP_PATH\"/auto_hidden/no_hide 2> /dev/null)\n\tif [[ -z $no_hide ]]; then\n\t\twid=$(xdotool getactivewindow)\n\t\tmkdir -p \"$MUTDROP_PATH\"/auto_hidden\n\t\techo \"$wid\" > \"$MUTDROP_PATH\"/auto_hidden/wid\n\t\tget_class_name \"$wid\" > \"$MUTDROP_PATH\"/auto_hidden/class\n\t\tget_geometry \"$wid\" > \"$MUTDROP_PATH\"/auto_hidden/geometry\n\t\tunmap hide\n\tfi\n}\n\nauto_show() {\n\tlocal no_hide\n\tno_hide=$(cat \"$MUTDROP_PATH\"/auto_hidden/no_hide 2> /dev/null)\n\tif [[ -z $no_hide ]]; then\n\t\tlocal was_floating\n\t\twid=$(< \"$MUTDROP_PATH\"/auto_hidden/wid)\n\t\tclass=$(< \"$MUTDROP_PATH\"/auto_hidden/class)\n\t\twas_floating=$(< \"$MUTDROP_PATH\"/auto_hidden/geometry)\n\t\trestore_geometry \"$wid\"\n\t\tpre_map \"$was_floating\"\n\t\tmap_and_post_map \"$was_floating\"\n\tfi\n}\n\n# * Hide All\nhide_all() {\n\tshopt -s nullglob dotglob\n\tlocal dropdowns\n\tdropdowns=(\"$MUTDROP_PATH\"/*)\n\tfor dropdown in \"${dropdowns[@]}\"; do\n\t\t# cat to silence errors\n\t\twid=$(cat \"$dropdown\" 2> /dev/null)\n\t\tunmap \"$wid\" 2> /dev/null\n\tdone\n\tshopt -u nullglob dotglob\n}\n\n# * Main\n# ** Setup\nset_wm\ndecoration_settings\nset_class\n\n# ** Primary Action\nif $clearwid; then\n\t# shellcheck disable=SC2188\n\t> \"$MUTDROP_PATH/$program$num\"\nelif [[ $program == toggle_auto_hide ]]; then\n\ttoggle_auto_hide\nelif [[ $program == auto_hide ]]; then\n\tauto_hide\nelif [[ $program == auto_show ]]; then\n\tauto_show\nelif [[ $program == hide_all ]]; then\n\thide_all\nelse\n\twid_toggle\nfi\n\n# vim is dumb\n# vim: set ft=sh noet:\n"
  },
  {
    "path": ".sbin/termop",
    "content": "#!/usr/bin/env bash\n\nscreen_1_width=$(xrandr | grep '*' | awk 'NR==1 {print substr($1,1,4)}')\nscreen_1_heigh=$(xrandr | grep '*' | awk 'NR==1 {print substr($1,6,4)}')\nscreen_2_width=$(xrandr | grep '*' | awk 'NR==2 {print substr($1,1,4)}')\nscreen_2_heigh=$(xrandr | grep '*' | awk 'NR==2 {print substr($1,6,4)}')\n\nwindow_width=$(expr $screen_1_width / 2)\nwindow_heigh=$(expr $screen_1_heigh / 2)\nxoffset=$(expr $screen_1_width / 2 - ${3:-$window_width} / 2)\n[[ -z \"$screen_2_heigh\" ]] && screen_2_heigh=0\nyoffset=$(expr $screen_1_heigh / 2 - ${4:-$window_heigh} / 2 )\n\ntmass -l /home/bresilla/.config/tmux load $2\nexec tdrop -a -m -w ${3:-$window_width} -h ${4:-$window_heigh} -x ${5:-$xoffset} -y ${6:-$yoffset} -n $2 -f \"-e tmux attach -t $2\" $1\n\n"
  },
  {
    "path": ".sbin/tux",
    "content": "#!/usr/bin/env bash\n# fzf-tmux: starts fzf in a tmux pane\n# usage: fzf-tmux [-u|-d [HEIGHT[%]]] [-l|-r [WIDTH[%]]] [--] [FZF OPTIONS]\n\nfail() {\n  >&2 echo \"$1\"\n  exit 2\n}\n\nfzf=\"$(command -v fzf 2> /dev/null)\" || fzf=\"$(dirname \"$0\")/fzf\"\n[[ -x \"$fzf\" ]] || fail 'fzf executable not found'\n\nargs=()\nopt=\"\"\nskip=\"\"\nswap=\"\"\nclose=\"\"\nterm=\"\"\n[[ -n \"$LINES\" ]] && lines=$LINES || lines=$(tput lines) || lines=$(tmux display-message -p \"#{pane_height}\")\n[[ -n \"$COLUMNS\" ]] && columns=$COLUMNS || columns=$(tput cols) || columns=$(tmux display-message -p \"#{pane_width}\")\n\nhelp() {\n  >&2 echo 'usage: fzf-tmux [-u|-d [HEIGHT[%]]] [-l|-r [WIDTH[%]]] [--] [FZF OPTIONS]\n\n  Layout\n    -u [HEIGHT[%]]  Split above (up)\n    -d [HEIGHT[%]]  Split below (down)\n    -l [WIDTH[%]]   Split left\n    -r [WIDTH[%]]   Split right\n\n    (default: -d 50%)\n'\n  exit\n}\n\nwhile [[ $# -gt 0 ]]; do\n  arg=\"$1\"\n  shift\n  [[ -z \"$skip\" ]] && case \"$arg\" in\n    -)\n      term=1\n      ;;\n    --help)\n      help\n      ;;\n    --version)\n      echo \"fzf-tmux (with fzf $(\"$fzf\" --version))\"\n      exit\n      ;;\n    -w*|-h*|-d*|-u*|-r*|-l*)\n      if [[ \"$arg\" =~ ^.[lrw] ]]; then\n        opt=\"-h\"\n        if [[ \"$arg\" =~ ^.l ]]; then\n          opt=\"$opt -d\"\n          swap=\"; swap-pane -D ; select-pane -L\"\n          close=\"; tmux swap-pane -D\"\n        fi\n      else\n        opt=\"\"\n        if [[ \"$arg\" =~ ^.u ]]; then\n          opt=\"$opt -d\"\n          swap=\"; swap-pane -D ; select-pane -U\"\n          close=\"; tmux swap-pane -D\"\n        fi\n      fi\n      if [[ ${#arg} -gt 2 ]]; then\n        size=\"${arg:2}\"\n      else\n        if [[ \"$1\" =~ ^[0-9]+%?$ ]]; then\n          size=\"$1\"\n          shift\n        else\n          continue\n        fi\n      fi\n\n      if [[ \"$size\" =~ %$ ]]; then\n        size=${size:0:((${#size}-1))}\n        if [[ -n \"$swap\" ]]; then\n          opt=\"$opt -p $(( 100 - size ))\"\n        else\n          opt=\"$opt -p $size\"\n        fi\n      else\n        if [[ -n \"$swap\" ]]; then\n          if [[ \"$arg\" =~ ^.l ]]; then\n            max=$columns\n          else\n            max=$lines\n          fi\n          size=$(( max - size ))\n          [[ $size -lt 0 ]] && size=0\n          opt=\"$opt -l $size\"\n        else\n          opt=\"$opt -l $size\"\n        fi\n      fi\n      ;;\n    --)\n      # \"--\" can be used to separate fzf-tmux options from fzf options to\n      # avoid conflicts\n      skip=1\n      continue\n      ;;\n    *)\n      args+=(\"$arg\")\n      ;;\n  esac\n  [[ -n \"$skip\" ]] && args+=(\"$arg\")\ndone\n\nif [[ -z \"$TMUX\" || \"$opt\" =~ ^-h && \"$columns\" -le 40 || ! \"$opt\" =~ ^-h && \"$lines\" -le 15 ]]; then\n  \"$fzf\" \"${args[@]}\"\n  exit $?\nfi\n\n# --height option is not allowed\nargs+=(\"--no-height\")\n\n# Handle zoomed tmux pane by moving it to a temp window\nif tmux list-panes -F '#F' | grep -q Z; then\n  zoomed=1\n  original_window=$(tmux display-message -p \"#{window_id}\")\n  tmp_window=$(tmux new-window -d -P -F \"#{window_id}\" \"bash -c 'while :; do for c in \\\\| / - '\\\\;' do sleep 0.2; printf \\\"\\\\r\\$c fzf-tmux is running\\\\r\\\"; done; done'\")\n  tmux swap-pane -t $tmp_window \\; select-window -t $tmp_window\nfi\n\nset -e\n\n# Clean up named pipes on exit\nid=$RANDOM\nargsf=\"${TMPDIR:-/tmp}/fzf-args-$id\"\nfifo1=\"${TMPDIR:-/tmp}/fzf-fifo1-$id\"\nfifo2=\"${TMPDIR:-/tmp}/fzf-fifo2-$id\"\nfifo3=\"${TMPDIR:-/tmp}/fzf-fifo3-$id\"\ncleanup() {\n  \\rm -f $argsf $fifo1 $fifo2 $fifo3\n\n  # Restore tmux window options\n  if [[ \"${#tmux_win_opts[@]}\" -gt 0 ]]; then\n    eval \"tmux ${tmux_win_opts[@]}\"\n  fi\n\n  # Remove temp window if we were zoomed\n  if [[ -n \"$zoomed\" ]]; then\n    tmux display-message -p \"#{window_id}\" > /dev/null\n    tmux swap-pane -t $original_window \\; \\\n      select-window -t $original_window \\; \\\n      kill-window -t $tmp_window \\; \\\n      resize-pane -Z\n  fi\n\n  if [ $# -gt 0 ]; then\n    trap - EXIT\n    exit 130\n  fi\n}\ntrap 'cleanup 1' SIGUSR1\ntrap 'cleanup' EXIT\n\nenvs=\"env TERM=$TERM \"\n[[ -n \"$FZF_DEFAULT_OPTS\"    ]] && envs=\"$envs FZF_DEFAULT_OPTS=$(printf %q \"$FZF_DEFAULT_OPTS\")\"\n[[ -n \"$FZF_DEFAULT_COMMAND\" ]] && envs=\"$envs FZF_DEFAULT_COMMAND=$(printf %q \"$FZF_DEFAULT_COMMAND\")\"\n\nmkfifo -m o+w $fifo2\nmkfifo -m o+w $fifo3\n\n# Build arguments to fzf\nopts=\"\"\nfor arg in \"${args[@]}\"; do\n  arg=\"${arg//\\\\/\\\\\\\\}\"\n  arg=\"${arg//\\\"/\\\\\\\"}\"\n  arg=\"${arg//\\`/\\\\\\`}\"\n  arg=\"${arg//$/\\\\$}\"\n  opts=\"$opts \\\"$arg\\\"\"\ndone\n\npppid=$$\necho -n \"trap 'kill -SIGUSR1 -$pppid' EXIT SIGINT SIGTERM;\" > $argsf\nclose=\"; trap - EXIT SIGINT SIGTERM $close\"\n\ntmux_win_opts=( $(tmux show-window-options remain-on-exit \\; show-window-options synchronize-panes | sed '/ off/d; s/^/set-window-option /; s/$/ \\\\;/') )\n\nif [[ -n \"$term\" ]] || [[ -t 0 ]]; then\n  cat <<< \"\\\"$fzf\\\" $opts > $fifo2; echo \\$? > $fifo3 $close\" >> $argsf\n  TMUX=$(echo $TMUX | cut -d , -f 1,2) tmux set-window-option synchronize-panes off \\;\\\n    set-window-option remain-on-exit off \\;\\\n    split-window $opt \"$envs bash -c 'cd $(printf %q \"$PWD\"); exec -a fzf bash $argsf'\" $swap \\\n    > /dev/null 2>&1\nelse\n  mkfifo $fifo1\n  cat <<< \"\\\"$fzf\\\" $opts < $fifo1 > $fifo2; echo \\$? > $fifo3 $close\" >> $argsf\n  TMUX=$(echo $TMUX | cut -d , -f 1,2) tmux set-window-option synchronize-panes off \\;\\\n    set-window-option remain-on-exit off \\;\\\n    split-window $opt \"$envs bash -c 'exec -a fzf bash $argsf'\" $swap \\\n    > /dev/null 2>&1\n  cat <&0 > $fifo1 &\nfi\ncat $fifo2\nexit \"$(cat $fifo3)\"\n\n"
  },
  {
    "path": ".sbin/wispot",
    "content": "#!/usr/bin/env bash\n\nif [[ $1 == \"init\" ]]; then\n    doas hotspot wlp2s0 wlp2s0 algorithm dyhere024 &> /tmp/wispot.out &\nelse\n    hotspot_name=$(hotspot --list-running | sed -n '3p' | awk '{print $1}')\n    if [[ -z $hotspot_name ]]; then\n        exit 1;\n    else\n        if [[ $1 == \"stop\" ]]; then\n        doas hotspot --stop $hotspot_name\n        elif [[ $1 == \"list\" ]]; then\n            hotspot --list-clients $hotspot_name;\n        elif [[ $1 == \"log\" ]]; then\n            cat /tmp/wispot.out;\n        elif [[ $1 == \"scan\" ]]; then\n            nmap 192.168.12.1-250\n        else\n            printf \"Usage: hotspot [options]\\n\\nOPTIONS:\\n  init \\t\\t Initialize hotspot\\n  stop \\t\\t Stop hotspot\\n  list \\t\\t list hotspot connected devices\\n  log \\t\\t show output logs\\n  scan \\t\\t nmap scan for devices\\n\"\n        fi\n    fi\nfi\n"
  },
  {
    "path": ".sbin/zathura",
    "content": "#!/bin/bash\nFILEPATH=$(readlink -f \"$1\")\nbash $HOME/dots/.config/zathura/genzathrc > $HOME/.config/zathura/zathurarc\n#bash $HOME/Dots/.config/zathura/genzathrc > $HOME/Dots/.config/zathura/zathurarc\n/usr/bin/zathura \"$FILEPATH\" &\n"
  },
  {
    "path": ".startup",
    "content": "#!/usr/bin/env sh\nMONITOR1=eDP1\nMONITOR2=DP1\n\nrefresh() {\n    #SHORTCUTS\n    killall -q sxhkd\n    while pgrep -x sxhkd >/dev/null; do sleep 1; done\n    sxhkd -c /home/bresilla/.config/sxhkd/sxhkdrc &\n\n    #MONITORS\n    xrandr --output eDP1 --primary --mode 3840x2160 --pos 0x2160 --rotate normal --output DP1 --mode 3840x2160 --pos 0x0 --rotate normal --output DP2 --off --output HDMI1 --off --output HDMI2 --off --output VIRTUAL1 --off &\n\n    #TASKBAR\n    killall -q polybar &\n    while pgrep -x polybar >/dev/null; do sleep 1; done\n    MONITOR=$MONITOR1 polybar -r -c ~/.config/polybar/main main &\n    MONITOR=$MONITOR2 polybar -r -c ~/.config/polybar/main main &\n    MONITOR=$MONITOR1 polybar -r -c ~/.config/polybar/center workspaces &\n    MONITOR=$MONITOR2 polybar -r -c ~/.config/polybar/center workspaces &\n\n    #COMPTOSITOR\n    killall -q picom\n    while pgrep -x picom >/dev/null; do sleep 1; done\n    picom --config ~/.config/compton/compton &\n\n    #WALLPAPER\n    pkill -f loopwall\n    loopwall /home/bresilla/data/WALL 300 &\n\n    #NOTIFICATION\n    killall -q dunst\n    while pgrep -x dunst >/dev/null; do sleep 1; done\n    dunst -config /home/bresilla/.config/dunst/dunstrc &\n\n    #WIDGETS\n    # killall -q conky\n    # while pgrep -x conky >/dev/null; do sleep 1; done\n    # conky -c /home/bresilla/.config/conky/conky &\n}\n\nrunonce() {\n    #POLYKIT\n    /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &\n\n    #KEYBOARD\n    xset -dpms s off &\n    xset -r 118 & #Insert\n    xset -r 107 & #Print\n    setxkbmap de &\n    xmodmap -e \"remove control = Control_R\" && xmodmap -e \"add mod3 = Control_R\" &\n\n    #POINTER\n    xsetroot -cursor_name left_ptr &\n\n    #LIGHT\n    clight &\n\n    #CLIPBOARD\n    greenclip daemon &\n\n    #SSH-AGENT\n    eval \"$(ssh-agent)\"\n}\n\nif [ \"$1\" == \"-r\" ] ;then\n  refresh\nelse\n  runonce\nfi\n"
  },
  {
    "path": ".tmux.conf",
    "content": "set -g prefix M-Space\nset -g default-shell /usr/bin/zsh\n\n#behaviour\nset -g default-terminal \"tmux-256color\"\nsetw -g xterm-keys on\nset -s escape-time 10\nset -sg repeat-time 600\nset -s focus-events on\nset -g set-clipboard on\nset -q -g status-utf8 on\nset -g mouse on\n#set -g status off\nset -g history-limit 100000\nnew-session -n $HOST\nset -g renumber-windows on\nset -g status-keys vi\n\n#shotrcuts\nbind -n C-a send-keys \"_shko\" \\; send-keys \"Enter\" \\;\nbind -n C-s send-keys \"s !!\" \\; send-keys \"Enter\" \\;\n\n#navigation\nbind -n C-b split-window -h -c \"#{pane_current_path}\"\nbind -n C-v split-window -v -c \"#{pane_current_path}\"\nbind -n C-n new-window -c \"#{pane_current_path}\"\n\nbind -n C-End next-window\nbind -n C-Home previous-window\n\nis_vim=\"ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\\\S+\\\\/)?g?(view|n?vim?x?)(diff)?$'\"\nbind -n C-left if-shell \"$is_vim\" \"send-keys C-h\"  \"select-pane -L\"\nbind -n C-down if-shell \"$is_vim\" \"send-keys C-j\"  \"select-pane -D\"\nbind -n C-up if-shell \"$is_vim\" \"send-keys C-k\"  \"select-pane -U\"\nbind -n C-right if-shell \"$is_vim\" \"send-keys C-l\"  \"select-pane -R\"\n\n# bind -n C-left run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L\"\n# bind -n C-down run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D\"\n# bind -n C-up run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U\"\n# bind -n C-right run \"(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R\"\n\n###################################THEME\n#set -g window-style 'bg=colour233'\n#set -g window-active-style 'bg=black'\n\n# Status update interval\nset -g status-interval 1\n\n# Basic status bar colors\nset -g status-fg colour231\nset -g status-bg default\n\n# Left side of status bar\nset -g status-left-bg default\nset -g status-left-fg default\nset -g status-left-length 50\nset -g status-left \"#($HOME/.config/tmux/modules/STATUS LEFT) #(/home/bresilla/.config/tmux/modules/directory #{pane_current_path} 3) \"\n# set -g status-left \"#($HOME/.config/tmux/modules/STATUS LEFT)\"\n\n# Right side of status bar\nset -g status-right-bg default\nset -g status-right-fg default\nset -g status-right-length 50\nset -g status-right \"#($HOME/.config/tmux/modules/STATUS RIGHT) \"\n\n\n#\"\"\n# Window status\nset -g window-status-current-bg default\nset -g window-status-current-fg default\nset -g window-status-format \"#[fg=colour8,bg=default,bold] #(/home/bresilla/.config/tmux/modules/directory #{pane_current_path} 1) #[nobold,fg=default,bg=default]\"\n# set -g window-status-format \"#[fg=colour0,bg=colour8] #(/home/bresilla/.config/tmux/modules/directory #{pane_current_path} 1) #[fg=colour1,bg=default]\"\nset -g window-status-current-format \"#[fg=colour0,bg=colour7] #(/home/bresilla/.config/tmux/modules/directory #{pane_current_path} 1) #[fg=colour1,bg=default]\"\n# set -g window-status-current-format \"#[fg=colour1,bg=default,nobold]#[fg=colour15,bg=colour1]   \"■\"   #[fg=colour1,bg=default]\"\n\n\n# set -g window-status-format \"#[fg=colour59,bg=default,bold] #(/home/bresilla/.config/tmux/modules/directory #{pane_current_path} 1) #[nobold,fg=colour59,bg=default] \"\n# set -g window-status-current-format \"#[fg=colour0,bg=colour1]#[fg=colour1,bg=default,nobold]#[fg=colour15,bg=colour1] #(/home/bresilla/.config/tmux/modules/directory #{pane_current_path} 1) #[fg=colour1,bg=default]\"\n\n\n# set -g pane-border-status bottom\n# set -g pane-border-format '#(sh /home/bresilla/.config/tmux/modules/borderland --pane-current-path=#{pane_current_path} --pane-active=#{pane_active})'\n\n\n# Window separator\nset -g window-status-separator \"#[fg=colour8,bg=default]#[fg=default,bg=default]\"\n# set -g window-status-separator \"\"\n\n# Window status alignment\nset -g status-justify centre\n\n# Pane border\nset -g pane-border-bg default\nset -g pane-border-fg colour16\n\n# Active pane border\nset -g pane-active-border-bg default\nset -g pane-active-border-fg colour16\n\n# Message\nset -g message-bg colour25\nset -g message-fg white\n\n# Command message\nset -g message-command-bg colour25\nset -g message-command-fg white\n"
  },
  {
    "path": ".zshrc",
    "content": "#!/usr/bin/env zsh\n#--------------------------------------------------------------------------------------------------------------------\n###WAL COLORS\n(cat ~/.cache/wal/sequences &)\nsource ~/.cache/wal/colors.sh\n\n#--------------------------------------------------------------------------------------------------------------------\n###SCRIPTS PATH\nexport FPATH=~/.config/zsh:$FPATH\n###FUNCTIONS\n[ -d ~/.func ] && for file in ~/.func/*; do source \"$file\" ; done\n###PROFILE\n[[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'\n###DIRENV\neval \"$(direnv hook zsh)\"\n###MODULES\n[[ -e /opt/modules ]] && source /opt/modules/init/zsh\n\n###LAUNCHER\nif [[ -n ${LAUNCHER} ]]; then\n    PS1=\"> \"\n    bindkey -s \"^M\" \" & \\n\"\n    bind 'RETURN: \"\\e[4~ & \\n exit \\n\"'\n    return\nfi\n\n###CASE INSENSITIVE\nzstyle ':completion:*' completer _expand _complete _ignored\nzstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'\n# treat `#', `~' and `^' characters as part of patterns for filename generation\nsetopt extended_glob\nsetopt local_options\n# case insensitive matching when performing filename expansion\nsetopt no_case_glob\n# if command not found, but directory found, cd into this directory\nsetopt auto_cd\n# turn off automatic matching of ~/ directories (speeds things up)\nsetopt no_cdable_vars\n# prevents you from accidentally overwriting an existing file\nsetopt clobber\n# perform implicit tees or cats when multiple redirections are attempted\nsetopt multios\n# do not send the HUP signal to backround jobs on shell exit\nsetopt no_hup\n# parameter expansion, command substitution and arithmetic expansion are performed in prompts\nsetopt prompt_subst\n# do not prompt when rm *\nsetopt rmstarsilent\n\n#--------------------------------------------------------------------------------------------------------------------\n###HISTORY STAFF\nexport HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=1\nHISTFILE=~/.config/zsh_history\nHISTSIZE=100000\nSAVEHIST=100000\nsetopt append_history\nsetopt sharehistory\nsetopt incappendhistory\nsetopt inc_append_history\nsetopt hist_ignore_all_dups\nsetopt hist_reduce_blanks\nsetopt hist_ignore_space\nsetopt interactive_comments\nsetopt no_beep\n\n#--------------------------------------------------------------------------------------------------------------------\n###VI MODE\nbindkey -v\nDEFAULT_VI_MODE=viins\nKEYTIMEOUT=1\nset_vi_mode_cursor() {\n    case $KEYMAP in\n        vicmd)\n          printf \"\\033[2 q\"\n          ;;\n        main|viins)\n          printf \"\\033[3 q\"\n          ;;\n    esac\n}\n\nzle-keymap-select(){ set_vi_mode_cursor; zle reset-prompt; }\n\nzle-line-init(){ zle -K $DEFAULT_VI_MODE; }\n\nzle -N zle-line-init\nzle -N zle-keymap-select\n\nvi-append-x-selection(){ RBUFFER=$(xsel -o -p </dev/null)$RBUFFER; }\nzle -N vi-append-x-selection\nbindkey -M vicmd '^P' vi-append-x-selection\n\nvi-yank-x-selection(){ print -rn -- $CUTBUFFER | xsel -i -p; }\nzle -N vi-yank-x-selection\nbindkey -M vicmd '^Y' vi-yank-x-selection\n\n#--------------------------------------------------------------------------------------------------------------------\n# use SUDO for last command\nsudo-command-line() {\n    [[ -z $BUFFER ]] && zle up-history\n    if [[ $BUFFER == sudo\\ * ]]; then\n        LBUFFER=\"${LBUFFER#sudo }\"\n    elif [[ $BUFFER == $EDITOR\\ * ]]; then\n        LBUFFER=\"${LBUFFER#$EDITOR }\"\n        LBUFFER=\"sudoedit $LBUFFER\"\n    elif [[ $BUFFER == sudoedit\\ * ]]; then\n        LBUFFER=\"${LBUFFER#sudoedit }\"\n        LBUFFER=\"$EDITOR $LBUFFER\"\n    else\n        LBUFFER=\"sudo $LBUFFER\"\n    fi\n}\nzle -N sudo-command-line\nbindkey -s '\\es' sudo-command-line\n\n\n#-------------------------------------------------------------------------------------------------------------------\n###SEPARATOR LINES\nhrrrr() {\n    if (( COLS <= 0 )) ; then\n        COLS=\"${COLUMNS:-80}\"\n    fi\n    local WORD=\"$1\"\n    if [[ -n \"$WORD\" ]] ; then\n        local LINE=''\n        while (( ${#LINE} < COLS ))\n        do\n            LINE=\"$LINE$WORD\"\n        done\n        echo \"${LINE:0:$COLS}\"\n    fi\n}\nfunction precmd() { hrrrr '-'; }\n\n#--------------------------------------------------------------------------------------------------------------------\n###FUZZYFINDER\nfunction run_history(){ hister; zle reset-prompt; zle redisplay; }\nzle -N run_history\nbindkey -M vicmd '^t' run_history\nbindkey -M viins '^t' run_history\nbindkey '^t' run_history\n\nfunction run_killer(){ killer; zle reset-prompt; zle redisplay; }\nzle -N run_killer\nbindkey -M vicmd '^k' run_killer\nbindkey -M viins '^k' run_killer\nbindkey '^k' run_killer\n\nfunction run_find(){ finder; zle reset-prompt; zle redisplay; }\nzle -N run_find\nbindkey -M vicmd '^f' run_find\nbindkey -M viins '^f' run_find\nbindkey '^f' run_find\n\nfunction run_compile(){ compile FastDebug && build; zle reset-prompt; zle redisplay; }\nzle -N run_compile\nbindkey -M viins '^o' run_compile\nbindkey -M vicmd '^o' run_compile\nbindkey '^o' run_compile\n\npush-line-and-clear() { zle .push-line; zle .clear-screen }\nzle -N push-line-and-clear\nbindkey '^L' push-line-and-clear\n\n\n#--------------------------------------------------------------------------------------------------------------------\n###MODULES\nautoload -U colors && colors\nautoload compinit && compinit\n\n# TMOUT=1\nTRAPALRM() {\n    if [ \"$WIDGET\" != \"complete-word\" ]; then\n        zle reset-prompt\n    fi\n}\n\n[ -d ~/.config/zsh/insult ] && . ~/.config/zsh/insult\n[ -f ~/.config/zsh/async ] && autoload -U async\n[ -d ~/.config/zsh/cmdtime ] && source ~/.config/zsh/cmdtime/zsh-command-time.zsh\n[ -d ~/.config/zsh/visualvi ] && source ~/.config/zsh/visualvi/zsh-vimode-visual.zsh\n[ -d ~/.config/zsh/autosuggestions ] && source ~/.config/zsh/autosuggestions/zsh-autosuggestions.zsh\n[ -d ~/.config/zsh/syntax ] && source ~/.config/zsh/syntax/zsh-syntax-highlighting.zsh\n#[ -d ~/.config/zsh/almostontop ] && source ~/.config/zsh/almostontop/almostontop.plugin.zsh\n[ -d ~/.config/zsh/upsearch ] && source ~/.config/zsh/upsearch/zsh-history-substring-search.zsh\n[ -d ~/.config/zsh/upsearch ] && source ~/.config/zsh/upsearch/zsh-miscellaneous.zsh\n[ -d ~/.config/zsh/autopair ] && source ~/.config//zsh/autopair/autopair.zh\n[ -d ~/.config/zsh/completions ] && source ~/.config/zsh/completions/zsh-completions.zsh\n[ -d ~/.config/zsh/goto ] && source ~/.config/zsh/goto/goto.sh\n[ -d ~/.config/gitstatus ] && source ~/.config/gitstatus/gitstatus.prompt.zsh\n\n\n\n#--------------------------------------------------------------------------------------------------------------------\n###THEME\n[ -f ~/.config/promptline ] && source ~/.config/promptline\n\n\n\n#--------------------------------------------------------------------------------------------------------------------\n# Added by Zplugin's installer\n# source \"$HOME/.zplugin/bin/zplugin.zsh\"\n# autoload -Uz _zplugin\n# (( ${+_comps} )) && _comps[zplugin]=_zplugin\n### End of Zplugin installer's chunk\n# zplugin light zsh-users/zsh-autosuggestions\n# zplugin light zdharma/fast-syntax-highlighting\n# zplugin load zdharma/history-search-multi-word\n\n[[ -n \"${$(task ids)/[ ]*\\n/}\" ]] && task | tail -n+4 | head -n-2\n\nsource /home/bresilla/.config/broot/launcher/bash/br\n\n[ -f ~/.resh/shellrc ] && source ~/.resh/shellrc\n"
  },
  {
    "path": "README.md",
    "content": "my dotfiles :)\n\nwallpapers: (https://www.patreon.com/kvacm)\n\n![demo-1](.assets/1572819071.png)\n![demo-1](.assets/1572995575.png)\n![demo-1](.assets/1572819108.png)\n![demo-1](.assets/1572819230.png)\n![demo-1](.assets/1572819346.png)\n![demo-1](.assets/1572819598.png)\n![demo-1](.assets/1572819692.png)\n![demo-1](.assets/1572819830.png)\n![demo-1](.assets/1572820349.png)\n![demo-1](.assets/1572820981.png)\n![demo-1](.assets/1572821163.png)\n![demo-1](.assets/1572821316.png)\n"
  },
  {
    "path": "run_me.sh",
    "content": "#! /usr/bin/env bash\n\n[[ -d $DOTS ]] && echo \"No \\$DOTS directory found!\" && exit 1\n\nFILES=$DOTS/.config/*\nfor f in $FILES; do\n    ln -sf $f ~/.config/\n    echo $f\ndone\n\nFILES=$DOTS/.local/share/*\nfor f in $FILES; do\n    ln -sf $f ~/.local/share/\n    echo $f\ndone\n\nln -sf $DOTS/.func ~/.func\nln -sf $DOTS/.sbin ~/.sbin\nln -sf $DOTS/.bashrc ~/.bashrc\nln -sf $DOTS/.gitconfig ~/.gitconfig\nln -sf $DOTS/.profile ~/.profile\nln -sf $DOTS/.startup ~/.startup\nln -sf $DOTS/.tmux.conf ~/.tmux.conf\nln -sf $DOTS/.zshrc ~/.zshrc\n\n\nln -sf $DOTS/.other/.bin ~/.bin\nln -sf $DOTS/.other/.fonts ~/.fonts\nln -sf $DOTS/.other/.gnupg ~/.gnupg\nln -sf $DOTS/.other/.mozilla ~/.mozilla\nln -sf $DOTS/.other/.password-store ~/.password-store\nln -sf $DOTS/.other/.ssh ~/.ssh\nln -sf $DOTS/.other/.tomb ~/.tomb\nln -sf $DOTS/.other/.vscode ~/.vscode\nln -sf $DOTS/.other/.wallpaper ~/.wallpaper\n"
  }
]