<commit_before>############################################
#             Functions
#############################################

#     autoload -U colors zsh/terminfo
#     colors
#
#     autoload -Uz vcs_info
#     zstyle ':vcs_info:*' enable git hg
#     zstyle ':vcs_info:*' check-for-changes true
#     zstyle ':vcs_info:git*' formats "%{${fg[cyan]}%}[%{${fg[green]}%}%s%{${fg[cyan]}%}][%{${fg[blue]}%}%r/%S%%{${fg[cyan]}%}][%{${fg[blue]}%}%b%{${fg[yellow]}%}%m%u%c%{${fg[cyan]}%}]%{$reset_color%}"
#
#     setopt prompt_subst
#
#     if [[ -n "$SSH_CLIENT"  ||  -n "$SSH2_CLIENT" ]]; then
#         p_host='%F{yellow}%M%f'
#     else
#         p_host='%F{cyan}%M%f'
#     fi
#
#     PS1=${(j::Q)${(Z:Cn:):-$' %F{cyan}[%f %(!.%F{red}%n%f.%F{cyan}%n%f) %F{cyan}@%f ${p_host} %F{cyan}][%f %F{blue}%~%f %F{cyan}]%f %(!.%F{cyan}%#%f.%F{cyan}%#%f) " " '}}
#
#     PS2=$'%_>'
#     RPROMPT=$'${vcs_info_msg_0_}'
# }


#######################################
# => tmux
#######################################
## shortcut for creating/attaching named sessions
t() {
  if [ -z "$1" ]; then
      tmux list-sessions
  else
      local _session="${1}"; shift
      # tmux has -t $1 && tmux attach -t $1 2>/dev/null || echo "Creating new session..." && tmux new -s $1
      tmux attach -t "${_session}" "${@}" 2>/dev/null || \
          echo "Starting new session..." && tmux new -s "${_session}"
  fi
}

# tmuxinator 'alias' funciton,
# adds a 'show' argument to show a configuration without open the editor
unalias mux 2>/dev/null
mux(){
    case "${1}" in
        "show")
	        cat "${HOME}/.config/tmuxinator/${2}.yml" 2>/dev/null
        ;;
        *)<commit_msg>fix tmux function<commit_after>############################################
#             Functions
#############################################

#     autoload -U colors zsh/terminfo
#     colors
#
#     autoload -Uz vcs_info
#     zstyle ':vcs_info:*' enable git hg
#     zstyle ':vcs_info:*' check-for-changes true
#     zstyle ':vcs_info:git*' formats "%{${fg[cyan]}%}[%{${fg[green]}%}%s%{${fg[cyan]}%}][%{${fg[blue]}%}%r/%S%%{${fg[cyan]}%}][%{${fg[blue]}%}%b%{${fg[yellow]}%}%m%u%c%{${fg[cyan]}%}]%{$reset_color%}"
#
#     setopt prompt_subst
#
#     if [[ -n "$SSH_CLIENT"  ||  -n "$SSH2_CLIENT" ]]; then
#         p_host='%F{yellow}%M%f'
#     else
#         p_host='%F{cyan}%M%f'
#     fi
#
#     PS1=${(j::Q)${(Z:Cn:):-$' %F{cyan}[%f %(!.%F{red}%n%f.%F{cyan}%n%f) %F{cyan}@%f ${p_host} %F{cyan}][%f %F{blue}%~%f %F{cyan}]%f %(!.%F{cyan}%#%f.%F{cyan}%#%f) " " '}}
#
#     PS2=$'%_>'
#     RPROMPT=$'${vcs_info_msg_0_}'
# }


#######################################
# => tmux
#######################################
## shortcut for creating/attaching named sessions
t() {
    [ -z "$1" ] && { tmux list-sessions; return 1; }

    local _session="${1}"; shift
    tmux attach -t "${_session}" "${@}" 2>/dev/null || \
        { echo "Starting new session..." && tmux new -s "${_session}" "$@" }
}

# tmuxinator 'alias' funciton,
# adds a 'show' argument to show a configuration without open the editor
unalias mux 2>/dev/null
mux(){
    case "${1}" in
        "show")
	        cat "${HOME}/.config/tmuxinator/${2}.yml" 2>/dev/null
        ;;
        *)
{'fraction_non_alphanumeric': 0.3412969283276451, 'fraction_numerical': 0.008377288240769469, 'mean_word_length': 3.56011315417256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '7416102', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1274, 'n_words': 223}