<commit_before>if (( $+commands[kubectl] )); then
  # TODO: 2022-01-05: remove this block
  # remove old generated files
  command rm -f "$ZSH_CACHE_DIR/kubectl_completion"

  # TODO: 2022-01-05: remove this bit of code as it exists in oh-my-zsh.sh
  # Add completions folder in $ZSH_CACHE_DIR
  command mkdir -p "$ZSH_CACHE_DIR/completions"
  (( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)

  # If the completion file does not exist, generate it and then source it
  # Otherwise, source it and regenerate in the background
  if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then
    kubectl completion zsh >| "$ZSH_CACHE_DIR/completions/_kubectl"
    source "$ZSH_CACHE_DIR/completions/_kubectl"
  else
    source "$ZSH_CACHE_DIR/completions/_kubectl"
    kubectl completion zsh >| "$ZSH_CACHE_DIR/completions/_kubectl" &|
  fi
fi

# This command is used a LOT both below and in daily life
alias k=kubectl<commit_msg>fix(kubectl): support completion for snap installs (#10727)<commit_after>if (( $+commands[kubectl] )); then
  # TODO: 2022-01-05: remove this block
  # remove old generated files
  command rm -f "$ZSH_CACHE_DIR/kubectl_completion"

  # TODO: 2022-01-05: remove this bit of code as it exists in oh-my-zsh.sh
  # Add completions folder in $ZSH_CACHE_DIR
  command mkdir -p "$ZSH_CACHE_DIR/completions"
  (( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath)

  # If the completion file does not exist, generate it and then source it
  # Otherwise, source it and regenerate in the background
  if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then
    kubectl completion zsh | tee "$ZSH_CACHE_DIR/completions/_kubectl" >/dev/null
    source "$ZSH_CACHE_DIR/completions/_kubectl"
  else
    source "$ZSH_CACHE_DIR/completions/_kubectl"
    kubectl completion zsh | tee "$ZSH_CACHE_DIR/completions/_kubectl" >/dev/null &|
  fi
fi

# This command is used a LOT both below and in daily life
alias k=kubectl
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.018353174603174604, 'mean_word_length': 4.436657681940701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5917760', 'n_tokens_mistral': 779, 'n_tokens_neox': 725, 'n_words': 197}