: <<'COMMENT'
# 環境構築

# パッケージインストール
yay -Syu pkgfile oh-my-zsh-git zsh-completions zsh-autosuggestions \
         zsh-syntax-highlighting zsh-theme-powerlevel10k-git

# command-not-foundを機能させるためにpkgfileの情報を更新する
sudo pkgfile --update

# oh-my-zshのカスタムを置くディレクトリを作る
sudo mkdir /usr/local/share/oh-my-zsh

# テーマ
sudo mkdir /usr/local/share/oh-my-zsh/themes
sudo ln -s /usr/share/zsh-theme-powerlevel10k /usr/local/share/oh-my-zsh/themes/powerlevel10k

# プラグイン
sudo mkdir /usr/local/share/oh-my-zsh/plugins
sudo ln -s /usr/share/zsh/plugins/zsh-syntax-highlighting \
           /usr/local/share/oh-my-zsh/plugins/zsh-syntax-highlighting
sudo ln -s /usr/share/zsh/plugins/zsh-autosuggestions \
           /usr/local/share/oh-my-zsh/plugins/zsh-autosuggestions
COMMENT

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

export ZSH="/usr/share/oh-my-zsh"
export ZSH_CUSTOM="/usr/local/share/oh-my-zsh"

# Uncomment the following line if pasting URLs and other text is messed up.
DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to display red dots whilst waiting for completion.
COMPLETION_WAITING_DOTS="true"

ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(zsh-syntax-highlighting zsh-autosuggestions history-substring-search command-not-found)

source $ZSH/oh-my-zsh.sh

# User configuration

# Ignore commands that start with spaces and duplicates.
export HISTCONTROL=ignoreboth

# Don't add certain commands to the history file.
export HISTORY_IGNORE="(\&|[bf]g|c|clear|history|exit|q|pwd|* --help)"

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
