#!/bin/bash

# if [[ -n ${ZSH_VERSION-} ]]; then
# 	autoload -U +X bashcompinit && bashcompinit
# fi

_o() {
	local cur prev sessions

	sessions=$(o params)

	COMPREPLY=()

	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	COMPREPLY=( $(compgen -W "${sessions}" -- ${cur}) )
}

complete -o nospace -F _o o


_vims() {
	local cur prev sessions

	sessions=$(vims sessions)

	COMPREPLY=()

	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	COMPREPLY=( $(compgen -W "${sessions}" -- ${cur}) )
}

complete -o nospace -F _vims vims
